diff options
author | David Tardon <dtardon@redhat.com> | 2016-01-13 15:45:17 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-01-16 16:24:43 +0100 |
commit | 7d93bb8fcb406773d2dc68b25ab7cee6e114d482 (patch) | |
tree | 9c93a90be3f3fc143675bd17ea71d0b14a9f99d3 /external | |
parent | 2653ffec08f306f0f3f13fcb95bcedc45aebad1d (diff) |
build liblangtag as shared lib on linux and OS X
Change-Id: I3ae138d1a06d22be42a3cd6f565fba6950208fc6
Diffstat (limited to 'external')
-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 |
5 files changed, 53 insertions, 6 deletions
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) |