diff options
-rw-r--r-- | RepositoryExternal.mk | 20 | ||||
-rw-r--r-- | external/liblangtag/ExternalPackage_liblangtag.mk | 20 | ||||
-rw-r--r-- | external/liblangtag/ExternalProject_langtag.mk | 9 | ||||
-rw-r--r-- | external/liblangtag/Module_liblangtag.mk | 9 | ||||
-rw-r--r-- | external/liblangtag/UnpackedTarball_langtag.mk | 11 | ||||
-rw-r--r-- | external/liblangtag/liblangtag-bundled-soname.patch.0 | 10 |
6 files changed, 73 insertions, 6 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index f8c2b4a109cd..c5051d163ce1 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1042,6 +1042,8 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\ liblangtag_data \ )) +ifeq ($(COM),MSC) + define gb_LinkTarget__use_liblangtag $(call gb_LinkTarget_set_include,$(1),\ $(LIBLANGTAG_CFLAGS) \ @@ -1052,6 +1054,24 @@ $(call gb_LinkTarget_use_external_project,$(1),langtag) endef +else + +$(eval $(call gb_Helper_register_packages_for_install,ooo,\ + liblangtag \ +)) + +define gb_LinkTarget__use_liblangtag +$(call gb_LinkTarget_set_include,$(1),\ + $(LIBLANGTAG_CFLAGS) \ + $$(INCLUDE) \ +) +$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS)) +$(call gb_LinkTarget_use_package,$(1),liblangtag) + +endef + +endif # MSC + define gb_ExternalProject__use_liblangtag $(call gb_ExternalProject_use_external_project,$(1),langtag) diff --git a/external/liblangtag/ExternalPackage_liblangtag.mk b/external/liblangtag/ExternalPackage_liblangtag.mk new file mode 100644 index 000000000000..d93c0d409f0a --- /dev/null +++ b/external/liblangtag/ExternalPackage_liblangtag.mk @@ -0,0 +1,20 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,liblangtag,langtag)) + +$(eval $(call gb_ExternalPackage_use_external_project,liblangtag,langtag)) + +ifeq ($(OS),MACOSX) +$(eval $(call gb_ExternalPackage_add_file,liblangtag,$(LIBO_LIB_FOLDER)/liblangtag.1.dylib,liblangtag/.libs/liblangtag.1.dylib)) +else ifeq ($(DISABLE_DYNLOADING),) +$(eval $(call gb_ExternalPackage_add_file,liblangtag,$(LIBO_LIB_FOLDER)/liblangtag-lo.so.1,liblangtag/.libs/liblangtag-lo.so.1.3.1)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/liblangtag/ExternalProject_langtag.mk b/external/liblangtag/ExternalProject_langtag.mk index 53a0fa305a9e..cf41f35e04e1 100644 --- a/external/liblangtag/ExternalProject_langtag.mk +++ b/external/liblangtag/ExternalProject_langtag.mk @@ -22,7 +22,10 @@ $(eval $(call gb_ExternalProject_register_targets,langtag,\ # Results in "cl : Command line error D8003 : missing source filename" $(call gb_ExternalProject_get_state_target,langtag,build): $(call gb_ExternalProject_run,build,\ - MAKE=$(MAKE) ./configure --disable-modules --disable-test --disable-introspection --disable-shared --enable-static --with-pic \ + MAKE=$(MAKE) ./configure --disable-modules --disable-test --disable-introspection --with-pic \ + $(if $(or $(DISABLE_DYNLOADING),$(filter MSC,$(COM))), \ + --disable-shared --enable-static, \ + --enable-shared --disable-static) \ $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ $(if $(filter TRUE,$(HAVE_GCC_BUILTIN_ATOMIC)),"lt_cv_has_atomic=yes","lt_cv_has_atomic=no") \ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) "ac_cv_va_copy=no") \ @@ -38,5 +41,9 @@ $(call gb_ExternalProject_get_state_target,langtag,build): $(if $(verbose),V=1) \ $(gb_Helper_set_ld_path) \ $(MAKE) \ + $(if $(filter MACOSX,$(OS)),\ + && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \ + $(EXTERNAL_WORKDIR)/liblangtag/.libs/liblangtag.1.dylib \ + ) \ ) # vim: set noet sw=4 ts=4: diff --git a/external/liblangtag/Module_liblangtag.mk b/external/liblangtag/Module_liblangtag.mk index 670ae3521496..a8c456663ffe 100644 --- a/external/liblangtag/Module_liblangtag.mk +++ b/external/liblangtag/Module_liblangtag.mk @@ -11,8 +11,15 @@ $(eval $(call gb_Module_Module,liblangtag)) $(eval $(call gb_Module_add_targets,liblangtag,\ UnpackedTarball_langtag \ - ExternalProject_langtag \ ExternalPackage_liblangtag_data \ + ExternalProject_langtag \ +)) + + +ifneq ($(COM),MSC) +$(eval $(call gb_Module_add_targets,liblangtag,\ + ExternalPackage_liblangtag \ )) +endif # vim: set noet sw=4 ts=4: diff --git a/external/liblangtag/UnpackedTarball_langtag.mk b/external/liblangtag/UnpackedTarball_langtag.mk index 541baa3736b6..ebcb0611c66f 100644 --- a/external/liblangtag/UnpackedTarball_langtag.mk +++ b/external/liblangtag/UnpackedTarball_langtag.mk @@ -15,10 +15,13 @@ $(eval $(call gb_UnpackedTarball_set_pre_action,langtag,\ $(GNUTAR) -x -j -f $(gb_UnpackedTarget_TARFILE_LOCATION)/$(LANGTAGREG_TARBALL) \ )) -# Currently no patches applied, if there were it would be: -#$(eval $(call gb_UnpackedTarball_add_patches,langtag,\ -# external/liblangtag/your-modification.patch \ -#)) +ifneq ($(OS),MACOSX) +ifneq ($(OS),WNT) +$(eval $(call gb_UnpackedTarball_add_patches,langtag,\ + external/liblangtag/liblangtag-bundled-soname.patch.0 \ +)) +endif +endif ifeq ($(OS),WNT) ifeq ($(COM),GCC) diff --git a/external/liblangtag/liblangtag-bundled-soname.patch.0 b/external/liblangtag/liblangtag-bundled-soname.patch.0 new file mode 100644 index 000000000000..4780d7a125f4 --- /dev/null +++ b/external/liblangtag/liblangtag-bundled-soname.patch.0 @@ -0,0 +1,10 @@ +--- liblangtag/Makefile.in.orig 2015-08-07 11:57:42.256742305 +0200 ++++ liblangtag/Makefile.in 2015-08-07 11:58:11.818741799 +0200 +@@ -638,6 +638,7 @@ + liblangtag_la_LDFLAGS = \ + $(LDFLAGS) \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ ++ -release lo \ + $(NULL) + + all: $(BUILT_SOURCES) |