From a92f80fdca36976ecfaed84eaf29b14f5503603a Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 23 Oct 2013 15:00:29 +0200 Subject: [PATCH] icu: use libraries from WORKDIR Change-Id: I7d996cc9412eadf89c8d04ee29abe1fa6f7d53db --- RepositoryExternal.mk | 86 +++++++++++-------- configure.ac | 2 +- external/firebird/ExternalProject_firebird.mk | 2 +- external/icu/ExternalPackage_icu.mk | 43 +++------- 4 files changed, 66 insertions(+), 67 deletions(-) diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 764f98845126..639d22ae763f 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1192,60 +1192,74 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \ icudt \ icuin \ )) - -define gb_LinkTarget__use_icudata -$(call gb_LinkTarget_use_package,$(1),icu) -$(call gb_LinkTarget_use_libraries,$(1),\ - icudt \ -) - -endef -define gb_LinkTarget__use_icui18n -$(call gb_LinkTarget_use_package,$(1),icu) -$(call gb_LinkTarget_use_libraries,$(1),\ - icuin \ -) - -endef else $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \ icudata$(gb_ICU_suffix) \ icui18n$(gb_ICU_suffix) \ )) - -define gb_LinkTarget__use_icudata -$(call gb_LinkTarget_use_package,$(1),icu) -$(call gb_LinkTarget_use_libraries,$(1),\ - icudata$(gb_ICU_suffix) \ -) - -endef -define gb_LinkTarget__use_icui18n -$(call gb_LinkTarget_use_package,$(1),icu) -$(call gb_LinkTarget_use_libraries,$(1),\ - icui18n$(gb_ICU_suffix) \ -) - -endef endif - $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \ icutu$(gb_ICU_suffix) \ icuuc$(gb_ICU_suffix) \ )) -define gb_LinkTarget__use_icutu +define gb_LinkTarget__use_icudata $(call gb_LinkTarget_use_package,$(1),icu) -$(call gb_LinkTarget_use_libraries,$(1),\ - icutu$(gb_ICU_suffix) \ + +ifeq ($(OS),WNT) +$(call gb_LinkTarget_add_libs,$(1),\ + $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \ ) +else +$(call gb_LinkTarget_add_libs,$(1),\ + -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \ +) +endif endef + +define gb_LinkTarget__use_icui18n +$(call gb_LinkTarget_use_package,$(1),icu) + +ifeq ($(OS),WNT) +$(call gb_LinkTarget_add_libs,$(1),\ + $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \ +) +else +$(call gb_LinkTarget_add_libs,$(1),\ + -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \ +) +endif + +endef + +define gb_LinkTarget__use_icutu +$(call gb_LinkTarget_use_package,$(1),icu) + +ifeq ($(OS),WNT) +$(call gb_LinkTarget_add_libs,$(1),\ + $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icutu$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \ +) +else +$(call gb_LinkTarget_add_libs,$(1),\ + -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licutu$(gb_ICU_suffix) \ +) +endif + +endef + define gb_LinkTarget__use_icuuc $(call gb_LinkTarget_use_package,$(1),icu) -$(call gb_LinkTarget_use_libraries,$(1),\ - icuuc$(gb_ICU_suffix) \ + +ifeq ($(OS),WNT) +$(call gb_LinkTarget_add_libs,$(1),\ + $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \ ) +else +$(call gb_LinkTarget_add_libs,$(1),\ + -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \ +) +endif endef diff --git a/configure.ac b/configure.ac index 3f3d809db9c6..0bacf5087bda 100644 --- a/configure.ac +++ b/configure.ac @@ -9029,7 +9029,7 @@ else # external libs): the system icu-config is quite unhelpful and spits out # dozens of weird flags and also default path -I/usr/include ICU_CFLAGS="-I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common" - ICU_LIBS="" + ICU_LIBS="-L${WORKDIR}/UnpackedTarball/icu/source/lib" fi AC_SUBST(SYSTEM_ICU) AC_SUBST(SYSTEM_GENBRK) diff --git a/external/firebird/ExternalProject_firebird.mk b/external/firebird/ExternalProject_firebird.mk index bf6b45368ba7..7001c2348d80 100644 --- a/external/firebird/ExternalProject_firebird.mk +++ b/external/firebird/ExternalProject_firebird.mk @@ -38,7 +38,7 @@ $(call gb_ExternalProject_get_state_target,firebird,build): -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \ -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \ ,$(ICU_CPPFLAGS)) \ - -L$(OUTDIR)/lib \ + -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib \ " \ && ./configure \ --without-editline \ diff --git a/external/icu/ExternalPackage_icu.mk b/external/icu/ExternalPackage_icu.mk index 4af02f5a96fe..baf38c77aa25 100644 --- a/external/icu/ExternalPackage_icu.mk +++ b/external/icu/ExternalPackage_icu.mk @@ -12,13 +12,11 @@ icu_VERSION := $(ICU_MAJOR).$(ICU_MINOR)$(if $(ICU_MICRO),.$(ICU_MICRO)) $(eval $(call gb_ExternalPackage_ExternalPackage,icu,icu)) $(eval $(call gb_ExternalPackage_use_external_project,icu,icu)) -ifeq ($(OS),WNT) -ifeq ($(COM),GCC) -$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicudata.dll.a,source/stubdata/icudt.lib)) -$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicuuc.dll.a,source/lib/icuuc.lib)) -$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicui18n.dll.a,source/lib/icuin.lib)) -$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu.dll.a,source/lib/icutu.lib)) +ifneq ($(DISABLE_DYNLOADING),TRUE) +ifeq ($(OS),WNT) + +ifeq ($(COM),GCC) $(eval $(call gb_ExternalPackage_add_libraries_for_install,icu,bin,\ source/lib/icudt$(ICU_MAJOR).dll \ source/lib/icuuc$(ICU_MAJOR).dll \ @@ -30,14 +28,7 @@ $(eval $(call gb_ExternalPackage_add_files,icu,bin,\ source/bin/genbrk.exe \ source/bin/gencmn.exe \ )) - else -$(eval $(call gb_ExternalPackage_add_files,icu,lib,\ - source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \ - source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \ - source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \ - source/lib/icutu$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib\ -)) $(eval $(call gb_ExternalPackage_add_libraries_for_install,icu,bin,\ source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d)$(ICU_MAJOR).dll \ source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d)$(ICU_MAJOR).dll \ @@ -49,37 +40,31 @@ $(eval $(call gb_ExternalPackage_add_files,icu,bin,\ source/bin/genbrk.exe \ source/bin/gencmn.exe \ )) -endif -else # $(OS) -ifeq ($(DISABLE_DYNLOADING),TRUE) -$(eval $(call gb_ExternalPackage_add_files,icu,lib,\ - source/lib/libicudata.a \ - source/lib/libicuuc.a \ - source/lib/libicui18n.a \ - source/lib/libicutu.a \ -)) +endif # $(COM) + else ifeq ($(OS),ANDROID) + $(eval $(call gb_ExternalPackage_add_libraries_for_install,icu,lib,\ source/lib/libicudatalo.so \ source/lib/libicuuclo.so \ source/lib/libicui18nlo.so \ source/lib/libicutulo.so \ )) -else + +else # $(OS) != WNT/ANDROID + $(eval $(call gb_ExternalPackage_add_library_for_install,icu,lib/libicudata$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION))) -$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicudata$(gb_Library_DLLEXT),source/lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION))) $(eval $(call gb_ExternalPackage_add_library_for_install,icu,lib/libicuuc$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION))) -$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicuuc$(gb_Library_DLLEXT),source/lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION))) $(eval $(call gb_ExternalPackage_add_library_for_install,icu,lib/libicui18n$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION))) -$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicui18n$(gb_Library_DLLEXT),source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION))) $(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION))) -$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu$(gb_Library_DLLEXT),source/lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION))) $(eval $(call gb_ExternalPackage_add_files,icu,bin,\ source/bin/genccode \ source/bin/genbrk \ source/bin/gencmn \ )) -endif -endif + +endif # $(OS) +endif # DISABLE_DYNLOADING + # vim: set noet sw=4 ts=4: