icu: use libraries from WORKDIR

Change-Id: I7d996cc9412eadf89c8d04ee29abe1fa6f7d53db
This commit is contained in:
Michael Stahl 2013-10-23 15:00:29 +02:00
parent dddff6e51d
commit a92f80fdca
4 changed files with 66 additions and 67 deletions

View file

@ -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

View file

@ -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)

View file

@ -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 \

View file

@ -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: