[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - external/liblangtag RepositoryExternal.mk

David Tardon dtardon at redhat.com
Mon Jan 25 09:14:50 PST 2016


 RepositoryExternal.mk                                 |   20 ++++++++++++++++++
 external/liblangtag/ExternalPackage_liblangtag.mk     |   20 ++++++++++++++++++
 external/liblangtag/ExternalProject_langtag.mk        |    9 +++++++-
 external/liblangtag/Module_liblangtag.mk              |    9 +++++++-
 external/liblangtag/UnpackedTarball_langtag.mk        |   11 ++++++---
 external/liblangtag/liblangtag-bundled-soname.patch.0 |   10 +++++++++
 6 files changed, 73 insertions(+), 6 deletions(-)

New commits:
commit eb1afda651bc9077efc1020825545a90752a0177
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Jan 13 15:45:17 2016 +0100

    build liblangtag as shared lib on linux and OS X
    
    Change-Id: I3ae138d1a06d22be42a3cd6f565fba6950208fc6
    (cherry picked from commit 7d93bb8fcb406773d2dc68b25ab7cee6e114d482)
    Reviewed-on: https://gerrit.libreoffice.org/21546
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 35417dd..c69b574 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1068,6 +1068,8 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
 	liblangtag_data \
 ))
 
+ifeq ($(COM),MSC)
+
 define gb_LinkTarget__use_liblangtag
 $(call gb_LinkTarget_use_unpacked,$(1),langtag)
 $(call gb_LinkTarget_set_include,$(1),\
@@ -1079,6 +1081,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 0000000..d93c0d4
--- /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 53a0fa3..cf41f35 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 670ae35..a8c4566 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 541baa3..ebcb061 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 0000000..4780d7a
--- /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)


More information about the Libreoffice-commits mailing list