Kaydet (Commit) 475e4b47 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Move i18nlangtag lib to URELIB

...as stoc/Library_javavm.mk depends on it since
9b09a217 "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/30272Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst a3b3e336
......@@ -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) \
......
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -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=
......
......@@ -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 \
) \
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment