summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-01-02 19:03:51 +0100
committerEike Rathke <erack@redhat.com>2013-01-02 19:23:03 +0100
commit79a3c9b186534c5e3adde2266d3e7fd6527b11b9 (patch)
treef2c688de53158b47994f970e897a51795f6913f0 /i18npool
parent3b1102ad193d55b98c7c72e706173353c35bb1b6 (diff)
partly revert 92a9b7780c6e13a4da3b12794342edbc4c09ef51 for ICU < 49
Re-enable build with ICU 4.6 and 4.8 ICU versions prior to 49 don't know Conditional_Japanese_Starter and Hebrew_Letter Also, the change in i18npool/CustomTarget_breakiterator.mk - -e "s#\[:LineBreak = Close_Punctuation:\]#\[& \[:LineBreak = Close_Parenthesis:\]\]#" \ with i18npool/source/breakiterator/data/line.txt -$CL = [:LineBreak = Close_Punctuation:] ; +$CL = [:LineBreak = Close_Parenthesis:]; did not produce equivalent results. Instead use $CP = [:LineBreak = Close_Parenthesis:]; $CL = [[:LineBreak = Close_Punctuation:] $CP]; Change-Id: I14fc14319ea34f23393264560452a79bb49fc3a7
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/CustomTarget_breakiterator.mk18
-rw-r--r--i18npool/qa/cppunit/test_breakiterator.cxx7
-rw-r--r--i18npool/source/breakiterator/data/line.txt3
3 files changed, 26 insertions, 2 deletions
diff --git a/i18npool/CustomTarget_breakiterator.mk b/i18npool/CustomTarget_breakiterator.mk
index a8fe3bde7504..da3c2248e66e 100644
--- a/i18npool/CustomTarget_breakiterator.mk
+++ b/i18npool/CustomTarget_breakiterator.mk
@@ -88,13 +88,29 @@ $(i18npool_BIDIR)/%.brk : $(i18npool_BIDIR)/%.txt $(call gb_ExternalExecutable_g
$(call gb_ExternalExecutable_get_command,genbrk) -r $< -o $@ $(if $(findstring s,$(MAKEFLAGS)),> /dev/null))
# fdo#31271 ")" reclassified in more recent Unicode Standards / ICU 4.4
-# * Prepend set empty as of Unicode Version 6.1 / ICU 4.9, which bails out if used.
+# * Prepend set empty as of Unicode Version 6.1 / ICU 49, which bails out if used.
# NOTE: strips every line with _word_ 'Prepend', including $Prepend
+# * Conditional_Japanese_Starter does not exist in ICU < 49, which bail out if used.
+# * Hebrew_Letter does not exist in ICU < 49, which bail out if used.
# NOTE: I sincerely hope there is a better way to avoid problems than this abominable
# sed substitution...
$(i18npool_BIDIR)/%.txt : \
$(SRCDIR)/i18npool/source/breakiterator/data/%.txt | $(i18npool_BIDIR)/.dir
sed -e ': dummy' \
+ $(if $(filter-out YES,$(ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER)),\
+ -e '/\[:LineBreak = Conditional_Japanese_Starter:\]/d' \
+ -e 's# $$CJ##' \
+ ) \
+ $(if $(filter-out YES,$(ICU_RECLASSIFIED_HEBREW_LETTER)),\
+ -e '/\[:LineBreak = Hebrew_Letter:\]/d' \
+ -e '/^$$HLcm =/d' \
+ -e '/^$$HLcm $$NUcm;/d' \
+ -e '/^$$NUcm $$HLcm;/d' \
+ -e '/^$$HL $$CM+;/d' \
+ -e 's# | $$HL\(cm\)\?##g' \
+ -e 's#$$HLcm ##g' \
+ -e 's# $$HL##g' \
+ ) \
$(if $(filter YES,$(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)),-e "/Prepend/d") \
$< > $@
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index 26e24397ed81..fa8dd56801ca 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -74,7 +74,9 @@ public:
#endif
CPPUNIT_TEST(testWordBoundaries);
+#if (U_ICU_VERSION_MAJOR_NUM > 4)
CPPUNIT_TEST(testKhmer);
+#endif
CPPUNIT_TEST(testJapanese);
CPPUNIT_TEST_SUITE_END();
private:
@@ -865,6 +867,10 @@ void TestBreakIterator::testNorthernThai()
}
#endif
+#if (U_ICU_VERSION_MAJOR_NUM > 4)
+// Not sure if any version earlier than 49 did have Khmer word boundary
+// dictionaries, 4.6 does not.
+
//A test to ensure that our khmer word boundary detection is useful
//https://bugs.freedesktop.org/show_bug.cgi?id=52020
void TestBreakIterator::testKhmer()
@@ -886,6 +892,7 @@ void TestBreakIterator::testKhmer()
CPPUNIT_ASSERT(aBounds.startPos == 3 && aBounds.endPos == 5);
}
+#endif
void TestBreakIterator::testJapanese()
{
diff --git a/i18npool/source/breakiterator/data/line.txt b/i18npool/source/breakiterator/data/line.txt
index b9f3a0585be9..148b7e1708a9 100644
--- a/i18npool/source/breakiterator/data/line.txt
+++ b/i18npool/source/breakiterator/data/line.txt
@@ -62,7 +62,8 @@ $BK = [:LineBreak = Mandatory_Break:];
$B2 = [:LineBreak = Break_Both:];
$CB = [:LineBreak = Contingent_Break:];
$CJ = [:LineBreak = Conditional_Japanese_Starter:];
-$CL = [:LineBreak = Close_Parenthesis:];
+$CP = [:LineBreak = Close_Parenthesis:];
+$CL = [[:LineBreak = Close_Punctuation:] $CP];
$CM = [:LineBreak = Combining_Mark:];
$CR = [:LineBreak = Carriage_Return:];
$EX = [:LineBreak = Exclamation:];