From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:51:28 +0200 Subject: Adding upstream version 1:7.0.4. 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 | 27 +++++++++ ...2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 | 69 ++++++++++++++++++++++ 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 ++++ 13 files changed, 303 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/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 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..0602c320e --- /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,\ + ./configure --without-crypto --without-python \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + $(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..5bde97637 --- /dev/null +++ b/external/libxslt/UnpackedTarball_libxslt.mk @@ -0,0 +1,27 @@ +# -*- 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 \ + external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 b/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 new file mode 100644 index 000000000..f82c2e4f7 --- /dev/null +++ b/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 @@ -0,0 +1,69 @@ +From e2584eed1c84c18f16e42188c30d2c3d8e3e8853 Mon Sep 17 00:00:00 2001 +From: Chun-wei Fan +Date: Tue, 12 Nov 2019 17:37:05 +0800 +Subject: [PATCH] win32: Add configuration for profiler + +Without this the generated xsltconfig.h will not be complete as there +will be a configuration variable that is left in the header, breaking +builds. + +This will allow one to enable or disable profiler support in Windows +builds, and the default is to enable this. +--- + win32/configure.js | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/win32/configure.js b/win32/configure.js +index 56694cce..12c99f30 100644 +--- a/win32/configure.js ++++ b/win32/configure.js +@@ -47,6 +47,7 @@ var withIconv = true; + var withZlib = false; + var withCrypto = true; + var withModules = false; ++var withProfiler = true; + /* Win32 build options. */ + var dirSep = "\\"; + var compiler = "msvc"; +@@ -106,6 +107,7 @@ function usage() + txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n"; + txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "no") + ")\n"; + txt += " modules: Enable Module support (" + (withModules? "yes" : "no") + ")\n"; ++ txt += " profiler: Enable Profiler support (" + (withProfiler? "yes" : "no") + ")\n"; + txt += "\nWin32 build options, default value given in parentheses:\n\n"; + txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n"; + txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n"; +@@ -192,6 +194,7 @@ function discoverVersion() + vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0")); + vf.WriteLine("WITH_CRYPTO=" + (withCrypto? "1" : "0")); + vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0")); ++ vf.WriteLine("WITH_PROFILER=" + (withProfiler? "1" : "0")); + vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0")); + vf.WriteLine("STATIC=" + (buildStatic? "1" : "0")); + vf.WriteLine("PREFIX=" + buildPrefix); +@@ -240,6 +243,8 @@ function configureXslt() + of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0")); + } else if (s.search(/\@WITH_MODULES\@/) != -1) { + of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0")); ++ } else if (s.search(/\@WITH_PROFILER\@/) != -1) { ++ of.WriteLine(s.replace(/\@WITH_PROFILER\@/, withProfiler? "1" : "0")); + } else if (s.search(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/) != -1) { + of.WriteLine(s.replace(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/, "NULL")); + } else +@@ -343,6 +348,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { + withCrypto = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "modules") + withModules = strToBool(arg.substring(opt.length + 1, arg.length)); ++ else if (opt == "profiler") ++ withProfiler = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "compiler") + compiler = arg.substring(opt.length + 1, arg.length); + else if (opt == "cruntime") +@@ -477,6 +484,7 @@ txtOut += " Use iconv: " + boolToStr(withIconv) + "\n"; + txtOut += " With zlib: " + boolToStr(withZlib) + "\n"; + txtOut += " Crypto: " + boolToStr(withCrypto) + "\n"; + txtOut += " Modules: " + boolToStr(withModules) + "\n"; ++txtOut += " Profiler: " + boolToStr(withProfiler) + "\n"; + txtOut += "\n"; + txtOut += "Win32 build configuration\n"; + txtOut += "-------------------------\n"; 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..78c485925 --- /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*) -- cgit v1.2.3