diff options
Diffstat (limited to '')
-rw-r--r-- | external/liblangtag/ExternalPackage_liblangtag.mk | 20 | ||||
-rw-r--r-- | external/liblangtag/ExternalPackage_liblangtag_data.mk | 37 | ||||
-rw-r--r-- | external/liblangtag/ExternalProject_liblangtag.mk | 54 | ||||
-rw-r--r-- | external/liblangtag/Makefile | 7 | ||||
-rw-r--r-- | external/liblangtag/Module_liblangtag.mk | 25 | ||||
-rw-r--r-- | external/liblangtag/README | 10 | ||||
-rw-r--r-- | external/liblangtag/UnpackedTarball_liblangtag.mk | 35 | ||||
-rw-r--r-- | external/liblangtag/clang-cl.patch.0 | 41 | ||||
-rw-r--r-- | external/liblangtag/langtag-libtool-rpath.patch.0 | 23 | ||||
-rw-r--r-- | external/liblangtag/liblangtag-bundled-soname.patch.0 | 10 |
10 files changed, 262 insertions, 0 deletions
diff --git a/external/liblangtag/ExternalPackage_liblangtag.mk b/external/liblangtag/ExternalPackage_liblangtag.mk new file mode 100644 index 000000000..549f5eb36 --- /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,liblangtag)) + +$(eval $(call gb_ExternalPackage_use_external_project,liblangtag,liblangtag)) + +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.4.1)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/liblangtag/ExternalPackage_liblangtag_data.mk b/external/liblangtag/ExternalPackage_liblangtag_data.mk new file mode 100644 index 000000000..fee94a1b5 --- /dev/null +++ b/external/liblangtag/ExternalPackage_liblangtag_data.mk @@ -0,0 +1,37 @@ +# -*- 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_data,liblangtag)) + +$(eval $(call gb_ExternalPackage_use_external_project,liblangtag_data,liblangtag)) + +$(eval $(call gb_ExternalPackage_add_files,liblangtag_data,$(LIBO_SHARE_FOLDER)/liblangtag,\ + data/language-subtag-registry.xml \ +)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,liblangtag_data,$(LIBO_SHARE_FOLDER)/liblangtag/common/bcp47,\ + data/common/bcp47/calendar.xml \ + data/common/bcp47/collation.xml \ + data/common/bcp47/currency.xml \ + data/common/bcp47/number.xml \ + data/common/bcp47/timezone.xml \ + data/common/bcp47/transform.xml \ + data/common/bcp47/transform_ime.xml \ + data/common/bcp47/transform_keyboard.xml \ + data/common/bcp47/transform_mt.xml \ + data/common/bcp47/transform_private_use.xml \ + data/common/bcp47/variant.xml \ +)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,liblangtag_data,$(LIBO_SHARE_FOLDER)/liblangtag/common/supplemental,\ + data/common/supplemental/likelySubtags.xml \ + data/common/supplemental/supplementalMetadata.xml \ +)) + +# vim: set shiftwidth=4 tabstop=4 noexpandtab: diff --git a/external/liblangtag/ExternalProject_liblangtag.mk b/external/liblangtag/ExternalProject_liblangtag.mk new file mode 100644 index 000000000..9e2553860 --- /dev/null +++ b/external/liblangtag/ExternalProject_liblangtag.mk @@ -0,0 +1,54 @@ +# -*- 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_ExternalProject_ExternalProject,liblangtag)) + +$(eval $(call gb_ExternalProject_use_external,liblangtag,libxml2)) + +$(eval $(call gb_ExternalProject_use_autoconf,liblangtag,build)) + +$(eval $(call gb_ExternalProject_register_targets,liblangtag,\ + build \ +)) + +# disable ccache on windows, as it doesn't cope with the quoted defines +# liblangtag uses (-DBUILDDIR="\"$(abs_top_builddir)\"" and similar). +# Results in "cl : Command line error D8003 : missing source filename" +$(call gb_ExternalProject_get_state_target,liblangtag,build): + $(call gb_Trace_StartRange,liblangtrag,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + MAKE=$(MAKE) $(gb_RUN_CONFIGURE) ./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") \ + CFLAGS='$(CFLAGS) -pthread \ + $(call gb_ExternalProject_get_build_flags,liblangtag)' \ + $(gb_CONFIGURE_PLATFORMS) \ + $(if $(CROSS_COMPILING),$(if $(filter WNT,$(OS)),"lt_cv_c99_vsnprintf=yes" "ac_cv_va_copy=yes","ac_cv_va_copy=no")) \ + LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" \ + LIBXML2_LIBS="$(if $(filter WNT,$(OS)),-L$(call gb_UnpackedTarball_get_dir,libxml2)/win32/bin.msvc -llibxml2,$(LIBXML_LIBS))" \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________URELIB) \ + $(if $(filter-out LINUX FREEBSD,$(OS)),,LDFLAGS="-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath,\\"\$$\$$ORIGIN) \ + $(if $(filter-out SOLARIS,$(OS)),,LDFLAGS="-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-R$(COMMA)\\"\$$\$$ORIGIN) \ + && $(if $(filter WNT,$(OS)),\ + REAL_CC="$(shell cygpath -w $(lastword $(filter-out -%,$(CC))))" \ + REAL_CC_FLAGS="$(filter -%,$(CC))") \ + $(if $(verbose),V=1) \ + $(MAKE) \ + LIBO_TUNNEL_LIBRARY_PATH='$(subst ','\'',$(subst $$,$$$$,$(call gb_Helper_extend_ld_path,$(call gb_UnpackedTarball_get_dir,liblangtag)/liblangtag/.libs)))' \ + $(if $(filter MACOSX,$(OS)),\ + && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl URELIB \ + $(EXTERNAL_WORKDIR)/liblangtag/.libs/liblangtag.1.dylib \ + ) \ + ) + $(call gb_Trace_EndRange,liblangtrag,EXTERNAL) + +# vim: set noet sw=4 ts=4: diff --git a/external/liblangtag/Makefile b/external/liblangtag/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/liblangtag/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/liblangtag/Module_liblangtag.mk b/external/liblangtag/Module_liblangtag.mk new file mode 100644 index 000000000..dbb7dd5f1 --- /dev/null +++ b/external/liblangtag/Module_liblangtag.mk @@ -0,0 +1,25 @@ +# -*- 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_Module_Module,liblangtag)) + +$(eval $(call gb_Module_add_targets,liblangtag,\ + UnpackedTarball_liblangtag \ + ExternalPackage_liblangtag_data \ + ExternalProject_liblangtag \ +)) + + +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/README b/external/liblangtag/README new file mode 100644 index 000000000..254e40a22 --- /dev/null +++ b/external/liblangtag/README @@ -0,0 +1,10 @@ +From [https://bitbucket.org/tagoh/liblangtag]. An interface for BCP47 language tags. + +Updated IANA Language Subtag Registry files are available as +[https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry] +and per convention are stored as a data/language-subtag-registry file in a +language-subtag-registry-YYYY-MM-DD.tar.bz2 archive, with YYYY-MM-DD being the +File-Date entry of the file, for example +language-subtag-registry-2015-08-04.tar.bz2, and uploaded to the external +sources repository to be included in the build of liblangtag. See download.lst +LANGTAGREG_TARBALL and LANGTAGREG_SHA256SUM. diff --git a/external/liblangtag/UnpackedTarball_liblangtag.mk b/external/liblangtag/UnpackedTarball_liblangtag.mk new file mode 100644 index 000000000..16b9ea999 --- /dev/null +++ b/external/liblangtag/UnpackedTarball_liblangtag.mk @@ -0,0 +1,35 @@ +# -*- 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_UnpackedTarball_UnpackedTarball,liblangtag)) + +$(eval $(call gb_UnpackedTarball_set_tarball,liblangtag,$(LIBLANGTAG_TARBALL),,liblangtag)) + +$(eval $(call gb_UnpackedTarball_set_pre_action,liblangtag,\ + $(GNUTAR) -x -j -f $(gb_UnpackedTarget_TARFILE_LOCATION)/$(LANGTAGREG_TARBALL) \ +)) + +$(eval $(call gb_UnpackedTarball_update_autoconf_configs,liblangtag)) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,liblangtag,0)) + +ifneq ($(OS),MACOSX) +ifneq ($(OS),WNT) +$(eval $(call gb_UnpackedTarball_add_patches,liblangtag,\ + external/liblangtag/liblangtag-bundled-soname.patch.0 \ +)) +endif +endif + +$(eval $(call gb_UnpackedTarball_add_patches,liblangtag, \ + $(if $(SYSTEM_LIBXML),,external/liblangtag/langtag-libtool-rpath.patch.0) \ + external/liblangtag/clang-cl.patch.0 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/liblangtag/clang-cl.patch.0 b/external/liblangtag/clang-cl.patch.0 new file mode 100644 index 000000000..94348b65f --- /dev/null +++ b/external/liblangtag/clang-cl.patch.0 @@ -0,0 +1,41 @@ +--- liblangtag/lt-macros.h ++++ liblangtag/lt-macros.h +@@ -120,7 +120,7 @@ + * + * See the GNU C documentation for more details. + */ +-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) ++#if (defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))) || defined __clang__ + # define LT_GNUC_PRINTF(format_idx, arg_idx) \ + __attribute__((__format__ (__printf__, format_idx, arg_idx))) + # define LT_GNUC_UNUSED \ +@@ -136,7 +136,7 @@ + * explicit %NULL. + * See the GNU C documentation for details. + */ +-#if __GNUC__ >= 4 ++#if (defined __GNUC__ &&__GNUC__ >= 4) || defined __clang__ + # define LT_GNUC_NULL_TERMINATED \ + __attribute__((__sentinel__)) + #else /* !__GNUC__ */ +@@ -220,17 +220,17 @@ + * + * See the GNU C documentation for more details. + */ +-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) ++#if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) + #define LT_GNUC_DEPRECATED __attribute__((__deprecated__)) + #else + #define LT_GNUC_DEPRECATED + #endif +-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) ++#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) + #define LT_GNUC_DEPRECATED_FOR(f) __attribute__((deprecated("Use " #f " instead"))) + #else + #define LT_GNUC_DEPRECATED_FOR(f) LT_GNUC_DEPRECATED + #endif +-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) ++#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) + #define LT_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") diff --git a/external/liblangtag/langtag-libtool-rpath.patch.0 b/external/liblangtag/langtag-libtool-rpath.patch.0 new file mode 100644 index 000000000..368832b8b --- /dev/null +++ b/external/liblangtag/langtag-libtool-rpath.patch.0 @@ -0,0 +1,23 @@ +Prevent libtool from adding annoying stuff to RPATH + +--- configure ++++ configure +@@ -10730,6 +10730,7 @@ + else + ld_shlibs=no + fi ++hardcode_libdir_flag_spec= + ;; + + netbsd*) +--- data/Makefile.in ++++ data/Makefile.in +@@ -859,7 +859,7 @@ + @CROSS_COMPILING_TRUE@language-subtag-registry.xml: language-subtag-registry reg2xml.c Makefile + @CROSS_COMPILING_TRUE@ @echo Warning: Unable to rebuild $@ when cross-compiling + @CROSS_COMPILING_FALSE@@REBUILD_DATA_TRUE@language-subtag-registry.xml: language-subtag-registry reg2xml$(EXEEXT) Makefile +-@CROSS_COMPILING_FALSE@@REBUILD_DATA_TRUE@ $(AM_V_GEN) $(builddir)/reg2xml$(EXEEXT) $(srcdir)/language-subtag-registry $@.tmp || $(builddir)/reg2xml$(EXEEXT) $(builddir)/language-subtag-registry $@.tmp; \ ++@CROSS_COMPILING_FALSE@@REBUILD_DATA_TRUE@ $(AM_V_GEN) $(LIBO_TUNNEL_LIBRARY_PATH) $(builddir)/reg2xml$(EXEEXT) $(srcdir)/language-subtag-registry $@.tmp || $(LIBO_TUNNEL_LIBRARY_PATH) $(builddir)/reg2xml$(EXEEXT) $(builddir)/language-subtag-registry $@.tmp; \ + @CROSS_COMPILING_FALSE@@REBUILD_DATA_TRUE@ head -1 $@.tmp | grep -E '^<\?xml version'>/dev/null 2>&1 && mv $@.tmp $@ || (echo "E: $@ isn't an expected result"; rm $@.tmp) + @CROSS_COMPILING_FALSE@@REBUILD_DATA_FALSE@language-subtag-registry.xml: + @CROSS_COMPILING_FALSE@@REBUILD_DATA_FALSE@ @echo Warning: the rebuild of $@ is explicitly disabled. diff --git a/external/liblangtag/liblangtag-bundled-soname.patch.0 b/external/liblangtag/liblangtag-bundled-soname.patch.0 new file mode 100644 index 000000000..4780d7a12 --- /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) |