summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-05-14 08:15:32 +0200
committerDavid Tardon <dtardon@redhat.com>2012-05-14 08:27:32 +0200
commitdd49c193de9c4515335ad4a29778ceff225e3c38 (patch)
tree26957750e4e080fe3d6adb8fddec25f371a84251 /i18npool
parent5a5d80ce5483696e0b05c31a0c4134c8ae4b82eb (diff)
make build work again with older ICU
The recent addition of Hebrew line breaking rules apparently does not work with genbrk from ICU 4.6. Maybe we should just require 4.x (where x is the first version where it is implemented) as minimum ICU version? IMHO it would be better than this insane (and fragile) filtering... Change-Id: Ia2adad3621fa7a2f319a07fb569b1f1c1eb6db7c
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/CustomTarget_breakiterator.mk35
1 files changed, 24 insertions, 11 deletions
diff --git a/i18npool/CustomTarget_breakiterator.mk b/i18npool/CustomTarget_breakiterator.mk
index 1c701847b409..3e0df9ee3b2f 100644
--- a/i18npool/CustomTarget_breakiterator.mk
+++ b/i18npool/CustomTarget_breakiterator.mk
@@ -98,18 +98,31 @@ $(i18npool_BIDIR)/%.brk : $(i18npool_BIDIR)/%.txt $(i18npool_GENBRKTARGET)
$(i18npool_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.
-# NOTE: strips every line with _word_ 'Prepend', including $Prepend
+# * Prepend set empty as of Unicode Version 6.1 / ICU 4.9, which bails out if used.
+# NOTE: strips every line with _word_ 'Prepend', including $Prepend
+# * Conditional_Japanese_Starter does not exist in ICU 4.6, which bails out if used.
+# * Hebrew_Letter does not exist in ICU 4.6, which bails 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
-ifeq ($(ICU_RECLASSIFIED_CLOSE_PARENTHESIS),YES)
-ifeq ($(ICU_RECLASSIFIED_PREPEND_SET_EMPTY),YES)
- sed "s#\[:LineBreak = Close_Punctuation:\]#\[\[:LineBreak = Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< | sed "/Prepend/d" > $@
-else
- sed "s#\[:LineBreak = Close_Punctuation:\]#\[\[:LineBreak = Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@
-endif
-else
- cp $< $@
-endif
+ sed -e ': dummy' \
+ $(if $(filter YES,$(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)),-e "s#\[:LineBreak = Close_Punctuation:\]#\[& \[:LineBreak = Close_Parenthesis:\]\]#") \
+ $(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") \
+ $< > $@
# vim: set noet sw=4 ts=4: