config_host.mk.in | 2 + configure.in | 8 +++++++ i18npool/CustomTarget_breakiterator.mk | 35 ++++++++++++++++++++++----------- 3 files changed, 34 insertions(+), 11 deletions(-)
New commits: commit dd49c193de9c4515335ad4a29778ceff225e3c38 Author: David Tardon <dtar...@redhat.com> Date: Mon May 14 08:15:32 2012 +0200 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 diff --git a/config_host.mk.in b/config_host.mk.in index da7b3b4..1112331 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -219,6 +219,8 @@ export ICU_MAJOR=@ICU_MAJOR@ export ICU_MICRO=@ICU_MICRO@ export ICU_MINOR=@ICU_MINOR@ export ICU_RECLASSIFIED_CLOSE_PARENTHESIS=@ICU_RECLASSIFIED_CLOSE_PARENTHESIS@ +export ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER=@ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER@ +export ICU_RECLASSIFIED_HEBREW_LETTER=@ICU_RECLASSIFIED_HEBREW_LETTER@ export ICU_RECLASSIFIED_PREPEND_SET_EMPTY=@ICU_RECLASSIFIED_PREPEND_SET_EMPTY@ export ILIB=@ILIB@ @x_Cygwin@ export INCLUDE= diff --git a/configure.in b/configure.in index ddf47e8..3659e5c 100644 --- a/configure.in +++ b/configure.in @@ -7691,6 +7691,8 @@ ICU_MINOR= ICU_MICRO= ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES" ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES" +ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="YES" +ICU_RECLASSIFIED_HEBREW_LETTER="YES" AC_MSG_CHECKING([which icu to use]) if test "$with_system_icu" = "yes"; then AC_MSG_RESULT([external]) @@ -7760,6 +7762,10 @@ You can use --with-system-icu-for-build=force to use it anyway.]) else ICU_RECLASSIFIED_PREPEND_SET_EMPTY="NO" fi + if test "$ICU_MAJOR" -eq 4 -a "$ICU_MINOR" -le 6; then + ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="NO" + ICU_RECLASSIFIED_HEBREW_LETTER="NO" + fi fi libo_MINGW_CHECK_DLL([ICUDATA], [icudata][$ICU_MAJOR][$ICU_MINOR]) @@ -7779,6 +7785,8 @@ AC_SUBST(ICU_MAJOR) AC_SUBST(ICU_MINOR) AC_SUBST(ICU_MICRO) AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS) +AC_SUBST([ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER]) +AC_SUBST([ICU_RECLASSIFIED_HEBREW_LETTER]) AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY) AC_SUBST([MINGW_ICUDATA_DLL]) AC_SUBST([MINGW_ICUI18N_DLL]) diff --git a/i18npool/CustomTarget_breakiterator.mk b/i18npool/CustomTarget_breakiterator.mk index 1c70184..3e0df9e 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: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits