[Libreoffice-commits] .: configure.in i18npool/source set_soenv.in

Jan Holesovsky kendy at kemper.freedesktop.org
Mon Oct 3 05:11:14 PDT 2011


 configure.in                           |   41 +++++++++++++++++++++------------
 i18npool/source/breakiterator/Makefile |   22 +++++++++++------
 set_soenv.in                           |    1 
 3 files changed, 42 insertions(+), 22 deletions(-)

New commits:
commit b08a764af938dab465fe89f431991014bc66d65f
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Mon Oct 3 14:09:29 2011 +0200

    Fix the build / host confusion around icu tools.

diff --git a/configure.in b/configure.in
index a628634..268641f 100644
--- a/configure.in
+++ b/configure.in
@@ -6027,9 +6027,13 @@ AC_SUBST(SYSTEM_SANE_HEADER)
 dnl ===================================================================
 dnl Check for system icu
 dnl ===================================================================
+SYSTEM_GENBRK=
+SYSTEM_GENCCODE=
+SYSTEM_GENCMN=
 ICU_MAJOR=
 ICU_MINOR=
 ICU_MICRO=
+ICU_RECLASSIFIED_CLOSE_PARENTHESIS=
 AC_MSG_CHECKING([which icu to use])
 if test -n "$with_system_icu" -o -n "$with_system_libs" && \
         test "$with_system_icu" != "no"; then
@@ -6039,19 +6043,6 @@ if test -n "$with_system_icu" -o -n "$with_system_libs" && \
     AC_MSG_CHECKING([for unicode/rbbi.h])
     AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)])
     AC_LANG_POP([C++])
-    AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
-    if test -z "$SYSTEM_GENBRK"; then
-        AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
-    fi
-    AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
-    if test -z "$SYSTEM_GENCCODE"; then
-        AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
-    fi
-    AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
-    if test -z "$SYSTEM_GENCMN"; then
-        AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
-    fi
-
     ICUPATH="$PATH"
     if test "$WITH_MINGW" = "yes" ; then
         ICUPATH="/usr/i686-w64-mingw32/sys-root/mingw/bin:$ICUPATH"
@@ -6070,10 +6061,31 @@ if test -n "$with_system_icu" -o -n "$with_system_libs" && \
         AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])
     fi
 
+    if test "$cross_compiling" != "yes"; then
+        # using the system icu tools can lead to version confusion, use the
+        # ones from the build environment when cross-compiling
+        AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
+        if test -z "$SYSTEM_GENBRK"; then
+            AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
+        fi
+        AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
+        if test -z "$SYSTEM_GENCCODE"; then
+            AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
+        fi
+        AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
+        if test -z "$SYSTEM_GENCMN"; then
+            AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
+        fi
+        if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "4"; then
+            ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
+        fi
+    fi
+
     MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS icui18n$ICU_MAJOR$ICU_MINOR.dll icuuc$ICU_MAJOR$ICU_MINOR.dll icudata$ICU_MAJOR$ICU_MINOR.dll"
 else
     AC_MSG_RESULT([internal])
-    SYSTEM_ICU=NO
+    SYSTEM_ICU="NO"
+    ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
     BUILD_TYPE="$BUILD_TYPE ICU"
 fi
 AC_SUBST(SYSTEM_ICU)
@@ -6083,6 +6095,7 @@ AC_SUBST(SYSTEM_GENCMN)
 AC_SUBST(ICU_MAJOR)
 AC_SUBST(ICU_MINOR)
 AC_SUBST(ICU_MICRO)
+AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
 
 dnl ===================================================================
 dnl Graphite
diff --git a/i18npool/source/breakiterator/Makefile b/i18npool/source/breakiterator/Makefile
index 8800a42..e292258 100644
--- a/i18npool/source/breakiterator/Makefile
+++ b/i18npool/source/breakiterator/Makefile
@@ -43,16 +43,22 @@ else
 	$(gb_Helper_execute)gendict $< $@
 endif
 
-ifeq ($(SYSTEM_ICU),YES)
-GENBRK := $(SYSTEM_GENBRK)
-GENCCODE := $(SYSTEM_GENCCODE)
-GENCMN := $(SYSTEM_GENCMN)
-USE_SED := $(shell if test "$(ICU_MAJOR)" -ge "5" -o "$(ICU_MAJOR)" = "4" -a "$(ICU_MINOR)" -ge "4"; then echo "YES"; fi)
-else
+ifeq ($(SYSTEM_GENBRK),)
 GENBRK := $(gb_Helper_execute)genbrk
+else
+GENBRK := $(SYSTEM_GENBRK)
+endif
+
+ifeq ($(SYSTEM_GENCODE),)
 GENCCODE := $(gb_Helper_execute)genccode
+else
+GENCCODE := $(SYSTEM_GENCCODE)
+endif
+
+ifeq ($(SYSTEM_GENCMN),)
 GENCMN := $(gb_Helper_execute)gencmn
-USE_SED := YES
+else
+GENCMN := $(SYSTEM_GENCMN)
 endif
 
 TEMPFILE := $(shell $(gb_MKTEMP))
@@ -78,7 +84,7 @@ OpenOffice_dat.c : $(subst .brk,_brk.c,$(BRKFILES))
 
 # fdo#31271 ")" reclassified in more recent ICU/Unicode Standards
 %.txt.p : $(realpath $(SRC_ROOT)/i18npool/source/breakiterator/data)/%.txt
-ifeq ($(USE_SED),YES)
+ifeq ($(ICU_RECLASSIFIED_CLOSE_PARENTHESIS),YES)
 	sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@
 else
 	cp $< $@
diff --git a/set_soenv.in b/set_soenv.in
index 6b4e4d1..cf0ef7f 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1879,6 +1879,7 @@ ToFile( "SYSTEM_ICU",        "@SYSTEM_ICU@",       "e" );
 ToFile( "ICU_MAJOR",         "@ICU_MAJOR@",        "e" );
 ToFile( "ICU_MINOR",         "@ICU_MINOR@",        "e" );
 ToFile( "ICU_MICRO",         "@ICU_MICRO@",        "e" );
+ToFile( "ICU_RECLASSIFIED_CLOSE_PARENTHESIS", "@ICU_RECLASSIFIED_CLOSE_PARENTHESIS@", "e" );
 ToFile( "SYSTEM_GENBRK",     "@SYSTEM_GENBRK@",    "e" );
 ToFile( "SYSTEM_GENCCODE",   "@SYSTEM_GENCCODE@",  "e" );
 ToFile( "SYSTEM_GENCMN",     "@SYSTEM_GENCMN@",    "e" );


More information about the Libreoffice-commits mailing list