From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- external/libxslt/ExternalPackage_libxslt.mk | 32 +++++++++++++ external/libxslt/ExternalProject_libxslt.mk | 55 +++++++++++++++++++++++ external/libxslt/Makefile | 7 +++ external/libxslt/Module_libxslt.mk | 18 ++++++++ external/libxslt/README | 1 + external/libxslt/UnpackedTarball_libxslt.mk | 26 +++++++++++ external/libxslt/libxslt-1.1.26-memdump.patch | 10 +++++ external/libxslt/libxslt-config.patch.1 | 35 +++++++++++++++ external/libxslt/libxslt-internal-symbols.patch.1 | 13 ++++++ external/libxslt/libxslt-msvc-sym.patch.2 | 16 +++++++ external/libxslt/libxslt-msvc.patch.2 | 10 +++++ external/libxslt/rpath.patch.0 | 10 +++++ 12 files changed, 233 insertions(+) create mode 100644 external/libxslt/ExternalPackage_libxslt.mk create mode 100644 external/libxslt/ExternalProject_libxslt.mk create mode 100644 external/libxslt/Makefile create mode 100644 external/libxslt/Module_libxslt.mk create mode 100644 external/libxslt/README create mode 100644 external/libxslt/UnpackedTarball_libxslt.mk create mode 100644 external/libxslt/libxslt-1.1.26-memdump.patch create mode 100644 external/libxslt/libxslt-config.patch.1 create mode 100644 external/libxslt/libxslt-internal-symbols.patch.1 create mode 100644 external/libxslt/libxslt-msvc-sym.patch.2 create mode 100644 external/libxslt/libxslt-msvc.patch.2 create mode 100644 external/libxslt/rpath.patch.0 (limited to 'external/libxslt') diff --git a/external/libxslt/ExternalPackage_libxslt.mk b/external/libxslt/ExternalPackage_libxslt.mk new file mode 100644 index 000000000..c22a2e1b5 --- /dev/null +++ b/external/libxslt/ExternalPackage_libxslt.mk @@ -0,0 +1,32 @@ +# -*- 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,libxslt,libxslt)) + +$(eval $(call gb_ExternalPackage_use_external_project,libxslt,libxslt)) + +ifneq ($(DISABLE_DYNLOADING),TRUE) +ifeq ($(OS),MACOSX) +$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libxslt.1.dylib,libxslt/.libs/libxslt.1.dylib)) +$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.0.dylib,libexslt/.libs/libexslt.0.dylib)) +else ifeq ($(OS),WNT) +ifeq ($(COM),GCC) +$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libxslt.dll,libxslt/.libs/libxslt.dll)) +$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.dll,libexslt/.libs/libexslt.dll)) +else # COM=MSC +$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libxslt.dll,win32/bin.msvc/libxslt.dll)) +$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.dll,win32/bin.msvc/libexslt.dll)) +endif +else # OS!=WNT +$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libxslt.so.1,libxslt/.libs/libxslt.so.1.1.$(LIBXSLT_VERSION_MICRO))) +$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.20)) +endif +endif # DISABLE_DYNLOADING + +# vim: set noet sw=4 ts=4: diff --git a/external/libxslt/ExternalProject_libxslt.mk b/external/libxslt/ExternalProject_libxslt.mk new file mode 100644 index 000000000..842f60db2 --- /dev/null +++ b/external/libxslt/ExternalProject_libxslt.mk @@ -0,0 +1,55 @@ +# -*- 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,libxslt)) + +$(eval $(call gb_ExternalProject_use_external,libxslt,libxml2)) + +$(eval $(call gb_ExternalProject_register_targets,libxslt,\ + build \ +)) +ifeq ($(OS),WNT) +$(eval $(call gb_ExternalProject_use_nmake,libxslt,build)) + +$(call gb_ExternalProject_get_state_target,libxslt,build): + $(call gb_Trace_StartRange,libxslt,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + cscript /e:javascript configure.js \ + $(if $(MSVC_USE_DEBUG_RUNTIME),cruntime=/MDd) \ + $(if $(filter TRUE,$(ENABLE_DBGUTIL)),debug=yes) \ + vcmanifest=yes \ + lib=$(call gb_UnpackedTarball_get_dir,libxml2)/win32/bin.msvc \ + && nmake \ + ,win32) + $(call gb_Trace_EndRange,libxslt,EXTERNAL) +else # OS!=WNT +$(call gb_ExternalProject_get_state_target,libxslt,build): + $(call gb_Trace_StartRange,libxslt,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + $(gb_RUN_CONFIGURE) ./configure --without-crypto --without-python \ + $(gb_CONFIGURE_PLATFORMS) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ + LDFLAGS="$(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN" -Wl$(COMMA)-noinhibit-exec) \ + $(if $(SYSBASE),$(if $(filter SOLARIS LINUX,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl))" \ + $(if $(SYSBASE),CPPFLAGS="-I$(SYSBASE)/usr/include") \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)), \ + $(if $(filter iOS,$(OS)),LIBS="-liconv") \ + --disable-shared,--disable-static) \ + $(if $(SYSTEM_LIBXML),,--with-libxml-src=$(call gb_UnpackedTarball_get_dir,libxml2)) \ + && chmod 777 xslt-config \ + && $(MAKE) \ + $(if $(filter MACOSX,$(OS)),\ + && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \ + $(EXTERNAL_WORKDIR)/libxslt/.libs/libxslt.1.dylib \ + ) \ + ) + $(call gb_Trace_EndRange,libxslt,EXTERNAL) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/libxslt/Makefile b/external/libxslt/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/libxslt/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/libxslt/Module_libxslt.mk b/external/libxslt/Module_libxslt.mk new file mode 100644 index 000000000..970433892 --- /dev/null +++ b/external/libxslt/Module_libxslt.mk @@ -0,0 +1,18 @@ +# -*- 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,libxslt)) + +$(eval $(call gb_Module_add_targets,libxslt,\ + ExternalPackage_libxslt \ + ExternalProject_libxslt \ + UnpackedTarball_libxslt \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libxslt/README b/external/libxslt/README new file mode 100644 index 000000000..dd69a9d73 --- /dev/null +++ b/external/libxslt/README @@ -0,0 +1 @@ +Gnome xslt library written in C, from [http://xmlsoft.org/xslt/] diff --git a/external/libxslt/UnpackedTarball_libxslt.mk b/external/libxslt/UnpackedTarball_libxslt.mk new file mode 100644 index 000000000..7d39cb1e3 --- /dev/null +++ b/external/libxslt/UnpackedTarball_libxslt.mk @@ -0,0 +1,26 @@ +# -*- 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,libxslt)) + +$(eval $(call gb_UnpackedTarball_set_tarball,libxslt,$(LIBXSLT_TARBALL))) + +$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxslt)) + +$(eval $(call gb_UnpackedTarball_add_patches,libxslt,\ + external/libxslt/libxslt-config.patch.1 \ + external/libxslt/libxslt-internal-symbols.patch.1 \ + $(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED),\ + external/libxslt/libxslt-msvc-sym.patch.2, \ + external/libxslt/libxslt-msvc.patch.2) \ + external/libxslt/libxslt-1.1.26-memdump.patch \ + external/libxslt/rpath.patch.0 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libxslt/libxslt-1.1.26-memdump.patch b/external/libxslt/libxslt-1.1.26-memdump.patch new file mode 100644 index 000000000..28724f749 --- /dev/null +++ b/external/libxslt/libxslt-1.1.26-memdump.patch @@ -0,0 +1,10 @@ +--- misc/libxslt-1.1.26/xsltproc/xsltproc.c 2009-08-23 14:53:33.000000000 +0200 ++++ misc/build/libxslt-1.1.26/xsltproc/xsltproc.c 2013-01-18 14:16:12.202767222 +0100 +@@ -877,7 +877,6 @@ + xsltFreeSecurityPrefs(sec); + xsltCleanupGlobals(); + xmlCleanupParser(); +- xmlMemoryDump(); + return(errorno); + } + diff --git a/external/libxslt/libxslt-config.patch.1 b/external/libxslt/libxslt-config.patch.1 new file mode 100644 index 000000000..e4ce5d9e2 --- /dev/null +++ b/external/libxslt/libxslt-config.patch.1 @@ -0,0 +1,35 @@ +Hack the xslt-config to return paths into WORKDIR. + +--- a/xslt-config.in Wed Jan 17 14:18:26 2007 ++++ b/xslt-config.in Wed Jun 25 13:06:05 2008 +@@ -1,10 +1,16 @@ + #! /bin/sh + +-prefix=@prefix@ +-exec_prefix=@exec_prefix@ ++#prefix=@prefix@ ++#exec_prefix=@exec_prefix@ ++#exec_prefix_set=no ++#includedir=@includedir@ ++#libdir=@libdir@ ++ ++prefix=${WORKDIR}/UnpackedTarball/libxslt ++exec_prefix=${WORKDIR}/UnpackedTarball/libxslt + exec_prefix_set=no +-includedir=@includedir@ +-libdir=@libdir@ ++includedir=${WORKDIR}/UnpackedTarball/libxslt ++libdir=${WORKDIR}/UnpackedTarball/libxslt + + usage() + { +@@ -92,7 +98,8 @@ + libs="@XSLT_LIBDIR@ $libs" + fi + +- libs="$libs @EXTRA_LIBS@" ++ #libs="$libs @EXTRA_LIBS@" ++ libs="-L${libdir}/libxslt/.libs -L${libdir}/libexslt/.libs -lxslt -lm" + ;; + + *) diff --git a/external/libxslt/libxslt-internal-symbols.patch.1 b/external/libxslt/libxslt-internal-symbols.patch.1 new file mode 100644 index 000000000..84a15154d --- /dev/null +++ b/external/libxslt/libxslt-internal-symbols.patch.1 @@ -0,0 +1,13 @@ +--- xslt/libxslt/libxslt.syms.orig 2017-09-05 16:25:50.504966267 +0200 ++++ xslt/libxslt/libxslt.syms 2017-09-05 16:41:00.256895709 +0200 +@@ -497,5 +497,10 @@ + + # pattern + xsltCompMatchClearCache; ++ ++# Solaris ld needs explicit auto-reduction (or, alternatively, "-B local") ++ local: ++ *; ++ + } LIBXML2_1.1.30; + diff --git a/external/libxslt/libxslt-msvc-sym.patch.2 b/external/libxslt/libxslt-msvc-sym.patch.2 new file mode 100644 index 000000000..636c22a82 --- /dev/null +++ b/external/libxslt/libxslt-msvc-sym.patch.2 @@ -0,0 +1,16 @@ +--- build/libxslt-1.1.26/win32/Makefile.msvc.old 2019-10-20 01:02:55.359375000 +0200 ++++ build/libxslt-1.1.26/win32/Makefile.msvc 2019-10-20 01:03:05.187500000 +0200 +@@ -54,11 +54,13 @@ + CFLAGS = /nologo /D "_WINDOWS" /D "_MBCS" /W3 /wd4244 /wd4267 $(CRUNTIME) /D "_REENTRANT" + CFLAGS = $(CFLAGS) /I$(BASEDIR) /I$(XSLT_SRCDIR) /I$(INCPREFIX) + CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE ++CFLAGS = $(CFLAGS) $(SOLARINC) -I$(WORKDIR)\UnpackedTarball\libxml2\include -I$(WORKDIR)/UnpackedTarball/icu/source/i18n -I$(WORKDIR)/UnpackedTarball/icu/source/common + + # The linker and its options. + LD = link.exe + LDFLAGS = /nologo + LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX) ++LDFLAGS = $(LDFLAGS) /DEBUG /OPT:REF + LIBS = + + # The archiver and its options. diff --git a/external/libxslt/libxslt-msvc.patch.2 b/external/libxslt/libxslt-msvc.patch.2 new file mode 100644 index 000000000..fea5f9dc6 --- /dev/null +++ b/external/libxslt/libxslt-msvc.patch.2 @@ -0,0 +1,10 @@ +--- build/libxslt-1.1.26/win32/Makefile.msvc.old 2010-10-20 01:02:55.359375000 +0200 ++++ build/libxslt-1.1.26/win32/Makefile.msvc 2010-10-20 01:03:05.187500000 +0200 +@@ -54,6 +54,7 @@ + CFLAGS = /nologo /D "_WINDOWS" /D "_MBCS" /W3 /wd4244 /wd4267 $(CRUNTIME) /D "_REENTRANT" + CFLAGS = $(CFLAGS) /I$(BASEDIR) /I$(XSLT_SRCDIR) /I$(INCPREFIX) + CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE ++CFLAGS = $(CFLAGS) $(SOLARINC) -I$(WORKDIR)\UnpackedTarball\libxml2\include -I$(WORKDIR)/UnpackedTarball/icu/source/i18n -I$(WORKDIR)/UnpackedTarball/icu/source/common + + # The linker and its options. + LD = link.exe diff --git a/external/libxslt/rpath.patch.0 b/external/libxslt/rpath.patch.0 new file mode 100644 index 000000000..798bccec7 --- /dev/null +++ b/external/libxslt/rpath.patch.0 @@ -0,0 +1,10 @@ +--- configure ++++ configure +@@ -10196,6 +10196,7 @@ + else + ld_shlibs=no + fi ++hardcode_libdir_flag_spec= + ;; + + netbsd* | netbsdelf*-gnu) -- cgit v1.2.3