[Libreoffice-commits] core.git: external/icu external/liblangtag RepositoryExternal.mk Repository.mk

Stephan Bergmann sbergman at redhat.com
Tue Oct 25 17:56:07 UTC 2016


 Repository.mk                                  |    2 +-
 RepositoryExternal.mk                          |   12 ++++++++----
 external/icu/ExternalPackage_icu.mk            |    4 ----
 external/icu/ExternalPackage_icu_ure.mk        |   17 ++++++++++++++++-
 external/icu/ExternalProject_icu.mk            |   13 ++++++++-----
 external/icu/icu4c-build.patch                 |    2 +-
 external/liblangtag/ExternalProject_langtag.mk |    4 ++--
 7 files changed, 36 insertions(+), 18 deletions(-)

New commits:
commit 475e4b477c6d7ae114c3ae51ba4872882af67a68
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 25 16:46:35 2016 +0200

    Move i18nlangtag lib to URELIB
    
    ...as stoc/Library_javavm.mk depends on it since
    9b09a217c79e8a35fc4de54c89ef49fbf8f72752 "Resolves: #i86470# Wrong Java locale
    when using 'nl' and 'fr'".  The i18nlangtag lib in turn depends on libs from
    external/liblangtag and external/icu, so those needed to be moved to URELIB,
    too.
    
    On Windows, the external icu package was already split into icu and icu_ure
    (because "libxml2 is in URE and depends on icuuc*.dll on Windows"), so use that
    splitting on all platforms.  (However, the corresponding changes that were
    necessary in RepositoryExternal.mk suggest that they had been missing for the
    split Windows case until now, and things had happened to work by accident?)
    
    On macOS, a library's install name reflects its (URELIB, OOO, ...) layer, and in
    external/icu/icu4c-build.patch there is only a single place to set that for all
    libs from external/icu.  This patch changes that from OOO to URELIB, but for the
    icui18n lib that should stay at OOO.  The hack to make it URELIB nonetheless
    works for now.  To clean this up again, either the whole of icu could go into
    URE (dropping the icu vs. icu_ure package split completely), or the macOS layers
    URELIB and OOO could be combined into one (as the libs end up in the same
    directory anyway).
    
    Change-Id: Idc262fa41481d06ba2cae86ad7629cdccb392c07
    Reviewed-on: https://gerrit.libreoffice.org/30272
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/Repository.mk b/Repository.mk
index 7c85976..61c2127 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -506,6 +506,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_URE,ure, \
 	affine_uno_uno \
 	$(if $(filter MSC,$(COM)),cli_uno) \
+	i18nlangtag \
 	$(if $(ENABLE_JAVA), \
 		java_uno \
 		jpipe \
@@ -560,7 +561,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
 	dict_zh \
 	embobj \
 	$(if $(ENABLE_JAVA),hsqldb) \
-	i18nlangtag \
 	i18nutil \
 	index_data \
 	$(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), libreofficekitgtk) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 16eb38a..e127aa2 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -998,7 +998,7 @@ gb_ExternalProject__use_liblangtag :=
 
 else # !SYSTEM_LIBLANGTAG
 
-$(eval $(call gb_Helper_register_packages_for_install,ooo,\
+$(eval $(call gb_Helper_register_packages_for_install,ure,\
 	liblangtag_data \
 ))
 
@@ -1016,7 +1016,7 @@ endef
 
 else
 
-$(eval $(call gb_Helper_register_packages_for_install,ooo,\
+$(eval $(call gb_Helper_register_packages_for_install,ure,\
 	liblangtag \
 ))
 
@@ -1442,7 +1442,7 @@ endef
 
 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
 define gb_LinkTarget__use_icudata
-$(call gb_LinkTarget_use_package,$(1),icu)
+$(call gb_LinkTarget_use_package,$(1),icu_ure)
 
 ifeq ($(OS),WNT)
 $(call gb_LinkTarget_add_libs,$(1),\
@@ -1472,7 +1472,7 @@ endif
 endef
 
 define gb_LinkTarget__use_icuuc
-$(call gb_LinkTarget_use_package,$(1),icu)
+$(call gb_LinkTarget_use_package,$(1),icu_ure)
 
 ifeq ($(OS),WNT)
 $(call gb_LinkTarget_add_libs,$(1),\
@@ -3816,6 +3816,7 @@ ifeq ($(SYSTEM_ICU),)
 define gb_Executable__register_gendict
 $(call gb_Executable_add_runtime_dependencies,gendict,\
 	$(call gb_Package_get_target_for_build,icu) \
+	$(call gb_Package_get_target_for_build,icu_ure) \
 )
 endef
 
@@ -3958,6 +3959,7 @@ $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTa
 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
 	$(call gb_Package_get_target_for_build,icu) \
+	$(call gb_Package_get_target_for_build,icu_ure) \
 )
 
 endef
@@ -3978,6 +3980,7 @@ $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/Unpacked
 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
 $(call gb_ExternalExecutable_add_dependencies,genccode,\
 	$(call gb_Package_get_target_for_build,icu) \
+	$(call gb_Package_get_target_for_build,icu_ure) \
 )
 
 endef
@@ -3998,6 +4001,7 @@ $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTa
 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
 	$(call gb_Package_get_target_for_build,icu) \
+	$(call gb_Package_get_target_for_build,icu_ure) \
 )
 
 endef
diff --git a/external/icu/ExternalPackage_icu.mk b/external/icu/ExternalPackage_icu.mk
index 4c90d8f..dcd4da2 100644
--- a/external/icu/ExternalPackage_icu.mk
+++ b/external/icu/ExternalPackage_icu.mk
@@ -29,15 +29,11 @@ endif # $(COM)
 else ifeq ($(OS),ANDROID)
 
 $(eval $(call gb_ExternalPackage_add_files,icu,$(LIBO_LIB_FOLDER),\
-	source/lib/libicudatalo.so \
-	source/lib/libicuuclo.so \
 	source/lib/libicui18nlo.so \
 ))
 
 else # $(OS) != WNT/ANDROID
 
-$(eval $(call gb_ExternalPackage_add_file,icu,$(LIBO_LIB_FOLDER)/libicudata$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION)))
-$(eval $(call gb_ExternalPackage_add_file,icu,$(LIBO_LIB_FOLDER)/libicuuc$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION)))
 $(eval $(call gb_ExternalPackage_add_file,icu,$(LIBO_LIB_FOLDER)/libicui18n$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION)))
 
 endif # $(OS)
diff --git a/external/icu/ExternalPackage_icu_ure.mk b/external/icu/ExternalPackage_icu_ure.mk
index a016c8c..fefe71a 100644
--- a/external/icu/ExternalPackage_icu_ure.mk
+++ b/external/icu/ExternalPackage_icu_ure.mk
@@ -7,7 +7,10 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-# libxml2 is in URE and depends on icuuc*.dll on Windows - extra package needed
+# libxml2 is in URE and depends on icuuc*.dll on Windows; the i18nlangtag lib is
+# in URE and depends on the icuuc lib (which in turn depends on the icudata lib)
+# on all platforms:
+
 $(eval $(call gb_ExternalPackage_ExternalPackage,icu_ure,icu))
 
 $(eval $(call gb_ExternalPackage_use_external_project,icu_ure,icu))
@@ -27,6 +30,18 @@ $(eval $(call gb_ExternalPackage_add_files,icu_ure,$(LIBO_URE_LIB_FOLDER),\
 ))
 endif # $(COM)
 
+else ifeq ($(OS),ANDROID)
+
+$(eval $(call gb_ExternalPackage_add_files,icu_ure,$(LIBO_URE_LIB_FOLDER),\
+	source/lib/libicudatalo.so \
+	source/lib/libicuuclo.so \
+))
+
+else # $(OS) != WNT/ANDROID
+
+$(eval $(call gb_ExternalPackage_add_file,icu_ure,$(LIBO_URE_LIB_FOLDER)/libicudata$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu_ure,$(LIBO_URE_LIB_FOLDER)/libicuuc$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION)))
+
 endif # $(OS)
 endif # DISABLE_DYNLOADING
 
diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk
index b0578c4..d5d98ff 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -90,11 +90,14 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
 			$(if $(filter IOS,$(OS)), \
 				--with-data-packaging=archive) \
 		&& $(MAKE) \
-		$(if $(filter MACOSX,$(OS)),&& $(PERL) \
-			$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
-			$(gb_Package_SOURCEDIR_icu)/source/lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION) \
-			$(gb_Package_SOURCEDIR_icu)/source/lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION) \
-			$(gb_Package_SOURCEDIR_icu)/source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION)) \
+		$(if $(filter MACOSX,$(OS)), \
+			&& $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl \
+				URELIB \
+				$(gb_Package_SOURCEDIR_icu)/source/lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION) \
+				$(gb_Package_SOURCEDIR_icu)/source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION) \
+			&& $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl \
+				OOO \
+				$(gb_Package_SOURCEDIR_icu)/source/lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION)) \
 	,source)
 
 endif
diff --git a/external/icu/icu4c-build.patch b/external/icu/icu4c-build.patch
index 1f6010b..103e9ae 100644
--- a/external/icu/icu4c-build.patch
+++ b/external/icu/icu4c-build.patch
@@ -51,7 +51,7 @@
 -else
 -LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET))
 -endif
-+LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @__________________________________________________OOO/$(notdir $(MIDDLE_SO_TARGET))
++LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @__________________________________________________URELIB/$(notdir $(MIDDLE_SO_TARGET))
  
  ## Compiler switch to embed a runtime search path
  LD_RPATH=
diff --git a/external/liblangtag/ExternalProject_langtag.mk b/external/liblangtag/ExternalProject_langtag.mk
index 5be74fb..eacf41d 100644
--- a/external/liblangtag/ExternalProject_langtag.mk
+++ b/external/liblangtag/ExternalProject_langtag.mk
@@ -31,7 +31,7 @@ $(call gb_ExternalProject_get_state_target,langtag,build):
 		$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) "ac_cv_va_copy=no") \
 		LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" \
 		LIBXML2_LIBS="$(if $(filter WNTMSC,$(OS)$(COM)),-L$(call gb_UnpackedTarball_get_dir,xml2)/win32/bin.msvc -llibxml2,$(LIBXML_LIBS))" \
-		$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
+		$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________URELIB) \
 		$(if $(filter-out LINUX FREEBSD,$(OS)),,LDFLAGS="-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath,\\"\$$\$$ORIGIN) \
 		$(if $(filter-out SOLARIS,$(OS)),,LDFLAGS="-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-R$(COMMA)\\"\$$\$$ORIGIN) \
 		$(if $(filter-out WNTGCC,$(OS)$(COM)),,LDFLAGS="-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2") \
@@ -42,7 +42,7 @@ $(call gb_ExternalProject_get_state_target,langtag,build):
 		   $(MAKE) \
                 LIBO_TUNNEL_LIBRARY_PATH='$(subst ','\'',$(call gb_Helper_extend_ld_path,$(call gb_UnpackedTarball_get_dir,langtag)/liblangtag/.libs))' \
 		$(if $(filter MACOSX,$(OS)),\
-			&& $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
+			&& $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl URELIB \
 				$(EXTERNAL_WORKDIR)/liblangtag/.libs/liblangtag.1.dylib \
 		) \
 	)


More information about the Libreoffice-commits mailing list