summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
Diffstat (limited to 'external')
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/apache-commons/ExternalPackage_apache_commons_logging.mk16
-rw-r--r--external/apache-commons/ExternalProject_apache_commons_logging.mk29
-rw-r--r--external/apache-commons/Makefile7
-rw-r--r--external/apache-commons/README1
-rw-r--r--external/apache-commons/UnpackedTarball_apache_commons_logging.mk22
-rw-r--r--external/apache-commons/patches/logging.patch46
-rw-r--r--external/breakpad/SIGSTKSZ.patch11
-rw-r--r--external/breakpad/UnpackedTarball_breakpad.mk2
-rw-r--r--external/breakpad/include.patch10
-rw-r--r--external/ct2n/include.patch.010
-rw-r--r--external/curl/2b0994c29a721c91c57.patch48
-rw-r--r--external/curl/CVE-2023-38545_7.87.0.patch134
-rw-r--r--external/curl/ExternalPackage_curl.mk4
-rw-r--r--external/curl/ExternalProject_curl.mk5
-rw-r--r--external/curl/UnpackedTarball_curl.mk3
-rw-r--r--external/curl/clang-cl.patch.02
-rw-r--r--external/curl/curl-7.26.0_win-proxy.patch25
-rw-r--r--external/curl/curl-msvc-disable-protocols.patch.14
-rw-r--r--external/curl/curl-msvc-zlib.patch.116
-rw-r--r--external/curl/curl-msvc.patch.14
-rw-r--r--external/curl/curl-nss.patch.115
-rw-r--r--external/curl/zlib.patch.020
-rw-r--r--external/expat/0001-Fix-compiler-warnings.patch47
-rw-r--r--external/expat/UnpackedTarball_expat.mk3
-rw-r--r--external/expat/expat-winapi.patch26
-rw-r--r--external/gpgmepp/ExternalProject_gpgmepp.mk2
-rw-r--r--external/gpgmepp/UnpackedTarball_gpgmepp.mk1
-rw-r--r--external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.132
-rw-r--r--external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.129
-rw-r--r--external/harfbuzz/UnpackedTarball_harfbuzz.mk1
-rw-r--r--external/hsqldb/UnpackedTarball_hsqldb.mk1
-rw-r--r--external/hsqldb/patches/disable-dump-script.patch14
-rw-r--r--external/jfreereport/ExternalProject_jfreereport_flow_engine.mk3
-rw-r--r--external/jfreereport/ExternalProject_jfreereport_liblayout.mk7
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_flow_engine.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libbase.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libfonts.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libformula.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_liblayout.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libloader.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_librepository.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libserializer.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libxml.mk1
-rw-r--r--external/jfreereport/patches/flow-engine.patch3
-rw-r--r--external/jfreereport/patches/libbase-1.1.3-remove-commons-logging.patch.1903
-rw-r--r--external/jfreereport/patches/libfonts-1.1.3-remove-commons-logging.patch.1506
-rw-r--r--external/jfreereport/patches/libformula-1.1.3-remove-commons-logging.patch.1266
-rw-r--r--external/jfreereport/patches/liblayout-0.2.10-remove-commons-logging.patch.1860
-rw-r--r--external/jfreereport/patches/liblayout.patch3
-rw-r--r--external/jfreereport/patches/libloader-1.1.3-remove-commons-logging.patch.1635
-rw-r--r--external/jfreereport/patches/librepository-1.1.3-remove-commons-logging.patch.1117
-rw-r--r--external/jfreereport/patches/libserializer-1.1.2-remove-commons-logging.patch.131
-rw-r--r--external/jfreereport/patches/libxml-1.1.3-remove-commons-logging.patch.1313
-rw-r--r--external/jfreereport/patches/pentaho-reporting-flow-engine-0.9.4-remove-commons-logging.patch.1101
-rw-r--r--external/libassuan/ExternalProject_libassuan.mk3
-rw-r--r--external/libffi/ExternalPackage_libffi.mk (renamed from external/apache-commons/Module_apache-commons.mk)12
-rw-r--r--external/libffi/ExternalProject_libffi.mk29
-rw-r--r--external/libffi/Module_libffi.mk1
-rw-r--r--external/libgpg-error/ExternalProject_libgpg-error.mk2
-rw-r--r--external/liblangtag/UnpackedTarball_liblangtag.mk2
-rw-r--r--external/liblangtag/Wformat-overflow.patch17
-rw-r--r--external/liblangtag/langtag-valencia.patch.029
-rw-r--r--external/libnumbertext/EmptyString.patch113
-rw-r--r--external/libnumbertext/UnpackedTarball_libnumbertext.mk1
-rw-r--r--external/liborcus/UnpackedTarball_liborcus.mk17
-rw-r--r--external/liborcus/forcepoint-83.patch.138
-rw-r--r--external/liborcus/forcepoint-84.patch.138
-rw-r--r--external/liborcus/forcepoint-87.patch.127
-rw-r--r--external/liborcus/forcepoint-95.patch.111
-rw-r--r--external/liborcus/include.patch.021
-rw-r--r--external/liborcus/overrun.patch.063
-rw-r--r--external/libtommath/README2
-rw-r--r--external/libtommath/UnpackedTarball_libtommath.mk2
-rw-r--r--external/libtommath/clang-cl.patch16
-rw-r--r--external/libtommath/libtommath-msvc.patch12
-rw-r--r--external/libxml2/ExternalPackage_libxml2.mk2
-rw-r--r--external/libxml2/ExternalProject_libxml2.mk4
-rw-r--r--external/libxml2/UnpackedTarball_libxml2.mk6
-rw-r--r--external/libxml2/libxml2-XMLCALL-redefine.patch.011
-rw-r--r--external/libxml2/libxml2-android.patch6
-rw-r--r--external/libxml2/libxml2-config.patch.143
-rw-r--r--external/libxml2/libxml2-global-symbols.patch14
-rw-r--r--external/libxml2/libxml2-icu-sym.patch.02
-rw-r--r--external/libxml2/libxml2-icu.patch.02
-rw-r--r--external/libxml2/xml2-config.in28
-rw-r--r--external/libxslt/ExternalPackage_libxslt.mk2
-rw-r--r--external/libxslt/README2
-rw-r--r--external/libxslt/UnpackedTarball_libxslt.mk1
-rw-r--r--external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.169
-rw-r--r--external/libxslt/rpath.patch.02
-rw-r--r--external/neon/Library_neon.mk6
-rw-r--r--external/nss/ExternalProject_nss.mk7
-rw-r--r--external/nss/README26
-rw-r--r--external/nss/UnpackedTarball_nss.mk4
-rw-r--r--external/nss/asan.patch.16
-rw-r--r--external/nss/clang-cl.patch.012
-rw-r--r--external/nss/macos-dlopen.patch.02
-rw-r--r--external/nss/nss-android.patch.113
-rw-r--r--external/nss/nss-bz1646594.patch.12
-rw-r--r--external/nss/nss-ios.patch112
-rw-r--r--external/nss/nss-restore-manual-pre-dependencies.patch.16
-rw-r--r--external/nss/nss-win32-make.patch.14
-rw-r--r--external/nss/nss.aix.patch10
-rw-r--r--external/nss/nss.bzmozilla1238154.patch2
-rw-r--r--external/nss/nss.cygwin64.in32bit.patch2
-rw-r--r--external/nss/nss.nowerror.patch2
-rw-r--r--external/nss/nss.patch22
-rw-r--r--external/nss/nss.utf8bom.patch.14
-rw-r--r--external/nss/nss.vs2015.patch2
-rw-r--r--external/nss/nss.vs2015.pdb.patch2
-rw-r--r--external/nss/nss.windows.patch6
-rw-r--r--external/nss/nss_macosx.patch17
-rw-r--r--external/nss/ubsan.patch.02
-rw-r--r--external/openssl/ExternalPackage_openssl.mk12
-rw-r--r--external/openssl/ExternalProject_openssl.mk15
-rw-r--r--external/openssl/UnpackedTarball_openssl.mk12
-rw-r--r--external/openssl/ccb0a11145ee72b042d10593a64eaf9e8a55ec12.patch.156
-rw-r--r--external/openssl/openssl-1.0.1h-win64.patch.147
-rw-r--r--external/openssl/openssl-1.0.2k-cve-2020-1971.patch.1578
-rw-r--r--external/openssl/openssl-3650-masm.patch.135
-rw-r--r--external/openssl/openssl-fixbuild.patch.123
-rw-r--r--external/openssl/openssl-no-multilib.patch.038
-rw-r--r--external/openssl/openssllnx.patch23
-rw-r--r--external/openssl/opensslsol.patch20
-rw-r--r--external/openssl/opensslwnt.patch167
-rw-r--r--external/openssl/opensslwnt_safeseh.patch23
-rw-r--r--external/pdfium/Library_pdfium.mk84
-rw-r--r--external/pdfium/README2
-rw-r--r--external/pdfium/UnpackedTarball_pdfium.mk19
-rw-r--r--external/pdfium/build.patch.1229
-rw-r--r--external/pdfium/c++20-comparison.patch12
-rw-r--r--external/pdfium/configs/build_config.h132
-rw-r--r--external/pdfium/inc/pch/precompiled_pdfium.hxx58
-rw-r--r--external/pdfium/include.patch11
-rw-r--r--external/pdfium/msvc2017.patch.115
-rw-r--r--external/poppler/README2
-rw-r--r--external/poppler/StaticLibrary_poppler.mk57
-rw-r--r--external/poppler/UnpackedTarball_poppler.mk4
-rw-r--r--external/poppler/disable-freetype.patch.141
-rw-r--r--external/poppler/disable-nss-and-gpgmepp.patch.176
-rw-r--r--external/poppler/gcc7-EntityInfo.patch.155
-rw-r--r--external/poppler/gcc7-GfxFont.patch.194
-rw-r--r--external/poppler/poppler-config.patch.151
-rw-r--r--external/postgresql/ExternalProject_postgresql.mk2
-rw-r--r--external/postgresql/postgres-msvc-build.patch.16
-rw-r--r--external/python3/ExternalPackage_python3.mk278
-rw-r--r--external/python3/ExternalProject_python3.mk28
-rw-r--r--external/python3/UnpackedTarball_python3.mk1
-rw-r--r--external/python3/i100492-freebsd.patch.16
-rw-r--r--external/python3/internal-zlib.patch.022
-rw-r--r--external/python3/python-3.3.0-clang.patch.113
-rw-r--r--external/python3/python-3.3.0-darwin.patch.122
-rw-r--r--external/python3/python-3.3.3-disable-obmalloc.patch.04
-rw-r--r--external/python3/python-3.3.3-elf-rpath.patch.112
-rw-r--r--external/python3/python-3.5.4-msvc-disable.patch.18
-rw-r--r--external/python3/python-3.5.tweak.strip.soabi.patch2
-rw-r--r--external/python3/python-3.7.6-msvc-ssl.patch.127
-rw-r--r--external/python3/ubsan.patch.023
-rw-r--r--external/redland/UnpackedTarball_raptor.mk1
-rw-r--r--external/redland/raptor/raptor-libxml2-11.patch.115
-rw-r--r--external/zlib/UnpackedTarball_zlib.mk4
-rw-r--r--external/zlib/ubsan.patch11
163 files changed, 5441 insertions, 2204 deletions
diff --git a/external/Module_external.mk b/external/Module_external.mk
index baf7215b2b70..b5875835a9bb 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -16,7 +16,6 @@ endif
$(eval $(call gb_Module_add_moduledirs,external,\
$(if $(filter-out iOS,$(OS)),$(call gb_Helper_optional,XMLSEC,xmlsec)) \
$(call gb_Helper_optional,ABW,libabw) \
- $(call gb_Helper_optional,APACHE_COMMONS,apache-commons) \
$(call gb_Helper_optional,APR,apr) \
$(call gb_Helper_optional,BOOST,boost) \
$(call gb_Helper_optional,BREAKPAD,breakpad) \
diff --git a/external/apache-commons/ExternalPackage_apache_commons_logging.mk b/external/apache-commons/ExternalPackage_apache_commons_logging.mk
deleted file mode 100644
index 2bff13b93c66..000000000000
--- a/external/apache-commons/ExternalPackage_apache_commons_logging.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- 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,apache_commons_logging,apache_commons_logging))
-
-$(eval $(call gb_ExternalPackage_use_external_project,apache_commons_logging,apache_commons_logging))
-
-$(eval $(call gb_ExternalPackage_add_file,apache_commons_logging,$(LIBO_SHARE_JAVA_FOLDER)/commons-logging-$(COMMONS_LOGGING_VERSION).jar,target/commons-logging-$(COMMONS_LOGGING_VERSION).jar))
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/apache-commons/ExternalProject_apache_commons_logging.mk b/external/apache-commons/ExternalProject_apache_commons_logging.mk
deleted file mode 100644
index 47981ee9ecd6..000000000000
--- a/external/apache-commons/ExternalProject_apache_commons_logging.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- 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,apache_commons_logging))
-
-$(eval $(call gb_ExternalProject_register_targets,apache_commons_logging,\
- build \
-))
-
-$(call gb_ExternalProject_get_state_target,apache_commons_logging,build) :
- $(call gb_ExternalProject_run,build,\
- ANT_OPTS="$$ANT_OPTS -Dfile.encoding=ISO-8859-1" \
- $(ICECREAM_RUN) "$(ANT)" \
- $(if $(verbose),-v,-q) \
- -f build.xml \
- -Dbuild.label="build-$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)" \
- -Dant.build.javac.source=$(JAVA_SOURCE_VER) \
- -Dant.build.javac.target=$(JAVA_TARGET_VER) \
- $(if $(debug),-Dcompile.debug="true",-Dcompile.debug="false") \
- compile build-jar \
- )
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/apache-commons/Makefile b/external/apache-commons/Makefile
deleted file mode 100644
index e4968cf85fb6..000000000000
--- a/external/apache-commons/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- 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/apache-commons/README b/external/apache-commons/README
deleted file mode 100644
index 18944aca4af7..000000000000
--- a/external/apache-commons/README
+++ /dev/null
@@ -1 +0,0 @@
-Java library; used for logging in Extensions, from [http://commons.apache.org/]
diff --git a/external/apache-commons/UnpackedTarball_apache_commons_logging.mk b/external/apache-commons/UnpackedTarball_apache_commons_logging.mk
deleted file mode 100644
index 1d5ad3dc2d9d..000000000000
--- a/external/apache-commons/UnpackedTarball_apache_commons_logging.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- 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,apache_commons_logging))
-
-$(eval $(call gb_UnpackedTarball_set_tarball,apache_commons_logging,$(APACHE_COMMONS_LOGGING_TARBALL),,apache-commons))
-
-$(eval $(call gb_UnpackedTarball_fix_end_of_line,apache_commons_logging,\
- build.xml \
-))
-
-$(eval $(call gb_UnpackedTarball_add_patches,apache_commons_logging,\
- external/apache-commons/patches/logging.patch \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/apache-commons/patches/logging.patch b/external/apache-commons/patches/logging.patch
deleted file mode 100644
index c225e5a30338..000000000000
--- a/external/apache-commons/patches/logging.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- misc/commons-logging-1.1.1-src/build.xml 2007-11-22 00:27:52.000000000 +0100
-+++ misc/build/commons-logging-1.1.1-src/build.xml 2008-06-24 14:23:56.316301736 +0200
-@@ -129,12 +129,6 @@
-
- <!-- ========== Compiler Defaults ========================================= -->
-
-- <!-- Version of java class files to generate. -->
-- <property name="target.version" value="1.2"/>
--
-- <!-- Version of java source to accept -->
-- <property name="source.version" value="1.2"/>
--
- <!-- Should Java compilations set the 'debug' compiler option? -->
- <property name="compile.debug" value="true"/>
-
-@@ -283,6 +277,10 @@
- classpathref="compile.classpath"
- classname="org.apache.avalon.framework.logger.Logger"/>
-
-+ <available property="servlet-api.present"
-+ classpathref="compile.classpath"
-+ classname="javax.servlet.ServletContextListener"/>
-+
- <available file="${log4j12.jar}" property="log4j12.present"/>
- <available file="${log4j13.jar}" property="log4j13.present"/>
- <available file="${build.home}/docs" property="maven.generated.docs.present"/>
-@@ -362,8 +360,8 @@
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}"
-- source="${source.version}"
-- target="${target.version}">
-+ source="${ant.build.javac.source}"
-+ target="${ant.build.javac.target}">
-
- <classpath refid="compile.classpath"/>
-
-@@ -373,6 +371,8 @@
- unless="logkit.present"/>
- <exclude name="org/apache/commons/logging/impl/AvalonLogger.java"
- unless="avalon-framework.present"/>
-+ <exclude name="org/apache/commons/logging/impl/ServletContextCleaner.java"
-+ unless="servlet-api.present"/>
- </javac>
- </target>
-
diff --git a/external/breakpad/SIGSTKSZ.patch b/external/breakpad/SIGSTKSZ.patch
new file mode 100644
index 000000000000..d37c58a2f84b
--- /dev/null
+++ b/external/breakpad/SIGSTKSZ.patch
@@ -0,0 +1,11 @@
+--- src/client/linux/handler/exception_handler.cc
++++ src/client/linux/handler/exception_handler.cc
+@@ -138,7 +138,7 @@
+ // SIGSTKSZ may be too small to prevent the signal handlers from overrunning
+ // the alternative stack. Ensure that the size of the alternative stack is
+ // large enough.
+- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
++ static const unsigned kSigStackSize = std::max<decltype(SIGSTKSZ)>(16384, SIGSTKSZ);
+
+ // Only set an alternative stack if there isn't already one, or if the current
+ // one is too small.
diff --git a/external/breakpad/UnpackedTarball_breakpad.mk b/external/breakpad/UnpackedTarball_breakpad.mk
index b9e14874d72d..d69c83c936ce 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -25,6 +25,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1 \
external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1 \
external/breakpad/c++20-allocator.patch \
+ external/breakpad/SIGSTKSZ.patch \
+ external/breakpad/include.patch \
))
ifeq ($(COM_IS_CLANG),TRUE)
diff --git a/external/breakpad/include.patch b/external/breakpad/include.patch
new file mode 100644
index 000000000000..e90ae9c11744
--- /dev/null
+++ b/external/breakpad/include.patch
@@ -0,0 +1,10 @@
+--- src/client/linux/handler/minidump_descriptor.h
++++ src/client/linux/handler/minidump_descriptor.h
+@@ -31,6 +31,7 @@
+ #define CLIENT_LINUX_HANDLER_MINIDUMP_DESCRIPTOR_H_
+
+ #include <assert.h>
++#include <stdint.h>
+ #include <sys/types.h>
+
+ #include <string>
diff --git a/external/ct2n/include.patch.0 b/external/ct2n/include.patch.0
new file mode 100644
index 000000000000..8852b533311d
--- /dev/null
+++ b/external/ct2n/include.patch.0
@@ -0,0 +1,10 @@
+--- core/src/textcodec/JPTextEncoder.cpp
++++ core/src/textcodec/JPTextEncoder.cpp
+@@ -36,6 +36,7 @@
+ // and the grateful thanks of the Qt team.
+
+ #include "JPTextEncoder.h"
++#include <stdint.h>
+
+ /*
+ * This data is derived from Unicode 1.1,
diff --git a/external/curl/2b0994c29a721c91c57.patch b/external/curl/2b0994c29a721c91c57.patch
new file mode 100644
index 000000000000..0bcc24c06aa5
--- /dev/null
+++ b/external/curl/2b0994c29a721c91c57.patch
@@ -0,0 +1,48 @@
+From 2b0994c29a721c91c572cff7808c572a24d251eb Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Thu, 23 Nov 2023 08:15:47 +0100
+Subject: [PATCH] cookie: lowercase the domain names before PSL checks
+
+Reported-by: Harry Sintonen
+
+Closes #12387
+---
+ lib/cookie.c | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/lib/cookie.c b/lib/cookie.c
+index 568cf537ad1b1..9095cea3e97f2 100644
+--- a/lib/cookie.c
++++ b/lib/cookie.c
+@@ -1027,15 +1027,23 @@ Curl_cookie_add(struct Curl_easy *data,
+ * dereference it.
+ */
+ if(data && (domain && co->domain && !Curl_host_is_ipnum(co->domain))) {
+- const psl_ctx_t *psl = Curl_psl_use(data);
+- int acceptable;
+-
+- if(psl) {
+- acceptable = psl_is_cookie_domain_acceptable(psl, domain, co->domain);
+- Curl_psl_release(data);
++ bool acceptable = FALSE;
++ char lcase[256];
++ char lcookie[256];
++ size_t dlen = strlen(domain);
++ size_t clen = strlen(co->domain);
++ if((dlen < sizeof(lcase)) && (clen < sizeof(lcookie))) {
++ const psl_ctx_t *psl = Curl_psl_use(data);
++ if(psl) {
++ /* the PSL check requires lowercase domain name and pattern */
++ Curl_strntolower(lcase, domain, dlen + 1);
++ Curl_strntolower(lcookie, co->domain, clen + 1);
++ acceptable = psl_is_cookie_domain_acceptable(psl, lcase, lcookie);
++ Curl_psl_release(data);
++ }
++ else
++ acceptable = !bad_domain(domain, strlen(domain));
+ }
+- else
+- acceptable = !bad_domain(domain, strlen(domain));
+
+ if(!acceptable) {
+ infof(data, "cookie '%s' dropped, domain '%s' must not "
diff --git a/external/curl/CVE-2023-38545_7.87.0.patch b/external/curl/CVE-2023-38545_7.87.0.patch
new file mode 100644
index 000000000000..c15c273ea41e
--- /dev/null
+++ b/external/curl/CVE-2023-38545_7.87.0.patch
@@ -0,0 +1,134 @@
+From 92fd36dd54de9ac845549944692eb33c5aee7343 Mon Sep 17 00:00:00 2001
+From: Jay Satiro <raysatiro@yahoo.com>
+Date: Mon, 9 Oct 2023 17:15:44 -0400
+Subject: [PATCH] socks: return error if hostname too long for remote resolve
+
+Prior to this change the state machine attempted to change the remote
+resolve to a local resolve if the hostname was longer than 255
+characters. Unfortunately that did not work as intended and caused a
+security issue.
+
+This patch applies to curl versions 7.87.0 - 8.1.2. Other versions
+that are affected take a different patch. Refer to the CVE advisory
+for more information.
+
+Bug: https://curl.se/docs/CVE-2023-38545.html
+---
+ lib/socks.c | 8 +++----
+ tests/data/Makefile.inc | 2 +-
+ tests/data/test728 | 64 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 69 insertions(+), 5 deletions(-)
+ create mode 100644 tests/data/test728
+
+diff --git a/lib/socks.c b/lib/socks.c
+index d491e08..e7da5b4 100644
+--- a/lib/socks.c
++++ b/lib/socks.c
+@@ -539,9 +539,9 @@ static CURLproxycode do_SOCKS5(struct Curl_cfilter *cf,
+
+ /* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */
+ if(!socks5_resolve_local && hostname_len > 255) {
+- infof(data, "SOCKS5: server resolving disabled for hostnames of "
+- "length > 255 [actual len=%zu]", hostname_len);
+- socks5_resolve_local = TRUE;
++ failf(data, "SOCKS5: the destination hostname is too long to be "
++ "resolved remotely by the proxy.");
++ return CURLPX_LONG_HOSTNAME;
+ }
+
+ if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
+@@ -882,7 +882,7 @@ static CURLproxycode do_SOCKS5(struct Curl_cfilter *cf,
+ }
+ else {
+ socksreq[len++] = 3;
+- socksreq[len++] = (char) hostname_len; /* one byte address length */
++ socksreq[len++] = (unsigned char) hostname_len; /* one byte length */
+ memcpy(&socksreq[len], sx->hostname, hostname_len); /* w/o NULL */
+ len += hostname_len;
+ }
+diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
+index 3e0221a..64b11de 100644
+--- a/tests/data/Makefile.inc
++++ b/tests/data/Makefile.inc
+@@ -99,7 +99,7 @@ test679 test680 test681 test682 test683 test684 test685 \
+ \
+ test700 test701 test702 test703 test704 test705 test706 test707 test708 \
+ test709 test710 test711 test712 test713 test714 test715 test716 test717 \
+-test718 test719 test720 test721 \
++test718 test719 test720 test721 test728 \
+ \
+ test800 test801 test802 test803 test804 test805 test806 test807 test808 \
+ test809 test810 test811 test812 test813 test814 test815 test816 test817 \
+diff --git a/tests/data/test728 b/tests/data/test728
+new file mode 100644
+index 0000000..05bcf28
+--- /dev/null
++++ b/tests/data/test728
+@@ -0,0 +1,64 @@
++<testcase>
++<info>
++<keywords>
++HTTP
++HTTP GET
++SOCKS5
++SOCKS5h
++followlocation
++</keywords>
++</info>
++
++#
++# Server-side
++<reply>
++# The hostname in this redirect is 256 characters and too long (> 255) for
++# SOCKS5 remote resolve. curl must return error CURLE_PROXY in this case.
++<data>
++HTTP/1.1 301 Moved Permanently
++Location: http://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
++Content-Length: 0
++Connection: close
++
++</data>
++</reply>
++
++#
++# Client-side
++<client>
++<features>
++proxy
++</features>
++<server>
++http
++socks5
++</server>
++ <name>
++SOCKS5h with HTTP redirect to hostname too long
++ </name>
++ <command>
++--no-progress-meter --location --proxy socks5h://%HOSTIP:%SOCKSPORT http://%HOSTIP:%HTTPPORT/%TESTNUMBER
++</command>
++</client>
++
++#
++# Verify data after the test has been "shot"
++<verify>
++<protocol crlf="yes">
++GET /%TESTNUMBER HTTP/1.1
++Host: %HOSTIP:%HTTPPORT
++User-Agent: curl/%VERSION
++Accept: */*
++
++</protocol>
++<errorcode>
++97
++</errorcode>
++# the error message is verified because error code CURLE_PROXY (97) may be
++# returned for any number of reasons and we need to make sure it is
++# specifically for the reason below so that we know the check is working.
++<stderr mode="text">
++curl: (97) SOCKS5: the destination hostname is too long to be resolved remotely by the proxy.
++</stderr>
++</verify>
++</testcase>
+--
+2.7.4
+
diff --git a/external/curl/ExternalPackage_curl.mk b/external/curl/ExternalPackage_curl.mk
index 1fb360c85ca9..82979b110558 100644
--- a/external/curl/ExternalPackage_curl.mk
+++ b/external/curl/ExternalPackage_curl.mk
@@ -14,13 +14,13 @@ $(eval $(call gb_ExternalPackage_use_external_project,curl,curl))
ifneq ($(DISABLE_DYNLOADING),TRUE)
ifeq ($(COM),MSC)
-$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-ipv6-sspi-schannel/bin/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
+$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-zlib-static-ipv6-sspi-schannel/bin/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
else ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.4.dylib,lib/.libs/libcurl.4.dylib))
else ifeq ($(OS),AIX)
$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so,lib/.libs/libcurl.so.4))
else
-$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.7.0))
+$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.8.0))
endif
endif # $(DISABLE_DYNLOADING)
diff --git a/external/curl/ExternalProject_curl.mk b/external/curl/ExternalProject_curl.mk
index 06cc96c2e8de..43bb1cad0b93 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -42,8 +42,8 @@ $(call gb_ExternalProject_get_state_target,curl,build):
./configure \
$(if $(filter iOS MACOSX,$(OS)),\
--with-secure-transport,\
- $(if $(ENABLE_NSS),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out"),--without-nss)) \
- --without-ssl --without-gnutls --without-polarssl --without-cyassl --without-axtls --without-mbedtls \
+ $(if $(ENABLE_NSS),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out") --with-nss-deprecated,--without-nss)) \
+ --without-openssl --without-gnutls --without-polarssl --without-cyassl --without-axtls --without-mbedtls \
--enable-ftp --enable-http --enable-ipv6 \
--without-libidn2 --without-libpsl --without-librtmp \
--without-libssh2 --without-metalink --without-nghttp2 \
@@ -85,6 +85,7 @@ $(call gb_ExternalProject_get_state_target,curl,build):
ENABLE_IPV6=yes \
ENABLE_SSPI=yes \
ENABLE_WINSSL=yes \
+ WITH_ZLIB=static \
,winbuild)
endif
diff --git a/external/curl/UnpackedTarball_curl.mk b/external/curl/UnpackedTarball_curl.mk
index 1cdb64c0bca2..258332bf3ba5 100644
--- a/external/curl/UnpackedTarball_curl.mk
+++ b/external/curl/UnpackedTarball_curl.mk
@@ -19,9 +19,12 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,curl,\
$(eval $(call gb_UnpackedTarball_add_patches,curl,\
external/curl/curl-msvc.patch.1 \
+ external/curl/curl-msvc-zlib.patch.1 \
external/curl/curl-msvc-disable-protocols.patch.1 \
external/curl/curl-7.26.0_win-proxy.patch \
external/curl/zlib.patch.0 \
+ external/curl/CVE-2023-38545_7.87.0.patch \
+ external/curl/2b0994c29a721c91c57.patch \
))
ifeq ($(SYSTEM_NSS),)
diff --git a/external/curl/clang-cl.patch.0 b/external/curl/clang-cl.patch.0
index 2fbb10c2a9aa..5dfb19d5ba59 100644
--- a/external/curl/clang-cl.patch.0
+++ b/external/curl/clang-cl.patch.0
@@ -1,6 +1,6 @@
--- winbuild/MakefileBuild.vc
+++ winbuild/MakefileBuild.vc
-@@ -60,7 +60,7 @@
+@@ -52,7 +52,7 @@
!ELSE
CC_NODEBUG = $(CC) /O2 /DNDEBUG
CC_DEBUG = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd
diff --git a/external/curl/curl-7.26.0_win-proxy.patch b/external/curl/curl-7.26.0_win-proxy.patch
index 46cdcc739d80..62016a70e8a0 100644
--- a/external/curl/curl-7.26.0_win-proxy.patch
+++ b/external/curl/curl-7.26.0_win-proxy.patch
@@ -12,18 +12,18 @@
--- curl-7.26.0/lib/url.c
+++ misc/build/curl-7.26.0/lib/url.c
@@ -78,6 +78,10 @@
- bool curl_win32_idn_to_ascii(const char *in, char **out);
- #endif /* USE_LIBIDN2 */
+
+ #include <limits.h>
+#ifdef _WIN32
+#include <WinHttp.h>
+#endif
+
+ #include "doh.h"
#include "urldata.h"
#include "netrc.h"
-
@@ -4586,6 +4590,21 @@
- }
+ #ifndef CURL_DISABLE_PROXY
#ifndef CURL_DISABLE_HTTP
+#ifdef _WIN32
@@ -31,7 +31,7 @@
+{
+ int bufSize;
+ char *out = NULL;
-+ if(wStr != NULL) {
++ if(wStr) {
+ bufSize = WideCharToMultiByte(
+ CP_ACP, 0, wStr, -1, NULL, 0, NULL, NULL);
+ out = (char *)malloc(bufSize * sizeof(char));
@@ -44,7 +44,7 @@
/****************************************************************
* Detect what (if any) proxy to use. Remember that this selects a host
* name and is not limited to HTTP proxies only.
-@@ -4613,6 +4633,66 @@
+@@ -4613,6 +4633,67 @@
* For compatibility, the all-uppercase versions of these variables are
* checked if the lowercase versions don't exist.
*/
@@ -58,28 +58,29 @@
+ char *ieProxy;
+ char *ieNoProxy;
+ char *pos;
++ bool spacesp;
+
+ ieProxy = wstrToCstr(ieProxyConfig->lpszProxy);
+ ieNoProxy = wstrToCstr(ieProxyConfig->lpszProxyBypass);
+
+ /* Convert the ieNoProxy into a proper no_proxy value */
-+ if(NULL != ieNoProxy) {
++ if(ieNoProxy) {
+ no_proxy = strdup(ieNoProxy);
+ pos = strpbrk(no_proxy, "; ");
-+ while(NULL != pos) {
++ while(pos) {
+ no_proxy[pos-no_proxy] = ',';
+ pos = strpbrk(no_proxy, "; ");
+ }
+ }
+
-+ if(!check_noproxy(conn->host.name, no_proxy)) {
++ if(!Curl_check_noproxy(conn->host.name, no_proxy, &spacesp)) {
+ /* Look for the http proxy setting */
+ char *tok;
+ char *saveptr;
+
-+ if(NULL != ieProxy) {
++ if(ieProxy) {
+ tok = strtok_s(ieProxy, ";", &saveptr);
-+ if(strchr(tok, '=') == NULL) {
++ if(!strchr(tok, '=')) {
+ proxy = strdup(ieProxy);
+ }
+ else {
@@ -90,7 +91,7 @@
+ }
+ tok = strtok_s(NULL, ";", &saveptr);
+ }
-+ while(NULL != tok);
++ while(tok);
+ }
+ }
+ }
diff --git a/external/curl/curl-msvc-disable-protocols.patch.1 b/external/curl/curl-msvc-disable-protocols.patch.1
index a6d06c69b004..71ff0c01a028 100644
--- a/external/curl/curl-msvc-disable-protocols.patch.1
+++ b/external/curl/curl-msvc-disable-protocols.patch.1
@@ -2,7 +2,7 @@ disable protocols nobody needs in MSVC build
--- curl/lib/config-win32.h.orig 2017-08-09 16:43:29.464000000 +0200
+++ curl/lib/config-win32.h 2017-08-09 16:47:38.549200000 +0200
-@@ -733,4 +733,20 @@
+@@ -654,4 +654,20 @@
# define ENABLE_IPV6 1
#endif
@@ -25,7 +25,7 @@ disable protocols nobody needs in MSVC build
#endif /* HEADER_CURL_CONFIG_WIN32_H */
--- curl/winbuild/MakefileBuild.vc.orig 2017-10-23 23:41:21.393200000 +0200
+++ curl/winbuild/MakefileBuild.vc 2017-10-23 23:34:16.028000000 +0200
-@@ -431,7 +431,7 @@
+@@ -562,7 +562,7 @@
EXE_OBJS = $(CURL_OBJS) $(CURL_DIROBJ)\curl.res
diff --git a/external/curl/curl-msvc-zlib.patch.1 b/external/curl/curl-msvc-zlib.patch.1
new file mode 100644
index 000000000000..a9ee0013d50b
--- /dev/null
+++ b/external/curl/curl-msvc-zlib.patch.1
@@ -0,0 +1,16 @@
+find internal zlib in nmake buildsystem
+
+--- curl/winbuild/MakefileBuild.vc.orig2 2021-10-27 20:44:48.685237000 +0200
++++ curl/winbuild/MakefileBuild.vc 2021-10-27 20:47:23.792407400 +0200
+@@ -244,8 +244,9 @@
+ ZLIB_LIB_DIR = $(ZLIB_PATH)\lib
+ ZLIB_LFLAGS = $(ZLIB_LFLAGS) "/LIBPATH:$(ZLIB_LIB_DIR)"
+ !ELSE
+-ZLIB_INC_DIR = $(DEVEL_INCLUDE)
+-ZLIB_LIB_DIR = $(DEVEL_LIB)
++ZLIB_INC_DIR = $(WORKDIR)/UnpackedTarball/zlib
++ZLIB_LIB_DIR = $(WORKDIR)/LinkTarget/StaticLibrary
++ZLIB_LFLAGS = $(ZLIB_LFLAGS) "/LIBPATH:$(ZLIB_LIB_DIR)"
+ !ENDIF
+
+ # Depending on how zlib is built the libraries have different names, we
diff --git a/external/curl/curl-msvc.patch.1 b/external/curl/curl-msvc.patch.1
index a5b79a8e9c49..54ad026ec8c7 100644
--- a/external/curl/curl-msvc.patch.1
+++ b/external/curl/curl-msvc.patch.1
@@ -2,7 +2,7 @@ MSVC: using SOLARINC
--- curl/winbuild/MakefileBuild.vc.orig 2017-10-23 16:36:07.713550851 +0200
+++ curl/winbuild/MakefileBuild.vc 2017-10-23 16:38:19.301547594 +0200
-@@ -60,7 +60,7 @@
+@@ -52,7 +52,7 @@
!ELSE
CC_NODEBUG = $(CC) /O2 /DNDEBUG
CC_DEBUG = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd
@@ -11,7 +11,7 @@ MSVC: using SOLARINC
!ENDIF
LFLAGS = /nologo /machine:$(MACHINE)
-@@ -300,11 +300,11 @@
+@@ -426,11 +426,11 @@
# CURL_XX macros are for the curl.exe command
!IF "$(DEBUG)"=="yes"
diff --git a/external/curl/curl-nss.patch.1 b/external/curl/curl-nss.patch.1
index 69fde5f7f236..2e8766b3d45f 100644
--- a/external/curl/curl-nss.patch.1
+++ b/external/curl/curl-nss.patch.1
@@ -1,12 +1,17 @@
diff -ur curl.org/configure curl/configure
---- curl.org/configure 2016-03-13 15:14:07.177000076 +0100
-+++ curl/configure 2016-03-13 15:16:44.132000076 +0100
-@@ -24009,7 +24009,7 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using hard-wired libraries and compilation flags for NSS." >&5
- $as_echo "$as_me: WARNING: Using hard-wired libraries and compilation flags for NSS." >&2;}
+--- curl.orig/configure 2023-02-20 16:11:55.000000000 +0900
++++ curl/configure 2023-02-23 15:40:58.617432471 +0900
+@@ -28675,7 +28675,12 @@
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Using hard-wired libraries and compilation flags for NSS." >&5
+ printf "%s\n" "$as_me: WARNING: Using hard-wired libraries and compilation flags for NSS." >&2;}
addld="-L$OPT_NSS/lib"
- addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
+ addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lnssutil3"
++ case $host_os in
++ *android*)
++ addlib="${addlib} -llog"
++ ;;
++ esac
addcflags="-I$OPT_NSS/include"
version="unknown"
nssprefix=$OPT_NSS
diff --git a/external/curl/zlib.patch.0 b/external/curl/zlib.patch.0
index f4a0ad4b152f..b4442ba262d1 100644
--- a/external/curl/zlib.patch.0
+++ b/external/curl/zlib.patch.0
@@ -1,22 +1,22 @@
--- configure
+++ configure
-@@ -20709,7 +20709,6 @@
+@@ -23035,7 +23035,6 @@
clean_CPPFLAGS=$CPPFLAGS
clean_LDFLAGS=$LDFLAGS
clean_LIBS=$LIBS
-ZLIB_LIBS=""
# Check whether --with-zlib was given.
- if test "${with_zlib+set}" = set; then :
-@@ -20718,6 +20719,7 @@
+ if test ${with_zlib+y}
+@@ -23045,6 +23044,7 @@
if test "$OPT_ZLIB" = "no" ; then
+ ZLIB_LIBS=""
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
- $as_echo "$as_me: WARNING: zlib disabled" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
+ printf "%s\n" "$as_me: WARNING: zlib disabled" >&2;}
else
-@@ -20725,6 +20725,21 @@
+@@ -23052,6 +23052,21 @@
OPT_ZLIB=""
fi
@@ -38,8 +38,8 @@
if test -z "$OPT_ZLIB" ; then
if test -n "$PKG_CONFIG"; then
-@@ -21005,6 +21020,7 @@
- $as_echo "$as_me: found both libz and libz.h header" >&6;}
+@@ -23344,6 +23359,7 @@
+ printf "%s\n" "$as_me: found both libz and libz.h header" >&6;}
curl_zlib_msg="enabled"
fi
+ fi
@@ -48,7 +48,7 @@
if test x"$AMFIXLIB" = x1; then
--- configure.ac
+++ configure.ac
-@@ -880,19 +880,30 @@
+@@ -1243,19 +1243,30 @@
clean_CPPFLAGS=$CPPFLAGS
clean_LDFLAGS=$LDFLAGS
clean_LIBS=$LIBS
@@ -80,7 +80,7 @@
if test -z "$OPT_ZLIB" ; then
CURL_CHECK_PKGCONFIG(zlib)
-@@ -975,6 +986,7 @@
+@@ -1336,6 +1347,7 @@
AC_MSG_NOTICE([found both libz and libz.h header])
curl_zlib_msg="enabled"
fi
diff --git a/external/expat/0001-Fix-compiler-warnings.patch b/external/expat/0001-Fix-compiler-warnings.patch
new file mode 100644
index 000000000000..adec5ed0d9be
--- /dev/null
+++ b/external/expat/0001-Fix-compiler-warnings.patch
@@ -0,0 +1,47 @@
+From 3f60a47cb5716bb810789a12ef6024c1dc448164 Mon Sep 17 00:00:00 2001
+From: Taichi Haradaguchi <20001722@ymail.ne.jp>
+Date: Fri, 9 Feb 2024 19:28:35 +0900
+Subject: [PATCH] Fix compiler warnings
+
+> In file included from ./../lib/internal.h:149,
+> from codepage.c:38:
+> ./../lib/expat.h:1045:5: warning: "XML_GE" is not defined, evaluates to 0 [-Wundef]
+> 1045 | #if XML_GE == 1
+> | ^~~~~~
+> ./../lib/internal.h:158:5: warning: "XML_GE" is not defined, evaluates to 0 [-Wundef]
+> 158 | #if XML_GE == 1
+> | ^~~~~~
+---
+ expat/lib/expat.h | 2 +-
+ expat/lib/internal.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/expat/lib/expat.h b/expat/lib/expat.h
+index 95464b0d..79bbfb61 100644
+--- a/expat/lib/expat.h
++++ b/expat/lib/expat.h
+@@ -1042,7 +1042,7 @@ typedef struct {
+ XMLPARSEAPI(const XML_Feature *)
+ XML_GetFeatureList(void);
+
+-#if XML_GE == 1
++#if defined(XML_GE) && XML_GE == 1
+ /* Added in Expat 2.4.0 for XML_DTD defined and
+ * added in Expat 2.6.0 for XML_GE == 1. */
+ XMLPARSEAPI(XML_Bool)
+diff --git a/expat/lib/internal.h b/expat/lib/internal.h
+index cce71e4c..208c6b67 100644
+--- a/expat/lib/internal.h
++++ b/expat/lib/internal.h
+@@ -155,7 +155,7 @@ extern "C" {
+ void _INTERNAL_trim_to_complete_utf8_characters(const char *from,
+ const char **fromLimRef);
+
+-#if XML_GE == 1
++#if defined(XML_GE) && XML_GE == 1
+ unsigned long long testingAccountingGetCountBytesDirect(XML_Parser parser);
+ unsigned long long testingAccountingGetCountBytesIndirect(XML_Parser parser);
+ const char *unsignedCharToPrintable(unsigned char c);
+--
+2.43.1
+
diff --git a/external/expat/UnpackedTarball_expat.mk b/external/expat/UnpackedTarball_expat.mk
index 5d4f41f6d147..465105f2ca8c 100644
--- a/external/expat/UnpackedTarball_expat.mk
+++ b/external/expat/UnpackedTarball_expat.mk
@@ -13,7 +13,10 @@ $(eval $(call gb_UnpackedTarball_set_tarball,expat,$(EXPAT_TARBALL)))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,expat,conftools))
+# * external/expat/0001-Fix-compiler-warnings.patch was sent to upstream as
+# <https://github.com/libexpat/libexpat/pull/819> "Fix compiler warnings":
$(eval $(call gb_UnpackedTarball_add_patches,expat,\
+ external/expat/0001-Fix-compiler-warnings.patch \
external/expat/expat-winapi.patch \
))
diff --git a/external/expat/expat-winapi.patch b/external/expat/expat-winapi.patch
index bd4da1472fc8..fed65644a732 100644
--- a/external/expat/expat-winapi.patch
+++ b/external/expat/expat-winapi.patch
@@ -1,6 +1,6 @@
---- misc/expat-2.1.0/lib/expat_external.h 2009-11-16 08:53:17.375000000 +0000
-+++ misc/build/expat-2.1.0/lib/expat_external.h 2009-11-16 08:53:34.703125000 +0000
-@@ -81,10 +81,6 @@
+--- misc/expat-2.5.0/lib/expat_external.h 2022-10-25 01:32:54.000000000 +0900
++++ misc/build/expat-2.5.0/lib/expat_external.h 2022-10-30 23:09:47.339459134 +0900
+@@ -88,10 +88,6 @@
# ifndef XML_BUILDING_EXPAT
/* using Expat from an application */
@@ -11,17 +11,15 @@
# endif
#endif /* not defined XML_STATIC */
---- misc/expat-2.1.0/lib/xmlparse.c 2021-05-23 16:56:25.000000000 +0100
-+++ misc/build/expat-2.1.0/lib/xmlparse.c 2021-05-25 12:42:11.997173600 +0100
-@@ -92,6 +92,11 @@
+--- misc/expat-2.5.0/lib/xmlparse.c 2022-10-26 00:09:08.000000000 +0900
++++ misc/build/expat-2.5.0/lib/xmlparse.c 2022-10-30 23:09:01.843006341 +0900
+@@ -67,6 +67,9 @@
+ #endif
- #include <expat_config.h>
-
-+#ifdef _WIN32
+ #ifdef _WIN32
++# undef HAVE_ARC4RANDOM_BUF
+# undef HAVE_GETRANDOM
+# undef HAVE_SYSCALL_GETRANDOM
-+#endif
-+
- #include "ascii.h"
- #include "expat.h"
- #include "siphash.h"
+ /* force stdlib to define rand_s() */
+ # if ! defined(_CRT_RAND_S)
+ # define _CRT_RAND_S
diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk b/external/gpgmepp/ExternalProject_gpgmepp.mk
index 8ecdf60e6f87..d7835622ca21 100644
--- a/external/gpgmepp/ExternalProject_gpgmepp.mk
+++ b/external/gpgmepp/ExternalProject_gpgmepp.mk
@@ -39,7 +39,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(call gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \
--host=$(gb_ExternalProject_gpgmepp_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor=$(call gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \
MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
index 1b0468fc6f23..fc7ed88ac6d6 100644
--- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk
+++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
@@ -33,5 +33,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \
external/gpgmepp/gcc9.patch \
external/gpgmepp/version.patch \
external/gpgmepp/ubsan.patch \
+ external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 b/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1
new file mode 100644
index 000000000000..538a5264bed4
--- /dev/null
+++ b/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1
@@ -0,0 +1,32 @@
+From 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e Mon Sep 17 00:00:00 2001
+From: Jiri Kucera <sanczes@gmail.com>
+Date: Sun, 25 Jul 2021 11:35:54 +0200
+Subject: [PATCH] core: Support closefrom also for glibc.
+
+* src/posix-io.c (_gpgme_io_spawn): Use glibc's closefrom.
+--
+
+Since 2.34, glibc introduces closefrom (the implementation
+follows *BSD standard).
+
+Signed-off-by: Werner Koch <wk@gnupg.org>
+---
+ src/posix-io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/posix-io.c b/src/posix-io.c
+index e712ef28..2a3a81fc 100644
+--- a/src/posix-io.c
++++ b/src/posix-io.c
+@@ -570,7 +570,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
+ if (fd_list[i].fd > fd)
+ fd = fd_list[i].fd;
+ fd++;
+-#ifdef __sun
++#if defined(__sun) || defined(__GLIBC__)
+ closefrom (fd);
+ max_fds = fd;
+ #else /*!__sun */
+--
+2.11.0
+
diff --git a/external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1 b/external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1
new file mode 100644
index 000000000000..2aef204a26e1
--- /dev/null
+++ b/external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1
@@ -0,0 +1,29 @@
+From 62e803b36173fd096d7ad460dd1d1db9be542593 Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed, 1 Jun 2022 07:38:21 -0600
+Subject: [PATCH] [sbix] Limit glyph extents
+
+Fixes https://github.com/harfbuzz/harfbuzz/issues/3557
+---
+ src/hb-ot-color-sbix-table.hh | 6 ++++++
+ test/fuzzing/fonts/sbix-extents.ttf | Bin 0 -> 582 bytes
+ 2 files changed, 6 insertions(+)
+ create mode 100644 test/fuzzing/fonts/sbix-extents.ttf
+
+diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh
+index 9741ebd450..6efae43cda 100644
+--- a/src/hb-ot-color-sbix-table.hh
++++ b/src/hb-ot-color-sbix-table.hh
+@@ -298,6 +298,12 @@ struct sbix
+
+ const PNGHeader &png = *blob->as<PNGHeader>();
+
++ if (png.IHDR.height >= 65536 || png.IHDR.width >= 65536)
++ {
++ hb_blob_destroy (blob);
++ return false;
++ }
++
+ extents->x_bearing = x_offset;
+ extents->y_bearing = png.IHDR.height + y_offset;
+ extents->width = png.IHDR.width;
diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index adec72ed0d57..9957f89e1b5c 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
external/harfbuzz/ubsan.patch \
external/harfbuzz/icu-65-api-macros-with-semicolon.patch.1 \
+ external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/hsqldb/UnpackedTarball_hsqldb.mk b/external/hsqldb/UnpackedTarball_hsqldb.mk
index cbba770f19a0..ed262cccf4ca 100644
--- a/external/hsqldb/UnpackedTarball_hsqldb.mk
+++ b/external/hsqldb/UnpackedTarball_hsqldb.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hsqldb,\
external/hsqldb/patches/jdbc-4.1.patch \
external/hsqldb/patches/multipleResultSets.patch \
) \
+ external/hsqldb/patches/disable-dump-script.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/hsqldb/patches/disable-dump-script.patch b/external/hsqldb/patches/disable-dump-script.patch
new file mode 100644
index 000000000000..401dd38abc9a
--- /dev/null
+++ b/external/hsqldb/patches/disable-dump-script.patch
@@ -0,0 +1,14 @@
+--- a/hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java 2023-02-13 11:08:11.297243034 +0000
++++ b/hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java 2023-02-13 13:49:17.973089433 +0000
+@@ -403,6 +403,11 @@
+ throw Trace.error(Trace.INVALID_IDENTIFIER);
+ }
+
++ // added condition to avoid execution of spurious command in .script or .log file
++ if (session.isProcessingScript() || session.isProcessingLog()) {
++ return new Result(ResultConstants.UPDATECOUNT);
++ }
++
+ dsw = new ScriptWriterText(database, token, true, true, true);
+
+ dsw.writeAll();
diff --git a/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk b/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
index 38247c21f50f..8b8fa4b80db6 100644
--- a/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
@@ -23,9 +23,6 @@ $(call gb_ExternalProject_get_state_target,jfreereport_flow_engine,build) :
$(if $(verbose),-v,-q) \
-f build.xml \
-Dbuild.label="build-$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)" \
- $(if $(SYSTEM_APACHE_COMMONS),\
- -Dcommons-logging.jar=$(COMMONS_LOGGING_JAR), \
- -Dcommons-logging.jar="$(call gb_UnpackedTarball_get_dir,apache_commons_logging)/target/commons-logging-$(COMMONS_LOGGING_VERSION).jar") \
-Dlibbase.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_libbase)/dist/libbase-$(LIBBASE_VERSION).jar \
-Dlibformula.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_libformula)/dist/libformula-$(LIBFORMULA_VERSION).jar \
-Dliblayout.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_liblayout)/build/lib/liblayout.jar \
diff --git a/external/jfreereport/ExternalProject_jfreereport_liblayout.mk b/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
index 831711dd44c8..fc96f7c9bb07 100644
--- a/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
@@ -9,10 +9,6 @@
$(eval $(call gb_ExternalProject_ExternalProject,jfreereport_liblayout))
-$(eval $(call gb_ExternalProject_use_externals,jfreereport_liblayout,\
- commons-logging \
-))
-
$(eval $(call gb_ExternalProject_use_external_projects,jfreereport_liblayout,\
jfreereport_sac \
jfreereport_libbase \
@@ -35,9 +31,6 @@ $(call gb_ExternalProject_get_state_target,jfreereport_liblayout,build) :
$(if $(verbose),-v,-q) \
-f build.xml \
-Dbuild.label="build-$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)" \
- $(if $(SYSTEM_APACHE_COMMONS),\
- -Dcommons-logging.jar=$(COMMONS_LOGGING_JAR), \
- -Dcommons-logging.jar="$(call gb_UnpackedTarball_get_dir,apache_commons_logging)/target/commons-logging-$(COMMONS_LOGGING_VERSION).jar") \
-Dflute.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_flute)/dist/flute-$(FLUTE_VERSION).jar \
-Dlibbase.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_libbase)/dist/libbase-$(LIBBASE_VERSION).jar \
-Dlibformula.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_libformula)/dist/libformula-$(LIBFORMULA_VERSION).jar \
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_flow_engine.mk b/external/jfreereport/UnpackedTarball_jfreereport_flow_engine.mk
index e0d309ab2f30..42e90e1e0bb4 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_flow_engine.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_flow_engine.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_flow_engine,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_flow_engine,\
external/jfreereport/patches/flow-engine.patch \
external/jfreereport/patches/flow-engine_date_is_datetime.patch.1 \
+ external/jfreereport/patches/pentaho-reporting-flow-engine-0.9.4-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libbase.mk b/external/jfreereport/UnpackedTarball_jfreereport_libbase.mk
index c3ba35190ede..46bb438aa58a 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libbase.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libbase.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libbase,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libbase,\
external/jfreereport/patches/common_build.patch \
external/jfreereport/patches/libbase-$(LIBBASE_VERSION)-deprecated.patch \
+ external/jfreereport/patches/libbase-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libfonts.mk b/external/jfreereport/UnpackedTarball_jfreereport_libfonts.mk
index b648c58bbef8..c45958505e96 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libfonts.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libfonts.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libfonts,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libfonts,\
external/jfreereport/patches/common_build.patch \
external/jfreereport/patches/libfonts-$(LIBFONTS_VERSION)-deprecated.patch \
+ external/jfreereport/patches/libfonts-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk b/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk
index 59622966895a..13e8fcfaf640 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libformula,\
external/jfreereport/patches/libformula-seconds_rounding.patch.1 \
external/jfreereport/patches/libformula-minutes_truncation.patch.1 \
external/jfreereport/patches/libformula-datevalue_truncation.patch.1 \
+ external/jfreereport/patches/libformula-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_liblayout.mk b/external/jfreereport/UnpackedTarball_jfreereport_liblayout.mk
index 7281ba59b353..a2538c37820b 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_liblayout.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_liblayout.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_liblayout,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_liblayout,\
external/jfreereport/patches/liblayout.patch \
+ external/jfreereport/patches/liblayout-0.2.10-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libloader.mk b/external/jfreereport/UnpackedTarball_jfreereport_libloader.mk
index 7357ddd03ad9..6221dfa52b1b 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libloader.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libloader.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libloader,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libloader,\
external/jfreereport/patches/common_build.patch \
external/jfreereport/patches/libloader-$(LIBLOADER_VERSION)-deprecated.patch \
+ external/jfreereport/patches/libloader-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_librepository.mk b/external/jfreereport/UnpackedTarball_jfreereport_librepository.mk
index 86ff991b9f3e..e1db29d02b3e 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_librepository.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_librepository.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_librepository,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_librepository,\
external/jfreereport/patches/common_build.patch \
external/jfreereport/patches/librepository-$(LIBREPOSITORY_VERSION)-deprecated.patch \
+ external/jfreereport/patches/librepository-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libserializer.mk b/external/jfreereport/UnpackedTarball_jfreereport_libserializer.mk
index 22d6d0cb7a2a..fb6f3d60c8da 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libserializer.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libserializer.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libserializer,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libserializer,\
external/jfreereport/patches/common_build.patch \
+ external/jfreereport/patches/libserializer-1.1.2-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libxml.mk b/external/jfreereport/UnpackedTarball_jfreereport_libxml.mk
index ceca692adee2..7a920a873d4c 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libxml.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libxml.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libxml,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libxml,\
external/jfreereport/patches/common_build.patch \
+ external/jfreereport/patches/libxml-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/patches/flow-engine.patch b/external/jfreereport/patches/flow-engine.patch
index 63f0dbda0e9f..5cf834994268 100644
--- a/external/jfreereport/patches/flow-engine.patch
+++ b/external/jfreereport/patches/flow-engine.patch
@@ -1,13 +1,12 @@
--- misc/flow-engine-0.9.4/build.xml (Revision 6728)
+++ misc/build/flow-engine-0.9.4/build.xml (Arbeitskopie)
-@@ -24,9 +24,13 @@
+@@ -24,9 +24,12 @@
<!-- Setup the compile classpath -->
<path id="classpath">
- <fileset dir="lib">
- <include name="*.jar" />
- </fileset>
-+ <pathelement path="${commons-logging.jar}"/>
+ <pathelement path="${libbase.jar}"/>
+ <pathelement path="${libformula.jar}"/>
+ <pathelement path="${liblayout.jar}"/>
diff --git a/external/jfreereport/patches/libbase-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/libbase-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..8d0df70a96df
--- /dev/null
+++ b/external/jfreereport/patches/libbase-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,903 @@
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/AbstractBoot.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/AbstractBoot.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/AbstractBoot.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/AbstractBoot.java 2021-02-23 12:11:46.680967049 +0000
+@@ -24,8 +24,7 @@
+ import java.util.ArrayList;
+ import java.util.Enumeration;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.config.ExtendedConfiguration;
+ import org.pentaho.reporting.libraries.base.config.ExtendedConfigurationWrapper;
+@@ -52,7 +51,7 @@
+ /**
+ * The logger for this class.
+ */
+- private static final Log LOGGER = LogFactory.getLog(AbstractBoot.class);
++ private static final Logger LOGGER = Logger.getLogger(AbstractBoot.class.getName());
+
+ /**
+ * The configuration wrapper around the plain configuration.
+@@ -163,7 +162,7 @@
+ }
+ if (isBootFailed())
+ {
+- LOGGER.error(getClass() + " failed to boot: " + bootFailed.getMessage());
++ LOGGER.severe(getClass() + " failed to boot: " + bootFailed.getMessage());
+ }
+ while (isBootInProgress())
+ {
+@@ -206,7 +205,7 @@
+ }
+ catch (Exception e)
+ {
+- LOGGER.error(getClass() + " failed to boot: ", e);
++ LOGGER.severe(getClass() + " failed to boot: " + e);
+ this.bootFailed = e;
+ }
+ finally
+@@ -265,8 +264,8 @@
+ if (boot.isBootFailed())
+ {
+ this.bootFailed = boot.getBootFailureReason();
+- LOGGER.error("Dependent project failed to boot up: " +
+- projectInformation.getBootClass() + " failed to boot: ", this.bootFailed);
++ LOGGER.severe("Dependent project failed to boot up: " +
++ projectInformation.getBootClass() + " failed to boot: " + this.bootFailed);
+ return;
+ }
+ }
+@@ -419,7 +418,7 @@
+ }
+ catch (IOException ioe)
+ {
+- LOGGER.warn("Failed to load the user configuration at " + url, ioe);
++ LOGGER.warning("Failed to load the user configuration at " + url + " : " + ioe);
+ }
+ }
+
+@@ -431,7 +430,7 @@
+ }
+ catch (IOException e)
+ {
+- LOGGER.warn("Failed to lookup the user configurations.", e);
++ LOGGER.warning("Failed to lookup the user configurations: " + e);
+ }
+ }
+ if (addSysProps)
+@@ -455,4 +454,4 @@
+ }
+ return extWrapper;
+ }
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageManager.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageManager.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageManager.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageManager.java 2021-02-23 12:18:45.836952221 +0000
+@@ -23,8 +23,8 @@
+ import java.util.HashMap;
+ import java.util.Iterator;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.config.PropertyFileConfiguration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+@@ -63,7 +63,7 @@
+ }
+ }
+
+- private static final Log LOGGER = LogFactory.getLog(PackageManager.class);
++ private static final Logger LOGGER = Logger.getLogger(PackageManager.class.getName());
+
+ /**
+ * An internal constant declaring that the specified module was already loaded.
+@@ -201,7 +201,7 @@
+ }
+ }
+ }
+- LOGGER.debug("Loaded a total of " + count + " modules under prefix: " + modulePrefix);
++ LOGGER.config("Loaded a total of " + count + " modules under prefix: " + modulePrefix);
+ }
+
+ /**
+@@ -224,9 +224,9 @@
+
+ if (mod.configure(this.booter))
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+- LOGGER.debug("Conf: " +
++ LOGGER.config("Conf: " +
+ new PadMessage(mod.getModule().getModuleClass(), 70) +
+ " [" + mod.getModule().getSubSystem() + ']');
+ }
+@@ -244,9 +244,9 @@
+
+ if (mod.initialize(this.booter))
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+- LOGGER.debug("Init: " +
++ LOGGER.config("Init: " +
+ new PadMessage(mod.getModule().getModuleClass(), 70) +
+ " [" + mod.getModule().getSubSystem() + ']');
+ }
+@@ -271,12 +271,12 @@
+ final PackageState dependentState = (PackageState) modulesByClass.get(key);
+ if (dependentState == null)
+ {
+- LOGGER.warn("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not found.");
++ LOGGER.warning("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not found.");
+ return false;
+ }
+ if (dependentState.getState() != PackageState.STATE_CONFIGURED)
+ {
+- LOGGER.warn("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not configured.");
++ LOGGER.warning("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not configured.");
+ return false;
+ }
+ }
+@@ -300,12 +300,12 @@
+ final PackageState dependentState = (PackageState) modulesByClass.get(key);
+ if (dependentState == null)
+ {
+- LOGGER.warn("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not found.");
++ LOGGER.warning("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not found.");
+ return false;
+ }
+ if (dependentState.getState() != PackageState.STATE_INITIALIZED)
+ {
+- LOGGER.warn("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not initializable.");
++ LOGGER.warning("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not initializable.");
+ return false;
+ }
+ }
+@@ -418,15 +418,15 @@
+ {
+ if (fatal)
+ {
+- LOGGER.warn("Unresolved dependency for package: " + moduleInfo.getModuleClass());
++ LOGGER.warning("Unresolved dependency for package: " + moduleInfo.getModuleClass());
+ }
+- LOGGER.debug("Module class referenced, but not in classpath: " + moduleInfo.getModuleClass());
++ LOGGER.config("Module class referenced, but not in classpath: " + moduleInfo.getModuleClass());
+ }
+
+ if (acceptVersion(moduleInfo, module) == false)
+ {
+ // module conflict!
+- LOGGER.warn("Module " + module.getName() + ": required version: "
++ LOGGER.warning("Module " + module.getName() + ": required version: "
+ + moduleInfo + ", but found Version: \n" + module);
+ final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
+ dropFailedModule(state);
+@@ -437,7 +437,7 @@
+ if (moduleContained == RETURN_MODULE_ERROR)
+ {
+ // the module caused harm before ...
+- LOGGER.debug("Indicated failure for module: " + module.getModuleClass());
++ LOGGER.config("Indicated failure for module: " + module.getModuleClass());
+ final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
+ dropFailedModule(state);
+ return false;
+@@ -447,7 +447,7 @@
+ if (incompleteModules.contains(module))
+ {
+ // we assume that loading will continue ...
+- LOGGER.error
++ LOGGER.severe
+ ("Circular module reference: This module definition is invalid: " +
+ module.getClass());
+ final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
+@@ -460,7 +460,7 @@
+ {
+ if (loadModule(required[i], incompleteModules, modules, true) == false)
+ {
+- LOGGER.debug("Indicated failure for module: " + module.getModuleClass());
++ LOGGER.config("Indicated failure for module: " + module.getModuleClass());
+ final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
+ dropFailedModule(state);
+ return false;
+@@ -472,7 +472,7 @@
+ {
+ if (loadModule(optional[i], incompleteModules, modules, true) == false)
+ {
+- LOGGER.debug("Optional module: " + optional[i].getModuleClass() + " was not loaded.");
++ LOGGER.config("Optional module: " + optional[i].getModuleClass() + " was not loaded.");
+ }
+ }
+ // maybe a dependent module defined the same base module ...
+@@ -486,7 +486,7 @@
+ }
+ catch (Exception e)
+ {
+- LOGGER.warn("Exception while loading module: " + moduleInfo, e);
++ LOGGER.warning("Exception while loading module: " + moduleInfo + " : " + e);
+ return false;
+ }
+ }
+@@ -506,7 +506,7 @@
+ }
+ if (module.getMajorVersion() == null)
+ {
+- LOGGER.warn("Module " + module.getName() + " does not define a major version.");
++ LOGGER.warning("Module " + module.getName() + " does not define a major version.");
+ }
+ else
+ {
+@@ -528,7 +528,7 @@
+ }
+ if (module.getMinorVersion() == null)
+ {
+- LOGGER.warn("Module " + module.getName() + " does not define a minor version.");
++ LOGGER.warning("Module " + module.getName() + " does not define a minor version.");
+ }
+ else
+ {
+@@ -550,14 +550,14 @@
+ }
+ if (module.getPatchLevel() == null)
+ {
+- LOGGER.debug("Module " + module.getName() + " does not define a patch level.");
++ LOGGER.config("Module " + module.getName() + " does not define a patch level.");
+ }
+ else
+ {
+ if (acceptVersion(moduleRequirement.getPatchLevel(),
+ module.getPatchLevel()) > 0)
+ {
+- LOGGER.debug("Did not accept patchlevel: "
++ LOGGER.config("Did not accept patchlevel: "
+ + moduleRequirement.getPatchLevel() + " - "
+ + module.getPatchLevel());
+ return false;
+@@ -699,4 +699,4 @@
+ p.println(mod.getDescription());
+ }
+ }
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageSorter.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageSorter.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageSorter.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageSorter.java 2021-02-23 12:19:11.752198616 +0000
+@@ -23,8 +23,7 @@
+ import java.util.Iterator;
+ import java.util.List;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+
+ /**
+@@ -180,7 +179,7 @@
+ }
+
+ /** A logger for debug-messages. */
+- private static final Log LOGGER = LogFactory.getLog(PackageSorter.class);
++ private static final Logger LOGGER = Logger.getLogger(PackageSorter.class.getName());
+
+ /**
+ * DefaultConstructor.
+@@ -313,7 +312,7 @@
+ final SortModule reqMod = (SortModule) moduleMap.get(moduleName);
+ if (reqMod == null)
+ {
+- LOGGER.warn("Invalid state: Required dependency of '" + moduleName + "' had an error.");
++ LOGGER.warning("Invalid state: Required dependency of '" + moduleName + "' had an error.");
+ continue;
+ }
+ if (reqMod.getPosition() >= position)
+@@ -415,7 +414,7 @@
+ moduleMap.get(requiredModules[i].getModuleClass());
+ if (dependentModule == null)
+ {
+- LOGGER.warn
++ LOGGER.warning
+ ("A dependent module was not found in the list of known modules." +
+ requiredModules[i].getModuleClass());
+ continue;
+@@ -431,11 +430,11 @@
+ moduleMap.get(optionalModules[i].getModuleClass());
+ if (dependentModule == null)
+ {
+- LOGGER.warn("A dependent module was not found in the list of known modules.");
++ LOGGER.warning("A dependent module was not found in the list of known modules.");
+ continue;
+ }
+ collector.add(dependentModule.getSubSystem());
+ }
+ return collector;
+ }
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageState.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageState.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageState.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageState.java 2021-02-23 12:22:15.204942814 +0000
+@@ -17,8 +17,8 @@
+
+ package org.pentaho.reporting.libraries.base.boot;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+
+ /**
+ * The package state class is used by the package manager to keep track of
+@@ -31,7 +31,7 @@
+ public class PackageState
+ {
+ /** A logger. */
+- private static final Log LOGGER = LogFactory.getLog(PackageState.class);
++ private static final Logger LOGGER = Logger.getLogger(PackageState.class.getName());
+
+ /**
+ * A constant defining that the package is new.
+@@ -119,20 +119,20 @@
+ }
+ catch (NoClassDefFoundError noClassDef)
+ {
+- LOGGER.warn("Unable to load module classes for " +
++ LOGGER.warning("Unable to load module classes for " +
+ this.module.getName() + ':' + noClassDef.getMessage());
+ this.state = STATE_ERROR;
+ }
+ catch (Exception e)
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+ // its still worth a warning, but now we are more verbose ...
+- LOGGER.warn("Unable to configure the module " + this.module.getName(), e);
++ LOGGER.warning("Unable to configure the module " + this.module.getName() + " : " + e);
+ }
+- else if (LOGGER.isWarnEnabled())
++ else if (LOGGER.isLoggable(Level.WARNING))
+ {
+- LOGGER.warn("Unable to configure the module " + this.module.getName());
++ LOGGER.warning("Unable to configure the module " + this.module.getName());
+ }
+ this.state = STATE_ERROR;
+ }
+@@ -187,32 +187,32 @@
+ }
+ catch (NoClassDefFoundError noClassDef)
+ {
+- LOGGER.warn("Unable to load module classes for " + this.module.getName() + ':' + noClassDef.getMessage());
++ LOGGER.warning("Unable to load module classes for " + this.module.getName() + ':' + noClassDef.getMessage());
+ this.state = STATE_ERROR;
+ }
+ catch (ModuleInitializeException me)
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+ // its still worth a warning, but now we are more verbose ...
+- LOGGER.warn("Unable to initialize the module " + this.module.getName(), me);
++ LOGGER.warning("Unable to initialize the module " + this.module.getName() + " : " + me);
+ }
+- else if (LOGGER.isWarnEnabled())
++ else if (LOGGER.isLoggable(Level.WARNING))
+ {
+- LOGGER.warn("Unable to initialize the module " + this.module.getName());
++ LOGGER.warning("Unable to initialize the module " + this.module.getName());
+ }
+ this.state = STATE_ERROR;
+ }
+ catch (Exception e)
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+ // its still worth a warning, but now we are more verbose ...
+- LOGGER.warn("Unable to initialize the module " + this.module.getName(), e);
++ LOGGER.warning("Unable to initialize the module " + this.module.getName() + " : " + e);
+ }
+- else if (LOGGER.isWarnEnabled())
++ else if (LOGGER.isLoggable(Level.WARNING))
+ {
+- LOGGER.warn("Unable to initialize the module " + this.module.getName());
++ LOGGER.warning("Unable to initialize the module " + this.module.getName());
+ }
+ this.state = STATE_ERROR;
+ }
+@@ -267,4 +267,4 @@
+ {
+ this.state = STATE_ERROR;
+ }
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/config/PropertyFileConfiguration.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/config/PropertyFileConfiguration.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/config/PropertyFileConfiguration.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/config/PropertyFileConfiguration.java 2021-02-23 12:13:55.788194558 +0000
+@@ -22,8 +22,7 @@
+ import java.io.InputStream;
+ import java.util.Properties;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+
+ /**
+@@ -34,7 +33,7 @@
+ public class PropertyFileConfiguration extends HierarchicalConfiguration
+ {
+ /** A logger for debug-messages. */
+- private static final Log LOGGER = LogFactory.getLog(PropertyFileConfiguration.class);
++ private static final Logger LOGGER = Logger.getLogger(PropertyFileConfiguration.class.getName());
+ /** A serialization related constant. */
+ private static final long serialVersionUID = 2423181637547944866L;
+
+@@ -89,7 +88,7 @@
+ }
+ else
+ {
+- LOGGER.debug("Configuration file not found in the classpath: " + resourceName);
++ LOGGER.config("Configuration file not found in the classpath: " + resourceName);
+ }
+
+ }
+@@ -118,9 +117,9 @@
+ }
+ catch (IOException ioe)
+ {
+- LOGGER.warn("Unable to read configuration", ioe);
++ LOGGER.warning("Unable to read configuration:" + ioe);
+ }
+
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ClassQueryTool.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ClassQueryTool.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ClassQueryTool.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ClassQueryTool.java 2021-02-23 12:24:05.460991092 +0000
+@@ -26,8 +26,7 @@
+ import java.util.zip.ZipEntry;
+ import java.util.zip.ZipInputStream;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * The class-query tool loads classes using a classloader and calls "processClass" for each class encountered. This is
+@@ -41,7 +40,7 @@
+ public abstract class ClassQueryTool
+ {
+ /** A logger. */
+- private static final Log logger = LogFactory.getLog(ClassQueryTool.class);
++ private static final Logger logger = Logger.getLogger(ClassQueryTool.class.getName());
+
+ /**
+ * The default constructor.
+@@ -89,7 +88,7 @@
+ catch (Throwable e)
+ {
+ // ignore ..
+- logger.debug("At class '" + className + "': " + e);
++ logger.config("At class '" + className + "': " + e);
+ }
+ }
+
+@@ -137,7 +136,7 @@
+ }
+ catch (final IOException e1)
+ {
+- logger.debug("Caught IO-Exception while processing file " + jarFile, e1);
++ logger.config("Caught IO-Exception while processing file " + jarFile + " : " + e1);
+ }
+ }
+
+@@ -225,7 +224,7 @@
+ for (int i = 0; i < allArray.length; i++)
+ {
+ final URL url = allArray[i];
+- logger.debug(url);
++ logger.config(url.toString());
+ }
+ for (int i = 0; i < urlsArray.length; i++)
+ {
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/DebugLog.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/DebugLog.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/DebugLog.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/DebugLog.java 2021-02-23 12:26:00.488084723 +0000
+@@ -17,8 +17,7 @@
+
+ package org.pentaho.reporting.libraries.base.util;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * This class provides static log messages for on-going bug-hunting efforts. This removes the need to create
+@@ -29,7 +28,7 @@
+ public final class DebugLog
+ {
+ /** A logger. */
+- private static final Log logger = LogFactory.getLog(DebugLog.class);
++ private static final Logger logger = Logger.getLogger(DebugLog.class.getName());
+
+ /**
+ * Logs a message using the debug-logger. By channeling all temporary log messages through this method,
+@@ -39,7 +38,7 @@
+ */
+ public static void log(final Object message)
+ {
+- logger.info(message);
++ logger.info(message.toString());
+ }
+
+ /**
+@@ -51,7 +50,7 @@
+ */
+ public static void log(final Object message, final Throwable t)
+ {
+- logger.info(message, t);
++ logger.info(message + " : " + t);
+ }
+
+ /**
+@@ -68,7 +67,7 @@
+ public static void logHereWE()
+ {
+ //noinspection ThrowableInstanceNeverThrown
+- logger.info("HERE: Debug point reached", new Exception("Debug-Point reached"));
++ logger.info("HERE: Debug point reached");
+ }
+
+ /**
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ObjectUtilities.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ObjectUtilities.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ObjectUtilities.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ObjectUtilities.java 2021-02-23 12:30:11.253468898 +0000
+@@ -29,8 +29,8 @@
+ import java.util.Arrays;
+ import java.util.StringTokenizer;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+
+ /**
+ * A collection of useful static utility methods for handling classes and object instantiation.
+@@ -39,7 +39,7 @@
+ */
+ public final class ObjectUtilities
+ {
+- private static final Log LOGGER = LogFactory.getLog(ObjectUtilities.class);
++ private static final Logger LOGGER = Logger.getLogger(ObjectUtilities.class.getName());
+
+ /**
+ * A constant for using the TheadContext as source for the classloader.
+@@ -180,15 +180,15 @@
+ }
+ catch (NoSuchMethodException e)
+ {
+- LOGGER.warn("Object without clone() method is impossible on class " + aClass, e);
++ LOGGER.warning("Object without clone() method is impossible on class " + aClass + " : " + e);
+ }
+ catch (IllegalAccessException e)
+ {
+- LOGGER.warn("Object.clone(): unable to call method 'clone()' on class " + aClass, e);
++ LOGGER.warning("Object.clone(): unable to call method 'clone()' on class " + aClass + " : " + e);
+ }
+ catch (InvocationTargetException e)
+ {
+- LOGGER.warn("Object without clone() method is impossible on class " + aClass, e);
++ LOGGER.warning("Object without clone() method is impossible on class " + aClass + " : " + e);
+ }
+ throw new CloneNotSupportedException
+ ("Failed to clone: Clone caused an Exception while cloning type " + aClass);
+@@ -424,32 +424,32 @@
+ if (type != null && type.isAssignableFrom(c) == false)
+ {
+ // this is unacceptable and means someone messed up the configuration
+- LOGGER.warn("Specified class " + className + " is not of expected type " + type);
++ LOGGER.warning("Specified class " + className + " is not of expected type " + type);
+ return null;
+ }
+ return c.newInstance();
+ }
+ catch (ClassNotFoundException e)
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+- LOGGER.debug("Specified class " + className + " does not exist.");
++ LOGGER.config("Specified class " + className + " does not exist.");
+ }
+ // sometimes, this one is expected.
+ }
+ catch (NoClassDefFoundError e)
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+- LOGGER.debug("Specified class " + className + " cannot be loaded [NOCLASSDEFERROR].");
++ LOGGER.config("Specified class " + className + " cannot be loaded [NOCLASSDEFERROR].");
+ }
+ }
+ catch (Throwable e)
+ {
+ // this is more severe than a class not being found at all
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+- LOGGER.info("Specified class " + className + " failed to instantiate correctly.", e);
++ LOGGER.info("Specified class " + className + " failed to instantiate correctly." + " : " + e);
+ }
+ else
+ {
+@@ -615,4 +615,4 @@
+ }
+ return hashCode;
+ }
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/PngEncoder.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/PngEncoder.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/PngEncoder.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/PngEncoder.java 2021-02-23 12:27:15.484797751 +0000
+@@ -27,8 +27,7 @@
+ import java.util.zip.Deflater;
+ import java.util.zip.DeflaterOutputStream;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.encoder.ImageEncoder;
+ import org.pentaho.reporting.libraries.base.encoder.UnsupportedEncoderException;
+
+@@ -66,7 +65,7 @@
+ public class PngEncoder implements ImageEncoder
+ {
+ /** A logger for debug-messages. */
+- private static final Log logger = LogFactory.getLog(PngEncoder.class);
++ private static final Logger logger = Logger.getLogger(PngEncoder.class.getName());
+
+ /**
+ * Constant specifying that alpha channel should be encoded.
+@@ -622,12 +621,12 @@
+ }
+ catch (Exception e)
+ {
+- logger.error("interrupted waiting for pixels!", e);
++ logger.severe("interrupted waiting for pixels: " + e);
+ return false;
+ }
+ if ((pg.getStatus() & ImageObserver.ABORT) != 0)
+ {
+- logger.error("image fetch aborted or errored");
++ logger.severe("image fetch aborted or errored");
+ return false;
+ }
+
+@@ -709,7 +708,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.error("Failed to write PNG Data", e);
++ logger.severe("Failed to write PNG Data:" + e);
+ return false;
+ }
+ }
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ResourceBundleSupport.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ResourceBundleSupport.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ResourceBundleSupport.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ResourceBundleSupport.java 2021-02-23 12:27:45.015078518 +0000
+@@ -36,8 +36,7 @@
+ import javax.swing.JMenu;
+ import javax.swing.KeyStroke;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * An utility class to ease up using property-file resource bundles.
+@@ -60,7 +59,7 @@
+ /**
+ * A logger for debug-messages.
+ */
+- private static final Log logger = LogFactory.getLog(ResourceBundleSupport.class);
++ private static final Logger logger = Logger.getLogger(ResourceBundleSupport.class.getName());
+
+ /**
+ * The resource bundle that will be used for local lookups.
+@@ -259,7 +258,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.error("Error during global lookup", e);
++ logger.severe("Error during global lookup: " + e);
+ throw new MissingResourceException("Error during global lookup", getResourceBase(), key);
+ }
+ }
+@@ -643,7 +642,7 @@
+ final URL in = ObjectUtilities.getResource(name, ResourceBundleSupport.class);
+ if (in == null)
+ {
+- logger.warn("Unable to find file in the class path: " + name + "; key=" + key);
++ logger.warning("Unable to find file in the class path: " + name + "; key=" + key);
+ }
+ return in;
+ }
+@@ -668,13 +667,13 @@
+
+ if (in == null)
+ {
+- logger.warn("Unable to find file in the class path: " + resourceName);
++ logger.warning("Unable to find file in the class path: " + resourceName);
+ return new ImageIcon(createTransparentImage(1, 1));
+ }
+ final Image img = Toolkit.getDefaultToolkit().createImage(in);
+ if (img == null)
+ {
+- logger.warn("Unable to instantiate the image: " + resourceName);
++ logger.warning("Unable to instantiate the image: " + resourceName);
+ return new ImageIcon(createTransparentImage(1, 1));
+ }
+ if (scale)
+@@ -808,7 +808,7 @@
+ }
+ catch (MissingResourceException mre)
+ {
+- logger.warn ("ResourceBundleSupport#getString(,,)", mre);
++ logger.warning ("ResourceBundleSupport#getString(,,): " + mre);
+ return '!' + key + '!';
+ }
+ }
+@@ -821,7 +821,7 @@
+ }
+ catch (MissingResourceException mre)
+ {
+- logger.warn ("ResourceBundleSupport#getString(,,)", mre);
++ logger.warning ("ResourceBundleSupport#getString(,,): " + mre);
+ return '!' + key + '!';
+ }
+ }
+@@ -836,7 +836,7 @@
+ }
+ catch (MissingResourceException mre)
+ {
+- logger.warn ("ResourceBundleSupport#getString(,,)", mre);
++ logger.warning ("ResourceBundleSupport#getString(,,): " + mre);
+ return '!' + key + '!';
+ }
+ }
+@@ -852,7 +852,7 @@
+ }
+ catch (MissingResourceException mre)
+ {
+- logger.warn ("ResourceBundleSupport#getString(,,)", mre);
++ logger.warning ("ResourceBundleSupport#getString(,,): " + mre);
+ return '!' + key + '!';
+ }
+ }
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/WaitingImageObserver.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/WaitingImageObserver.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/WaitingImageObserver.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/WaitingImageObserver.java 2021-02-23 12:30:28.223630238 +0000
+@@ -22,8 +22,7 @@
+ import java.awt.image.BufferedImage;
+ import java.awt.image.ImageObserver;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * This image observer blocks until the image is completely loaded. AWT defers the loading of images until they are
+@@ -37,7 +36,7 @@
+ public class WaitingImageObserver implements ImageObserver
+ {
+ /** A logger. */
+- private static final Log LOGGER = LogFactory.getLog(WaitingImageObserver.class);
++ private static final Logger LOGGER = Logger.getLogger(WaitingImageObserver.class.getName());
+
+ /**
+ * For serialization.
+@@ -149,7 +148,7 @@
+ }
+ catch (InterruptedException e)
+ {
+- LOGGER.info("WaitingImageObserver.waitImageLoaded(): InterruptedException thrown", e);
++ LOGGER.info("WaitingImageObserver.waitImageLoaded(): InterruptedException thrown: " + e);
+ }
+
+ if (maxLoadTime > 0 && lastUpdate < (System.currentTimeMillis() - maxLoadTime))
+@@ -172,4 +171,4 @@
+ {
+ return this.error;
+ }
+-}
+\ No newline at end of file
++}
+--- a/source/org/pentaho/reporting/libraries/base/util/IOUtils.java
++++ b/source/org/pentaho/reporting/libraries/base/util/IOUtils.java
+@@ -34,8 +34,7 @@
+ import java.sql.Clob;
+ import java.sql.SQLException;
+
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+
+ /**
+ * The IOUtils provide some IO related helper methods.
+@@ -48,7 +47,7 @@
+ * the singleton instance of the utility package.
+ */
+ private static IOUtils instance;
+- private static final Log logger = LogFactory.getLog(IOUtils.class);
++ private static final Logger logger = Logger.getLogger(IOUtils.class.getName());
+ /**
+ * DefaultConstructor.
+ */
+@@ -855,7 +854,7 @@
+ final long length = clob.length();
+ if (length > Integer.MAX_VALUE)
+ {
+- logger.warn ("This CLOB contains more than 2^31 characters. We cannot handle that.");
++ logger.warning ("This CLOB contains more than 2^31 characters. We cannot handle that.");
+ return null;
+ }
+
+@@ -867,7 +866,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.warn ("Copying the stream failed.", e);
++ logger.warning ("Copying the stream failed: " + e);
+ }
+ try
+ {
+@@ -875,7 +874,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.warn ("Failed to close input stream. No worries, we will be alright anyway.", e);
++ logger.warning ("Failed to close input stream. No worries, we will be alright anyway: " + e);
+ }
+ return outStream.toString();
+ }
+@@ -898,7 +897,7 @@
+ final long length = clob.length();
+ if (length > Integer.MAX_VALUE)
+ {
+- logger.warn ("This CLOB contains more than 2^31 characters. We cannot handle that.");
++ logger.warning ("This CLOB contains more than 2^31 characters. We cannot handle that.");
+ return null;
+ }
+
+@@ -910,7 +909,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.warn ("Copying the stream failed.", e);
++ logger.warning ("Copying the stream failed: " + e);
+ }
+ try
+ {
+@@ -918,7 +917,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.warn ("Failed to close input stream. No worries, we will be alright anyway.", e);
++ logger.warning ("Failed to close input stream. No worries, we will be alright anyway: " + e);
+ }
+ return outStream.toByteArray();
+ }
diff --git a/external/jfreereport/patches/libfonts-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/libfonts-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..723a732a593a
--- /dev/null
+++ b/external/jfreereport/patches/libfonts-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,506 @@
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java 2021-03-12 10:15:06.215353433 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java 2021-03-12 10:26:44.036236575 +0000
+@@ -37,8 +37,7 @@
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.base.util.StringUtils;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 21.07.2007, 20:14:05
+@@ -47,7 +46,8 @@
+ */
+ public class AfmFontRegistry extends AbstractFontFileRegistry
+ {
+- private static final Log logger = LogFactory.getLog(AfmFontRegistry.class);
++ private static final Logger logger = Logger.getLogger(AfmFontRegistry.class.getName());
++
+ /**
+ * The font path filter is used to collect font files and directories during
+ * the font path registration.
+@@ -133,7 +133,7 @@
+ filePfb.isFile() == false ||
+ filePfb.canRead() == false)
+ {
+- logger.warn("Cannot embedd font: " + filePfb + " is missing for " + font);
++ logger.warning("Cannot embedd font: " + filePfb + " is missing for " + font);
+ embedded = false;
+ }
+
+@@ -264,11 +264,11 @@
+ catch (final ClassNotFoundException cnfe)
+ {
+ // ignore the exception.
+- logger.debug("Failed to restore the cache: Cache was created by a different version of LibFonts");
++ logger.config("Failed to restore the cache: Cache was created by a different version of LibFonts");
+ }
+ catch (Exception e)
+ {
+- logger.debug("Failed to restore the cache:", e);
++ logger.config("Failed to restore the cache: " + e);
+ }
+ }
+
+@@ -311,14 +311,14 @@
+ catch (IOException e)
+ {
+ // ignore ..
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ // should not happen
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java 2021-03-12 10:15:06.228353587 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java 2021-03-12 10:27:11.614524616 +0000
+@@ -31,8 +31,7 @@
+ import org.pentaho.reporting.libraries.resourceloader.factory.property.PropertiesResourceFactory;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * A global registry for all supported encodings. This offers the option to fall
+@@ -42,7 +41,7 @@
+ */
+ public final class EncodingRegistry
+ {
+- private static final Log logger = LogFactory.getLog(EncodingRegistry.class);
++ private static final Logger logger = Logger.getLogger(EncodingRegistry.class.getName());
+
+ /**
+ * Implementation doc: This class uses several sources to load the encodings.
+@@ -266,7 +265,7 @@
+ catch (Exception e)
+ {
+ // fall back ...
+- logger.warn("Failed to create external-encoding instance for key " + key, e);
++ logger.warning("Failed to create external-encoding instance for key " + key + " : " + e);
+ }
+ }
+ if (isEncodingSupportedJVM(name))
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java 2021-03-12 10:15:06.218353469 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java 2021-03-12 10:27:47.015894357 +0000
+@@ -35,8 +35,7 @@
+ import org.pentaho.reporting.libraries.fonts.encoding.External8BitEncodingData;
+ import org.pentaho.reporting.libraries.base.config.DefaultConfiguration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * A simple sourcecode generator.
+@@ -45,7 +44,7 @@
+ */
+ public class EncodingGenerator
+ {
+- private static final Log logger = LogFactory.getLog(EncodingGenerator.class);
++ private static final Logger logger = Logger.getLogger(EncodingGenerator.class.getName());
+
+ private File targetDirectory;
+ private DefaultConfiguration propertySet;
+@@ -200,7 +199,7 @@
+ }
+ catch(Exception e)
+ {
+- logger.warn ("Failed to generate Encoding " + key, e);
++ logger.warning("Failed to generate Encoding " + key + " : " + e);
+ }
+ }
+ }
+@@ -269,7 +268,7 @@
+ }
+ catch(Exception e)
+ {
+- logger.warn ("Failed to generate Encoding " + key, e);
++ logger.warning("Failed to generate Encoding " + key + " : " + e);
+ }
+ }
+
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java 2021-03-12 10:15:06.217353457 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java 2021-03-12 10:28:33.904384084 +0000
+@@ -37,8 +37,7 @@
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.base.util.StringUtils;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 21.07.2007, 16:58:06
+@@ -47,7 +46,7 @@
+ */
+ public class PfmFontRegistry extends AbstractFontFileRegistry
+ {
+- private static final Log logger = LogFactory.getLog(PfmFontRegistry.class);
++ private static final Logger logger = Logger.getLogger(PfmFontRegistry.class.getName());
+
+ /**
+ * The font path filter is used to collect font files and directories during
+@@ -146,7 +145,7 @@
+ filePfb.isFile() == false ||
+ filePfb.canRead() == false)
+ {
+- logger.warn("Cannot embedd font: " + filePfb + " is missing for " + font);
++ logger.warning("Cannot embedd font: " + filePfb + " is missing for " + font);
+ embedded = false;
+ }
+
+@@ -155,7 +154,7 @@
+ {
+ if (pfmFont.isItextCompatible() == false)
+ {
+- logger.warn("Cannot embedd font: pfb-file for " + font + " is not valid (according to iText).");
++ logger.warning("Cannot embedd font: pfb-file for " + font + " is not valid (according to iText).");
+ }
+ }
+ registerFont (pfmFont);
+@@ -283,7 +282,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.debug("Failed to restore the cache:", e);
++ logger.config("Failed to restore the cache: " + e);
+ }
+ }
+
+@@ -326,14 +325,14 @@
+ catch (IOException e)
+ {
+ // ignore ..
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ // should not happen
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java 2021-03-12 10:15:06.229353599 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java 2021-03-12 10:25:43.831607771 +0000
+@@ -25,8 +25,7 @@
+ import java.util.Iterator;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.fonts.LibFontBoot;
+ import org.pentaho.reporting.libraries.fonts.encoding.EncodingRegistry;
+ import org.pentaho.reporting.libraries.base.util.StringUtils;
+@@ -39,7 +38,7 @@
+ */
+ public abstract class AbstractFontFileRegistry implements FontRegistry
+ {
+- private static final Log logger = LogFactory.getLog(AbstractFontFileRegistry.class);
++ private static final Logger logger = Logger.getLogger(AbstractFontFileRegistry.class.getName());
+
+ private HashMap seenFiles;
+
+@@ -74,7 +73,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.warn("Extra font path " + extraDir + " could not be fully registered.", e);
++ logger.warning("Extra font path " + extraDir + " could not be fully registered: " + e);
+ }
+ }
+ }
+@@ -98,13 +97,13 @@
+ final String jrepath = safeSystemGetProperty("java.home", ".");
+ final String fs = safeSystemGetProperty("file.separator", File.separator);
+
+- logger.debug("Running on operating system: " + osname);
+- logger.debug("Character encoding used as default: " + encoding);
++ logger.config("Running on operating system: " + osname);
++ logger.config("Character encoding used as default: " + encoding);
+
+ if (safeSystemGetProperty("mrj.version", null) != null)
+ {
+ final String userhome = safeSystemGetProperty("user.home", ".");
+- logger.debug("Detected MacOS (Property 'mrj.version' is present.");
++ logger.config("Detected MacOS (Property 'mrj.version' is present.");
+ registerFontPath(new File(userhome + "/Library/Fonts"), encoding);
+ registerFontPath(new File("/Library/Fonts"), encoding);
+ registerFontPath(new File("/Network/Library/Fonts"), encoding);
+@@ -116,7 +115,7 @@
+ }
+ else
+ {
+- logger.debug("Assuming unix like file structures");
++ logger.config("Assuming unix like file structures");
+ // Assume X11 is installed in the default location.
+ registerFontPath(new File("/usr/X11R6/lib/X11/fonts"), encoding);
+ registerFontPath(new File("/usr/share/fonts"), encoding);
+@@ -145,7 +144,7 @@
+ */
+ private void registerWindowsFontPath(final String encoding)
+ {
+- logger.debug("Found 'Windows' in the OS name, assuming DOS/Win32 structures");
++ logger.config("Found 'Windows' in the OS name, assuming DOS/Win32 structures");
+ // Assume windows
+ // If you are not using windows, ignore this. This just checks if a windows system
+ // directory exist and includes a font dir.
+@@ -182,7 +181,7 @@
+ }
+ }
+ }
+- logger.debug("Fonts located in \"" + fontPath + '\"');
++ logger.config("Fonts located in \"" + fontPath + '\"');
+ if (fontPath != null)
+ {
+ final File file = new File(fontPath);
+@@ -272,7 +271,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.warn("Font " + file + " is invalid. Message:" + e.getMessage(), e);
++ logger.warning("Font " + file + " is invalid. Message: " + e);
+ }
+ }
+ }
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java 2021-03-12 10:15:06.205353315 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java 2021-03-12 10:29:03.600694237 +0000
+@@ -22,8 +22,7 @@
+ import java.io.IOException;
+
+ import org.pentaho.reporting.libraries.fonts.tools.ByteTable;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 11.06.2006, 17:11:16
+@@ -32,7 +31,7 @@
+ */
+ public final class GraphemeClassifier
+ {
+- private static final Log logger = LogFactory.getLog(GraphemeClassifier.class);
++ private static final Logger logger = Logger.getLogger(GraphemeClassifier.class.getName());
+
+ public static final int OTHER = 0;
+
+@@ -70,7 +69,7 @@
+ }
+ catch(Exception e)
+ {
+- logger.warn ("Unable to load the pre-generated classification data.", e);
++ logger.warning("Unable to load the pre-generated classification data: " + e);
+ }
+ finally
+ {
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java 2021-03-12 10:15:06.214353421 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java 2021-03-12 10:29:19.746862875 +0000
+@@ -24,8 +24,7 @@
+ import org.pentaho.reporting.libraries.fonts.ByteAccessUtilities;
+ import org.pentaho.reporting.libraries.fonts.io.FileFontDataInputSource;
+ import org.pentaho.reporting.libraries.fonts.io.FontDataInputSource;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 06.11.2005, 18:27:21
+@@ -34,7 +33,7 @@
+ */
+ public class TrueTypeFont
+ {
+- private static final Log logger = LogFactory.getLog(TrueTypeFont.class);
++ private static final Logger logger = Logger.getLogger(TrueTypeFont.class.getName());
+
+ private static class TrueTypeFontHeader
+ {
+@@ -327,7 +326,7 @@
+ (FontHeaderTable) getTable(FontHeaderTable.TABLE_ID);
+ if (header == null)
+ {
+- logger.warn("The font '" + filename + "' does not have a 'head' table. The font file is not valid.");
++ logger.warning("The font '" + filename + "' does not have a 'head' table. The font file is not valid.");
+ return null;
+ }
+ final byte[] buffer =
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java 2021-03-12 10:15:06.213353409 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java 2021-03-12 10:29:38.442058137 +0000
+@@ -21,8 +21,7 @@
+ import java.io.IOException;
+ import java.util.HashMap;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.fonts.io.FileFontDataInputSource;
+ import org.pentaho.reporting.libraries.fonts.io.FontDataInputSource;
+ import org.pentaho.reporting.libraries.fonts.registry.FontContext;
+@@ -38,7 +37,7 @@
+ */
+ public class TrueTypeFontMetricsFactory implements FontMetricsFactory
+ {
+- private static final Log logger = LogFactory.getLog(TrueTypeFontMetricsFactory.class);
++ private static final Logger logger = Logger.getLogger(TrueTypeFontMetricsFactory.class.getName());
+ private HashMap fontRecords;
+
+ public TrueTypeFontMetricsFactory()
+@@ -77,7 +76,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.warn("Unable to read the font.", e);
++ logger.warning("Unable to read the font: " + e);
+ // todo: We should throw a better exception instead, shouldnt we?
+ throw new IllegalStateException();
+ }
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java 2021-03-12 10:15:06.214353421 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java 2021-03-12 10:31:15.504071887 +0000
+@@ -28,8 +28,7 @@
+ import java.io.Serializable;
+ import java.util.HashMap;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.fonts.FontException;
+ import org.pentaho.reporting.libraries.fonts.LibFontBoot;
+ import org.pentaho.reporting.libraries.fonts.cache.FontCache;
+@@ -61,7 +60,7 @@
+ return secondLevelCache;
+ }
+
+- private static final Log logger = LogFactory.getLog(TrueTypeFontRegistry.class);
++ private static final Logger logger = Logger.getLogger(TrueTypeFontRegistry.class.getName());
+
+ /**
+ * The font path filter is used to collect font files and directories during the font path registration.
+@@ -180,7 +179,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.info("Unable to register font file " + file, e);
++ logger.info("Unable to register font file " + file + " : " + e);
+ // An error must not stop us on our holy mission to find and register
+ // all fonts :)
+ return false;
+@@ -206,7 +205,7 @@
+ }
+ catch (FontException e)
+ {
+- logger.info("The font '" + font.getFilename() + "' is invalid.", e);
++ logger.info("The font '" + font.getFilename() + "' is invalid: " + e);
+ return;
+ }
+
+@@ -347,11 +346,11 @@
+ catch (final ClassNotFoundException cnfe)
+ {
+ // ignore the exception.
+- logger.debug("Failed to restore the cache: Cache was created by a different version of LibFonts");
++ logger.config("Failed to restore the cache: Cache was created by a different version of LibFonts");
+ }
+ catch (Exception e)
+ {
+- logger.debug("Non-Fatal: Failed to restore the cache. The cache will be rebuilt.", e);
++ logger.config("Non-Fatal: Failed to restore the cache. The cache will be rebuilt: " + e);
+ }
+ }
+
+@@ -394,14 +393,14 @@
+ catch (IOException e)
+ {
+ // ignore ..
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ // should not happen
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+--- a/source/org/pentaho/reporting/libraries/fonts/itext/BaseFontSupport.java
++++ b/source/org/pentaho/reporting/libraries/fonts/itext/BaseFontSupport.java
+@@ -34,8 +34,8 @@
+ import org.pentaho.reporting.libraries.fonts.merge.CompoundFontRecord;
+ import org.pentaho.reporting.libraries.base.config.ExtendedConfiguration;
+ import org.pentaho.reporting.libraries.base.util.StringUtils;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+
+ /**
+ * iText font support.
+@@ -44,7 +44,7 @@
+ */
+ public class BaseFontSupport implements FontMapper
+ {
+- private static final Log logger = LogFactory.getLog(BaseFontSupport.class);
++ private static final Logger logger = Logger.getLogger(BaseFontSupport.class.getName());
+ /**
+ * Storage for BaseFont objects created.
+ */
+@@ -235,7 +235,7 @@
+ final FontSource source = (FontSource) registryFontRecord;
+ if (source.isEmbeddable() == false)
+ {
+- logger.warn("License of font forbids embedded usage for font: " + fontKey);
++ logger.warning("License of font forbids embedded usage for font: " + fontKey);
+ // strict mode here?
+ embeddedOverride = false;
+ }
+@@ -286,13 +286,13 @@
+ }
+ catch (Exception e)
+ {
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage(), e);
++ logger.config("BaseFont.createFont failed. Key = " + fontKey + ": " + e);
+ }
+- else if (logger.isWarnEnabled())
++ else if (logger.isLoggable(Level.WARNING))
+ {
+- logger.warn("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage());
++ logger.warning("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage());
+ }
+ }
+ // fallback .. use BaseFont.HELVETICA as default
+@@ -322,7 +322,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.warn("BaseFont.createFont for FALLBACK failed.", e);
++ logger.warning("BaseFont.createFont for FALLBACK failed: " + e);
+ throw new BaseFontCreateException("Null font = " + fontKey);
+ }
+ throw new BaseFontCreateException("BaseFont creation failed, null font: " + fontKey);
diff --git a/external/jfreereport/patches/libformula-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/libformula-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..5a578cf56d08
--- /dev/null
+++ b/external/jfreereport/patches/libformula-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,266 @@
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/Formula.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/Formula.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/Formula.java 2021-02-23 14:41:06.962127389 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/Formula.java 2021-02-23 14:48:18.016328356 +0000
+@@ -19,8 +19,7 @@
+
+ import java.io.Serializable;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.formula.lvalues.LValue;
+ import org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair;
+ import org.pentaho.reporting.libraries.formula.parser.FormulaParseException;
+@@ -40,7 +39,7 @@
+ */
+ public class Formula implements Serializable, Cloneable
+ {
+- private static final Log logger = LogFactory.getLog(Formula.class);
++ private static final Logger logger = Logger.getLogger(Formula.class.getName());
+ private LValue rootReference;
+ private static final long serialVersionUID = -1176925812499923546L;
+
+@@ -105,7 +104,7 @@
+ final Type type = typeValuePair.getType();
+ if (type.isFlagSet(Type.ERROR_TYPE))
+ {
+- logger.debug("Error: " + typeValuePair.getValue());
++ logger.config("Error: " + typeValuePair.getValue());
+ }
+ else if (type.isFlagSet(Type.ARRAY_TYPE))
+ {
+@@ -131,7 +130,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.warn("Evaluation failed unexpectedly: ", e);
++ logger.warning("Evaluation failed unexpectedly: " + e);
+ return new TypeValuePair(ErrorType.TYPE, LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE);
+ }
+ }
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java 2021-02-23 14:41:06.980127564 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java 2021-02-23 14:48:29.995445103 +0000
+@@ -25,9 +25,7 @@
+ import org.pentaho.reporting.libraries.base.util.HashNMap;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
+-
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 02.11.2006, 12:48:32
+@@ -36,7 +34,7 @@
+ */
+ public class DefaultFunctionRegistry implements FunctionRegistry
+ {
+- private static final Log logger = LogFactory.getLog(DefaultFunctionRegistry.class);
++ private static final Logger logger = Logger.getLogger(DefaultFunctionRegistry.class.getName());
+
+ private static final String FUNCTIONS_PREFIX = "org.pentaho.reporting.libraries.formula.functions.";
+ private static final String[] EMPTY_ARRAY = new String[0];
+@@ -72,7 +70,7 @@
+ final Function function = createFunction(aName);
+ if (function == null)
+ {
+- logger.debug ("There is no such function: " + aName);
++ logger.config ("There is no such function: " + aName);
+ }
+ else
+ {
+@@ -132,7 +130,7 @@
+ (functionClass, DefaultFunctionRegistry.class, Function.class);
+ if (function == null)
+ {
+- logger.debug ("There is no such function: " + name);
++ logger.config ("There is no such function: " + name);
+ }
+ else
+ {
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java 2021-02-23 14:41:06.983127594 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java 2021-02-23 14:48:54.904687864 +0000
+@@ -27,8 +27,7 @@
+ import org.pentaho.reporting.libraries.formula.typing.Type;
+ import org.pentaho.reporting.libraries.formula.typing.coretypes.ErrorType;
+ import org.pentaho.reporting.libraries.formula.typing.coretypes.LogicalType;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * This function returns true if the parameter is of error and not of error type NA.
+@@ -37,7 +36,7 @@
+ */
+ public class IsErrFunction implements Function
+ {
+- private static final Log logger = LogFactory.getLog(IsErrFunction.class);
++ private static final Logger logger = Logger.getLogger(IsErrFunction.class.getName());
+ private static final TypeValuePair RETURN_TRUE = new TypeValuePair(LogicalType.TYPE, Boolean.TRUE);
+ private static final TypeValuePair RETURN_FALSE = new TypeValuePair(LogicalType.TYPE, Boolean.FALSE);
+ private static final long serialVersionUID = 6749192734608313367L;
+@@ -61,7 +60,7 @@
+
+ if (ErrorType.TYPE.equals(type) && value instanceof ErrorValue)
+ {
+- logger.warn ("Passing errors around is deprecated. Throw exceptions instead.");
++ logger.warning("Passing errors around is deprecated. Throw exceptions instead.");
+ final ErrorValue na = (ErrorValue) value;
+ if (na.getErrorCode() == LibFormulaErrorValue.ERROR_NA)
+ {
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java 2021-02-23 14:41:06.984127603 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java 2021-02-23 14:49:05.917795194 +0000
+@@ -27,8 +27,7 @@
+ import org.pentaho.reporting.libraries.formula.typing.Type;
+ import org.pentaho.reporting.libraries.formula.typing.coretypes.ErrorType;
+ import org.pentaho.reporting.libraries.formula.typing.coretypes.LogicalType;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * This function returns true if the parameter is of error type NA.
+@@ -39,7 +38,7 @@
+ {
+ private static final TypeValuePair RETURN_FALSE = new TypeValuePair(LogicalType.TYPE, Boolean.FALSE);
+ private static final TypeValuePair RETURN_TRUE = new TypeValuePair(LogicalType.TYPE, Boolean.TRUE);
+- private static final Log logger = LogFactory.getLog(IsNaFunction.class);
++ private static final Logger logger = Logger.getLogger(IsNaFunction.class.getName());
+ private static final long serialVersionUID = 1205462839536368718L;
+
+ public IsNaFunction()
+@@ -61,7 +60,7 @@
+
+ if (ErrorType.TYPE.equals(type) && value instanceof ErrorValue)
+ {
+- logger.warn ("Passing errors around is deprecated. Throw exceptions instead.");
++ logger.warning("Passing errors around is deprecated. Throw exceptions instead.");
+ final ErrorValue na = (ErrorValue) value;
+ if (na.getErrorCode() == LibFormulaErrorValue.ERROR_NA)
+ {
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java 2021-02-23 14:41:06.988127642 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java 2021-02-23 14:50:26.354579111 +0000
+@@ -17,8 +17,8 @@
+
+ package org.pentaho.reporting.libraries.formula.lvalues;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.formula.EvaluationException;
+ import org.pentaho.reporting.libraries.formula.FormulaContext;
+ import org.pentaho.reporting.libraries.formula.LibFormulaErrorValue;
+@@ -44,7 +44,7 @@
+ */
+ public class FormulaFunction extends AbstractLValue
+ {
+- private static final Log logger = LogFactory.getLog(FormulaFunction.class);
++ private static final Logger logger = Logger.getLogger(FormulaFunction.class.getName());
+
+ private static class FormulaParameterCallback implements ParameterCallback
+ {
+@@ -74,9 +74,9 @@
+ final TypeValuePair converted = typeRegistry.convertTo(paramType, result);
+ if (converted == null)
+ {
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("Failed to evaluate parameter " + pos + " on function " + function);
++ logger.config("Failed to evaluate parameter " + pos + " on function " + function);
+ }
+ throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_AUTO_ARGUMENT_VALUE);
+ }
+@@ -228,7 +228,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.error("Unexpected exception while evaluating", e);
++ logger.severe("Unexpected exception while evaluating: " + e);
+ throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE);
+ }
+ }
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java 2021-02-23 14:41:06.961127380 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java 2021-02-23 14:47:11.376678905 +0000
+@@ -35,8 +35,7 @@
+ import java.util.List;
+ import java.util.Locale;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.IOUtils;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+@@ -66,7 +65,7 @@
+ */
+ public class DefaultTypeRegistry implements TypeRegistry
+ {
+- private static final Log logger = LogFactory.getLog(DefaultTypeRegistry.class);
++ private static final Logger logger = Logger.getLogger(DefaultTypeRegistry.class.getName());
+
+ private static class ArrayConverterCallback implements ArrayCallback
+ {
+@@ -599,7 +598,7 @@
+ }
+ else
+ {
+- logger.warn("Assertation failure: Type declared to be a sequence, but no sequence found inside.");
++ logger.warning("Assertation failure: Type declared to be a sequence, but no sequence found inside.");
+ throw TypeConversionException.getInstance();
+ }
+ }
+@@ -612,7 +611,7 @@
+ }
+ else
+ {
+- logger.warn("Assertation failure: Type declared to be array, but no array callback found inside.");
++ logger.warning("Assertation failure: Type declared to be array, but no array callback found inside.");
+ throw TypeConversionException.getInstance();
+ }
+ }
+@@ -651,7 +650,7 @@
+ }
+ else
+ {
+- logger.warn("Assertation failure: Type declared to be array, but no array callback found inside.");
++ logger.warning("Assertation failure: Type declared to be array, but no array callback found inside.");
+ throw TypeConversionException.getInstance();
+ }
+ }
+--- a/source/org/pentaho/reporting/libraries/formula/function/logical/IfNaFunction.java
++++ b/source/org/pentaho/reporting/libraries/formula/function/logical/IfNaFunction.java
+@@ -17,8 +17,7 @@
+
+ package org.pentaho.reporting.libraries.formula.function.logical;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.formula.ErrorValue;
+ import org.pentaho.reporting.libraries.formula.EvaluationException;
+ import org.pentaho.reporting.libraries.formula.FormulaContext;
+@@ -37,7 +36,7 @@
+ */
+ public class IfNaFunction implements Function
+ {
+- private static final Log logger = LogFactory.getLog(IfNaFunction.class);
++ private static final Logger logger = Logger.getLogger(IfNaFunction.class.getName());
+ private static final long serialVersionUID = -7517668261071087411L;
+
+ public IfNaFunction()
+@@ -67,7 +66,7 @@
+ value = parameters.getValue(0);
+ if (ErrorType.TYPE.equals(type) && value instanceof ErrorValue)
+ {
+- logger.warn("Passing errors around is deprecated. Throw exceptions instead.");
++ logger.warning("Passing errors around is deprecated. Throw exceptions instead.");
+ final ErrorValue na = (ErrorValue) value;
+ if (na.getErrorCode() == LibFormulaErrorValue.ERROR_NA)
+ {
diff --git a/external/jfreereport/patches/liblayout-0.2.10-remove-commons-logging.patch.1 b/external/jfreereport/patches/liblayout-0.2.10-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..5c71a57d2de7
--- /dev/null
+++ b/external/jfreereport/patches/liblayout-0.2.10-remove-commons-logging.patch.1
@@ -0,0 +1,860 @@
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/input/style/parser/CSSValueFactory.java liblayout-0.2.10/source/org/jfree/layouting/input/style/parser/CSSValueFactory.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/input/style/parser/CSSValueFactory.java 2021-04-07 10:34:09.797045462 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/input/style/parser/CSSValueFactory.java 2021-04-07 10:41:20.015338056 +0100
+@@ -49,8 +49,7 @@
+ import org.jfree.layouting.input.style.values.CSSStringValue;
+ import org.jfree.layouting.input.style.values.CSSValue;
+ import org.w3c.css.sac.LexicalUnit;
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+
+@@ -61,7 +60,7 @@
+ */
+ public class CSSValueFactory
+ {
+- private static final Log logger = LogFactory.getLog(CSSValueFactory.class);
++ private static final Logger logger = Logger.getLogger(CSSValueFactory.class.getName());
+ public static final String SIMPLE_PREFIX = "org.jfree.layouting.parser.handlers.";
+ public static final String COMPOUND_PREFIX = "org.jfree.layouting.parser.compoundhandlers.";
+
+@@ -99,7 +98,7 @@
+ }
+ else
+ {
+- logger.warn("Invalid module implementation: " + c);
++ logger.warning("Invalid module implementation: " + c);
+ }
+ }
+
+@@ -300,7 +299,7 @@
+ (CSSCompoundValueReadHandler) compoundHandlers.get(name);
+ if (handler == null)
+ {
+- logger.warn("Got no key for inherited value: " + name);
++ logger.warning("Got no key for inherited value: " + name);
+ return;
+ }
+
+@@ -324,7 +323,7 @@
+ (CSSCompoundValueReadHandler) compoundHandlers.get(name);
+ if (handler == null)
+ {
+- logger.warn("Got no key for compound attr function: " + name);
++ logger.warning("Got no key for compound attr function: " + name);
+ return;
+ }
+
+@@ -373,7 +372,7 @@
+ {
+ if (key == null)
+ {
+- // Log.warn("Got no key for attribute-function " + normalizedName);
++ // Log.warning("Got no key for attribute-function " + normalizedName);
+ setCompundAttrValue(normalizedName, attrFn, rule, important);
+ return;
+ }
+@@ -387,7 +386,7 @@
+ // ATTR function (extended version).
+ if (key == null)
+ {
+- logger.warn("Got no key for attribute-function " + normalizedName);
++ logger.warning("Got no key for attribute-function " + normalizedName);
+ return;
+ }
+ final CSSAttrFunction attrFn = parseComplexAttrFn(value.getParameters());
+@@ -421,7 +420,7 @@
+ return;
+ }
+
+- logger.warn("Unparsable value: Got no valid result for " + normalizedName + " (" + value + ')');
++ logger.warning("Unparsable value: Got no valid result for " + normalizedName + " (" + value + ')');
+ return; // ignore this rule ..
+ }
+ final Map map = module.createValues(value);
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/input/style/parser/StyleSheetHandler.java liblayout-0.2.10/source/org/jfree/layouting/input/style/parser/StyleSheetHandler.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/input/style/parser/StyleSheetHandler.java 2021-04-07 10:34:09.798045474 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/input/style/parser/StyleSheetHandler.java 2021-04-07 10:48:18.496489721 +0100
+@@ -60,8 +60,7 @@
+ import org.pentaho.reporting.libraries.resourceloader.Resource;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceException;
+ import org.pentaho.reporting.libraries.base.util.FastStack;
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 23.11.2005, 13:06:06
+@@ -70,7 +69,7 @@
+ */
+ public class StyleSheetHandler implements DocumentHandler, ErrorHandler
+ {
+- private static final Log logger = LogFactory.getLog(StyleSheetHandler.class);
++ private static final Logger logger = Logger.getLogger(StyleSheetHandler.class.getName());
+ private HashMap namespaces;
+ private StyleKeyRegistry registry;
+ private StyleSheet styleSheet;
+@@ -614,7 +613,7 @@
+ catch (Exception e)
+ {
+ // we catch everything.
+- logger.warn("Error parsing style key: " + name, e);
++ logger.warning("Error parsing style key: " + name + " : " + e);
+ }
+
+ }
+@@ -639,7 +638,7 @@
+ public void warning(final CSSParseException exception)
+ throws CSSException
+ {
+- logger.warn("Warning: " + exception.getMessage());
++ logger.warning("Warning: " + exception.getMessage());
+ }
+
+ /**
+@@ -665,7 +664,7 @@
+ public void error(final CSSParseException exception)
+ throws CSSException
+ {
+- logger.warn("Error: ", exception);
++ logger.warning("Error: " + exception);
+ }
+
+ /**
+@@ -690,6 +689,6 @@
+ public void fatalError(final CSSParseException exception)
+ throws CSSException
+ {
+- logger.warn("Fatal Error: ", exception);
++ logger.warning("Fatal Error: " + exception);
+ }
+ }
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/normalizer/generator/PrintContentGenerator.java liblayout-0.2.10/source/org/jfree/layouting/normalizer/generator/PrintContentGenerator.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/normalizer/generator/PrintContentGenerator.java 2021-04-07 10:34:09.766045081 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/normalizer/generator/PrintContentGenerator.java 2021-04-07 10:47:20.093770766 +0100
+@@ -38,8 +38,7 @@
+ import org.jfree.layouting.layouter.context.PageContext;
+ import org.jfree.layouting.normalizer.content.NormalizationException;
+ import org.jfree.layouting.renderer.Renderer;
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+
+ /**
+ * Simply prints each incoming call.
+@@ -48,7 +47,7 @@
+ */
+ public class PrintContentGenerator implements ContentGenerator
+ {
+- private static final Log logger = LogFactory.getLog(PrintContentGenerator.class);
++ private static final Logger logger = Logger.getLogger(PrintContentGenerator.class.getName());
+
+
+ private static class PrintContentGeneratorState implements State
+@@ -96,56 +95,56 @@
+ */
+ public void startedDocument(final PageContext pageContext)
+ {
+- logger.debug("<document>");
++ logger.config("<document>");
+ renderer.startedDocument(pageContext);
+ }
+
+ public void startedFlow(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<flow tag='" + element.getTagName() + "'>");
++ logger.config("<flow tag='" + element.getTagName() + "'>");
+ renderer.startedFlow(element);
+ }
+
+ public void startedTable(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table>");
++ logger.config("<table>");
+ renderer.startedTable(element);
+ }
+
+ public void startedTableColumnGroup(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table-col-group>");
++ logger.config("<table-col-group>");
+ renderer.startedTableColumnGroup(element);
+ }
+
+ public void startedTableColumn(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table-col>");
++ logger.config("<table-col>");
+ renderer.startedTableColumn(element);
+ }
+
+ public void startedTableSection(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table-section>");
++ logger.config("<table-section>");
+ renderer.startedTableSection(element);
+ }
+
+ public void startedTableRow(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table-row>");
++ logger.config("<table-row>");
+ renderer.startedTableRow(element);
+ }
+
+ public void startedTableCell(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table-cell>");
++ logger.config("<table-cell>");
+ renderer.startedTableCell(element);
+ }
+
+@@ -153,7 +152,7 @@
+ throws NormalizationException
+ {
+ final String tagName = element.getTagName();
+- logger.debug("<block tag='" + tagName + "'>");
++ logger.config("<block tag='" + tagName + "'>");
+ renderer.startedBlock(element);
+ }
+
+@@ -161,14 +160,14 @@
+ throws NormalizationException
+ {
+ final String tagName = element.getTagName();
+- logger.debug("<paragraph tag='" + tagName + "'>");
++ logger.config("<paragraph tag='" + tagName + "'>");
+ renderer.startedRootInline(element);
+ }
+
+ public void startedMarker(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<marker>");
++ logger.config("<marker>");
+ renderer.startedMarker(element);
+ }
+
+@@ -176,80 +175,80 @@
+ throws NormalizationException
+ {
+ final String tagName = element.getTagName();
+- logger.debug("<inline tag='" + tagName + "'>");
++ logger.config("<inline tag='" + tagName + "'>");
+ renderer.startedInline(element);
+ }
+
+ public void addContent(final LayoutContext node, final ContentToken token)
+ throws NormalizationException
+ {
+- logger.debug("<content>" + token + "</content>");
++ logger.config("<content>" + token + "</content>");
+ renderer.addContent(node, token);
+ }
+
+ public void finishedInline() throws NormalizationException
+ {
+- logger.debug("</inline>");
++ logger.config("</inline>");
+ renderer.finishedInline();
+ }
+
+ public void finishedMarker() throws NormalizationException
+ {
+- logger.debug("</marker>");
++ logger.config("</marker>");
+ renderer.finishedMarker();
+ }
+
+ public void finishedRootInline() throws NormalizationException
+ {
+- logger.debug("</paragraph>");
++ logger.config("</paragraph>");
+ renderer.finishedRootInline();
+ }
+
+ public void finishedBlock() throws NormalizationException
+ {
+- logger.debug("</block>");
++ logger.config("</block>");
+ renderer.finishedBlock();
+ }
+
+ public void finishedTableCell() throws NormalizationException
+ {
+- logger.debug("</table-cell>");
++ logger.config("</table-cell>");
+ renderer.finishedTableCell();
+ }
+
+ public void finishedTableRow() throws NormalizationException
+ {
+- logger.debug("</table-row>");
++ logger.config("</table-row>");
+ renderer.finishedTableRow();
+ }
+
+ public void finishedTableSection() throws NormalizationException
+ {
+- logger.debug("</table-section>");
++ logger.config("</table-section>");
+ renderer.finishedTableSection();
+ }
+
+ public void finishedTableColumn() throws NormalizationException
+ {
+- logger.debug("</table-col>");
++ logger.config("</table-col>");
+ renderer.finishedTableColumn();
+ }
+
+ public void finishedTableColumnGroup() throws NormalizationException
+ {
+- logger.debug("</table-col-group>");
++ logger.config("</table-col-group>");
+ renderer.finishedTableColumnGroup();
+ }
+
+ public void finishedTable() throws NormalizationException
+ {
+- logger.debug("</table>");
++ logger.config("</table>");
+ renderer.finishedTable();
+ }
+
+ public void finishedFlow() throws NormalizationException
+ {
+- logger.debug("</flow>");
++ logger.config("</flow>");
+ renderer.finishedFlow();
+ }
+
+@@ -259,7 +258,7 @@
+ */
+ public void finishedDocument() throws NormalizationException
+ {
+- logger.debug("</document>");
++ logger.config("</document>");
+ renderer.finishedDocument();
+ }
+
+@@ -276,7 +275,7 @@
+ public void startedPassThrough(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<pass-through>");
++ logger.config("<pass-through>");
+ renderer.startedPassThrough(element);
+ }
+
+@@ -284,26 +283,26 @@
+ final ContentToken token)
+ throws NormalizationException
+ {
+- logger.debug("<pass-through-content>" + token + "</pass-through-content>");
++ logger.config("<pass-through-content>" + token + "</pass-through-content>");
+ renderer.addPassThroughContent(node, token);
+ }
+
+ public void finishedPassThrough() throws NormalizationException
+ {
+- logger.debug("</pass-through>");
++ logger.config("</pass-through>");
+ renderer.finishedPassThrough();
+ }
+
+ public void startedTableCaption(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug("<table-caption>");
++ logger.config("<table-caption>");
+ renderer.startedTableCaption(context);
+ }
+
+ public void finishedTableCaption() throws NormalizationException
+ {
+- logger.debug("</table-caption>");
++ logger.config("</table-caption>");
+ renderer.finishedTableCaption();
+ }
+
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/model/RenderBox.java liblayout-0.2.10/source/org/jfree/layouting/renderer/model/RenderBox.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/model/RenderBox.java 2021-04-07 10:34:09.779045241 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/renderer/model/RenderBox.java 2021-04-07 10:49:14.499179135 +0100
+@@ -44,8 +44,7 @@
+ import org.jfree.layouting.renderer.text.ExtendedBaselineInfo;
+ import org.jfree.layouting.renderer.text.TextUtility;
+ import org.pentaho.reporting.libraries.fonts.registry.FontMetrics;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * A render-box corresponds to elements in a DOM tree.
+@@ -62,7 +61,7 @@
+ */
+ public abstract class RenderBox extends RenderNode
+ {
+- private static final Log logger = LogFactory.getLog(RenderBox.class);
++ private static final Logger logger = Logger.getLogger(RenderBox.class.getName());
+ public static final boolean LOG_PRUNE = false;
+
+ private RenderNode firstChild;
+@@ -930,7 +929,7 @@
+ {
+ if (LOG_PRUNE)
+ {
+- logger.debug("Pruning: " + this);
++ logger.config("Pruning: " + this);
+ }
+ getParent().remove(this);
+ }
+@@ -944,7 +943,7 @@
+ {
+ if (LOG_PRUNE)
+ {
+- logger.debug("Pruning: " + lastChild);
++ logger.config("Pruning: " + lastChild);
+ }
+ remove(lastChild);
+ lastChild = getLastChild();
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/ModelPrinter.java liblayout-0.2.10/source/org/jfree/layouting/renderer/ModelPrinter.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/ModelPrinter.java 2021-04-07 10:34:09.786045327 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/renderer/ModelPrinter.java 2021-04-07 10:46:12.757941838 +0100
+@@ -41,8 +41,7 @@
+ import org.jfree.layouting.renderer.model.table.cells.TableCell;
+ import org.jfree.layouting.renderer.model.table.cols.TableColumn;
+ import org.jfree.layouting.renderer.model.table.cols.TableColumnModel;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: Jan 9, 2007, 2:22:59 PM
+@@ -51,7 +50,7 @@
+ */
+ public class ModelPrinter
+ {
+- private static final Log logger = LogFactory.getLog (ModelPrinter.class);
++ private static final Logger logger = Logger.getLogger(ModelPrinter.class.getName());
+
+ private ModelPrinter()
+ {
+@@ -66,7 +65,7 @@
+ b.append('[');
+ b.append(Integer.toHexString(System.identityHashCode(node)));
+ b.append(']');
+- logger.debug (b);
++ logger.config(b.toString());
+ node = node.getParent();
+ }
+ }
+@@ -96,7 +95,7 @@
+ b.append(", height=");
+ b.append(box.getHeight());
+ b.append('}');
+- logger.debug(b.toString());
++ logger.config(b.toString());
+
+ b = new StringBuffer();
+ for (int i = 0; i < level; i++)
+@@ -105,7 +104,7 @@
+ }
+ b.append("- nodeLayoutProperties=");
+ b.append(box.getNodeLayoutProperties());
+- logger.debug(b.toString());
++ logger.config(b.toString());
+
+ b = new StringBuffer();
+ for (int i = 0; i < level; i++)
+@@ -114,7 +113,7 @@
+ }
+ b.append("- boxLayoutProperties=");
+ b.append(box.getBoxLayoutProperties());
+- logger.debug(b.toString());
++ logger.config(b.toString());
+
+ if (box instanceof TableRowRenderBox)
+ {
+@@ -124,7 +123,7 @@
+ for (int i = 0; i < rowInfoStructure.getCellCount(); i++)
+ {
+ final TableCell cell = rowInfoStructure.getCellAt(i);
+- logger.debug ("CELL: " + i + " = " + cell.getRowSpan() + ' ' + cell.getColSpan() + ' ' + cell);
++ logger.config("CELL: " + i + " = " + cell.getRowSpan() + ' ' + cell.getColSpan() + ' ' + cell);
+ }
+ }
+ else if (box instanceof TableRenderBox)
+@@ -134,7 +133,7 @@
+ for (int i = 0; i < columnModel.getColumnCount(); i++)
+ {
+ final TableColumn col = columnModel.getColumn(i);
+- logger.debug ("COLUMN: EffectiveSize: " + col.getEffectiveSize() + " Computed Max Width: " + col.getComputedMaximumWidth() + " Computed ChunkSize: " + col.getComputedMinChunkSize());
++ logger.config("COLUMN: EffectiveSize: " + col.getEffectiveSize() + " Computed Max Width: " + col.getComputedMaximumWidth() + " Computed ChunkSize: " + col.getComputedMinChunkSize());
+ // for (int cs = 1; cs < 3; cs++)
+ // {
+ // Log.debug ("* COLUMN: " + i + "(" + cs + ") " +
+@@ -149,14 +148,14 @@
+ else if (box instanceof TableCellRenderBox)
+ {
+ final TableCellRenderBox cellBox = (TableCellRenderBox) box;
+- logger.debug ("CELL: Position: " + cellBox.getColumnIndex());
++ logger.config("CELL: Position: " + cellBox.getColumnIndex());
+ }
+ else if (box instanceof ParagraphRenderBox)
+ {
+ final ParagraphRenderBox paraBox = (ParagraphRenderBox) box;
+- logger.debug ("-----------------------------------------------------");
++ logger.config("-----------------------------------------------------");
+ printBox(paraBox.getLineboxContainer(), level + 1);
+- logger.debug ("-----------------------------------------------------");
++ logger.config("-----------------------------------------------------");
+ }
+
+ printChilds(box, level);
+@@ -203,7 +202,7 @@
+ b.append(", height=");
+ b.append(node.getHeight());
+ b.append('}');
+- logger.debug(b.toString());
++ logger.config(b.toString());
+
+
+ b = new StringBuffer();
+@@ -213,7 +212,7 @@
+ }
+ b.append("- nodeLayoutProperties=");
+ b.append(node.getNodeLayoutProperties());
+- logger.debug(b.toString());
++ logger.config(b.toString());
+ }
+
+ private static void printText(final RenderableText text, final int level)
+@@ -238,7 +237,7 @@
+ b.append(", text='");
+ b.append(text.getRawText());
+ b.append("'}");
+- logger.debug(b.toString());
++ logger.config(b.toString());
+
+ b = new StringBuffer();
+ for (int i = 0; i < level; i++)
+@@ -247,7 +246,7 @@
+ }
+ b.append("- nodeLayoutProperties=");
+ b.append(text.getNodeLayoutProperties());
+- logger.debug(b.toString());
++ logger.config(b.toString());
+ }
+
+ }
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/PrintingRenderer.java liblayout-0.2.10/source/org/jfree/layouting/renderer/PrintingRenderer.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/PrintingRenderer.java 2021-04-07 10:34:09.786045327 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/renderer/PrintingRenderer.java 2021-04-07 10:45:03.987095239 +0100
+@@ -37,8 +37,7 @@
+ import org.jfree.layouting.layouter.context.LayoutContext;
+ import org.jfree.layouting.layouter.context.PageContext;
+ import org.jfree.layouting.normalizer.content.NormalizationException;
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 17.07.2006, 17:43:21
+@@ -47,7 +46,7 @@
+ */
+ public class PrintingRenderer implements Renderer
+ {
+- private static final Log logger = LogFactory.getLog(PrintingRenderer.class);
++ private static final Logger logger = Logger.getLogger(PrintingRenderer.class.getName());
+ private static class PrintingRendererState implements State
+ {
+ private State parentState;
+@@ -89,7 +88,7 @@
+ */
+ public void startedDocument(final PageContext pageContext)
+ {
+- logger.debug ("<document>");
++ logger.config("<document>");
+ parent.startedDocument(pageContext);
+ }
+
+@@ -102,7 +101,7 @@
+ public void startedFlow(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<flow " +
++ logger.config("<flow " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedFlow(context);
+ }
+@@ -110,7 +109,7 @@
+ public void startedTable(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<table " +
++ logger.config("<table " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedTable(context);
+ }
+@@ -118,7 +117,7 @@
+ public void startedTableSection(final LayoutContext layoutContext)
+ throws NormalizationException
+ {
+- logger.debug ("<table-section " +
++ logger.config("<table-section " +
+ "tag='" + layoutContext.getTagName() + "' namespace='" + layoutContext.getNamespace() + "'>");
+ parent.startedTableSection(layoutContext);
+ }
+@@ -126,7 +125,7 @@
+ public void startedTableRow(final LayoutContext layoutContext)
+ throws NormalizationException
+ {
+- logger.debug ("<table-row " +
++ logger.config("<table-row " +
+ "tag='" + layoutContext.getTagName() + "' namespace='" + layoutContext.getNamespace() + "'>");
+ parent.startedTableRow(layoutContext);
+ }
+@@ -134,7 +133,7 @@
+ public void startedTableCell(final LayoutContext layoutContext)
+ throws NormalizationException
+ {
+- logger.debug ("<table-cell " +
++ logger.config("<table-cell " +
+ "tag='" + layoutContext.getTagName() + "' namespace='" + layoutContext.getNamespace() + "'>");
+ parent.startedTableCell(layoutContext);
+ }
+@@ -142,7 +141,7 @@
+ public void startedBlock(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<block " +
++ logger.config("<block " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedBlock(context);
+ }
+@@ -150,7 +149,7 @@
+ public void startedMarker(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<marker " +
++ logger.config("<marker " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedMarker(context);
+ }
+@@ -158,7 +157,7 @@
+ public void startedRootInline(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<paragraph " +
++ logger.config("<paragraph " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedRootInline(context);
+ }
+@@ -166,7 +165,7 @@
+ public void startedInline(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<inline " +
++ logger.config("<inline " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedInline(context);
+ }
+@@ -175,93 +174,93 @@
+ final ContentToken content)
+ throws NormalizationException
+ {
+- logger.debug ("<content>" + content + "</content>");
++ logger.config("<content>" + content + "</content>");
+ parent.addContent(context, content);
+ }
+
+ public void finishedInline() throws NormalizationException
+ {
+- logger.debug ("</inline>");
++ logger.config("</inline>");
+ parent.finishedInline();
+ }
+
+ public void finishedRootInline() throws NormalizationException
+ {
+- logger.debug ("</paragraph>");
++ logger.config("</paragraph>");
+ parent.finishedRootInline();
+ }
+
+ public void finishedMarker() throws NormalizationException
+ {
+- logger.debug ("</marker>");
++ logger.config("</marker>");
+ parent.finishedMarker();
+ }
+
+ public void finishedBlock() throws NormalizationException
+ {
+- logger.debug ("</block>");
++ logger.config("</block>");
+ parent.finishedBlock();
+ }
+
+ public void finishedTableCell() throws NormalizationException
+ {
+- logger.debug ("</table-cell>");
++ logger.config("</table-cell>");
+ parent.finishedTableCell();
+ }
+
+ public void finishedTableRow() throws NormalizationException
+ {
+- logger.debug ("</table-row>");
++ logger.config("</table-row>");
+ parent.finishedTableRow();
+ }
+
+ public void finishedTableSection() throws NormalizationException
+ {
+- logger.debug ("</table-section>");
++ logger.config("</table-section>");
+ parent.finishedTableSection();
+ }
+
+ public void finishedTable() throws NormalizationException
+ {
+- logger.debug ("</table>");
++ logger.config("</table>");
+ parent.finishedTable();
+ }
+
+ public void finishedFlow() throws NormalizationException
+ {
+- logger.debug ("</flow>");
++ logger.config("</flow>");
+ parent.finishedFlow();
+ }
+
+ public void finishedDocument() throws NormalizationException
+ {
+- logger.debug ("</document>");
++ logger.config("</document>");
+ parent.finishedDocument();
+ }
+
+ public void startedTableColumnGroup(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<table-column-group>");
++ logger.config("<table-column-group>");
+ parent.startedTableColumnGroup(context);
+ }
+
+ public void startedTableColumn(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<table-column>");
++ logger.config("<table-column>");
+ parent.startedTableColumn(context);
+ }
+
+ public void finishedTableColumnGroup() throws NormalizationException
+ {
+- logger.debug ("</table-column-group>");
++ logger.config("</table-column-group>");
+ parent.finishedTableColumnGroup();
+ }
+
+ public void finishedTableColumn() throws NormalizationException
+ {
+- logger.debug ("</table-column>");
++ logger.config("</table-column>");
+ parent.finishedTableColumn();
+ }
+
+@@ -274,14 +273,14 @@
+ */
+ public void handlePageBreak(final PageContext pageContext)
+ {
+- logger.debug ("<!-- PAGEBREAK ENCOUNTERED -->");
++ logger.config("<!-- PAGEBREAK ENCOUNTERED -->");
+ parent.handlePageBreak(pageContext);
+ }
+
+ public void startedPassThrough(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<pass-through>");
++ logger.config("<pass-through>");
+ parent.startedPassThrough(context);
+ }
+
+@@ -289,13 +288,13 @@
+ final ContentToken content)
+ throws NormalizationException
+ {
+- logger.debug ("<pass-through-content>" + content + "</pass-through-content>");
++ logger.config("<pass-through-content>" + content + "</pass-through-content>");
+ parent.addPassThroughContent(context, content);
+ }
+
+ public void finishedPassThrough() throws NormalizationException
+ {
+- logger.debug ("</pass-through>");
++ logger.config("</pass-through>");
+ parent.finishedPassThrough();
+ }
+
+@@ -307,13 +306,13 @@
+ public void startedTableCaption(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<table-caption>");
++ logger.config("<table-caption>");
+ parent.startedTableCaption(context);
+ }
+
+ public void finishedTableCaption() throws NormalizationException
+ {
+- logger.debug ("</table-caption>");
++ logger.config("</table-caption>");
+ parent.finishedTableCaption();
+ }
+ }
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/util/AttributeMap.java liblayout-0.2.10/source/org/jfree/layouting/util/AttributeMap.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/util/AttributeMap.java 2021-04-07 10:34:09.787045339 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/util/AttributeMap.java 2021-04-07 10:48:57.444969193 +0100
+@@ -35,8 +35,7 @@
+ import java.util.Iterator;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+
+ /**
+@@ -46,7 +45,7 @@
+ */
+ public class AttributeMap implements Serializable, Cloneable
+ {
+- private static final Log logger = LogFactory.getLog(AttributeMap.class);
++ private static final Logger logger = Logger.getLogger(AttributeMap.class.getName());
+
+ private static final long serialVersionUID = -7442871030874215436L;
+ private static final String[] EMPTY_NAMESPACES = new String[0];
+@@ -102,7 +101,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.error("Clone failed for ReportAttributeMap.createUnmodifiableMap", e);
++ logger.severe("Clone failed for ReportAttributeMap.createUnmodifiableMap:" + e);
+ throw new IllegalStateException("Clone failed for ReportAttributeMap.createUnmodifiableMap");
+ }
+ }
diff --git a/external/jfreereport/patches/liblayout.patch b/external/jfreereport/patches/liblayout.patch
index cf82b5c05a80..9e68986a86a5 100644
--- a/external/jfreereport/patches/liblayout.patch
+++ b/external/jfreereport/patches/liblayout.patch
@@ -1,13 +1,12 @@
--- misc/liblayout-0.2.10/build.xml (Revision 6728)
+++ misc/build/liblayout-0.2.10/build.xml (Arbeitskopie)
-@@ -24,9 +24,16 @@
+@@ -24,9 +24,15 @@
<!-- Setup the compile classpath -->
<path id="classpath">
- <fileset dir="lib">
- <include name="*.jar" />
- </fileset>
-+ <pathelement path="${commons-logging.jar}"/>
+ <pathelement path="${flute.jar}"/>
+ <pathelement path="${libbase.jar}"/>
+ <pathelement path="${libformula.jar}"/>
diff --git a/external/jfreereport/patches/libloader-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/libloader-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..fad07d59ded8
--- /dev/null
+++ b/external/jfreereport/patches/libloader-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,635 @@
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java 2021-04-07 10:55:58.343147414 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java 2021-04-07 11:08:48.389599751 +0100
+@@ -22,8 +22,8 @@
+ import java.util.Iterator;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+
+@@ -34,7 +34,7 @@
+ */
+ public class DefaultResourceManagerBackend implements ResourceManagerBackend
+ {
+- private static final Log logger = LogFactory.getLog(DefaultResourceManagerBackend.class);
++ private static final Logger logger = Logger.getLogger(DefaultResourceManagerBackend.class.getName());
+
+ private ArrayList resourceLoaders;
+ private ArrayList resourceBundleLoaders;
+@@ -280,9 +280,9 @@
+ {
+ // ignore it, try the next factory ...
+ exception = rex;
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("Failed at " + fact.getClass() + ": ", rex);
++ logger.config("Failed at " + fact.getClass() + ": " + rex);
+ }
+ }
+ }
+@@ -413,7 +413,7 @@
+ {
+ throw new UnrecognizedLoaderException("Invalid key: No resource-loader registered for schema: " + key.getSchema());
+ }
+- logger.debug("Loaded " + key);
++ logger.config("Loaded " + key);
+ return loader.load(key);
+ }
+
+@@ -451,7 +451,7 @@
+ ResourceLoader.class);
+ if (loader != null)
+ {
+- //Log.debug("Registering loader for " + loader.getSchema());
++ //Log.config("Registering loader for " + loader.getSchema());
+ registerLoader(loader);
+ }
+ }
+@@ -465,7 +465,7 @@
+ ResourceManager.class, ResourceBundleLoader.class);
+ if (loader != null)
+ {
+- //Log.debug("Registering loader for " + loader.getSchema());
++ //Log.config("Registering loader for " + loader.getSchema());
+ registerBundleLoader(loader);
+ }
+ }
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java 2021-04-07 10:55:58.342147402 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java 2021-04-07 11:05:40.206289803 +0100
+@@ -27,8 +27,8 @@
+ import java.util.Collections;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 05.12.2007, 19:15:56
+@@ -37,7 +37,7 @@
+ */
+ public class DrawableWrapper
+ {
+- private static final Log logger = LogFactory.getLog(DrawableWrapper.class);
++ private static final Logger logger = Logger.getLogger(DrawableWrapper.class.getName());
+ private static final Map drawables = Collections.synchronizedMap(new HashMap());
+
+ private Object backend;
+@@ -67,9 +67,9 @@
+ Modifier.isAbstract(modifiers) ||
+ Modifier.isStatic(modifiers))
+ {
+- if (logger.isWarnEnabled())
++ if (logger.isLoggable(Level.WARNING))
+ {
+- logger.warn("DrawMethod is not valid: " + aClass + '#' + drawMethod);
++ logger.warning("DrawMethod is not valid: " + aClass + '#' + drawMethod);
+ }
+ drawMethod = null;
+ }
+@@ -77,9 +77,9 @@
+ catch (NoSuchMethodException e)
+ {
+ // ignore exception
+- if (logger.isWarnEnabled())
++ if (logger.isLoggable(Level.WARNING))
+ {
+- logger.warn("The object is not a drawable: " + aClass);
++ logger.warning("The object is not a drawable: " + aClass);
+ }
+ drawMethod = null;
+ }
+@@ -141,9 +141,9 @@
+ }
+ catch (Exception e)
+ {
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.warn("Invoking draw failed:", e);
++ logger.warning("Invoking draw failed: " + e);
+ }
+ }
+ }
+@@ -167,9 +167,9 @@
+ }
+ catch (Exception e)
+ {
+- if (logger.isWarnEnabled())
++ if (logger.isLoggable(Level.WARNING))
+ {
+- logger.warn("Invoking getPreferredSize failed:", e);
++ logger.warning("Invoking getPreferredSize failed: " + e);
+ }
+ return null;
+ }
+@@ -193,9 +193,9 @@
+ }
+ catch (Exception e)
+ {
+- if (logger.isWarnEnabled())
++ if (logger.isLoggable(Level.WARNING))
+ {
+- logger.warn("Invoking isKeepAspectRatio failed:", e);
++ logger.warning("Invoking isKeepAspectRatio failed: " + e);
+ }
+ return false;
+ }
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java 2021-04-07 10:55:58.344147426 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java 2021-04-07 11:03:22.711602044 +0100
+@@ -24,8 +24,7 @@
+ import java.util.HashMap;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
+@@ -43,7 +42,7 @@
+ public class FileResourceLoader implements ResourceLoader
+ {
+ public static final String SCHEMA_NAME = FileResourceLoader.class.getName();
+- private static final Log logger = LogFactory.getLog(FileResourceLoader.class);
++ private static final Logger logger = Logger.getLogger(FileResourceLoader.class.getName());
+
+ public FileResourceLoader()
+ {
+@@ -210,7 +209,7 @@
+ }
+
+ // Log information
+- logger.debug("Serializing a File Resource Key...");
++ logger.config("Serializing a File Resource Key...");
+ if (key.getParent() != null)
+ {
+ throw new ResourceException
+@@ -224,7 +223,7 @@
+ final String strIdentifier = file.getCanonicalPath();
+ final String result = ResourceKeyUtils.createStringResourceKey
+ (key.getSchema().toString(), strIdentifier, key.getFactoryParameters());
+- logger.debug("Serialized File Resource Key: [" + result + "]");
++ logger.config("Serialized File Resource Key: [" + result + "]");
+ return result;
+ }
+ catch (IOException ioe)
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java 2021-04-07 10:55:58.343147414 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java 2021-04-07 11:01:56.064538444 +0100
+@@ -21,8 +21,7 @@
+ import java.util.HashMap;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceException;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java 2021-04-07 10:55:58.343147414 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java 2021-04-07 11:03:14.370499656 +0100
+@@ -21,8 +21,7 @@
+ import java.util.Map;
+ import java.net.URL;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
+@@ -41,7 +40,7 @@
+ public class ClassloaderResourceLoader implements ResourceLoader
+ {
+ public static final String SCHEMA_NAME = ClassloaderResourceLoader.class.getName();
+- private static final Log logger = LogFactory.getLog(ClassloaderResourceLoader.class);
++ private static final Logger logger = Logger.getLogger(ClassloaderResourceLoader.class.getName());
+
+ public ClassloaderResourceLoader()
+ {
+@@ -197,7 +196,7 @@
+ }
+
+ // Log information
+- logger.debug("Serializing a Classloader Resource Key...");
++ logger.config("Serializing a Classloader Resource Key...");
+ if (key.getParent() != null)
+ {
+ throw new ResourceException
+@@ -207,7 +206,7 @@
+ // Serialize the key
+ final String result = ResourceKeyUtils.createStringResourceKey(key.getSchema().toString(),
+ (String) key.getIdentifier(), key.getFactoryParameters());
+- logger.debug("Serialized Classloader Resource Key: [" + result + "]");
++ logger.config("Serialized Classloader Resource Key: [" + result + "]");
+ return result;
+ }
+
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java 2021-04-07 10:55:58.344147426 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java 2021-04-07 11:03:41.998838804 +0100
+@@ -22,8 +22,7 @@
+ import java.util.HashMap;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
+@@ -40,7 +39,7 @@
+ public class URLResourceLoader implements ResourceLoader
+ {
+ public static final String SCHEMA_NAME = URLResourceLoader.class.getName();
+- private static final Log logger = LogFactory.getLog(URLResourceLoader.class);
++ private static final Logger logger = Logger.getLogger(URLResourceLoader.class.getName());
+
+ public URLResourceLoader()
+ {
+@@ -188,10 +187,10 @@
+ }
+
+ // Log information
+- logger.debug("Serializing a Classloader Resource Key...");
++ logger.config("Serializing a Classloader Resource Key...");
+ if (key.getParent() != null)
+ {
+- logger.warn("Serializing a Classloader Resource Key which contains a parent: key=[" + bundleKey + "] parent=["
++ logger.warning("Serializing a Classloader Resource Key which contains a parent: key=[" + bundleKey + "] parent=["
+ + key.getParent() + "]");
+ }
+
+@@ -199,7 +198,7 @@
+ final URL url = (URL) key.getIdentifier();
+ final String result = ResourceKeyUtils.createStringResourceKey
+ (key.getSchema().toString(), url.toExternalForm(), key.getFactoryParameters());
+- logger.debug("Serialized Classloader Resource Key: [" + result + "]");
++ logger.config("Serialized Classloader Resource Key: [" + result + "]");
+ return result;
+ }
+
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java 2021-04-07 10:55:58.344147426 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java 2021-04-07 11:02:18.522814132 +0100
+@@ -21,8 +21,7 @@
+ import java.util.HashMap;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceException;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+@@ -40,7 +39,7 @@
+ public class ZipResourceLoader implements ResourceLoader
+ {
+ public static final String SCHEMA_NAME = ZipResourceLoader.class.getName();
+- private static final Log logger = LogFactory.getLog(ZipResourceLoader.class);
++ private static final Logger logger = Logger.getLogger(ZipResourceLoader.class.getName());
+
+ public ZipResourceLoader()
+ {
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java 2021-04-07 10:55:58.345147438 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java 2021-04-07 10:58:52.758288370 +0100
+@@ -20,8 +20,7 @@
+ import org.pentaho.reporting.libraries.base.boot.AbstractModule;
+ import org.pentaho.reporting.libraries.base.boot.ModuleInitializeException;
+ import org.pentaho.reporting.libraries.base.boot.SubSystem;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 13.04.2006, 16:29:07
+@@ -30,7 +29,7 @@
+ */
+ public class EHCacheModule extends AbstractModule
+ {
+- public static final Log CACHE_MONITOR = LogFactory.getLog(EHCacheModule.class.getName() + "#CacheLog");
++ public static final Logger CACHE_MONITOR = Logger.getLogger(EHCacheModule.class.getName() + "#CacheLog");
+
+ public EHCacheModule() throws ModuleInitializeException
+ {
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java 2021-04-07 10:55:58.345147438 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java 2021-04-07 10:59:17.251589016 +0100
+@@ -20,8 +20,8 @@
+ import net.sf.ehcache.Cache;
+ import net.sf.ehcache.CacheException;
+ import net.sf.ehcache.Element;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.Resource;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+ import org.pentaho.reporting.libraries.resourceloader.cache.ResourceFactoryCache;
+@@ -110,7 +109,7 @@
+ }
+ }
+
+- private static final Log logger = LogFactory.getLog(EHResourceFactoryCache.class);
++ private static final Logger logger = Logger.getLogger(EHResourceFactoryCache.class.getName());
+ private Cache factoryCache;
+
+ public EHResourceFactoryCache(final Cache factoryCache)
+@@ -128,16 +128,16 @@
+ final Resource res = getInternal(key, target[i]);
+ if (res != null)
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Res Cache Hit " + key);
++ EHCacheModule.CACHE_MONITOR.config("Res Cache Hit " + key);
+ }
+ return res;
+ }
+ }
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Res Cache Miss " + key);
++ EHCacheModule.CACHE_MONITOR.config("Res Cache Miss " + key);
+ }
+ return null;
+ }
+@@ -168,9 +168,9 @@
+ }
+ catch (CacheException e)
+ {
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("Failed to retrieve resource for key " + key, e);
++ logger.config("Failed to retrieve resource for key " + key + ": " + e);
+ }
+ return null;
+ }
+@@ -185,9 +185,9 @@
+ }
+ catch (Exception e)
+ {
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("Failed to store resource for key " + source, e);
++ logger.config("Failed to store resource for key " + source + ": " + e);
+ }
+ // ignore ... the object is not serializable ..
+ }
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java 2021-04-07 10:55:58.342147402 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java 2021-04-07 11:06:27.248867251 +0100
+@@ -27,8 +27,8 @@
+ import java.util.Iterator;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.util.CSVQuoter;
+ import org.pentaho.reporting.libraries.base.util.CSVTokenizer;
+ import org.pentaho.reporting.libraries.base.util.IOUtils;
+@@ -42,7 +42,7 @@
+ {
+ private static final String DELIMITER = ";";
+ private static final String SERIALIZATION_PREFIX = "resourcekey:";
+- private static final Log logger = LogFactory.getLog(ResourceManager.class);
++ private static final Logger logger = Logger.getLogger(ResourceManager.class.getName());
+
+ /**
+ * Returns a string representation of the ResourceKey based on the pieces that are passed as parameters
+@@ -169,7 +169,7 @@
+
+ sb.append(quoter.doQuoting(entrySb.toString()));
+ }
+- logger.debug("Converted ResourceKey's Factory Parameters to String: [" + sb.toString() + "]");
++ logger.config("Converted ResourceKey's Factory Parameters to String: [" + sb.toString() + "]");
+ return sb.toString();
+ }
+
+@@ -226,9 +226,9 @@
+ params.put(key, value);
+ }
+
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("Converted ResourceKey's Factory Parameter String to a Map: [" + factoryParameters
++ logger.config("Converted ResourceKey's Factory Parameter String to a Map: [" + factoryParameters
+ + "] -> map of size " + params.size());
+ }
+ return params;
+@@ -369,7 +369,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.error("Error closing input stream", e);
++ logger.severe("Error closing input stream: " + e);
+ }
+ }
+ }
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java 2021-04-07 10:55:58.344147426 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java 2021-04-07 11:07:50.557889876 +0100
+@@ -22,8 +22,8 @@
+ import java.util.Map;
+ import java.util.Set;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+ import org.pentaho.reporting.libraries.resourceloader.cache.BundleCacheResourceWrapper;
+@@ -57,7 +57,7 @@
+ */
+ public final class ResourceManager
+ {
+- private static final Log logger = LogFactory.getLog(ResourceManager.class);
++ private static final Logger logger = Logger.getLogger(ResourceManager.class.getName());
+ private ResourceManagerBackend backend;
+
+ public static final String BUNDLE_LOADER_PREFIX = "org.pentaho.reporting.libraries.resourceloader.bundle.loader.";
+@@ -273,7 +273,7 @@
+ final ResourceBundleData bundle = loadResourceBundle(key);
+ if (bundle != null)
+ {
+- logger.debug("Loaded bundle for key " + key);
++ logger.config("Loaded bundle for key " + key);
+ return bundle;
+ }
+ final ResourceKey parent = key.getParent();
+@@ -283,7 +283,7 @@
+ final ResourceBundleData parentData = loadResourceBundle(parent);
+ if (parentData != null)
+ {
+- logger.debug("Loaded bundle for key (derivate) " + key);
++ logger.config("Loaded bundle for key (derivate) " + key);
+ return parentData.deriveData(key);
+ }
+ }
+@@ -400,9 +400,9 @@
+ newResource = backend.create(derivedManager, resourceBundleData, context, target);
+ if (isResourceCacheable(newResource))
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Storing created bundle-resource for key: " + key);
++ EHCacheModule.CACHE_MONITOR.config("Storing created bundle-resource for key: " + key);
+ }
+ factoryCache.put(newResource);
+ if (key != newResource.getSource())
+@@ -412,9 +412,9 @@
+ }
+ else
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Created bundle-resource is not cacheable for " + key);
++ EHCacheModule.CACHE_MONITOR.config("Created bundle-resource is not cacheable for " + key);
+ }
+ }
+ }
+@@ -423,17 +423,17 @@
+ newResource = backend.create(this, loadedData, context, target);
+ if (isResourceCacheable(newResource))
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Storing created resource for key: " + key);
++ EHCacheModule.CACHE_MONITOR.config("Storing created resource for key: " + key);
+ }
+ factoryCache.put(newResource);
+ }
+ else
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Created resource is not cacheable for " + key);
++ EHCacheModule.CACHE_MONITOR.config("Created resource is not cacheable for " + key);
+ }
+ }
+ }
+@@ -556,7 +556,7 @@
+ {
+ if (failedModules.contains(dataCacheProviderClass) == false)
+ {
+- logger.warn("Failed to create data cache: " + e.getLocalizedMessage());
++ logger.warning("Failed to create data cache: " + e.getLocalizedMessage());
+ failedModules.add(dataCacheProviderClass);
+ }
+ }
+@@ -593,7 +593,7 @@
+ {
+ if (failedModules.contains(dataCacheProviderClass) == false)
+ {
+- logger.warn("Failed to create data cache: " + e.getLocalizedMessage());
++ logger.warning("Failed to create data cache: " + e.getLocalizedMessage());
+ failedModules.add(dataCacheProviderClass);
+ }
+ }
+@@ -630,7 +630,7 @@
+ {
+ if (failedModules.contains(cacheProviderClass) == false)
+ {
+- logger.warn("Failed to create factory cache: " + e.getLocalizedMessage());
++ logger.warning("Failed to create factory cache: " + e.getLocalizedMessage());
+ failedModules.add(cacheProviderClass);
+ }
+ }
+--- a/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceBundleDataCache.java
++++ b/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceBundleDataCache.java
+@@ -17,6 +17,7 @@
+
+ package org.pentaho.reporting.libraries.resourceloader.modules.cache.ehcache;
+
++import java.util.logging.Level;
+ import net.sf.ehcache.Cache;
+ import net.sf.ehcache.CacheException;
+ import net.sf.ehcache.Element;
+@@ -64,17 +65,17 @@
+ final Element element = dataCache.get((Object) key);
+ if (element != null)
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Bund Cache Hit " + key);
++ EHCacheModule.CACHE_MONITOR.config("Bund Cache Hit " + key);
+ }
+ return (ResourceBundleDataCacheEntry) element.getObjectValue();
+ }
+ else
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Bund Cache Miss " + key);
++ EHCacheModule.CACHE_MONITOR.config("Bund Cache Miss " + key);
+ }
+ return null;
+ }
+@@ -101,9 +102,9 @@
+ final Object keyObject = data.getBundleKey();
+ final Object valueObject = new DefaultResourceBundleDataCacheEntry(cdata, caller);
+ final Element element = new Element(keyObject, valueObject);
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Storing Bundle " + keyObject);
++ EHCacheModule.CACHE_MONITOR.config("Storing Bundle " + keyObject);
+ }
+ dataCache.put(element);
+ return cdata;
+--- a/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceDataCache.java
++++ b/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceDataCache.java
+@@ -17,6 +17,7 @@
+
+ package org.pentaho.reporting.libraries.resourceloader.modules.cache.ehcache;
+
++import java.util.logging.Level;
+ import net.sf.ehcache.Cache;
+ import net.sf.ehcache.CacheException;
+ import net.sf.ehcache.Element;
+@@ -64,15 +65,15 @@
+ final Element element = dataCache.get((Object) key);
+ if (element != null)
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Data Cache Hit " + key);
++ EHCacheModule.CACHE_MONITOR.config("Data Cache Hit " + key);
+ }
+ return (ResourceDataCacheEntry) element.getObjectValue();
+ }
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Data Cache Miss " + key);
++ EHCacheModule.CACHE_MONITOR.config("Data Cache Miss " + key);
+ }
+ return null;
+ }
diff --git a/external/jfreereport/patches/librepository-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/librepository-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..29acd6043d0a
--- /dev/null
+++ b/external/jfreereport/patches/librepository-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,117 @@
+diff -ru librepository-1.1.3.orig/source/org/pentaho/reporting/libraries/repository/zip/ZipContentLocation.java librepository-1.1.3/source/org/pentaho/reporting/libraries/repository/zip/ZipContentLocation.java
+--- librepository-1.1.3.orig/source/org/pentaho/reporting/libraries/repository/zip/ZipContentLocation.java 2021-04-07 11:16:05.369984495 +0100
++++ librepository-1.1.3/source/org/pentaho/reporting/libraries/repository/zip/ZipContentLocation.java 2021-04-07 11:17:30.417035353 +0100
+@@ -21,8 +21,7 @@
+ import java.util.HashMap;
+ import java.util.zip.ZipEntry;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.repository.ContentCreationException;
+ import org.pentaho.reporting.libraries.repository.ContentEntity;
+ import org.pentaho.reporting.libraries.repository.ContentIOException;
+@@ -35,7 +34,7 @@
+
+ public class ZipContentLocation implements ContentLocation
+ {
+- private static final Log logger = LogFactory.getLog(ZipContentLocation.class);
++ private static final Logger logger = Logger.getLogger(ZipContentLocation.class.getName());
+ private ZipRepository repository;
+ private ZipContentLocation parent;
+ private String comment;
+@@ -114,7 +113,7 @@
+ final Object entry = entries.get(path);
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Directory-Entry with the same name as a Content-Entry encountered: " + path);
++ logger.warning("Directory-Entry with the same name as a Content-Entry encountered: " + path);
+ return;
+ }
+ final ZipContentLocation location;
+@@ -164,7 +163,7 @@
+ {
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Directory-Entry with the same name as a Content-Entry encountered: " + path);
++ logger.warning("Directory-Entry with the same name as a Content-Entry encountered: " + path);
+ return;
+ }
+
+@@ -188,12 +187,12 @@
+ {
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Duplicate Content-Entry encountered: " + path);
++ logger.warning("Duplicate Content-Entry encountered: " + path);
+ return;
+ }
+ else if (entry != null)
+ {
+- logger.warn("Replacing Directory-Entry with the same name as a Content-Entry: " + path);
++ logger.warning("Replacing Directory-Entry with the same name as a Content-Entry: " + path);
+ }
+ final ZipContentItem contentItem = new ZipContentItem(repository, this, zipEntry, data);
+ entries.put(path, contentItem);
+@@ -352,4 +351,4 @@
+ {
+ return (entries.remove(entity.getName()) != null);
+ }
+-}
+\ No newline at end of file
++}
+diff -ru librepository-1.1.3.orig/source/org/pentaho/reporting/libraries/repository/zipreader/ZipReadContentLocation.java librepository-1.1.3/source/org/pentaho/reporting/libraries/repository/zipreader/ZipReadContentLocation.java
+--- librepository-1.1.3.orig/source/org/pentaho/reporting/libraries/repository/zipreader/ZipReadContentLocation.java 2021-04-07 11:16:05.365984446 +0100
++++ librepository-1.1.3/source/org/pentaho/reporting/libraries/repository/zipreader/ZipReadContentLocation.java 2021-04-07 11:17:22.342935587 +0100
+@@ -21,8 +21,7 @@
+ import java.util.HashMap;
+ import java.util.zip.ZipEntry;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.repository.ContentCreationException;
+ import org.pentaho.reporting.libraries.repository.ContentEntity;
+ import org.pentaho.reporting.libraries.repository.ContentIOException;
+@@ -39,7 +38,7 @@
+ */
+ public class ZipReadContentLocation implements ContentLocation
+ {
+- private static final Log logger = LogFactory.getLog(ZipReadContentLocation.class);
++ private static final Logger logger = Logger.getLogger(ZipReadContentLocation.class.getName());
+ private ZipReadRepository repository;
+ private ZipReadContentLocation parent;
+ private String comment;
+@@ -117,7 +116,7 @@
+ final Object entry = entries.get(path);
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Directory-Entry with the same name as a Content-Entry encountered: " + path);
++ logger.warning("Directory-Entry with the same name as a Content-Entry encountered: " + path);
+ return;
+ }
+ final ZipReadContentLocation location;
+@@ -164,7 +163,7 @@
+ {
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Directory-Entry with the same name as a Content-Entry encountered: " + path);
++ logger.warning("Directory-Entry with the same name as a Content-Entry encountered: " + path);
+ return;
+ }
+
+@@ -188,12 +187,12 @@
+ {
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Duplicate Content-Entry encountered: " + path);
++ logger.warning("Duplicate Content-Entry encountered: " + path);
+ return;
+ }
+ else if (entry != null)
+ {
+- logger.warn("Replacing Directory-Entry with the same name as a Content-Entry: " + path);
++ logger.warning("Replacing Directory-Entry with the same name as a Content-Entry: " + path);
+ }
+ final ZipReadContentItem contentItem = new ZipReadContentItem(repository, this, zipEntry, data);
+ entries.put(path, contentItem);
diff --git a/external/jfreereport/patches/libserializer-1.1.2-remove-commons-logging.patch.1 b/external/jfreereport/patches/libserializer-1.1.2-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..52ee76a77491
--- /dev/null
+++ b/external/jfreereport/patches/libserializer-1.1.2-remove-commons-logging.patch.1
@@ -0,0 +1,31 @@
+diff -ru libserializer-1.1.2.orig/source/org/pentaho/reporting/libraries/serializer/SerializerHelper.java libserializer-1.1.2/source/org/pentaho/reporting/libraries/serializer/SerializerHelper.java
+--- libserializer-1.1.2.orig/source/org/pentaho/reporting/libraries/serializer/SerializerHelper.java 2021-04-07 11:22:05.509434457 +0100
++++ libserializer-1.1.2/source/org/pentaho/reporting/libraries/serializer/SerializerHelper.java 2021-04-07 11:23:19.102343782 +0100
+@@ -25,8 +25,7 @@
+ import java.util.HashMap;
+ import java.util.Iterator;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+ import org.pentaho.reporting.libraries.base.util.DebugLog;
+@@ -41,7 +40,7 @@
+ */
+ public class SerializerHelper
+ {
+- private static final Log logger = LogFactory.getLog(SerializerHelper.class);
++ private static final Logger logger = Logger.getLogger(SerializerHelper.class.getName());
+ /**
+ * The singleton instance of the serialize helper.
+ */
+@@ -124,7 +123,7 @@
+ }
+ else
+ {
+- logger.warn("Invalid SerializeMethod implementation: " + c);
++ logger.warning("Invalid SerializeMethod implementation: " + c);
+ }
+ }
+ }
diff --git a/external/jfreereport/patches/libxml-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/libxml-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..ecec88c480ab
--- /dev/null
+++ b/external/jfreereport/patches/libxml-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,313 @@
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java 2021-04-07 11:34:22.313653786 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java 2021-04-07 11:48:16.381234640 +0100
+@@ -20,8 +20,8 @@
+ import java.util.HashMap;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.DependencyCollector;
+ import org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey;
+ import org.pentaho.reporting.libraries.resourceloader.Resource;
+@@ -40,7 +40,7 @@
+ */
+ public abstract class AbstractXmlReadHandler implements XmlReadHandler
+ {
+- private static final Log logger = LogFactory.getLog(AbstractXmlReadHandler.class);
++ private static final Logger logger = Logger.getLogger(AbstractXmlReadHandler.class.getName());
+
+ /**
+ * The root handler.
+@@ -120,8 +120,8 @@
+ final XmlReadHandler childHandler = getHandlerForChild(uri, tagName, attrs);
+ if (childHandler == null)
+ {
+- logger.warn("Unknown tag <" + uri + ':' + tagName + ">: Start to ignore this element and all of its childs. " + getLocatorString());
+- logger.debug(this.getClass());
++ logger.warning("Unknown tag <" + uri + ':' + tagName + ">: Start to ignore this element and all of its childs. " + getLocatorString());
++ logger.config(this.getClass().getName());
+ final IgnoreAnyChildReadHandler ignoreAnyChildReadHandler =
+ new IgnoreAnyChildReadHandler();
+ ignoreAnyChildReadHandler.init(getRootHandler(), uri, tagName);
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java 2021-04-07 11:34:22.313653786 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java 2021-04-07 11:44:15.729203631 +0100
+@@ -26,8 +26,7 @@
+ import javax.xml.parsers.SAXParser;
+ import javax.xml.parsers.SAXParserFactory;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.CompoundResource;
+ import org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey;
+ import org.pentaho.reporting.libraries.resourceloader.Resource;
+@@ -56,7 +55,7 @@
+ */
+ public abstract class AbstractXmlResourceFactory implements ResourceFactory
+ {
+- private static final Log logger = LogFactory.getLog(AbstractXmlResourceFactory.class);
++ private static final Logger logger = Logger.getLogger(AbstractXmlResourceFactory.class.getName());
+
+ /**
+ * A key for the content base.
+@@ -115,7 +114,7 @@
+ }
+ catch (SAXException se)
+ {
+- logger.debug("Comments are not supported by this SAX implementation.");
++ logger.config("Comments are not supported by this SAX implementation.");
+ }
+
+ try
+@@ -133,7 +132,7 @@
+ }
+ catch (SAXException e)
+ {
+- logger.warn("No Namespace features will be available. (Yes, this is serious)");
++ logger.warning("No Namespace features will be available. (Yes, this is serious)");
+ }
+ }
+
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java 2021-04-07 11:34:22.314653798 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java 2021-04-07 11:43:15.934442890 +0100
+@@ -22,8 +22,7 @@
+ import javax.xml.parsers.DocumentBuilderFactory;
+ import javax.xml.parsers.ParserConfigurationException;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.Resource;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceCreationException;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+@@ -61,7 +60,7 @@
+ }
+ }
+
+- private static final Log logger = LogFactory.getLog(DomTreeResourceFactory.class);
++ private static final Logger logger = Logger.getLogger(DomTreeResourceFactory.class.getName());
+
+ /**
+ * Creates a resource by interpreting the data given in the resource-data object. If additional datastreams need to
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java 2021-04-07 11:34:22.313653786 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java 2021-04-07 11:49:49.117390246 +0100
+@@ -17,8 +17,8 @@
+
+ package org.pentaho.reporting.libraries.xmlns.parser;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.xml.sax.ErrorHandler;
+ import org.xml.sax.SAXException;
+ import org.xml.sax.SAXParseException;
+@@ -30,9 +30,9 @@
+ */
+ public class LoggingErrorHandler implements ErrorHandler
+ {
+- private static final Log defaultLogContext = LogFactory.getLog(LoggingErrorHandler.class);
++ private static final Logger defaultLogContext = Logger.getLogger(LoggingErrorHandler.class.getName());
+ /** @noinspection NonConstantLogger*/
+- private Log logContext;
++ private Logger logContext;
+
+ /**
+ * Default-Constructor. Logs to a logger configured with this class name as category.
+@@ -47,7 +47,7 @@
+ *
+ * @param logContext the logger that should receive the messages.
+ */
+- public LoggingErrorHandler(final Log logContext)
++ public LoggingErrorHandler(final Logger logContext)
+ {
+ if (logContext == null)
+ {
+@@ -78,7 +78,7 @@
+ */
+ public void warning(final SAXParseException exception) throws SAXException
+ {
+- if (logContext.isDebugEnabled())
++ if (logContext.isLoggable(Level.CONFIG))
+ {
+ if (exception.getMessage().startsWith("URI was not reported to parser for entity"))
+ {
+@@ -86,7 +86,7 @@
+ // the GNU thing complain about it ..
+ return;
+ }
+- logContext.debug("Parser-Warning", exception);
++ logContext.severe("Parser-Warning: " + exception.getMessage());
+ }
+ }
+
+@@ -115,15 +115,15 @@
+ */
+ public void error(final SAXParseException exception) throws SAXException
+ {
+- if (logContext.isWarnEnabled())
++ if (logContext.isLoggable(Level.WARNING))
+ {
+- if (logContext.isDebugEnabled())
++ if (logContext.isLoggable(Level.CONFIG))
+ {
+- logContext.warn("Recoverable Parser-Error", exception);
++ logContext.warning("Recoverable Parser-Error:" + exception.getMessage());
+ }
+ else
+ {
+- logContext.warn("Recoverable Parser-Error:" + exception.getMessage());
++ logContext.warning("Recoverable Parser-Error:" + exception.getMessage());
+ }
+ }
+ }
+@@ -156,15 +156,15 @@
+ */
+ public void fatalError(final SAXParseException exception) throws SAXException
+ {
+- if (logContext.isErrorEnabled())
++ if (logContext.isLoggable(Level.SEVERE))
+ {
+- if (logContext.isDebugEnabled())
++ if (logContext.isLoggable(Level.CONFIG))
+ {
+- logContext.error("Fatal Parser-Error", exception);
++ logContext.severe("Fatal Parser-Error:" + exception.getMessage());
+ }
+ else
+ {
+- logContext.error("Fatal Parser-Error:" + exception.getMessage());
++ logContext.severe("Fatal Parser-Error:" + exception.getMessage());
+ }
+ }
+ }
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java 2021-04-07 11:34:22.314653798 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java 2021-04-07 11:43:45.602820344 +0100
+@@ -22,8 +22,7 @@
+ import java.net.URL;
+ import java.util.HashMap;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.xml.sax.EntityResolver;
+ import org.xml.sax.InputSource;
+
+@@ -34,7 +33,7 @@
+ */
+ public final class ParserEntityResolver implements EntityResolver
+ {
+- private static final Log logger = LogFactory.getLog(ParserEntityResolver.class);
++ private static final Logger logger = Logger.getLogger(ParserEntityResolver.class.getName());
+
+ /**
+ * The hashtable for the known entities (deprecated DTDs).
+@@ -75,7 +74,7 @@
+ }
+ else
+ {
+- logger.warn("Validate location failed for " + publicID + " location: " + location);
++ logger.warning("Validate location failed for " + publicID + " location: " + location);
+ return false;
+ }
+ }
+@@ -101,7 +100,7 @@
+ }
+ else
+ {
+- logger.warn("Validate location failed for " + publicID + " location: " + location);
++ logger.warning("Validate location failed for " + publicID + " location: " + location);
+ return false;
+ }
+ }
+@@ -195,7 +194,7 @@
+ }
+ catch (IOException ioe)
+ {
+- logger.warn("Unable to open specified DTD", ioe);
++ logger.warning("Unable to open specified DTD: " + ioe);
+ }
+ return null;
+ }
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java 2021-04-07 11:34:22.312653773 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java 2021-04-07 11:44:05.484073284 +0100
+@@ -20,8 +20,7 @@
+ import java.io.InputStream;
+ import java.net.URL;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceManager;
+@@ -34,7 +33,7 @@
+ */
+ public class ResourceDataInputSource extends InputSource
+ {
+- private static final Log logger = LogFactory.getLog(ResourceDataInputSource.class);
++ private static final Logger logger = Logger.getLogger(ResourceDataInputSource.class.getName());
+ private ResourceData data;
+ private long version;
+ private ResourceManager caller;
+@@ -103,7 +102,7 @@
+ }
+ catch (ResourceLoadingException e)
+ {
+- logger.error("Unable to create byte-stream: " + data.getKey());
++ logger.severe("Unable to create byte-stream: " + data.getKey());
+ return null;
+ }
+ }
+--- a/source/org/pentaho/reporting/libraries/xmlns/common/ParserUtil.java
++++ b/source/org/pentaho/reporting/libraries/xmlns/common/ParserUtil.java
+@@ -21,8 +21,7 @@
+ import org.pentaho.reporting.libraries.xmlns.LibXmlBoot;
+ import org.xml.sax.Locator;
+ import org.xml.sax.SAXException;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Basic helper functions to ease up the process of parsing.
+@@ -31,7 +30,7 @@
+ */
+ public class ParserUtil
+ {
+- private static final Log logger = LogFactory.getLog(ParserUtil.class);
++ private static final Logger logger = Logger.getLogger(ParserUtil.class.getName());
+ private static boolean strictParsing;
+
+ static
+@@ -243,7 +242,7 @@
+ return false;
+ }
+
+- logger.warn("Invalid value encountered: Expected 'true' or 'false', but got '" + text + "'");
++ logger.warning("Invalid value encountered: Expected 'true' or 'false', but got '" + text + "'");
+ return "true".equalsIgnoreCase(text);
+ }
+ }
+@@ -281,11 +280,11 @@
+
+ if (locator == null)
+ {
+- logger.warn("Invalid value encountered for boolean attribute.");
++ logger.warning("Invalid value encountered for boolean attribute.");
+ }
+ else
+ {
+- logger.warn("Invalid value encountered for boolean attribute. [Line: " +
++ logger.warning("Invalid value encountered for boolean attribute. [Line: " +
+ locator.getLineNumber() + " Column: " + locator.getColumnNumber() + "]");
+ }
+ return Boolean.FALSE;
diff --git a/external/jfreereport/patches/pentaho-reporting-flow-engine-0.9.4-remove-commons-logging.patch.1 b/external/jfreereport/patches/pentaho-reporting-flow-engine-0.9.4-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..80029e49fe59
--- /dev/null
+++ b/external/jfreereport/patches/pentaho-reporting-flow-engine-0.9.4-remove-commons-logging.patch.1
@@ -0,0 +1,101 @@
+diff -ru pentaho-reporting-flow-engine-0.9.4.orig/source/org/jfree/report/JFreeReportBoot.java pentaho-reporting-flow-engine-0.9.4/source/org/jfree/report/JFreeReportBoot.java
+--- pentaho-reporting-flow-engine-0.9.4.orig/source/org/jfree/report/JFreeReportBoot.java 2021-04-07 12:09:46.917336778 +0100
++++ pentaho-reporting-flow-engine-0.9.4/source/org/jfree/report/JFreeReportBoot.java 2021-04-07 12:12:04.794062296 +0100
+@@ -42,8 +42,7 @@
+ import org.pentaho.reporting.libraries.base.boot.PackageManager;
+ import org.pentaho.reporting.libraries.base.versioning.ProjectInformation;
+ import org.pentaho.reporting.libraries.base.LibBaseBoot;
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+
+ /**
+ * An utility class to safely boot and initialize the JFreeReport library. This class
+@@ -66,7 +65,7 @@
+ */
+ public class JFreeReportBoot extends AbstractBoot
+ {
+- private static final Log logger = LogFactory.getLog(JFreeReportBoot.class);
++ private static final Logger logger = Logger.getLogger(JFreeReportBoot.class.getName());
+
+ /**
+ * A wrappper around the user supplied global configuration.
+@@ -292,12 +291,12 @@
+ // make sure logging is re-initialized after we injected our configuration.
+ if (isStrictFP() == false)
+ {
+- logger.warn("The used VM seems to use a non-strict floating point arithmetics");
+- logger.warn("Layouts computed with this Java Virtual Maschine may be invalid.");
+- logger.warn("JFreeReport and the library 'iText' depend on the strict floating point rules");
+- logger.warn("of Java1.1 as implemented by the Sun Virtual Maschines.");
+- logger.warn("If you are using the BEA JRockit VM, start the Java VM with the option");
+- logger.warn("'-Xstrictfp' to restore the default behaviour.");
++ logger.warning("The used VM seems to use a non-strict floating point arithmetics");
++ logger.warning("Layouts computed with this Java Virtual Maschine may be invalid.");
++ logger.warning("JFreeReport and the library 'iText' depend on the strict floating point rules");
++ logger.warning("of Java1.1 as implemented by the Sun Virtual Maschines.");
++ logger.warning("If you are using the BEA JRockit VM, start the Java VM with the option");
++ logger.warning("'-Xstrictfp' to restore the default behaviour.");
+ }
+
+ final PackageManager mgr = getPackageManager();
+@@ -338,8 +337,8 @@
+ }
+ catch (Exception se)
+ {
+- logger.error
+- ("An error occured while checking the system properties for extension modules.", se);
++ logger.severe
++ ("An error occured while checking the system properties for extension modules: " + se);
+ }
+ }
+
+diff -ru pentaho-reporting-flow-engine-0.9.4.orig/source/org/jfree/report/util/ComponentDrawable.java pentaho-reporting-flow-engine-0.9.4/source/org/jfree/report/util/ComponentDrawable.java
+--- pentaho-reporting-flow-engine-0.9.4.orig/source/org/jfree/report/util/ComponentDrawable.java 2021-04-07 12:09:46.916336765 +0100
++++ pentaho-reporting-flow-engine-0.9.4/source/org/jfree/report/util/ComponentDrawable.java 2021-04-07 12:11:25.530570919 +0100
+@@ -42,8 +42,7 @@
+ import javax.swing.RepaintManager;
+ import javax.swing.SwingUtilities;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 11.10.2005, 14:03:15
+@@ -52,7 +51,7 @@
+ */
+ public class ComponentDrawable
+ {
+- private static final Log logger = LogFactory.getLog (ComponentDrawable.class);
++ private static final Logger logger = Logger.getLogger(ComponentDrawable.class.getName());
+
+ /**
+ * A runnable that executes the drawing operation on the event-dispatcher thread.
+@@ -443,7 +442,7 @@
+ }
+ catch (Exception e)
+ {
+- ComponentDrawable.logger.warn("Failed to compute the preferred size.");
++ ComponentDrawable.logger.warning("Failed to compute the preferred size.");
+ }
+ return new Dimension(0, 0);
+ }
+@@ -475,7 +474,7 @@
+ }
+ catch (Exception e)
+ {
+- ComponentDrawable.logger.warn("Failed to compute the defined size.");
++ ComponentDrawable.logger.warning("Failed to compute the defined size.");
+ }
+ return new Dimension(0, 0);
+ }
+@@ -563,7 +562,7 @@
+ }
+ catch (Exception e)
+ {
+- ComponentDrawable.logger.warn("Failed to redraw the component.");
++ ComponentDrawable.logger.warning("Failed to redraw the component.");
+ }
+ }
+ }
diff --git a/external/libassuan/ExternalProject_libassuan.mk b/external/libassuan/ExternalProject_libassuan.mk
index 83d79a520988..9237c35a5d31 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -30,11 +30,12 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executabl
--disable-shared \
--disable-doc \
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
+ CFLAGS="$(CFLAGS) -D__STDC__=1" \
CXXFLAGS="$(CXXFLAGS)" \
GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
--host=$(gb_ExternalProject_libassuan_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_libassuan_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ RC='windres -O COFF --target=$(gb_ExternalProject_libassuan_target) --preprocessor=$(call gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \
MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/apache-commons/Module_apache-commons.mk b/external/libffi/ExternalPackage_libffi.mk
index 45aabe229b03..61b0a1ca460c 100644
--- a/external/apache-commons/Module_apache-commons.mk
+++ b/external/libffi/ExternalPackage_libffi.mk
@@ -7,12 +7,14 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-$(eval $(call gb_Module_Module,apache-commons))
+$(eval $(call gb_ExternalPackage_ExternalPackage,libffi,libffi))
-$(eval $(call gb_Module_add_targets,apache-commons,\
- ExternalPackage_apache_commons_logging \
- ExternalProject_apache_commons_logging \
- UnpackedTarball_apache_commons_logging \
+$(eval $(call gb_ExternalPackage_use_external_project,libffi,libffi))
+
+ifeq ($(COM),MSC)
+$(eval $(call gb_ExternalPackage_add_files,libffi,$(LIBO_LIB_FOLDER)/python-core-$(PYTHON_VERSION)/lib, \
+ $(HOST_PLATFORM)/.libs/libffi-7.dll \
))
+endif
# vim: set noet sw=4 ts=4:
diff --git a/external/libffi/ExternalProject_libffi.mk b/external/libffi/ExternalProject_libffi.mk
index bdf8fe61eb76..0ff625ea3e20 100644
--- a/external/libffi/ExternalProject_libffi.mk
+++ b/external/libffi/ExternalProject_libffi.mk
@@ -14,17 +14,34 @@ $(eval $(call gb_ExternalProject_register_targets,libffi,\
))
# set prefix so that it ends up in libffi.pc so that pkg-config in python3 works
+# For a static Windows build, change CPPFLAGS to include -D_LIB and --disable-static
+# Also remove the ExternalPackage in that case
+
+libffi_WIN_PLATFORM := $(strip \
+ $(if $(filter INTEL,$(CPUNAME)),32) \
+ $(if $(filter X86_64,$(CPUNAME)),64) \
+ $(if $(filter ARM64,$(CPUNAME)),arm64) \
+ )
$(call gb_ExternalProject_get_state_target,libffi,build):
$(call gb_ExternalProject_run,build,\
+ export LIB="$(ILIB)" && \
./configure \
--enable-option-checking=fatal \
- $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
- --enable-static \
- --disable-shared \
- --with-pic \
- --enable-portable-binary \
- CC="$(CC) $(if $(filter LINUX,$(OS)),-fvisibility=hidden)" \
+ --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
+ $(if $(filter LINUX,$(OS)), \
+ --disable-shared \
+ CC="$(CC) -fvisibility=hidden" \
+ --with-pic \
+ --enable-portable-binary) \
+ $(if $(filter WNT,$(OS)), \
+ --disable-static \
+ CC="$(call gb_UnpackedTarball_get_dir,libffi)/msvcc.sh -m$(libffi_WIN_PLATFORM)" \
+ CXX="$(call gb_UnpackedTarball_get_dir,libffi)/msvcc.sh -m$(libffi_WIN_PLATFORM)" \
+ LD='link' \
+ CPP='cl -nologo -EP' \
+ CXXCPP='cl -nologo -EP' \
+ CPPFLAGS="-DFFI_BUILDING_DLL $(SOLARINC)") \
--prefix=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM) \
--disable-docs \
&& $(MAKE) \
diff --git a/external/libffi/Module_libffi.mk b/external/libffi/Module_libffi.mk
index 739fd4197000..ace75480abe3 100644
--- a/external/libffi/Module_libffi.mk
+++ b/external/libffi/Module_libffi.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_Module_Module,libffi))
$(eval $(call gb_Module_add_targets,libffi,\
UnpackedTarball_libffi \
ExternalProject_libffi \
+ ExternalPackage_libffi \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk b/external/libgpg-error/ExternalProject_libgpg-error.mk
index 1fcd63180e20..e5155aad94c1 100644
--- a/external/libgpg-error/ExternalProject_libgpg-error.mk
+++ b/external/libgpg-error/ExternalProject_libgpg-error.mk
@@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Execut
--disable-doc \
--disable-tests \
--host=$(gb_ExternalProject_libgpg-error_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor=$(call gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \
&& $(MAKE) \
)
else
diff --git a/external/liblangtag/UnpackedTarball_liblangtag.mk b/external/liblangtag/UnpackedTarball_liblangtag.mk
index 66b8051782d0..16b9ea999f71 100644
--- a/external/liblangtag/UnpackedTarball_liblangtag.mk
+++ b/external/liblangtag/UnpackedTarball_liblangtag.mk
@@ -30,8 +30,6 @@ endif
$(eval $(call gb_UnpackedTarball_add_patches,liblangtag, \
$(if $(SYSTEM_LIBXML),,external/liblangtag/langtag-libtool-rpath.patch.0) \
external/liblangtag/clang-cl.patch.0 \
- external/liblangtag/langtag-valencia.patch.0 \
- external/liblangtag/Wformat-overflow.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/liblangtag/Wformat-overflow.patch b/external/liblangtag/Wformat-overflow.patch
deleted file mode 100644
index f2d017e4b395..000000000000
--- a/external/liblangtag/Wformat-overflow.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- liblangtag/lt-script-db.c
-+++ liblangtag/lt-script-db.c
-@@ -134,8 +134,12 @@
- cnode = cnode->next;
- }
- if (!subtag) {
-- lt_warning("No subtag node: description = '%s'",
-- desc);
-+ if (!desc) {
-+ lt_warning("No subtag nor description node");
-+ } else {
-+ lt_warning("No subtag node: description = '%s'",
-+ desc);
-+ }
- goto bail1;
- }
- if (!desc) {
diff --git a/external/liblangtag/langtag-valencia.patch.0 b/external/liblangtag/langtag-valencia.patch.0
deleted file mode 100644
index dc28043042e4..000000000000
--- a/external/liblangtag/langtag-valencia.patch.0
+++ /dev/null
@@ -1,29 +0,0 @@
---- liblangtag/lt-tag.c
-+++ liblangtag/lt-tag.c
-@@ -2009,11 +2009,23 @@
- if (ctag->region)
- lt_string_append_printf(string, "_%s",
- lt_region_get_tag(ctag->region));
-- if (ctag->script) {
-+ if (ctag->script)
- mod = lt_script_convert_to_modifier(ctag->script);
-- if (mod)
-- lt_string_append_printf(string, "@%s", mod);
-+ if (!mod && ctag->variants)
-+ {
-+ lt_list_t* l;
-+ for (l = ctag->variants; l != NULL; l = lt_list_next(l)) {
-+ lt_variant_t *variant = lt_list_value(l);
-+ const char *s = lt_variant_get_tag(variant);
-+ if (lt_strcmp0(s, "valencia") == 0) {
-+ mod = "valencia";
-+ break;
-+ }
-+ }
- }
-+ if (mod)
-+ lt_string_append_printf(string, "@%s", mod);
-+
- lt_tag_unref(ctag);
-
- bail:
diff --git a/external/libnumbertext/EmptyString.patch1 b/external/libnumbertext/EmptyString.patch1
new file mode 100644
index 000000000000..d6570117da09
--- /dev/null
+++ b/external/libnumbertext/EmptyString.patch1
@@ -0,0 +1,13 @@
+--- a/src/Soros.cxx 2022-06-27 09:36:46.486075920 +0100
++++ b/src/Soros.cxx 2022-06-27 09:37:52.594072196 +0100
+@@ -98,8 +98,8 @@
+ s = regex_replace(s, quoteEnd, L"");
+ s = translate(s, c.substr(1), m.substr(1), L"");
+ replace(s, slash, L"\\\\"); // -> \\, ", ;, #
+- begins.push_back(s[0] == L'^');
+- ends.push_back(s[s.length()-1] == L'$');
++ begins.push_back(!s.empty() && s[0] == L'^');
++ ends.push_back(!s.empty() && s[s.length()-1] == L'$');
+ s = L"^" + regex_replace(s, wregex(L"^\\^"), L"");
+ s = regex_replace(s, wregex(L"\\$$"), L"") + L"$";
+ try
diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index 67b147393e31..5667b138bbb0 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1))
# <https://github.com/Numbertext/libnumbertext/pull/43>:
$(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
external/libnumbertext/0001-Don-t-depend-on-en_US.UTF-8-locale.patch \
+ external/libnumbertext/EmptyString.patch1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
index 113e8e25818d..a6c36095f3ab 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -15,6 +15,15 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,liborcus))
+# forcepoint-83.patch.1 merged as
+# https://gitlab.com/orcus/orcus/-/commit/9f6400b8192e39fefd475a96222713e9e9c60038
+# forcepoint-84.patch.1 merged as
+# https://gitlab.com/orcus/orcus/-/commit/223defe95d6f20f1bc5fd22fecc80a79a9519028
+# forcepoint-87.patch.1 merged as
+# https://gitlab.com/orcus/orcus/-/commit/a718524ca424fb8a7e7931345a118342d1d4a507
+# forcepoint-95.patch.1 submitted as
+# https://gitlab.com/orcus/orcus/-/merge_requests/124
+
$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/rpath.patch.0 \
external/liborcus/gcc9.patch.0 \
@@ -23,6 +32,14 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/include.patch.0 \
))
+$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
+ external/liborcus/forcepoint-83.patch.1 \
+ external/liborcus/forcepoint-84.patch.1 \
+ external/liborcus/forcepoint-87.patch.1 \
+ external/liborcus/forcepoint-95.patch.1 \
+ external/liborcus/overrun.patch.0 \
+))
+
ifeq ($(OS),WNT)
$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/windows-constants-hack.patch \
diff --git a/external/liborcus/forcepoint-83.patch.1 b/external/liborcus/forcepoint-83.patch.1
new file mode 100644
index 000000000000..644c0dcfff4e
--- /dev/null
+++ b/external/liborcus/forcepoint-83.patch.1
@@ -0,0 +1,38 @@
+From 4d58816e995a562f26f3cc5006ae9ddd46b1bbed Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Wed, 23 Mar 2022 16:44:00 +0000
+Subject: [PATCH] forcepoint#83 Invalid read of size 1
+
+==343916== Invalid read of size 1
+==343916== at 0x11A7B2F0: orcus::parser_base::cur_char() const (parser_base.hpp:79)
+==343916== by 0x11B7B112: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::element_open(long) (sax_parser.hpp:258)
+==343916== by 0x11B7A2C7: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::element() (sax_parser.hpp:246)
+==343916== by 0x11B7A197: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::body() (sax_parser.hpp:214)
+==343916== by 0x11B79FD9: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::parse() (sax_parser.hpp:182)
+==343916== by 0x11B79F8B: orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::parse() (sax_ns_parser.hpp:277)
+==343916== by 0x11B79768: orcus::sax_token_parser<orcus::xml_stream_handler>::parse() (sax_token_parser.hpp:215)
+==343916== by 0x11B79406: orcus::xml_stream_parser::parse() (xml_stream_parser.cpp:68)
+==343916== by 0x11BE3805: orcus::orcus_xlsx::detect(unsigned char const*, unsigned long) (orcus_xlsx.cpp:188)
+==343916== by 0x11AB2482: orcus::detect(unsigned char const*, unsigned long) (format_detection.cpp:60)
+==343916== by 0x30E60945: (anonymous namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) (filterdetect.cxx:83)
+==343916== by 0x30E60ABE: non-virtual thunk to (anonymous namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) (filterdetect.cxx:0)
+---
+ include/orcus/sax_parser.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/orcus/sax_parser.hpp b/include/orcus/sax_parser.hpp
+index 15e8d917..2e707568 100644
+--- a/include/orcus/sax_parser.hpp
++++ b/include/orcus/sax_parser.hpp
+@@ -255,7 +255,7 @@ void sax_parser<_Handler,_Config>::element_open(std::ptrdiff_t begin_pos)
+ while (true)
+ {
+ skip_space_and_control();
+- char c = cur_char();
++ char c = cur_char_checked();
+ if (c == '/')
+ {
+ // Self-closing element: <element/>
+--
+2.35.1
+
diff --git a/external/liborcus/forcepoint-84.patch.1 b/external/liborcus/forcepoint-84.patch.1
new file mode 100644
index 000000000000..462fc8bd972d
--- /dev/null
+++ b/external/liborcus/forcepoint-84.patch.1
@@ -0,0 +1,38 @@
+From ec469f774bb91302c4df21eff1314dfd508d37c8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Wed, 23 Mar 2022 20:04:31 +0000
+Subject: [PATCH] forcepoint#84 Invalid read of size 1
+
+==356879== Invalid read of size 1
+==356879== at 0x11EC50B0: orcus::parser_base::cur_char() const (parser_base.hpp:79)
+==356879== by 0x11EDD736: orcus::sax::parser_base::value(std::basic_string_view<char, std::char_traits<char> >&, bool) (sax_parser_base.cpp:303)
+==356879== by 0x11B7C3D5: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::attribute() (sax_parser.hpp:563)
+==356879== by 0x11B7B35E: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::element_open(long) (sax_parser.hpp:292)
+==356879== by 0x11B7A2F7: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::element() (sax_parser.hpp:246)
+==356879== by 0x11B7A1C7: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::body() (sax_parser.hpp:214)
+==356879== by 0x11B7A009: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::parse() (sax_parser.hpp:182)
+==356879== by 0x11B79FBB: orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::parse() (sax_ns_parser.hpp:277)
+==356879== by 0x11B79798: orcus::sax_token_parser<orcus::xml_stream_handler>::parse() (sax_token_parser.hpp:215)
+==356879== by 0x11B79436: orcus::xml_stream_parser::parse() (xml_stream_parser.cpp:68)
+==356879== by 0x11BE3855: orcus::orcus_xlsx::detect(unsigned char const*, unsigned long) (orcus_xlsx.cpp:188)
+==356879== by 0x11AB2492: orcus::detect(unsigned char const*, unsigned long) (format_detection.cpp:60)
+---
+ src/parser/sax_parser_base.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp
+index 46acb81d..1cee821e 100644
+--- a/src/parser/sax_parser_base.cpp
++++ b/src/parser/sax_parser_base.cpp
+@@ -298,7 +298,7 @@ void parser_base::value_with_encoded_char(cell_buffer& buf, std::string_view& st
+
+ bool parser_base::value(pstring& str, bool decode)
+ {
+- char c = cur_char();
++ char c = cur_char_checked();
+ if (c != '"' && c != '\'')
+ throw malformed_xml_error("value must be quoted", offset());
+
+--
+2.35.1
+
diff --git a/external/liborcus/forcepoint-87.patch.1 b/external/liborcus/forcepoint-87.patch.1
new file mode 100644
index 000000000000..f02a4726d8e5
--- /dev/null
+++ b/external/liborcus/forcepoint-87.patch.1
@@ -0,0 +1,27 @@
+From e4f3741197a3af6d434850d388483b523138a214 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Thu, 24 Mar 2022 21:31:14 +0000
+Subject: [PATCH] forcepoint#87 Assertion `mp_char <= mp_end' failed
+
+soffice.bin: ../../include/orcus/parser_base.hpp:65: bool orcus::parser_base::has_char() const: Assertion `mp_char <= mp_end' failed.
+---
+ src/parser/sax_parser_base.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp
+index 46acb81d..cb7a9c04 100644
+--- a/src/parser/sax_parser_base.cpp
++++ b/src/parser/sax_parser_base.cpp
+@@ -293,7 +293,8 @@
+
+ // Skip the closing quote.
+ assert(!has_char() || cur_char() == '"');
+- next();
++ if (has_char())
++ next();
+ }
+
+ bool parser_base::value(pstring& str, bool decode)
+--
+2.35.1
+
diff --git a/external/liborcus/forcepoint-95.patch.1 b/external/liborcus/forcepoint-95.patch.1
new file mode 100644
index 000000000000..93dc822298b0
--- /dev/null
+++ b/external/liborcus/forcepoint-95.patch.1
@@ -0,0 +1,11 @@
+--- a/include/orcus/sax_parser.hpp 2022-03-30 10:54:44.043568760 +0100
++++ b/include/orcus/sax_parser.hpp 2022-03-30 10:54:55.645037322 +0100
+@@ -547,7 +547,7 @@
+
+ skip_space_and_control();
+
+- char c = cur_char();
++ char c = cur_char_checked();
+ if (c != '=')
+ {
+ std::ostringstream os;
diff --git a/external/liborcus/include.patch.0 b/external/liborcus/include.patch.0
index 9555dd534b3e..3bed5aebf865 100644
--- a/external/liborcus/include.patch.0
+++ b/external/liborcus/include.patch.0
@@ -1,3 +1,24 @@
+--- include/orcus/base64.hpp
++++ include/orcus/base64.hpp
+@@ -9,6 +9,7 @@
+ #define __ORCUS_BASE64_HPP__
+
+ #include "env.hpp"
++#include <stdint.h>
+ #include <vector>
+ #include <string>
+
+--- include/orcus/types.hpp
++++ include/orcus/types.hpp
+@@ -16,6 +16,7 @@
+ #pragma GCC diagnostic ignored "-Wshadow"
+ #endif
+
++#include <stdint.h>
+ #include <cstdlib>
+ #include <vector>
+ #include <string>
+
--- src/liborcus/orcus_xlsx.cpp
+++ src/liborcus/orcus_xlsx.cpp
@@ -32,6 +32,7 @@
diff --git a/external/liborcus/overrun.patch.0 b/external/liborcus/overrun.patch.0
new file mode 100644
index 000000000000..8b5bc5366da1
--- /dev/null
+++ b/external/liborcus/overrun.patch.0
@@ -0,0 +1,63 @@
+--- src/parser/sax_token_parser.cpp
++++ src/parser/sax_token_parser.cpp
+@@ -10,6 +10,7 @@
+
+ #include <mdds/sorted_string_map.hpp>
+ #include <cctype>
++#include <limits>
+
+ namespace orcus {
+
+@@ -329,6 +330,28 @@
+ m_elem.raw_name = elem.name;
+ }
+
++static uint8_t readUint8(char const * begin, char const * end, char const ** endptr) {
++ unsigned n = 0;
++ char const * p = begin;
++ for (; p != end; ++p) {
++ char const c = *p;
++ if (c < '0' || c > '9') {
++ break;
++ }
++ n = 10 * n + (c - '0');
++ if (n > std::numeric_limits<uint8_t>::max()) {
++ *endptr = nullptr;
++ return 0;
++ }
++ }
++ if (p == begin) {
++ *endptr = nullptr;
++ return 0;
++ }
++ *endptr = p;
++ return n;
++}
++
+ void sax_token_handler_wrapper_base::attribute(const pstring& name, const pstring& val)
+ {
+ decl_attr_type dat = decl_attr::get().find(name.data(), name.size());
+@@ -340,18 +362,18 @@
+ const char* p = val.data();
+ const char* p_end = p + val.size();
+
+- char* endptr = nullptr;
+- long v = std::strtol(p, &endptr, 10);
++ const char* endptr = nullptr;
++ uint8_t v = readUint8(p, p_end, &endptr);
+
+- if (!endptr || endptr >= p_end || *endptr != '.')
++ if (!endptr || endptr == p_end || *endptr != '.')
+ break;
+
+ m_declaration.version_major = v;
+ p = endptr + 1;
+
+- v = std::strtol(p, &endptr, 10);
++ v = readUint8(p, p_end, &endptr);
+
+- if (!endptr || endptr > p_end)
++ if (!endptr)
+ break;
+
+ m_declaration.version_minor = v;
diff --git a/external/libtommath/README b/external/libtommath/README
index 0da3128c5404..41f91970a71b 100644
--- a/external/libtommath/README
+++ b/external/libtommath/README
@@ -3,4 +3,4 @@ integer library written entirely in C.
Used by embedded firebird (external/firebird).
-http://www.libtom.org/LibTomMath/
+From [https://www.libtom.net/LibTomMath/].
diff --git a/external/libtommath/UnpackedTarball_libtommath.mk b/external/libtommath/UnpackedTarball_libtommath.mk
index bb0b9e352930..8961a46162c5 100644
--- a/external/libtommath/UnpackedTarball_libtommath.mk
+++ b/external/libtommath/UnpackedTarball_libtommath.mk
@@ -14,8 +14,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libtommath,$(LIBTOMMATH_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libtommath,0))
$(eval $(call gb_UnpackedTarball_add_patches,libtommath,\
- external/libtommath/libtommath-msvc.patch \
- external/libtommath/clang-cl.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/libtommath/clang-cl.patch b/external/libtommath/clang-cl.patch
deleted file mode 100644
index 1cc92d380c62..000000000000
--- a/external/libtommath/clang-cl.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- tommath.h
-+++ tommath.h
-@@ -15,6 +15,13 @@
- #ifndef BN_H_
- #define BN_H_
-
-+// Work around clang-cl issue when mp_word is a typedef for unsigned __int128, see
-+// <https://bugs.llvm.org/show_bug.cgi?id=25305> "Clang-cl generates a call to an undefined symbol
-+// _udivti3":
-+#if defined _WIN32 && defined __clang__
-+#define MP_8BIT
-+#endif
-+
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdint.h>
diff --git a/external/libtommath/libtommath-msvc.patch b/external/libtommath/libtommath-msvc.patch
deleted file mode 100644
index 07884871aac9..000000000000
--- a/external/libtommath/libtommath-msvc.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- makefile.msvc 2016-02-05 23:25:32.000000000 +0100
-+++ makefile.msvc 2016-07-21 11:34:20.618390100 +0200
-@@ -38,3 +38,9 @@
-
- library: $(OBJECTS)
- lib /out:tommath.lib $(OBJECTS)
-+
-+.cc.obj:
-+ $(CC) /nologo $(CFLAGS) /c $<
-+
-+.c.obj:
-+ $(CC) /nologo $(CFLAGS) /c $<
diff --git a/external/libxml2/ExternalPackage_libxml2.mk b/external/libxml2/ExternalPackage_libxml2.mk
index d38eb68df0cb..799044575f9a 100644
--- a/external/libxml2/ExternalPackage_libxml2.mk
+++ b/external/libxml2/ExternalPackage_libxml2.mk
@@ -21,7 +21,7 @@ else # COM=MSC
$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dll,win32/bin.msvc/libxml2.dll))
endif
else # OS!=WNT
-$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.9.$(LIBXML_VERSION_MICRO)))
+$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.12.$(LIBXML_VERSION_MICRO)))
endif
endif # DISABLE_DYNLOADING
diff --git a/external/libxml2/ExternalProject_libxml2.mk b/external/libxml2/ExternalProject_libxml2.mk
index 0d8559dfb04f..5a044e3098dd 100644
--- a/external/libxml2/ExternalProject_libxml2.mk
+++ b/external/libxml2/ExternalProject_libxml2.mk
@@ -21,7 +21,7 @@ $(eval $(call gb_ExternalProject_use_nmake,libxml2,build))
$(call gb_ExternalProject_get_state_target,libxml2,build):
$(call gb_ExternalProject_run,build,\
cscript /e:javascript configure.js \
- iconv=no icu=yes sax1=yes $(if $(MSVC_USE_DEBUG_RUNTIME),run_debug=yes cruntime=/MDd) \
+ iconv=no icu=yes sax1=yes $(if $(MSVC_USE_DEBUG_RUNTIME),cruntime=/MDd) \
$(if $(filter TRUE,$(ENABLE_DBGUTIL)),debug=yes) \
&& nmake \
,win32)
@@ -36,7 +36,7 @@ $(call gb_ExternalProject_get_state_target,libxml2,build):
LDFLAGS="$(if $(SYSBASE),-L$(SYSBASE)/usr/lib)" \
CFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include) $(if $(debug),-g)" \
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
- && $(MAKE) \
+ && $(MAKE) libxml2.la xmllint \
)
endif
diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk
index 83df02849cb3..489fb007572b 100644
--- a/external/libxml2/UnpackedTarball_libxml2.mk
+++ b/external/libxml2/UnpackedTarball_libxml2.mk
@@ -14,13 +14,15 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libxml2,$(LIBXML_TARBALL),,libxml2)
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2))
$(eval $(call gb_UnpackedTarball_add_patches,libxml2,\
- external/libxml2/libxml2-config.patch.1 \
- external/libxml2/libxml2-global-symbols.patch \
+ $(if $(filter SOLARIS,$(OS)),external/libxml2/libxml2-global-symbols.patch) \
external/libxml2/libxml2-vc10.patch \
+ external/libxml2/libxml2-XMLCALL-redefine.patch.0 \
$(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
$(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \
external/libxml2/libxml2-icu-sym.patch.0, \
external/libxml2/libxml2-icu.patch.0) \
))
+$(eval $(call gb_UnpackedTarball_add_file,libxml2,xml2-config.in,external/libxml2/xml2-config.in))
+
# vim: set noet sw=4 ts=4:
diff --git a/external/libxml2/libxml2-XMLCALL-redefine.patch.0 b/external/libxml2/libxml2-XMLCALL-redefine.patch.0
new file mode 100644
index 000000000000..d9ca23be7ce4
--- /dev/null
+++ b/external/libxml2/libxml2-XMLCALL-redefine.patch.0
@@ -0,0 +1,11 @@
+--- include/libxml/xmlexports.h 2023-05-24 12:48:46.179570708 +0100
++++ include/libxml/xmlexports.h 2023-05-24 12:48:56.563577488 +0100
+@@ -38,8 +38,6 @@
+
+ /** DOC_DISABLE */
+ /* Compatibility */
+-#define XMLCALL
+-#define XMLCDECL
+ #if !defined(LIBXML_DLL_IMPORT)
+ #define LIBXML_DLL_IMPORT XMLPUBVAR
+ #endif
diff --git a/external/libxml2/libxml2-android.patch b/external/libxml2/libxml2-android.patch
index 42af83274026..acf9b17e02db 100644
--- a/external/libxml2/libxml2-android.patch
+++ b/external/libxml2/libxml2-android.patch
@@ -2,9 +2,9 @@
+++ misc/build/libxml2-2.7.6/Makefile.in
@@ -1635,7 +1635,7 @@
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
- check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-recursive
--all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+ check: check-recursive
+-all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(DATA) \
+all-am: Makefile $(LTLIBRARIES) \
config.h
install-binPROGRAMS: install-libLTLIBRARIES
diff --git a/external/libxml2/libxml2-config.patch.1 b/external/libxml2/libxml2-config.patch.1
deleted file mode 100644
index 5a2ef1485e92..000000000000
--- a/external/libxml2/libxml2-config.patch.1
+++ /dev/null
@@ -1,43 +0,0 @@
-Hack the xml2-config to return paths into WORKDIR.
-
---- a/xml2-config.in 2009-12-17 11:45:20.000000000 +0000
-+++ b/xml2-config.in 2009-12-17 11:45:36.000000000 +0000
-@@ -1,9 +1,14 @@
- #! /bin/sh
-
--prefix=@prefix@
--exec_prefix=@exec_prefix@
--includedir=@includedir@
--libdir=@libdir@
-+#prefix=@prefix@
-+#exec_prefix=@exec_prefix@
-+#includedir=@includedir@
-+#libdir=@libdir@
-+
-+prefix=${WORKDIR}/UnpackedTarball/libxml2
-+exec_prefix=${WORKDIR}/UnpackedTarball/libxml2
-+includedir=${WORKDIR}/UnpackedTarball/libxml2/include
-+libdir=${WORKDIR}/UnpackedTarball/libxml2/.libs
- cflags=
- libs=
-
-@@ -67,7 +72,8 @@
- ;;
-
- --cflags)
-- cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
-+ #cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
-+ cflags="-I${includedir}"
- ;;
-
- --libtool-libs)
-@@ -91,7 +96,8 @@
- libs="@XML_LIBDIR@ $libs"
- fi
-
-- libs="$libs @WIN32_EXTRA_LIBADD@"
-+ #libs="$libs @WIN32_EXTRA_LIBADD@"
-+ libs="-L${libdir} -lxml2 -lm"
- ;;
-
- *)
diff --git a/external/libxml2/libxml2-global-symbols.patch b/external/libxml2/libxml2-global-symbols.patch
index cfec9c530281..32146da4b3d7 100644
--- a/external/libxml2/libxml2-global-symbols.patch
+++ b/external/libxml2/libxml2-global-symbols.patch
@@ -13,10 +13,22 @@
} LIBXML2_2.6.28;
LIBXML2_2.6.32 {
-@@ -2231,3 +2231,43 @@
+@@ -2231,3 +2231,55 @@
xmlPopOutputCallbacks;
} LIBXML2_2.9.8;
++LIBXML2_2.11.4 {
++ global:
++ xmlMemSize;
++ xmlNewSAXParserCtxt;
++} LIBXML2_2.9.11;
++
++LIBXML2_2.12.3 {
++ global:
++ xmlCtxtSetMaxAmplification;
++ xmlTextReaderSetMaxAmplification;
++} LIBXML2_2.11.4;
++
+# HACK: export global variable accessor functions (globals.h)
+LIBXML2_GLOBAL_VARIABLES {
+ global:
diff --git a/external/libxml2/libxml2-icu-sym.patch.0 b/external/libxml2/libxml2-icu-sym.patch.0
index aac9d09ef13e..07676228da19 100644
--- a/external/libxml2/libxml2-icu-sym.patch.0
+++ b/external/libxml2/libxml2-icu-sym.patch.0
@@ -25,7 +25,7 @@ diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
!if "$(STATIC)" == "1"
LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib
!else
-+!if "$(WITH_RUN_DEBUG)" == "1"
++!if "$(DEBUG)" == "1"
+LIBS = $(LIBS) icuind.lib icuucd.lib icudtd.lib
+!else
LIBS = $(LIBS) icuuc.lib icuin.lib icudt.lib
diff --git a/external/libxml2/libxml2-icu.patch.0 b/external/libxml2/libxml2-icu.patch.0
index b390b03d8787..84197763f878 100644
--- a/external/libxml2/libxml2-icu.patch.0
+++ b/external/libxml2/libxml2-icu.patch.0
@@ -23,7 +23,7 @@ diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
!if "$(STATIC)" == "1"
LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib
!else
-+!if "$(WITH_RUN_DEBUG)" == "1"
++!if "$(DEBUG)" == "1"
+LIBS = $(LIBS) icuind.lib icuucd.lib icudtd.lib
+!else
LIBS = $(LIBS) icuuc.lib icuin.lib icudt.lib
diff --git a/external/libxml2/xml2-config.in b/external/libxml2/xml2-config.in
new file mode 100644
index 000000000000..164508e47e67
--- /dev/null
+++ b/external/libxml2/xml2-config.in
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ --version)
+ echo @VERSION@
+ exit 0
+ ;;
+ --cflags)
+ cflags="$LIBXML_CFLAGS"
+ ;;
+ --libs)
+ libs="$LIBXML_LIBS"
+ ;;
+ esac
+ shift
+done
+
+if test -n "$cflags$libs"; then
+ echo $cflags $libs
+fi
+
+exit 0
diff --git a/external/libxslt/ExternalPackage_libxslt.mk b/external/libxslt/ExternalPackage_libxslt.mk
index c22a2e1b5dad..c1a8ee1217f1 100644
--- a/external/libxslt/ExternalPackage_libxslt.mk
+++ b/external/libxslt/ExternalPackage_libxslt.mk
@@ -25,7 +25,7 @@ $(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.dl
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))
+$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.21))
endif
endif # DISABLE_DYNLOADING
diff --git a/external/libxslt/README b/external/libxslt/README
index dd69a9d732c3..2eb71661b903 100644
--- a/external/libxslt/README
+++ b/external/libxslt/README
@@ -1 +1 @@
-Gnome xslt library written in C, from [http://xmlsoft.org/xslt/]
+libxslt is an XSLT processor based on libxml2, from [https://gitlab.gnome.org/GNOME/libxslt/]
diff --git a/external/libxslt/UnpackedTarball_libxslt.mk b/external/libxslt/UnpackedTarball_libxslt.mk
index 5bde97637e25..7d39cb1e3478 100644
--- a/external/libxslt/UnpackedTarball_libxslt.mk
+++ b/external/libxslt/UnpackedTarball_libxslt.mk
@@ -21,7 +21,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,libxslt,\
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
deleted file mode 100644
index f82c2e4f77ee..000000000000
--- a/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1
+++ /dev/null
@@ -1,69 +0,0 @@
-From e2584eed1c84c18f16e42188c30d2c3d8e3e8853 Mon Sep 17 00:00:00 2001
-From: Chun-wei Fan <fanchunwei@src.gnome.org>
-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/rpath.patch.0 b/external/libxslt/rpath.patch.0
index 78c4859251df..798bccec750e 100644
--- a/external/libxslt/rpath.patch.0
+++ b/external/libxslt/rpath.patch.0
@@ -7,4 +7,4 @@
+hardcode_libdir_flag_spec=
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
diff --git a/external/neon/Library_neon.mk b/external/neon/Library_neon.mk
index 0afd6f4eff81..4c034a3178fb 100644
--- a/external/neon/Library_neon.mk
+++ b/external/neon/Library_neon.mk
@@ -91,4 +91,10 @@ $(eval $(call gb_Library_add_libs,neon,\
))
endif
+ifneq (,$(gb_ENABLE_DBGUTIL))
+$(eval $(call gb_Library_add_cflags,neon,\
+ -DNE_DEBUGGING \
+))
+endif
+
# vim: set noet sw=4 ts=4:
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index 41e9ad8de6fa..6d8dc7c5d3d4 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -15,6 +15,10 @@ $(eval $(call gb_ExternalProject_register_targets,nss,\
build \
))
+$(eval $(call gb_ExternalProject_use_externals,nss,\
+ zlib \
+))
+
ifeq ($(OS),WNT)
$(call gb_ExternalProject_get_state_target,nss,build): \
$(call gb_ExternalExecutable_get_dependencies,python) \
@@ -26,9 +30,10 @@ $(call gb_ExternalProject_get_state_target,nss,build): \
MOZ_DEBUG_FLAGS=" " \
OPT_CODE_SIZE=0) \
OS_TARGET=WIN95 \
+ USE_SYSTEM_ZLIB=1 \
$(if $(filter X86_64,$(CPUNAME)),USE_64=1) \
LIB="$(ILIB)" \
- XCFLAGS="-arch:SSE $(SOLARINC)" \
+ XCFLAGS="-arch:SSE $(SOLARINC) $(ZLIB_CFLAGS)" \
$(MAKE) nss_build_all RC="rc.exe $(SOLARINC)" \
NSINSTALL='$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py' \
NSS_DISABLE_GTESTS=1 \
diff --git a/external/nss/README b/external/nss/README
index 6997cea6ca06..09931f64ea20 100644
--- a/external/nss/README
+++ b/external/nss/README
@@ -1,5 +1,16 @@
Contains the Network Security Services (NSS) libraries from Mozilla
+== ESR versions ==
+
+Upstream releases both regular and "ESR" versions, the latter go into Firefox
+ESR and Thunderbird.
+
+There is a new ESR version about once a year, and a ESR version gets micro
+updates only when there are security issues to fix, and it's not always obvious
+from the release notes of a regular release if there are security issues that
+are relevant to LibreOffice, hence it's probably best to bundle only the ESR
+versions and upgrade for every micro release (as recommended by upstream).
+
== Fips 140 and signed libraries ==
Fips 140 mode is not supported. That is, the *.chk files containing the
@@ -20,18 +31,3 @@ With all supported macOS SDK we use
NSS_USE_SYSTEM_SQLITE=1
to build using the system sqlite.
-== system NSS on Linux ==
-
-Note that different Linux distributions use different SONAMEs for the
-NSS libraries, so it is not possible to use --with-system-nss and build
-a portable generic LO installation set, despite NSS upstream apparently
-maintaining ABI compatibility.
-
-Debian Squeeze:
-0x000000000000000e (SONAME) Library soname: [libnss3.so.1d]
-Fedora 20:
-0x000000000000000e (SONAME) Library soname: [libnss3.so]
-
-For the record, the LSB specified SONAME is libnss3.so
-http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libnss3.html
-
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index f49d55fab46e..af289a2226fd 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -22,11 +22,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/nss.vs2015.patch \
external/nss/nss.vs2015.pdb.patch \
external/nss/nss.bzmozilla1238154.patch \
- external/nss/nss-bz1646594.patch.1 \
+ external/nss/nss-bz1646594.patch.1 \
external/nss/macos-dlopen.patch.0 \
external/nss/nss-restore-manual-pre-dependencies.patch.1 \
- $(if $(filter iOS,$(OS)), \
- external/nss/nss-ios.patch) \
$(if $(filter ANDROID,$(OS)), \
external/nss/nss-android.patch.1) \
$(if $(filter MSC-INTEL,$(COM)-$(CPUNAME)), \
diff --git a/external/nss/asan.patch.1 b/external/nss/asan.patch.1
index 7dfd6ed4e782..ccabd446ebac 100644
--- a/external/nss/asan.patch.1
+++ b/external/nss/asan.patch.1
@@ -1,12 +1,12 @@
diff -ur nss.org/nss/coreconf/Linux.mk nss/nss/coreconf/Linux.mk
--- nss.org/nss/coreconf/Linux.mk 2014-05-06 04:36:01.817838877 +0200
+++ nss/nss/coreconf/Linux.mk 2014-05-06 04:37:25.387835456 +0200
-@@ -146,7 +146,7 @@
+@@ -157,7 +157,7 @@
# we don't use -z defs there.
# Also, -z defs conflicts with Address Sanitizer, which emits relocations
# against the libsanitizer runtime built into the main executable.
-ZDEFS_FLAG = -Wl,-z,defs
+ZDEFS_FLAG =
- DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) $(if $(filter-out $(OS),ANDROID),-Wl$(COMMA)-z$(COMMA)origin '-Wl$(COMMA)-rpath$(COMMA)$$ORIGIN')
- LDFLAGS += $(ARCHFLAG) -z noexecstack
+ DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell $(LD) -v)),,$(ZDEFS_FLAG)) $(if $(filter-out $(OS),ANDROID),-Wl$(COMMA)-z$(COMMA)origin '-Wl$(COMMA)-rpath$(COMMA)$$ORIGIN')
+ LDFLAGS += $(ARCHFLAG) -z noexecstack
diff --git a/external/nss/clang-cl.patch.0 b/external/nss/clang-cl.patch.0
index 1d615c2397d8..04e21e7003d0 100644
--- a/external/nss/clang-cl.patch.0
+++ b/external/nss/clang-cl.patch.0
@@ -14,7 +14,7 @@
#pragma intrinsic(_InterlockedExchange)
--- nspr/pr/include/prbit.h
+++ nspr/pr/include/prbit.h
-@@ -14,7 +14,7 @@
+@@ -15,7 +15,7 @@
*/
#if defined(_WIN32) && (_MSC_VER >= 1300) && \
(defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM) || \
@@ -23,7 +23,7 @@
# include <intrin.h>
# pragma intrinsic(_BitScanForward,_BitScanReverse)
__forceinline static int __prBitScanForward32(unsigned int val)
-@@ -32,7 +32,7 @@
+@@ -33,7 +33,7 @@
# define pr_bitscan_ctz32(val) __prBitScanForward32(val)
# define pr_bitscan_clz32(val) __prBitScanReverse32(val)
# define PR_HAVE_BUILTIN_BITSCAN32
@@ -32,7 +32,7 @@
(defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
defined(__aarch64__))
# define pr_bitscan_ctz32(val) __builtin_ctz(val)
-@@ -136,7 +136,7 @@
+@@ -138,7 +138,7 @@
*/
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || \
@@ -63,7 +63,7 @@
#define CERTDB_VALID_PEER CERTDB_TERMINAL_RECORD
--- nss/lib/util/pkcs11n.h
+++ nss/lib/util/pkcs11n.h
-@@ -426,7 +426,7 @@
+@@ -563,7 +563,7 @@
/* keep the old value for compatibility reasons*/
#define CKT_NSS_MUST_VERIFY ((__CKT_NSS_MUST_VERIFY)(CKT_NSS + 4))
#else
@@ -80,7 +80,7 @@
# in the outer pkcs11t.h:
--- nss/lib/util/pkcs11t.h
+++ nss/lib/util/pkcs11t.h
-@@ -72,7 +72,14 @@
+@@ -78,7 +78,14 @@
#define CK_INVALID_HANDLE 0
/* pack */
@@ -95,7 +95,7 @@
typedef struct CK_VERSION {
CK_BYTE major; /* integer portion of version number */
-@@ -1795,6 +1802,13 @@
+@@ -2586,6 +2593,13 @@
#include "pkcs11n.h"
/* undo packing */
diff --git a/external/nss/macos-dlopen.patch.0 b/external/nss/macos-dlopen.patch.0
index 1889b8df7cd3..e8abc8f59c69 100644
--- a/external/nss/macos-dlopen.patch.0
+++ b/external/nss/macos-dlopen.patch.0
@@ -1,6 +1,6 @@
--- nspr/pr/src/linking/prlink.c
+++ nspr/pr/src/linking/prlink.c
-@@ -799,7 +799,7 @@
+@@ -555,7 +555,7 @@
* The reason is that DARWIN's dlopen ignores the provided path
* and checks for the plain filename in DYLD_LIBRARY_PATH,
* which could load an unexpected version of a library. */
diff --git a/external/nss/nss-android.patch.1 b/external/nss/nss-android.patch.1
index f8b4cdaf3753..cbf7f5402f3f 100644
--- a/external/nss/nss-android.patch.1
+++ b/external/nss/nss-android.patch.1
@@ -1,7 +1,7 @@
diff -ur nss.org/nspr/build/autoconf/config.sub nss/nspr/build/autoconf/config.sub
--- nss.org/nspr/build/autoconf/config.sub 2017-09-07 15:29:45.031246453 +0200
+++ nss/nspr/build/autoconf/config.sub 2017-09-07 15:32:13.087235423 +0200
-@@ -111,6 +111,10 @@
+@@ -110,6 +110,11 @@
exit 1;;
esac
@@ -9,13 +9,13 @@ diff -ur nss.org/nspr/build/autoconf/config.sub nss/nspr/build/autoconf/config.s
+if test $1 = "i686-pc-linux-android"; then echo $1; exit; fi
+if test $1 = "x86_64-pc-linux-android"; then echo $1; exit; fi
+
- # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
- # Here we must recognize all the valid KERNEL-OS combinations.
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ # Split fields of configuration type
+ # shellcheck disable=SC2162
+ IFS="-" read field1 field2 field3 field4 <<EOF
diff -ur nss.org/nspr/configure nss/nspr/configure
--- nss.org/nspr/configure 2017-09-07 15:29:45.018246359 +0200
+++ nss/nspr/configure 2017-09-07 15:31:47.604075663 +0200
-@@ -2737,18 +2739,15 @@
+@@ -2728,18 +2728,15 @@
esac
AS="$android_toolchain"/bin/"$android_tool_prefix"-as
@@ -40,7 +40,8 @@ diff -ur nss.org/nspr/configure nss/nspr/configure
diff -ur nss.org/nss/Makefile nss/nss/Makefile
--- nss.org/nss/Makefile 2017-09-07 15:29:44.933245745 +0200
+++ nss/nss/Makefile 2017-09-07 15:32:04.347181076 +0200
-@@ -62,6 +62,6 @@
+@@ -65,7 +65,7 @@
+
ifeq ($(OS_TARGET),Android)
NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \
- --target=$(ANDROID_PREFIX) \
diff --git a/external/nss/nss-bz1646594.patch.1 b/external/nss/nss-bz1646594.patch.1
index e6c75922a7dc..cffb9f5fe61d 100644
--- a/external/nss/nss-bz1646594.patch.1
+++ b/external/nss/nss-bz1646594.patch.1
@@ -2,7 +2,7 @@ regression from https://bugzilla.mozilla.org/show_bug.cgi?id=1646594
--- nss/nss/coreconf/arch.mk.orig2 2020-08-18 14:33:21.295252404 +0200
+++ nss/nss/coreconf/arch.mk 2020-08-18 14:33:46.360320806 +0200
-@@ -116,8 +116,10 @@
+@@ -94,8 +94,10 @@
OS_RELEASE := $(word 1,$(OS_RELEASE)).$(word 2,$(OS_RELEASE))
endif
KERNEL = Linux
diff --git a/external/nss/nss-ios.patch b/external/nss/nss-ios.patch
deleted file mode 100644
index 9d4af2c724e9..000000000000
--- a/external/nss/nss-ios.patch
+++ /dev/null
@@ -1,112 +0,0 @@
---- a/a/nspr/config/autoconf.mk.in
-+++ a/a/nspr/config/autoconf.mk.in
-@@ -67,7 +67,7 @@
- MSC_VER = @MSC_VER@
- AR = @AR@
- AR_FLAGS = @AR_FLAGS@
--LD = @LD@
-+LD = echo
- RANLIB = @RANLIB@
- PERL = @PERL@
- RC = @RC@
---- a/a/nspr/configure
-+++ a/a/nspr/configure
-@@ -755,7 +755,7 @@
- OBJDIR='$(OBJDIR_NAME)'
- OBJDIR_NAME=.
- OBJDIR_SUFFIX=OBJ
--NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
-+NSINSTALL=${NSINSTALL?'$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'}
- NOSUCHFILE=/no-such-file
- LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
- LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
-@@ -3060,7 +3060,7 @@
- LIB_SUFFIX=a
- DLL_SUFFIX=so
- ASM_SUFFIX=s
--MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
-+MKSHLIB='touch $@; echo'
- PR_MD_ASFILES=
- PR_MD_CSRCS=
- PR_MD_ARCH_DIR=unix
-@@ -3904,7 +3904,7 @@
- DSO_CFLAGS=-fPIC
- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @__________________________________________________OOO/$@ -headerpad_max_install_names'
- _OPTIMIZE_FLAGS=-O2
-- MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
-+ MKSHLIB=touch $@
- STRIP="$STRIP -x -S"
- DLL_SUFFIX=dylib
- USE_PTHREADS=1
---- a/a/nss/coreconf/ruleset.mk
-+++ a/a/nss/coreconf/ruleset.mk
-@@ -68,7 +68,7 @@
- endif
-
- ifeq ($(MKPROG),)
-- MKPROG = $(CC)
-+ MKPROG = touch $@; echo
- endif
-
- #
---- a/a/nss/coreconf/Darwin.mk
-+++ a/a/nss/coreconf/Darwin.mk
-@@ -124,7 +124,7 @@
- DSO_LDOPTS += --coverage
- endif
-
--MKSHLIB = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
-+MKSHLIB = touch $@; echo
- DLL_SUFFIX = dylib
- ifdef MAPFILE
- MKSHLIB += -exported_symbols_list $(MAPFILE)
---- a/a/nss/coreconf/UNIX.mk
-+++ a/a/nss/coreconf/UNIX.mk
-@@ -21,10 +21,14 @@
-
- ifdef BUILD_TREE
- NSINSTALL_DIR = $(BUILD_TREE)/nss
-+ifndef NSINSTALL
- NSINSTALL = $(BUILD_TREE)/nss/nsinstall
-+endif
- else
- NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
-+ifndef NSINSTALL
- NSINSTALL = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall
-+endif
- endif
-
- MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend
---- a/a/nspr/pr/include/md/_darwin.h
-+++ a/a/nspr/pr/include/md/_darwin.h
-@@ -26,6 +26,8 @@
- #define _PR_SI_ARCHITECTURE "ppc"
- #elif defined(__arm__)
- #define _PR_SI_ARCHITECTURE "arm"
-+#elif defined(__arm64__)
-+#define _PR_SI_ARCHITECTURE "arm64"
- #elif defined(__aarch64__)
- #define _PR_SI_ARCHITECTURE "aarch64"
- #else
---- a/a/nspr/pr/src/Makefile.in
-+++ a/a/nspr/pr/src/Makefile.in
-@@ -180,7 +180,7 @@
- endif
-
- ifeq ($(OS_TARGET),MacOSX)
--OS_LIBS = -framework CoreServices -framework CoreFoundation
-+OS_LIBS = -framework CoreFoundation
- endif
-
- EXTRA_LIBS += $(OS_LIBS)
---- a/a/nss/cmd/shlibsign/sign.sh
-+++ a/a/nss/cmd/shlibsign/sign.sh
-@@ -2,6 +2,8 @@
- # 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/.
-+
-+exit 0
-
- # arguments:
- # 1: full path to DIST/OBJDIR (parent dir of "lib")
diff --git a/external/nss/nss-restore-manual-pre-dependencies.patch.1 b/external/nss/nss-restore-manual-pre-dependencies.patch.1
index ebcc5b48c540..ea034f0dc80f 100644
--- a/external/nss/nss-restore-manual-pre-dependencies.patch.1
+++ b/external/nss/nss-restore-manual-pre-dependencies.patch.1
@@ -68,7 +68,7 @@ summary: Bug 1637083 Replace pre-dependency with shell hack r=rrelyea
ck.h \
--- b/nss/manifest.mn Wed May 13 19:00:40 2020 +0000
+++ a/nss/manifest.mn Tue May 12 21:33:43 2020 +0000
-@@ -23,6 +23,12 @@
+@@ -24,6 +24,12 @@
# no real way to encode these in any sensible way
$(MAKE) -C coreconf/nsinstall program
$(MAKE) export
@@ -79,5 +79,5 @@ summary: Bug 1637083 Replace pre-dependency with shell hack r=rrelyea
+ $(MAKE) -C lib/base libs
+ IGNORE_DIRS=1 $(MAKE) -C lib/ckfw/builtins libs
- all: prepare_build
- $(MAKE) libs
+ lib: coreconf
+ cmd: lib
diff --git a/external/nss/nss-win32-make.patch.1 b/external/nss/nss-win32-make.patch.1
index 7ba3df451ee6..6a3201a082a1 100644
--- a/external/nss/nss-win32-make.patch.1
+++ b/external/nss/nss-win32-make.patch.1
@@ -1,6 +1,6 @@
--- nss/nss/coreconf/rules.mk.orig2 2014-06-03 15:30:01.667200000 +0200
+++ nss/nss/coreconf/rules.mk 2014-06-03 15:30:14.537200000 +0200
-@@ -259,7 +259,7 @@
+@@ -174,7 +174,7 @@
$(LIBRARY): $(OBJS) | $$(@D)/d
rm -f $@
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
@@ -9,7 +9,7 @@
else
$(AR) cr $@ $(OBJS)
endif
-@@ -297,7 +297,7 @@
+@@ -214,7 +214,7 @@
ifdef NS_USE_GCC
$(LINK_DLL) $(OBJS) $(SUB_SHLOBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS) $(RES)
else
diff --git a/external/nss/nss.aix.patch b/external/nss/nss.aix.patch
index 4b0c6bfb3261..10572f94717a 100644
--- a/external/nss/nss.aix.patch
+++ b/external/nss/nss.aix.patch
@@ -1,7 +1,7 @@
diff -ru a/nspr/configure b/nspr/configure
--- a/a/nspr/configure 2014-09-29 16:47:42.984012225 +0100
+++ b/b/nspr/configure 2014-09-29 16:50:33.907375937 +0100
-@@ -6369,7 +6369,6 @@
+@@ -6325,7 +6325,6 @@
AIX_LINK_OPTS='-brtl -bnso -berok'
;;
esac
@@ -12,7 +12,7 @@ diff -ru a/nspr/configure b/nspr/configure
diff -ru a/nspr/configure.in b/nspr/configure.in
--- a/a/nspr/configure.in 2014-09-29 16:46:35.257394860 +0100
+++ b/b/nspr/configure.in 2014-09-29 16:50:33.908375942 +0100
-@@ -1229,7 +1229,8 @@
+@@ -1180,7 +1180,8 @@
AC_DEFINE(XP_UNIX)
AC_DEFINE(AIX)
AC_DEFINE(SYSV)
@@ -22,7 +22,7 @@ diff -ru a/nspr/configure.in b/nspr/configure.in
AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H))
case "${target_os}" in
aix3.2*)
-@@ -1269,10 +1270,9 @@
+@@ -1220,10 +1221,9 @@
AC_DEFINE(HAVE_SOCKLEN_T)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
USE_IPV6=1
@@ -48,7 +48,7 @@ diff -ru a/nspr/pr/src/Makefile.in b/nspr/pr/src/Makefile.in
diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
--- a/a/nss/cmd/platlibs.mk 2014-09-29 16:47:42.987012253 +0100
+++ b/b/nss/cmd/platlibs.mk 2014-09-29 16:50:33.910375955 +0100
-@@ -134,7 +134,7 @@
+@@ -171,7 +171,7 @@
$(NULL)
ifeq ($(OS_ARCH), AIX)
@@ -57,7 +57,7 @@ diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
endif
# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
-@@ -180,7 +180,7 @@
+@@ -217,7 +217,7 @@
$(NULL)
ifeq ($(OS_ARCH), AIX)
diff --git a/external/nss/nss.bzmozilla1238154.patch b/external/nss/nss.bzmozilla1238154.patch
index 468ff810b9ca..425f38257892 100644
--- a/external/nss/nss.bzmozilla1238154.patch
+++ b/external/nss/nss.bzmozilla1238154.patch
@@ -1,7 +1,7 @@
diff -ru a/nspr/configure b/nspr/configure
--- a/a/nspr/configure 2019-01-26 12:23:06.589389910 +0100
+++ b/b/nspr/configure 2019-01-26 12:26:56.566222293 +0100
-@@ -7127,7 +7127,7 @@
+@@ -6883,7 +6883,7 @@
# Determine compiler version
diff --git a/external/nss/nss.cygwin64.in32bit.patch b/external/nss/nss.cygwin64.in32bit.patch
index b00761a0e85b..bce0f1d09403 100644
--- a/external/nss/nss.cygwin64.in32bit.patch
+++ b/external/nss/nss.cygwin64.in32bit.patch
@@ -3,7 +3,7 @@ on Cygwin 64bit and in 32bit mode
diff -ru nss.orig/nss/Makefile nss/nss/Makefile
--- a/nss.orig/nss/Makefile 2016-02-26 01:00:52.146713100 +0100
+++ b/nss/nss/Makefile 2016-02-26 01:02:05.303560100 +0100
-@@ -59,6 +59,8 @@
+@@ -63,6 +63,8 @@
# Translate coreconf build options to NSPR configure options.
#
diff --git a/external/nss/nss.nowerror.patch b/external/nss/nss.nowerror.patch
index ff81a9b33539..bdf7a33a874c 100644
--- a/external/nss/nss.nowerror.patch
+++ b/external/nss/nss.nowerror.patch
@@ -1,7 +1,7 @@
diff -ur nss.org/nss/coreconf/WIN32.mk nss/nss/coreconf/WIN32.mk
--- a/nss.org/nss/coreconf/WIN32.mk 2016-04-13 11:33:09.322294523 +0200
+++ b/nss/nss/coreconf/WIN32.mk 2016-04-13 11:33:27.744323969 +0200
-@@ -127,7 +127,7 @@
+@@ -121,7 +121,7 @@
-D_CRT_NONSTDC_NO_WARNINGS
OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS
ifndef NSS_ENABLE_WERROR
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index d9aaee5199bb..cc9eeed1b009 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -1,6 +1,6 @@
--- a/a/nspr/configure 2017-08-29 23:44:13.686045013 +0530
+++ b/b/nspr/configure 2017-08-29 23:46:53.774768655 +0530
-@@ -7034,7 +7034,7 @@
+@@ -6794,7 +6794,7 @@
PR_MD_CSRCS=linux.c
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
DSO_CFLAGS=-fPIC
@@ -11,7 +11,7 @@
# combo is not yet good at debugging inlined
--- a/nss.orig/nspr/pr/src/misc/prnetdb.c 2017-08-29 23:44:13.690045031 +0530
+++ b/nss/nspr/pr/src/misc/prnetdb.c 2017-08-29 23:47:03.810814019 +0530
-@@ -438,7 +438,7 @@
+@@ -441,7 +441,7 @@
char *buf = *bufp;
PRIntn buflen = *buflenp;
@@ -51,7 +51,7 @@
--- a/nss.org/nss/coreconf/arch.mk 2017-08-29 23:44:13.646044832 +0530
+++ b/nss/nss/coreconf/arch.mk 2017-08-29 23:45:51.494487134 +0530
-@@ -305,11 +305,17 @@
+@@ -284,11 +284,17 @@
OBJDIR_NAME_COMPILER = $(COMPILER_TAG)
endif
OBJDIR_NAME_BASE = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(OBJDIR_NAME_COMPILER)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG)
@@ -83,16 +83,16 @@
# The default implementation strategy for FreeBSD is pthreads.
--- a/nss.org/nss/coreconf/Linux.mk 2017-08-29 23:44:13.642044814 +0530
+++ b/nss/nss/coreconf/Linux.mk 2017-08-29 23:47:26.318915759 +0530
-@@ -147,7 +147,7 @@
+@@ -158,7 +158,7 @@
# Also, -z defs conflicts with Address Sanitizer, which emits relocations
# against the libsanitizer runtime built into the main executable.
ZDEFS_FLAG = -Wl,-z,defs
--DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
-+DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) $(if $(filter-out $(OS),ANDROID),-Wl$(COMMA)-z$(COMMA)origin '-Wl$(COMMA)-rpath$(COMMA)$$ORIGIN')
- LDFLAGS += $(ARCHFLAG) -z noexecstack
+-DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell $(LD) -v)),,$(ZDEFS_FLAG))
++DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell $(LD) -v)),,$(ZDEFS_FLAG)) $(if $(filter-out $(OS),ANDROID),-Wl$(COMMA)-z$(COMMA)origin '-Wl$(COMMA)-rpath$(COMMA)$$ORIGIN')
+ LDFLAGS += $(ARCHFLAG) -z noexecstack
# On Maemo, we need to use the -rpath-link flag for even the standard system
-@@ -177,8 +177,13 @@
+@@ -188,8 +188,13 @@
endif
endif
@@ -108,7 +108,7 @@
# dependencies in the same directory where it resides.
--- a/nss.org/nss/coreconf/rules.mk 2017-08-29 23:44:13.646044832 +0530
+++ b/nss/nss/coreconf/rules.mk 2017-08-29 23:47:37.442966042 +0530
-@@ -261,7 +261,7 @@
+@@ -176,7 +176,7 @@
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
$(AR) $(subst /,\\,$(OBJS))
else
@@ -119,7 +119,7 @@
--- a/nss.org/nss/coreconf/SunOS5.mk 2017-08-29 23:44:13.646044832 +0530
+++ b/nss/nss/coreconf/SunOS5.mk 2017-08-29 23:45:00.902258445 +0530
-@@ -48,8 +48,11 @@
+@@ -46,8 +46,11 @@
# OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
endif
else
@@ -135,7 +135,7 @@
ifndef BUILD_OPT
--- a/nss.org/nss/coreconf/Werror.mk 2017-08-29 23:44:13.646044832 +0530
+++ b/nss/nss/coreconf/Werror.mk 2017-08-29 23:44:23.994091608 +0530
-@@ -94,7 +94,8 @@
+@@ -96,7 +96,8 @@
endif #ndef NSS_ENABLE_WERROR
ifeq ($(NSS_ENABLE_WERROR),1)
diff --git a/external/nss/nss.utf8bom.patch.1 b/external/nss/nss.utf8bom.patch.1
index e8c56abefcde..f474adf6f932 100644
--- a/external/nss/nss.utf8bom.patch.1
+++ b/external/nss/nss.utf8bom.patch.1
@@ -1,7 +1,7 @@
diff -ur nss.org/nss/lib/ckfw/builtins/certdata.perl nss/nss/lib/ckfw/builtins/certdata.perl
--- nss.org/nss/lib/ckfw/builtins/certdata.perl 2016-03-31 18:26:07.890190900 +0800
+++ nss/nss/lib/ckfw/builtins/certdata.perl 2016-03-31 19:16:16.727269600 +0800
-@@ -110,6 +110,9 @@
+@@ -122,6 +122,9 @@
sub doprint {
my $i;
@@ -11,7 +11,7 @@ diff -ur nss.org/nss/lib/ckfw/builtins/certdata.perl nss/nss/lib/ckfw/builtins/c
print <<EOD
/* THIS IS A GENERATED FILE */
/* This Source Code Form is subject to the terms of the Mozilla Public
-@@ -119,6 +122,7 @@
+@@ -131,6 +134,7 @@
#ifndef BUILTINS_H
#include "builtins.h"
#endif /* BUILTINS_H */
diff --git a/external/nss/nss.vs2015.patch b/external/nss/nss.vs2015.patch
index de4f8762fd5b..73cff7c833fb 100644
--- a/external/nss/nss.vs2015.patch
+++ b/external/nss/nss.vs2015.patch
@@ -1,7 +1,7 @@
diff -ru nss.org/nss/coreconf/WIN32.mk nss/nss/coreconf/WIN32.mk
--- a/nss.org/nss/coreconf/WIN32.mk 2016-02-12 15:36:18.000000000 +0100
+++ b/nss/nss/coreconf/WIN32.mk 2016-02-26 00:42:43.170809600 +0100
-@@ -199,7 +199,7 @@
+@@ -192,7 +192,7 @@
# Disable C4244: conversion from 'type1' to 'type2', possible loss of data
# Disable C4018: 'expression' : signed/unsigned mismatch
# Disable C4312: 'type cast': conversion from 'type1' to 'type2' of greater size
diff --git a/external/nss/nss.vs2015.pdb.patch b/external/nss/nss.vs2015.pdb.patch
index c66940132cdd..3b498f976ac6 100644
--- a/external/nss/nss.vs2015.pdb.patch
+++ b/external/nss/nss.vs2015.pdb.patch
@@ -1,7 +1,7 @@
diff -ru nss.orig/nss/coreconf/WIN32.mk nss/nss/coreconf/WIN32.mk
--- a/nss.orig/nss/coreconf/WIN32.mk 2016-03-04 08:30:16.306639400 +0100
+++ b/nss/nss/coreconf/WIN32.mk 2016-03-04 08:31:17.987233200 +0100
-@@ -169,15 +169,15 @@
+@@ -163,15 +163,15 @@
DLLFLAGS += -OUT:$@
ifdef MOZ_DEBUG_SYMBOLS
ifdef MOZ_DEBUG_FLAGS
diff --git a/external/nss/nss.windows.patch b/external/nss/nss.windows.patch
index 901846e7bc1f..27a44045802e 100644
--- a/external/nss/nss.windows.patch
+++ b/external/nss/nss.windows.patch
@@ -1,6 +1,6 @@
--- a/a/nspr/config/rules.mk 2008-12-03 00:24:39.000000000 +0100
+++ b/b/nspr/config/rules.mk 2009-11-27 13:36:22.662753328 +0100
-@@ -415,7 +415,7 @@
+@@ -423,7 +423,7 @@
ifdef NEED_ABSOLUTE_PATH
# The quotes allow absolute paths to contain spaces.
@@ -11,7 +11,7 @@
$(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
--- a/a/nss/coreconf/rules.mk 2008-12-03 00:24:39.000000000 +0100
+++ b/b/nss/coreconf/rules.mk 2009-11-27 13:36:22.662753328 +0100
-@@ -386,7 +386,7 @@
+@@ -280,7 +280,7 @@
endif
# The quotes allow absolute paths to contain spaces.
@@ -22,7 +22,7 @@
ifdef USE_NT_C_SYNTAX
--- a/a/nspr/pr/include/md/_win95.h
+++ b/b/nspr/pr/include/md/_win95.h
-@@ -312,7 +312,7 @@
+@@ -317,7 +317,7 @@
#define _MD_ATOMIC_ADD(ptr,val) (InterlockedExchangeAdd((PLONG)ptr, (LONG)val) + val)
#define _MD_ATOMIC_DECREMENT(x) InterlockedDecrement((PLONG)x)
#endif /* x86 */
diff --git a/external/nss/nss_macosx.patch b/external/nss/nss_macosx.patch
index 3144fa687761..72277a425242 100644
--- a/external/nss/nss_macosx.patch
+++ b/external/nss/nss_macosx.patch
@@ -1,7 +1,7 @@
diff -ru a/nspr/configure b/nspr/configure
--- a/a/nspr/configure 2014-09-29 16:50:33.907375937 +0100
+++ b/b/nspr/configure 2014-09-29 16:51:59.213931947 +0100
-@@ -6577,7 +6579,7 @@
+@@ -6483,7 +6486,7 @@
DSO_CFLAGS=-fPIC
@@ -13,7 +13,7 @@ diff -ru a/nspr/configure b/nspr/configure
diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
--- a/a/nss/coreconf/Darwin.mk 2014-09-29 16:50:22.992304799 +0100
+++ b/b/nss/coreconf/Darwin.mk 2014-09-29 16:51:59.214931953 +0100
-@@ -20,13 +24,17 @@
+@@ -20,13 +20,17 @@
ifeq (,$(filter-out i%86,$(CPU_ARCH)))
ifdef USE_64
@@ -31,7 +31,14 @@ diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
override CPU_ARCH = x86
endif
else
-@@ -40,12 +48,16 @@
+@@ -33,19 +37,20 @@
+ ifeq (arm,$(CPU_ARCH))
+ # Nothing set for arm currently.
+ else
+-OS_REL_CFLAGS = -Dppc
+-CC += -arch ppc
+-CCC += -arch ppc
+ endif
endif
ifneq (,$(MACOS_SDK_DIR))
@@ -49,7 +56,7 @@ diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
# GCC <= 3
DARWIN_SDK_FRAMEWORKS = -F$(MACOS_SDK_DIR)/System/Library/Frameworks
ifneq (,$(shell find $(MACOS_SDK_DIR)/Library/Frameworks -maxdepth 0))
-@@ -108,7 +120,7 @@
+@@ -108,7 +113,7 @@
# May override this with different compatibility and current version numbers.
DARWIN_DYLIB_VERSIONS = -compatibility_version 1 -current_version 1
# May override this with -bundle to create a loadable module.
@@ -61,7 +68,7 @@ diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
diff -ru a/nss/Makefile b/nss/Makefile
--- a/a/nss/Makefile 2014-09-29 16:50:22.990304789 +0100
+++ b/b/nss/Makefile 2014-09-29 16:51:59.207931908 +0100
-@@ -72,6 +72,9 @@
+@@ -82,6 +82,9 @@
ifeq ($(OS_TARGET),WIN95)
NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
endif
diff --git a/external/nss/ubsan.patch.0 b/external/nss/ubsan.patch.0
index 059a9f3b2c0a..72be8aa6600a 100644
--- a/external/nss/ubsan.patch.0
+++ b/external/nss/ubsan.patch.0
@@ -18,7 +18,7 @@
count * sizeof(lgdbSlotData);
data->data = (unsigned char *)PORT_ZAlloc(dataLen);
-@@ -327,7 +327,7 @@
+@@ -329,7 +329,7 @@
}
if ((encoded->major == LGDB_DB_EXT1_VERSION_MAJOR) &&
(encoded->minor >= LGDB_DB_EXT1_VERSION_MINOR)) {
diff --git a/external/openssl/ExternalPackage_openssl.mk b/external/openssl/ExternalPackage_openssl.mk
index 695c7b7119b6..d0c0dbaab975 100644
--- a/external/openssl/ExternalPackage_openssl.mk
+++ b/external/openssl/ExternalPackage_openssl.mk
@@ -13,9 +13,17 @@ $(eval $(call gb_ExternalPackage_use_external_project,openssl,openssl))
ifeq ($(COM),MSC)
$(eval $(call gb_ExternalPackage_add_files,openssl,$(LIBO_LIB_FOLDER),\
- out32dll/ssleay32.dll \
- out32dll/libeay32.dll \
+ libcrypto-1_1.dll \
+ libssl-1_1.dll \
))
+ifneq ($(DISABLE_PYTHON),TRUE)
+ifneq ($(SYSTEM_PYTHON),TRUE)
+$(eval $(call gb_ExternalPackage_add_files,openssl,$(LIBO_LIB_FOLDER)/python-core-$(PYTHON_VERSION)/lib, \
+ libcrypto-1_1.dll \
+ libssl-1_1.dll \
+))
+endif
+endif
endif
# vim: set noet sw=4 ts=4:
diff --git a/external/openssl/ExternalProject_openssl.mk b/external/openssl/ExternalProject_openssl.mk
index 5f5fb42c5eef..eccf8438958a 100644
--- a/external/openssl/ExternalProject_openssl.mk
+++ b/external/openssl/ExternalProject_openssl.mk
@@ -42,7 +42,9 @@ OPENSSL_PLATFORM := \
ios-armv7\
,\
$(if $(filter WNT,$(OS)),\
- $(if $(filter INTEL,$(CPUNAME)),VC-WIN32,VC-WIN64A)\
+ $(if $(filter INTEL,$(CPUNAME)),VC-WIN32)\
+ $(if $(filter X86_64,$(CPUNAME)),VC-WIN64A)\
+ $(if $(filter ARM64,$(CPUNAME)),VC-WIN64-ARM)\
,\
$(if $(filter MACOSX,$(OS)),\
$(if $(filter POWERPC,$(CPUNAME)),darwin-ppc-cc)\
@@ -59,11 +61,9 @@ $(eval $(call gb_ExternalProject_use_nmake,openssl,build))
$(call gb_ExternalProject_get_state_target,openssl,build):
$(call gb_ExternalProject_run,build,\
- export PERL="$(shell cygpath -w $(PERL))" \
- && $(PERL) Configure $(OPENSSL_PLATFORM) no-idea \
- && cmd /c "ms\do_ms.bat $(PERL) $(OPENSSL_PLATFORM)" \
- && nmake -f "ms\ntdll.mak" \
- && mv inc32/* include/ \
+ CONFIGURE_INSIST=1 $(PERL) Configure $(OPENSSL_PLATFORM) no-tests no-multilib \
+ && export PERL="$(shell cygpath -w $(PERL))" \
+ && nmake -f makefile \
)
else
@@ -75,8 +75,7 @@ $(call gb_ExternalProject_get_state_target,openssl,build):
$(if $(filter WNT,$(OS)), \
$(PERL) Configure, \
./config)) \
- $(OPENSSL_PLATFORM) no-dso no-shared \
- $(if $(filter-out WNT,$(OS)),no-idea) \
+ $(OPENSSL_PLATFORM) no-dso no-shared no-tests no-multilib threads \
$(if $(filter-out ANDROID iOS WNT,$(OS)), \
$(if $(SYSBASE),-I$(SYSBASE)/usr/include -L$(SYSBASE)/usr/lib)) \
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
diff --git a/external/openssl/UnpackedTarball_openssl.mk b/external/openssl/UnpackedTarball_openssl.mk
index e7fca1116545..6f00cf7f7e44 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -12,17 +12,7 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,openssl))
$(eval $(call gb_UnpackedTarball_set_tarball,openssl,$(OPENSSL_TARBALL),,openssl))
$(eval $(call gb_UnpackedTarball_add_patches,openssl,\
- external/openssl/openssllnx.patch \
- external/openssl/opensslwnt.patch \
- $(if $(filter INTEL,$(CPUNAME)),external/openssl/opensslwnt_safeseh.patch) \
- external/openssl/openssl-1.0.1h-win64.patch.1 \
- external/openssl/opensslsol.patch \
- external/openssl/opensslios.patch \
- external/openssl/opensslosxppc.patch \
- external/openssl/openssl-3650-masm.patch.1 \
- external/openssl/openssl-fixbuild.patch.1 \
- external/openssl/openssl-1.0.2k-cve-2020-1971.patch.1 \
- external/openssl/ccb0a11145ee72b042d10593a64eaf9e8a55ec12.patch.1 \
+ external/openssl/openssl-no-multilib.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/openssl/ccb0a11145ee72b042d10593a64eaf9e8a55ec12.patch.1 b/external/openssl/ccb0a11145ee72b042d10593a64eaf9e8a55ec12.patch.1
deleted file mode 100644
index cf809750ecfb..000000000000
--- a/external/openssl/ccb0a11145ee72b042d10593a64eaf9e8a55ec12.patch.1
+++ /dev/null
@@ -1,56 +0,0 @@
-From ccb0a11145ee72b042d10593a64eaf9e8a55ec12 Mon Sep 17 00:00:00 2001
-From: Matt Caswell <matt@openssl.org>
-Date: Tue, 17 Aug 2021 14:41:48 +0100
-Subject: [PATCH] Fix a read buffer overrun in X509_CERT_AUX_print()
-
-This is a backport of commit c5dc9ab965f to 1.0.2. That commit fixed
-the same bug but in master/1.1.1 it is in the function X509_aux_print().
-The original commit had the following description:
-
-Fix a read buffer overrun in X509_aux_print().
-
-The ASN1_STRING_get0_data(3) manual explitely cautions the reader
-that the data is not necessarily NUL-terminated, and the function
-X509_alias_set1(3) does not sanitize the data passed into it in any
-way either, so we must assume the return value from X509_alias_get0(3)
-is merely a byte array and not necessarily a string in the sense
-of the C language.
-
-I found this bug while writing manual pages for X509_print_ex(3)
-and related functions. Theo Buehler <tb@openbsd.org> checked my
-patch to fix the same bug in LibreSSL, see
-
-http://cvsweb.openbsd.org/src/lib/libcrypto/asn1/t_x509a.c#rev1.9
-
-As an aside, note that the function still produces incomplete and
-misleading results when the data contains a NUL byte in the middle
-and that error handling is consistently absent throughout, even
-though the function provides an "int" return value obviously intended
-to be 1 for success and 0 for failure, and even though this function
-is called by another function that also wants to return 1 for success
-and 0 for failure and even does so in many of its code paths, though
-not in others. But let's stay focussed. Many things would be nice
-to have in the wide wild world, but a buffer overflow must not be
-allowed to remain in our backyard.
-
-CVE-2021-3712
-
-Reviewed-by: Paul Dale <pauli@openssl.org>
----
- crypto/asn1/t_x509a.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/crypto/asn1/t_x509a.c b/crypto/asn1/t_x509a.c
-index d1b897a469fd..b1bc9d0cd28b 100644
---- a/crypto/asn1/t_x509a.c
-+++ b/crypto/asn1/t_x509a.c
-@@ -104,7 +104,8 @@ int X509_CERT_AUX_print(BIO *out, X509_CERT_AUX *aux, int indent)
- } else
- BIO_printf(out, "%*sNo Rejected Uses.\n", indent, "");
- if (aux->alias)
-- BIO_printf(out, "%*sAlias: %s\n", indent, "", aux->alias->data);
-+ BIO_printf(out, "%*sAlias: %.*s\n", indent, "", aux->alias->length,
-+ aux->alias->data);
- if (aux->keyid) {
- BIO_printf(out, "%*sKey Id: ", indent, "");
- for (i = 0; i < aux->keyid->length; i++)
diff --git a/external/openssl/openssl-1.0.1h-win64.patch.1 b/external/openssl/openssl-1.0.1h-win64.patch.1
deleted file mode 100644
index aea914633ebb..000000000000
--- a/external/openssl/openssl-1.0.1h-win64.patch.1
+++ /dev/null
@@ -1,47 +0,0 @@
-diff --git a/ms/do_win64a.bat b/ms/do_win64a.bat
-index 8768dc6..6772390 100755
---- a/ms/do_win64a.bat
-+++ b/ms/do_win64a.bat
-@@ -1,19 +1,19 @@
--perl util\mkfiles.pl >MINFO
-+perl util/mkfiles.pl >MINFO
-
- cmd /c "nasm -f win64 -v" >NUL 2>&1
- if %errorlevel% neq 0 goto ml64
-
--perl ms\uplink-x86_64.pl nasm > ms\uptable.asm
--nasm -f win64 -o ms\uptable.obj ms\uptable.asm
-+perl ms/uplink-x86_64.pl nasm > ms/uptable.asm
-+nasm -f win64 -o ms/uptable.obj ms/uptable.asm
- goto proceed
-
- :ml64
--perl ms\uplink-x86_64.pl masm > ms\uptable.asm
--ml64 -c -Foms\uptable.obj ms\uptable.asm
-+perl ms/uplink-x86_64.pl masm > ms/uptable.asm
-+ml64 -c -Foms/uptable.obj ms/uptable.asm
-
- :proceed
--perl util\mk1mf.pl VC-WIN64A >ms\nt.mak
--perl util\mk1mf.pl dll VC-WIN64A >ms\ntdll.mak
-+perl util/mk1mf.pl VC-WIN64A >ms/nt.mak
-+perl util/mk1mf.pl dll VC-WIN64A >ms/ntdll.mak
-
--perl util\mkdef.pl 32 libeay > ms\libeay32.def
--perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
-+perl util/mkdef.pl 32 libeay > ms/libeay32.def
-+perl util/mkdef.pl 32 ssleay > ms/ssleay32.def
-diff --git a/util/mk1mf.pl b/util/mk1mf.pl
-index 72fa089..d98def1 100755
---- a/util/mk1mf.pl
-+++ b/util/mk1mf.pl
-@@ -233,6 +233,9 @@ else
- $cflags.=' -DTERMIO';
- }
-
-+# force unix style path separator
-+${o} = "/";
-+
- $fipsdir =~ s/\//${o}/g;
-
- $out_dir=(defined($VARS{'OUT'}))?$VARS{'OUT'}:$out_def.($debug?".dbg":"");
diff --git a/external/openssl/openssl-1.0.2k-cve-2020-1971.patch.1 b/external/openssl/openssl-1.0.2k-cve-2020-1971.patch.1
deleted file mode 100644
index 313f9cd870d7..000000000000
--- a/external/openssl/openssl-1.0.2k-cve-2020-1971.patch.1
+++ /dev/null
@@ -1,578 +0,0 @@
-diff -up openssl-1.0.2k/crypto/asn1/asn1_err.c.null-dereference openssl-1.0.2k/crypto/asn1/asn1_err.c
---- openssl-1.0.2k/crypto/asn1/asn1_err.c.null-dereference 2020-12-04 10:08:08.506247597 +0100
-+++ openssl-1.0.2k/crypto/asn1/asn1_err.c 2020-12-04 10:12:31.901956486 +0100
-@@ -1,6 +1,6 @@
- /* crypto/asn1/asn1_err.c */
- /* ====================================================================
-- * Copyright (c) 1999-2018 The OpenSSL Project. All rights reserved.
-+ * Copyright (c) 1999-2020 The OpenSSL Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
-@@ -103,6 +103,7 @@ static ERR_STRING_DATA ASN1_str_functs[]
- {ERR_FUNC(ASN1_F_ASN1_ITEM_DUP), "ASN1_item_dup"},
- {ERR_FUNC(ASN1_F_ASN1_ITEM_EX_COMBINE_NEW), "ASN1_ITEM_EX_COMBINE_NEW"},
- {ERR_FUNC(ASN1_F_ASN1_ITEM_EX_D2I), "ASN1_ITEM_EX_D2I"},
-+ {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_EX_I2D, 0), "ASN1_item_ex_i2d"},
- {ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_BIO), "ASN1_item_i2d_bio"},
- {ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_FP), "ASN1_item_i2d_fp"},
- {ERR_FUNC(ASN1_F_ASN1_ITEM_PACK), "ASN1_item_pack"},
-@@ -202,6 +203,7 @@ static ERR_STRING_DATA ASN1_str_reasons[
- {ERR_REASON(ASN1_R_AUX_ERROR), "aux error"},
- {ERR_REASON(ASN1_R_BAD_CLASS), "bad class"},
- {ERR_REASON(ASN1_R_BAD_OBJECT_HEADER), "bad object header"},
-+ {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BAD_TEMPLATE), "bad template"},
- {ERR_REASON(ASN1_R_BAD_PASSWORD_READ), "bad password read"},
- {ERR_REASON(ASN1_R_BAD_TAG), "bad tag"},
- {ERR_REASON(ASN1_R_BMPSTRING_IS_WRONG_LENGTH),
-diff -up openssl-1.0.2k/crypto/asn1/asn1.h.null-dereference openssl-1.0.2k/crypto/asn1/asn1.h
---- openssl-1.0.2k/crypto/asn1/asn1.h.null-dereference 2020-12-04 11:00:06.896637900 +0100
-+++ openssl-1.0.2k/crypto/asn1/asn1.h 2020-12-04 11:04:47.079562987 +0100
-@@ -1202,6 +1202,7 @@ void ERR_load_ASN1_strings(void);
- # define ASN1_F_ASN1_ITEM_DUP 191
- # define ASN1_F_ASN1_ITEM_EX_COMBINE_NEW 121
- # define ASN1_F_ASN1_ITEM_EX_D2I 120
-+# define ASN1_F_ASN1_ITEM_EX_I2D 231
- # define ASN1_F_ASN1_ITEM_I2D_BIO 192
- # define ASN1_F_ASN1_ITEM_I2D_FP 193
- # define ASN1_F_ASN1_ITEM_PACK 198
-@@ -1298,6 +1299,7 @@ void ERR_load_ASN1_strings(void);
- # define ASN1_R_AUX_ERROR 100
- # define ASN1_R_BAD_CLASS 101
- # define ASN1_R_BAD_OBJECT_HEADER 102
-+# define ASN1_R_BAD_TEMPLATE 230
- # define ASN1_R_BAD_PASSWORD_READ 103
- # define ASN1_R_BAD_TAG 104
- # define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214
-diff -up openssl-1.0.2k/crypto/asn1/tasn_dec.c.null-dereference openssl-1.0.2k/crypto/asn1/tasn_dec.c
---- openssl-1.0.2k/crypto/asn1/tasn_dec.c.null-dereference 2020-12-04 10:12:42.036057323 +0100
-+++ openssl-1.0.2k/crypto/asn1/tasn_dec.c 2020-12-04 10:17:45.685035333 +0100
-@@ -223,6 +223,15 @@ static int asn1_item_ex_d2i(ASN1_VALUE *
- break;
-
- case ASN1_ITYPE_MSTRING:
-+ /*
-+ * It never makes sense for multi-strings to have implicit tagging, so
-+ * if tag != -1, then this looks like an error in the template.
-+ */
-+ if (tag != -1) {
-+ ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_BAD_TEMPLATE);
-+ goto err;
-+ }
-+
- p = *in;
- /* Just read in tag and class */
- ret = asn1_check_tlen(NULL, &otag, &oclass, NULL, NULL,
-@@ -240,6 +249,7 @@ static int asn1_item_ex_d2i(ASN1_VALUE *
- ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_MSTRING_NOT_UNIVERSAL);
- goto err;
- }
-+
- /* Check tag matches bit map */
- if (!(ASN1_tag2bit(otag) & it->utype)) {
- /* If OPTIONAL, assume this is OK */
-@@ -316,6 +326,15 @@ static int asn1_item_ex_d2i(ASN1_VALUE *
- goto err;
-
- case ASN1_ITYPE_CHOICE:
-+ /*
-+ * It never makes sense for CHOICE types to have implicit tagging, so
-+ * if tag != -1, then this looks like an error in the template.
-+ */
-+ if (tag != -1) {
-+ ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_BAD_TEMPLATE);
-+ goto err;
-+ }
-+
- if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
- goto auxerr;
- if (*pval) {
-diff -up openssl-1.0.2k/crypto/asn1/tasn_enc.c.null-dereference openssl-1.0.2k/crypto/asn1/tasn_enc.c
---- openssl-1.0.2k/crypto/asn1/tasn_enc.c.null-dereference 2020-12-04 10:18:30.261472002 +0100
-+++ openssl-1.0.2k/crypto/asn1/tasn_enc.c 2020-12-04 10:21:14.310078987 +0100
-@@ -151,9 +151,25 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval,
- break;
-
- case ASN1_ITYPE_MSTRING:
-+ /*
-+ * It never makes sense for multi-strings to have implicit tagging, so
-+ * if tag != -1, then this looks like an error in the template.
-+ */
-+ if (tag != -1) {
-+ ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE);
-+ return -1;
-+ }
- return asn1_i2d_ex_primitive(pval, out, it, -1, aclass);
-
- case ASN1_ITYPE_CHOICE:
-+ /*
-+ * It never makes sense for CHOICE types to have implicit tagging, so
-+ * if tag != -1, then this looks like an error in the template.
-+ */
-+ if (tag != -1) {
-+ ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE);
-+ return -1;
-+ }
- if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
- return 0;
- i = asn1_get_choice_selector(pval, it);
-diff -up openssl-1.0.2k/crypto/x509v3/v3_genn.c.null-dereference openssl-1.0.2k/crypto/x509v3/v3_genn.c
---- openssl-1.0.2k/crypto/x509v3/v3_genn.c.null-dereference 2020-12-04 10:28:02.374237945 +0100
-+++ openssl-1.0.2k/crypto/x509v3/v3_genn.c 2020-12-04 10:36:51.156138263 +0100
-@@ -72,8 +72,9 @@ ASN1_SEQUENCE(OTHERNAME) = {
- IMPLEMENT_ASN1_FUNCTIONS(OTHERNAME)
-
- ASN1_SEQUENCE(EDIPARTYNAME) = {
-- ASN1_IMP_OPT(EDIPARTYNAME, nameAssigner, DIRECTORYSTRING, 0),
-- ASN1_IMP_OPT(EDIPARTYNAME, partyName, DIRECTORYSTRING, 1)
-+ /* DirectoryString is a CHOICE type so use explicit tagging */
-+ ASN1_EXP_OPT(EDIPARTYNAME, nameAssigner, DIRECTORYSTRING, 0),
-+ ASN1_EXP(EDIPARTYNAME, partyName, DIRECTORYSTRING, 1)
- } ASN1_SEQUENCE_END(EDIPARTYNAME)
-
- IMPLEMENT_ASN1_FUNCTIONS(EDIPARTYNAME)
-@@ -107,6 +108,37 @@ GENERAL_NAME *GENERAL_NAME_dup(GENERAL_N
- (char *)a);
- }
-
-+static int edipartyname_cmp(const EDIPARTYNAME *a, const EDIPARTYNAME *b)
-+{
-+ int res;
-+
-+ if (a == NULL || b == NULL) {
-+ /*
-+ * Shouldn't be possible in a valid GENERAL_NAME, but we handle it
-+ * anyway. OTHERNAME_cmp treats NULL != NULL so we do the same here
-+ */
-+ return -1;
-+ }
-+ if (a->nameAssigner == NULL && b->nameAssigner != NULL)
-+ return -1;
-+ if (a->nameAssigner != NULL && b->nameAssigner == NULL)
-+ return 1;
-+ /* If we get here then both have nameAssigner set, or both unset */
-+ if (a->nameAssigner != NULL) {
-+ res = ASN1_STRING_cmp(a->nameAssigner, b->nameAssigner);
-+ if (res != 0)
-+ return res;
-+ }
-+ /*
-+ * partyName is required, so these should never be NULL. We treat it in
-+ * the same way as the a == NULL || b == NULL case above
-+ */
-+ if (a->partyName == NULL || b->partyName == NULL)
-+ return -1;
-+
-+ return ASN1_STRING_cmp(a->partyName, b->partyName);
-+}
-+
- /* Returns 0 if they are equal, != 0 otherwise. */
- int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b)
- {
-@@ -116,8 +148,11 @@ int GENERAL_NAME_cmp(GENERAL_NAME *a, GE
- return -1;
- switch (a->type) {
- case GEN_X400:
-+ result = ASN1_TYPE_cmp(a->d.x400Address, b->d.x400Address);
-+ break;
-+
- case GEN_EDIPARTY:
-- result = ASN1_TYPE_cmp(a->d.other, b->d.other);
-+ result = edipartyname_cmp(a->d.ediPartyName, b->d.ediPartyName);
- break;
-
- case GEN_OTHERNAME:
-@@ -164,8 +199,11 @@ void GENERAL_NAME_set0_value(GENERAL_NAM
- {
- switch (type) {
- case GEN_X400:
-+ a->d.x400Address = value;
-+ break;
-+
- case GEN_EDIPARTY:
-- a->d.other = value;
-+ a->d.ediPartyName = value;
- break;
-
- case GEN_OTHERNAME:
-@@ -199,8 +237,10 @@ void *GENERAL_NAME_get0_value(GENERAL_NA
- *ptype = a->type;
- switch (a->type) {
- case GEN_X400:
-+ return a->d.x400Address;
-+
- case GEN_EDIPARTY:
-- return a->d.other;
-+ return a->d.ediPartyName;
-
- case GEN_OTHERNAME:
- return a->d.otherName;
-diff -up openssl-1.0.2k/crypto/x509v3/v3nametest.c.null-dereference openssl-1.0.2k/crypto/x509v3/v3nametest.c
---- openssl-1.0.2k/crypto/x509v3/v3nametest.c.null-dereference 2020-12-04 10:28:02.374237945 +0100
-+++ openssl-1.0.2k/crypto/x509v3/v3nametest.c 2020-12-04 10:36:51.156138263 +0100
-@@ -321,6 +321,356 @@ static void run_cert(X509 *crt, const ch
- }
- }
-
-+struct gennamedata {
-+ const unsigned char der[22];
-+ size_t derlen;
-+} gennames[] = {
-+ {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * SEQUENCE {}
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x13, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x02, 0x30, 0x00
-+ },
-+ 21
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * [APPLICATION 0] {}
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x13, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x02, 0x60, 0x00
-+ },
-+ 21
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x14, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x03, 0x0c, 0x01, 0x61
-+ },
-+ 22
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.2 }
-+ * [0] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x14, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x02, 0xa0, 0x03, 0x0c, 0x01, 0x61
-+ },
-+ 22
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * UTF8String { "b" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x14, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x03, 0x0c, 0x01, 0x62
-+ },
-+ 22
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * BOOLEAN { TRUE }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x14, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x03, 0x01, 0x01, 0xff
-+ },
-+ 22
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * BOOLEAN { FALSE }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x14, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x03, 0x01, 0x01, 0x00
-+ },
-+ 22
-+ }, {
-+ /* [1 PRIMITIVE] { "a" } */
-+ {
-+ 0x81, 0x01, 0x61
-+ },
-+ 3
-+ }, {
-+ /* [1 PRIMITIVE] { "b" } */
-+ {
-+ 0x81, 0x01, 0x62
-+ },
-+ 3
-+ }, {
-+ /* [2 PRIMITIVE] { "a" } */
-+ {
-+ 0x82, 0x01, 0x61
-+ },
-+ 3
-+ }, {
-+ /* [2 PRIMITIVE] { "b" } */
-+ {
-+ 0x82, 0x01, 0x62
-+ },
-+ 3
-+ }, {
-+ /*
-+ * [4] {
-+ * SEQUENCE {
-+ * SET {
-+ * SEQUENCE {
-+ * # commonName
-+ * OBJECT_IDENTIFIER { 2.5.4.3 }
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa4, 0x0e, 0x30, 0x0c, 0x31, 0x0a, 0x30, 0x08, 0x06, 0x03, 0x55,
-+ 0x04, 0x03, 0x0c, 0x01, 0x61
-+ },
-+ 16
-+ }, {
-+ /*
-+ * [4] {
-+ * SEQUENCE {
-+ * SET {
-+ * SEQUENCE {
-+ * # commonName
-+ * OBJECT_IDENTIFIER { 2.5.4.3 }
-+ * UTF8String { "b" }
-+ * }
-+ * }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa4, 0x0e, 0x30, 0x0c, 0x31, 0x0a, 0x30, 0x08, 0x06, 0x03, 0x55,
-+ 0x04, 0x03, 0x0c, 0x01, 0x62
-+ },
-+ 16
-+ }, {
-+ /*
-+ * [5] {
-+ * [1] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa5, 0x05, 0xa1, 0x03, 0x0c, 0x01, 0x61
-+ },
-+ 7
-+ }, {
-+ /*
-+ * [5] {
-+ * [1] {
-+ * UTF8String { "b" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa5, 0x05, 0xa1, 0x03, 0x0c, 0x01, 0x62
-+ },
-+ 7
-+ }, {
-+ /*
-+ * [5] {
-+ * [0] {
-+ * UTF8String {}
-+ * }
-+ * [1] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa5, 0x09, 0xa0, 0x02, 0x0c, 0x00, 0xa1, 0x03, 0x0c, 0x01, 0x61
-+ },
-+ 11
-+ }, {
-+ /*
-+ * [5] {
-+ * [0] {
-+ * UTF8String { "a" }
-+ * }
-+ * [1] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa5, 0x0a, 0xa0, 0x03, 0x0c, 0x01, 0x61, 0xa1, 0x03, 0x0c, 0x01,
-+ 0x61
-+ },
-+ 12
-+ }, {
-+ /*
-+ * [5] {
-+ * [0] {
-+ * UTF8String { "b" }
-+ * }
-+ * [1] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa5, 0x0a, 0xa0, 0x03, 0x0c, 0x01, 0x62, 0xa1, 0x03, 0x0c, 0x01,
-+ 0x61
-+ },
-+ 12
-+ }, {
-+ /* [6 PRIMITIVE] { "a" } */
-+ {
-+ 0x86, 0x01, 0x61
-+ },
-+ 3
-+ }, {
-+ /* [6 PRIMITIVE] { "b" } */
-+ {
-+ 0x86, 0x01, 0x62
-+ },
-+ 3
-+ }, {
-+ /* [7 PRIMITIVE] { `11111111` } */
-+ {
-+ 0x87, 0x04, 0x11, 0x11, 0x11, 0x11
-+ },
-+ 6
-+ }, {
-+ /* [7 PRIMITIVE] { `22222222`} */
-+ {
-+ 0x87, 0x04, 0x22, 0x22, 0x22, 0x22
-+ },
-+ 6
-+ }, {
-+ /* [7 PRIMITIVE] { `11111111111111111111111111111111` } */
-+ {
-+ 0x87, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
-+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
-+ },
-+ 18
-+ }, {
-+ /* [7 PRIMITIVE] { `22222222222222222222222222222222` } */
-+ {
-+ 0x87, 0x10, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
-+ 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22
-+ },
-+ 18
-+ }, {
-+ /* [8 PRIMITIVE] { 1.2.840.113554.4.1.72585.2.1 } */
-+ {
-+ 0x88, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04, 0x01, 0x84,
-+ 0xb7, 0x09, 0x02, 0x01
-+ },
-+ 15
-+ }, {
-+ /* [8 PRIMITIVE] { 1.2.840.113554.4.1.72585.2.2 } */
-+ {
-+ 0x88, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04, 0x01, 0x84,
-+ 0xb7, 0x09, 0x02, 0x02
-+ },
-+ 15
-+ }
-+};
-+
-+#define OSSL_NELEM(x) (sizeof(x)/sizeof((x)[0]))
-+
-+static int test_GENERAL_NAME_cmp(void)
-+{
-+ size_t i, j;
-+ GENERAL_NAME **namesa = OPENSSL_malloc(sizeof(*namesa)
-+ * OSSL_NELEM(gennames));
-+ GENERAL_NAME **namesb = OPENSSL_malloc(sizeof(*namesb)
-+ * OSSL_NELEM(gennames));
-+ int testresult = 0;
-+
-+ if (namesa == NULL || namesb == NULL)
-+ goto end;
-+
-+ for (i = 0; i < OSSL_NELEM(gennames); i++) {
-+ const unsigned char *derp = gennames[i].der;
-+
-+ /*
-+ * We create two versions of each GENERAL_NAME so that we ensure when
-+ * we compare them they are always different pointers.
-+ */
-+ namesa[i] = d2i_GENERAL_NAME(NULL, &derp, gennames[i].derlen);
-+ derp = gennames[i].der;
-+ namesb[i] = d2i_GENERAL_NAME(NULL, &derp, gennames[i].derlen);
-+ if (namesa[i] == NULL || namesb[i] == NULL)
-+ goto end;
-+ }
-+
-+ /* Every name should be equal to itself and not equal to any others. */
-+ for (i = 0; i < OSSL_NELEM(gennames); i++) {
-+ for (j = 0; j < OSSL_NELEM(gennames); j++) {
-+ if (i == j) {
-+ if (GENERAL_NAME_cmp(namesa[i], namesb[j]) != 0)
-+ goto end;
-+ } else {
-+ if (GENERAL_NAME_cmp(namesa[i], namesb[j]) == 0)
-+ goto end;
-+ }
-+ }
-+ }
-+ testresult = 1;
-+
-+ end:
-+ for (i = 0; i < OSSL_NELEM(gennames); i++) {
-+ if (namesa != NULL)
-+ GENERAL_NAME_free(namesa[i]);
-+ if (namesb != NULL)
-+ GENERAL_NAME_free(namesb[i]);
-+ }
-+ OPENSSL_free(namesa);
-+ OPENSSL_free(namesb);
-+
-+ if (!testresult)
-+ fprintf(stderr, "test of GENERAL_NAME_cmp failed\n");
-+
-+ return testresult;
-+}
-+
-+
-+
- int main(void)
- {
- const struct set_name_fn *pfn = name_fns;
-@@ -342,5 +692,8 @@ int main(void)
- }
- ++pfn;
- }
-+
-+ errors += !test_GENERAL_NAME_cmp();
-+
- return errors > 0 ? 1 : 0;
- }
diff --git a/external/openssl/openssl-3650-masm.patch.1 b/external/openssl/openssl-3650-masm.patch.1
deleted file mode 100644
index 97f1eb6446c3..000000000000
--- a/external/openssl/openssl-3650-masm.patch.1
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/crypto/perlasm/x86masm.pl b/crypto/perlasm/x86masm.pl
-index 1741342..917d0f8 100644
---- a/crypto/perlasm/x86masm.pl
-+++ b/crypto/perlasm/x86masm.pl
-@@ -18,10 +18,10 @@ sub ::generic
-
- if ($opcode =~ /lea/ && @arg[1] =~ s/.*PTR\s+(\(.*\))$/OFFSET $1/) # no []
- { $opcode="mov"; }
-- elsif ($opcode !~ /movq/)
-+ elsif ($opcode !~ /mov[dq]$/)
- { # fix xmm references
-- $arg[0] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[1]=~/\bxmm[0-7]\b/i);
-- $arg[1] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[0]=~/\bxmm[0-7]\b/i);
-+ $arg[0] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[-1]=~/\bxmm[0-7]\b/i);
-+ $arg[-1] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[0]=~/\bxmm[0-7]\b/i);
- }
-
- &::emit($opcode,@arg);
-@@ -160,13 +160,13 @@ sub ::public_label
- { push(@out,"PUBLIC\t".&::LABEL($_[0],$nmdecor.$_[0])."\n"); }
-
- sub ::data_byte
--{ push(@out,("DB\t").join(',',@_)."\n"); }
-+{ push(@out,("DB\t").join(',',splice(@_,0,16))."\n") while(@_); }
-
- sub ::data_short
--{ push(@out,("DW\t").join(',',@_)."\n"); }
-+{ push(@out,("DW\t").join(',',splice(@_,0,8))."\n") while(@_); }
-
- sub ::data_word
--{ push(@out,("DD\t").join(',',@_)."\n"); }
-+{ push(@out,("DD\t").join(',',splice(@_,0,4))."\n") while(@_); }
-
- sub ::align
- { push(@out,"ALIGN\t$_[0]\n"); }
diff --git a/external/openssl/openssl-fixbuild.patch.1 b/external/openssl/openssl-fixbuild.patch.1
deleted file mode 100644
index 5a986e87214b..000000000000
--- a/external/openssl/openssl-fixbuild.patch.1
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/crypto/evp/Makefile
-+++ b/crypto/evp/Makefile
-@@ -289,7 +289,7 @@
- e_idea.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
- e_idea.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
- e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
--e_idea.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
-+e_idea.o: ../../include/openssl/evp.h ../idea/idea.h
- e_idea.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
- e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
- e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
---- a/util/mklink.pl
-+++ b/util/mklink.pl
-@@ -50,8 +50,7 @@
- my $to = join('/', @to_path);
-
- my $file;
--$symlink_exists=eval {symlink("",""); 1};
--if ($^O eq "msys") { $symlink_exists=0 };
-+$symlink_exists=0;
- foreach $file (@files) {
- my $err = "";
- if ($symlink_exists) {
diff --git a/external/openssl/openssl-no-multilib.patch.0 b/external/openssl/openssl-no-multilib.patch.0
new file mode 100644
index 000000000000..07c45318ac25
--- /dev/null
+++ b/external/openssl/openssl-no-multilib.patch.0
@@ -0,0 +1,38 @@
+--- Configure.orig 2020-04-21 14:22:39.000000000 +0200
++++ Configure 2020-07-07 17:25:19.256297500 +0200
+@@ -24,7 +24,7 @@
+ my $orig_death_handler = $SIG{__DIE__};
+ $SIG{__DIE__} = \&death_handler;
+
+-my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]\n";
++my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [no-multilib] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]\n";
+
+ # Options:
+ #
+@@ -59,6 +59,7 @@
+ # If disabled, it also disables shared and dynamic-engine.
+ # no-asm do not use assembler
+ # no-egd do not compile support for the entropy-gathering daemon APIs
++# no-multilib exclude multilib identifier from library name
+ # [no-]zlib [don't] compile support for zlib compression.
+ # zlib-dynamic Like "zlib", but the zlib library is expected to be a shared
+ # library and will be loaded in run-time by the OpenSSL library.
+@@ -383,6 +384,7 @@
+ "mdc2",
+ "msan",
+ "multiblock",
++ "multilib",
+ "nextprotoneg",
+ "pinshared",
+ "ocb",
+@@ -1754,6 +1756,10 @@
+ if (-f catfile($srcdir, "test", $_, "build.info"));
+ }
+
++ if ($disabled{"multilib"}) {
++ $target{"multilib"} = "";
++ }
++
+ $config{build_infos} = [ ];
+
+ my %ordinals = ();
diff --git a/external/openssl/openssllnx.patch b/external/openssl/openssllnx.patch
deleted file mode 100644
index 224df8f87b2e..000000000000
--- a/external/openssl/openssllnx.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- build/openssl-0.9.8v/Configure-old 2010-04-17 13:51:42.000000000 +0200
-+++ build/openssl-0.9.8v/Configure 2010-04-17 13:52:03.000000000 +0200
-@@ -388,6 +388,9 @@
-
- "bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-
-+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+
- "nextstep", "cc:-O -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
- "nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
-
---- build/openssl-0.9.8v/Makefile.org 2010-01-27 17:06:36.000000000 +0100
-+++ build/openssl-0.9.8v/Makefile.org 2010-09-20 09:24:00.000000000 +0100
-@@ -206,7 +206,7 @@
- # same language for uniform treatment.
- BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
- CC='$(CC)' CFLAG='$(CFLAG)' \
-- AS='$(CC)' ASFLAG='$(CFLAG) -c' \
-+ AS='$(CC)' ASFLAG='$(CFLAG) -c -Wa,--noexecstack' \
- AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
- RC='$(RC)' \
- CROSS_COMPILE='$(CROSS_COMPILE)' \
diff --git a/external/openssl/opensslsol.patch b/external/openssl/opensslsol.patch
deleted file mode 100644
index 6122b67c930e..000000000000
--- a/external/openssl/opensslsol.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- misc/openssl-0.9.8v/Makefile.shared Wed Sep 17 17:56:40 2008
-+++ build/openssl-0.9.8v/Makefile.shared Fri Mar 26 16:04:41 2010
-@@ -95,7 +95,7 @@
- LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
- LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
- LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
-- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
-+ LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \
- $${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS} )
-
- LINK_SO= \
-@@ -105,7 +105,7 @@
- SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
- LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
- LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
-- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
-+ LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \
- $${SHAREDCMD} $${SHAREDFLAGS} \
- -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
- $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
diff --git a/external/openssl/opensslwnt.patch b/external/openssl/opensslwnt.patch
deleted file mode 100644
index e22bea6f077b..000000000000
--- a/external/openssl/opensslwnt.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-diff -ru openssl.orig/crypto/x509v3/v3_pci.c openssl/crypto/x509v3/v3_pci.c
---- a/openssl.orig/crypto/x509v3/v3_pci.c 2016-03-01 14:35:05.000000000 +0100
-+++ b/openssl/crypto/x509v3/v3_pci.c 2016-03-03 20:27:42.195914432 +0100
-@@ -3,7 +3,7 @@
- * Contributed to the OpenSSL Project 2004 by Richard Levitte
- * (richard@levitte.org)
- */
--/* Copyright (c) 2004 Kungliga Tekniska Högskolan
-+/* Copyright (c) 2004 Kungliga Tekniska Hoegskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
- *
-diff -ru openssl.orig/crypto/x509v3/v3_pcia.c openssl/crypto/x509v3/v3_pcia.c
---- a/openssl.orig/crypto/x509v3/v3_pcia.c 2016-03-01 14:35:05.000000000 +0100
-+++ b/openssl/crypto/x509v3/v3_pcia.c 2016-03-03 20:27:56.495913984 +0100
-@@ -3,7 +3,7 @@
- * Contributed to the OpenSSL Project 2004 by Richard Levitte
- * (richard@levitte.org)
- */
--/* Copyright (c) 2004 Kungliga Tekniska Högskolan
-+/* Copyright (c) 2004 Kungliga Tekniska Hoegskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
- *
-diff -ru openssl.orig/ms/do_ms.bat openssl/ms/do_ms.bat
---- a/openssl.orig/ms/do_ms.bat 2015-01-15 15:43:14.000000000 +0100
-+++ b/openssl/ms/do_ms.bat 2016-03-03 20:31:09.355907935 +0100
-@@ -1,11 +1,11 @@
-
--perl util\mkfiles.pl >MINFO
--perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak
--perl util\mk1mf.pl dll no-asm VC-WIN32 >ms\ntdll.mak
--if x%OSVERSION% == x goto skipce
--perl util\mk1mf.pl no-asm VC-CE >ms\ce.mak
--perl util\mk1mf.pl dll no-asm VC-CE >ms\cedll.mak
--:skipce
-+%1 util\mkfiles.pl >MINFO
-+if %2 == VC-WIN32 goto not64a
-+perl ms\uplink.pl win64a > ms\uptable.asm
-+ml64 -c -Foms\uptable.obj ms\uptable.asm
-+:not64a
-+%1 util\mk1mf.pl no-asm %2 >ms\nt.mak
-+%1 util\mk1mf.pl dll no-asm %2 >ms\ntdll.mak
-
--perl util\mkdef.pl 32 libeay > ms\libeay32.def
--perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
-+%1 util\mkdef.pl 32 libeay > ms\libeay32.def
-+%1 util\mkdef.pl 32 ssleay > ms\ssleay32.def
-diff -ru openssl.orig/util/mk1mf.pl openssl/util/mk1mf.pl
---- a/openssl.orig/util/mk1mf.pl 2016-03-03 20:22:21.043924505 +0100
-+++ b/openssl/util/mk1mf.pl 2016-03-03 20:34:45.015901171 +0100
-@@ -163,7 +163,7 @@
- $inc_def="outinc";
- $tmp_def="tmp";
-
--$perl="perl" unless defined $perl;
-+$perl="$ENV{PERL}" unless defined $perl;
- $mkdir="-mkdir" unless defined $mkdir;
-
- ($ssl,$crypto)=("ssl","crypto");
-@@ -347,6 +347,11 @@
- s/\s*$//; # was chop, didn't work in mixture of perls for Windows...
-
- ($key,$val)=/^([^=]+)=(.*)/;
-+
-+ # On some Windows machines, $val has linefeeds at the end, which confuses
-+ # subsequent code in this file. So we strip all whitespace at the end.
-+ $val =~ s/\s+$//;
-+
- if ($key eq "RELATIVE_DIRECTORY")
- {
- if ($lib ne "")
-@@ -473,7 +478,7 @@
- # Set your compiler options
- PLATFORM=$platform
- CC=$bin_dir${cc}
--CFLAG=$cflags
-+CFLAG=$cflags \$(SOLARINC)
- APP_CFLAG=$app_cflag
- LIB_CFLAG=$lib_cflag
- SHLIB_CFLAG=$shl_cflag
-@@ -488,7 +493,7 @@
-
- LINK_CMD=$link
- LFLAGS=$lflags
--RSC=$rsc
-+RSC=$rsc \$(SOLARINC)
-
- # The output directory for everything interesting
- OUT_D=$out_dir
-@@ -669,7 +674,7 @@
- printf OUT <<EOF;
- #ifdef $platform_cpp_symbol
- /* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */
-- #define CFLAGS "compiler: $cc $cflags"
-+ #define CFLAGS "compiler: $cflags"
- #define PLATFORM "$platform"
- EOF
- printf OUT " #define DATE \"%s\"\n", scalar gmtime();
-diff -ru openssl.orig/util/pl/VC-32.pl openssl/util/pl/VC-32.pl
---- a/openssl.orig/util/pl/VC-32.pl 2016-03-01 14:35:53.000000000 +0100
-+++ b/openssl/util/pl/VC-32.pl 2016-03-03 21:15:14.083824986 +0100
-@@ -30,7 +30,7 @@
- my $ff = "";
-
- # C compiler stuff
--$cc='cl';
-+$cc=$ENV{'CC'};
- if ($FLAVOR =~ /WIN64/)
- {
- # Note that we currently don't have /WX on Win64! There is a lot of
-@@ -114,7 +114,7 @@
- }
-
- $cc=($ENV{CC} or "cl");
-- $base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
-+ $base_cflags=' -W3 -GF -Gy -nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
- $base_cflags.=" $wcecdefs";
- $base_cflags.=' -I$(WCECOMPAT)/include' if (defined($ENV{'WCECOMPAT'}));
- $base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if (defined($ENV{'PORTSDK_LIBPATH'}));
-@@ -123,20 +123,21 @@
- } else {
- $base_cflags.=' /MC';
- }
-- $opt_cflags=' /O1i'; # optimize for space, but with intrinsics...
-- $dbg_cflags=' /Od -DDEBUG -D_DEBUG';
-+ $opt_cflags=' -O1i'; # optimize for space, but with intrinsics...
-+ $dbg_cflags=' -Od -DDEBUG -D_DEBUG';
-+
- $lflags="/nologo /opt:ref $wcelflag";
- }
- else # Win32
- {
- $base_cflags= " $mf_cflag";
-- my $f = $shlib || $fips ?' /MD':' /MT';
-+ my $f = $shlib || $fips ? (($ENV{MSVC_USE_DEBUG_RUNTIME} eq "TRUE") ? ' -MDd' : ' -MD' ):' -MT';
- $ff = "/fixed";
-- $opt_cflags=$f.' /Ox /O2 /Ob2';
-- $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
-+ $opt_cflags=$f.' -Ox -O2 -Ob2';
-+ $dbg_cflags=$f.'d -Od -DDEBUG -D_DEBUG';
- $lflags="/nologo /subsystem:console /opt:ref";
- }
--$lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
-+$lib_cflag='-Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
- $mlflags='';
-
- $out_def ="out32"; $out_def.="dll" if ($shlib);
-@@ -161,7 +162,7 @@
-
- $obj='.obj';
- $asm_suffix='.asm';
--$ofile="/Fo";
-+$ofile="-Fo.\\";
-
- # EXE linking stuff
- $link="link";
-diff -ru openssl.orig/ms/uplink.c openssl/ms/uplink.c
---- a/openssl.orig/ms/uplink.c 2015-03-19 15:02:02.000000000 +0100
-+++ b/openssl/ms/uplink.c 2016-03-03 20:39:19.403892565 +0100
-@@ -1,5 +1,6 @@
- #if (defined(_WIN64) || defined(_WIN32_WCE)) && !defined(UNICODE)
- # define UNICODE
-+# define _CRT_NON_CONFORMING_SWPRINTFS
- #endif
- #if defined(UNICODE) && !defined(_UNICODE)
- # define _UNICODE
diff --git a/external/openssl/opensslwnt_safeseh.patch b/external/openssl/opensslwnt_safeseh.patch
deleted file mode 100644
index f2eafab5b9ed..000000000000
--- a/external/openssl/opensslwnt_safeseh.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-use /safeseh in 32-bit MSVC builds; this is not required for 64-bit
-
-diff -ru openssl.orig/util/mk1mf.pl openssl/util/mk1mf.pl
---- a/openssl.orig/util/mk1mf.pl 2016-03-03 20:22:21.043924505 +0100
-+++ b/openssl/util/mk1mf.pl 2016-03-03 20:34:45.015901171 +0100
-@@ -488,7 +493,7 @@
- SRC_D=$src_dir
-
- LINK_CMD=$link
--LFLAGS=$lflags
-+LFLAGS=$lflags /SAFESEH
- RSC=$rsc \$(SOLARINC)
-
- # The output directory for everything interesting
-@@ -511,7 +516,7 @@
- MKDIR=$mkdir
- MKLIB=$bin_dir$mklib
- MLFLAGS=$mlflags
--ASM=$bin_dir$asm
-+ASM=$bin_dir$asm /safeseh
-
- # FIPS validated module and support file locations
-
diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk
index 07282fc3d157..136ebd7bf7e5 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_Library_set_include,pdfium,\
-I$(call gb_UnpackedTarball_get_dir,pdfium) \
-I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party \
-I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party/agg23 \
+ -I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party/abseil-cpp \
$$(INCLUDE) \
))
@@ -39,14 +40,11 @@ $(eval $(call gb_Library_set_generated_cxx_suffix,pdfium,cpp))
# pdfium
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annot \
- UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annothandlermgr \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annotiteration \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_baannot \
- UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_baannothandler \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_formfillenvironment \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_pageview \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_widget \
- UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_widgethandler \
UnpackedTarball/pdfium/fpdfsdk/fpdf_dataavail \
UnpackedTarball/pdfium/fpdfsdk/fpdf_ext \
UnpackedTarball/pdfium/fpdfsdk/fpdf_flatten \
@@ -55,7 +53,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/fpdfsdk/fpdf_structtree \
UnpackedTarball/pdfium/fpdfsdk/fpdf_sysfontinfo \
UnpackedTarball/pdfium/fpdfsdk/fpdf_transformpage \
- UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_actionhandler \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annotiterator \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_customaccess \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_filewriteadapter \
@@ -82,6 +79,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/constants/page_object \
UnpackedTarball/pdfium/constants/stream_dict_common \
UnpackedTarball/pdfium/constants/transparency \
+ UnpackedTarball/pdfium/constants/font_encodings \
))
# fdrm
@@ -239,10 +237,9 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fpdfapi/render/charposlist \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_devicebuffer \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_docrenderdata \
- UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagecacheentry \
- UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imageloader \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_imageloader \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagerenderer \
- UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_pagerendercache \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageimagecache \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_progressiverenderer \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_rendercontext \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_renderoptions \
@@ -260,7 +257,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fpdfapi/font/cfx_stockfontarray \
UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cid2unicodemap \
UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cmap \
- UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cmapmanager \
UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cmapparser \
UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_fontglobals \
UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_tounicodemap \
@@ -289,6 +285,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfuncdib \
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfunc \
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_basedcs \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_indexedcs \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/object_tree_traversal_util \
))
# fpdfdoc
@@ -408,10 +406,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssoutputtextbuf \
UnpackedTarball/pdfium/core/fxcrt/cfx_datetime \
UnpackedTarball/pdfium/core/fxcrt/bytestring \
- UnpackedTarball/pdfium/core/fxcrt/cfx_binarybuf \
UnpackedTarball/pdfium/core/fxcrt/cfx_bitstream \
UnpackedTarball/pdfium/core/fxcrt/cfx_utf8decoder \
- UnpackedTarball/pdfium/core/fxcrt/cfx_widetextbuf \
UnpackedTarball/pdfium/core/fxcrt/fx_random \
UnpackedTarball/pdfium/core/fxcrt/fx_string \
UnpackedTarball/pdfium/core/fxcrt/widestring \
@@ -419,9 +415,14 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcrt/fx_codepage \
UnpackedTarball/pdfium/core/fxcrt/fx_number \
UnpackedTarball/pdfium/core/fxcrt/cfx_utf8encoder \
- UnpackedTarball/pdfium/core/fxcrt/cfx_readonlymemorystream \
UnpackedTarball/pdfium/core/fxcrt/observed_ptr \
UnpackedTarball/pdfium/core/fxcrt/string_data_template \
+ UnpackedTarball/pdfium/core/fxcrt/binary_buffer \
+ UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_span_stream \
+ UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_string_stream \
+ UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_vector_stream \
+ UnpackedTarball/pdfium/core/fxcrt/fx_memory_malloc \
+ UnpackedTarball/pdfium/core/fxcrt/widetext_buffer \
))
# fxge
@@ -479,6 +480,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxge/dib/cfx_cmyk_to_srgb \
UnpackedTarball/pdfium/core/fxge/text_char_pos \
UnpackedTarball/pdfium/core/fxge/cfx_face \
+ UnpackedTarball/pdfium/core/fxge/cfx_defaultrenderdevice \
+ UnpackedTarball/pdfium/core/fxge/calculate_pitch \
))
# javascript, build with pdf_enable_v8 disabled.
@@ -524,47 +527,44 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/third_party/agg23/agg_vcgen_stroke \
))
+# third_party/abseil-cpp
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/third_party/abseil-cpp/absl/types/bad_optional_access \
+ UnpackedTarball/pdfium/third_party/abseil-cpp/absl/types/bad_variant_access \
+))
+
# third_party/fx_libopenjpeg
$(eval $(call gb_Library_add_generated_cobjects,pdfium,\
- UnpackedTarball/pdfium/third_party/libopenjpeg20/bio \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/cio \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/dwt \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/event \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/function_list \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/image \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/invert \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/j2k \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/jp2 \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/mct \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/mqc \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/openjpeg \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_clock \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/pi \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/thread \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/t1 \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/t2 \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/tcd \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/tgt \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/sparse_array \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/bio \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/cio \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/dwt \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/event \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/function_list \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/image \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/invert \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/j2k \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/jp2 \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/mct \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/mqc \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/openjpeg \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/opj_clock \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/pi \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/thread \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/t1 \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/t2 \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/tcd \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/tgt \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/sparse_array \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/ht_dec \
))
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
- UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_malloc \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/opj_malloc \
))
# pdfium_base
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/page_allocator \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/spin_lock \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_alloc \
UnpackedTarball/pdfium/third_party/base/debug/alias \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/oom_callback \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_bucket \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_oom \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_page \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_root_base \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/random \
UnpackedTarball/pdfium/third_party/base/memory/aligned_memory \
))
diff --git a/external/pdfium/README b/external/pdfium/README
index 0a146d2e74de..2be9e8f11b26 100644
--- a/external/pdfium/README
+++ b/external/pdfium/README
@@ -12,4 +12,6 @@ git checkout --track origin/chromium/$version
gclient sync
git archive --prefix=pdfium/ --format=tar origin/chromium/${version} > pdfium-${version}.tar
(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/freetype/src/include/ pdfium/third_party/freetype/src/src/)
+(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/abseil-cpp/absl/)
+(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/build/build_config.h pdfium/build/buildflag.h)
bzip2 pdfium-${version}.tar
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk
index f4643376cee0..07004e8de71d 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -11,6 +11,7 @@ pdfium_patches :=
pdfium_patches += ubsan.patch
# Fixes build on our baseline.
pdfium_patches += build.patch.1
+pdfium_patches += msvc2017.patch.1
# Avoids Windows 8 build dependency.
pdfium_patches += windows7.patch.1
pdfium_patches += c++20-comparison.patch
@@ -25,29 +26,17 @@ $(eval $(call gb_UnpackedTarball_add_patches,pdfium,\
$(foreach patch,$(pdfium_patches),external/pdfium/$(patch)) \
))
-# Upstream build system generates this, but it's not really a generated file.
-# Stripped down version from <https://dxr.mozilla.org/mozilla-central/source/ipc/chromium/src/build/build_config.h>.
-$(eval $(call gb_UnpackedTarball_add_file,pdfium,build/build_config.h,external/pdfium/configs/build_config.h))
-
$(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\
mv third_party/bigint/BigInteger.cc third_party/bigint/BigInteger.cpp && \
mv third_party/bigint/BigIntegerUtils.cc third_party/bigint/BigIntegerUtils.cpp && \
mv third_party/bigint/BigUnsigned.cc third_party/bigint/BigUnsigned.cpp && \
mv third_party/bigint/BigUnsignedInABase.cc third_party/bigint/BigUnsignedInABase.cpp && \
- mv third_party/base/allocator/partition_allocator/address_space_randomization.cc third_party/base/allocator/partition_allocator/address_space_randomization.cpp && \
- mv third_party/base/allocator/partition_allocator/page_allocator.cc third_party/base/allocator/partition_allocator/page_allocator.cpp && \
- mv third_party/base/allocator/partition_allocator/partition_alloc.cc third_party/base/allocator/partition_allocator/partition_alloc.cpp && \
- mv third_party/base/allocator/partition_allocator/spin_lock.cc third_party/base/allocator/partition_allocator/spin_lock.cpp && \
mv third_party/base/debug/alias.cc third_party/base/debug/alias.cpp && \
- mv third_party/base/allocator/partition_allocator/oom_callback.cc third_party/base/allocator/partition_allocator/oom_callback.cpp && \
- mv third_party/base/allocator/partition_allocator/partition_bucket.cc third_party/base/allocator/partition_allocator/partition_bucket.cpp && \
- mv third_party/base/allocator/partition_allocator/partition_oom.cc third_party/base/allocator/partition_allocator/partition_oom.cpp && \
- mv third_party/base/allocator/partition_allocator/partition_page.cc third_party/base/allocator/partition_allocator/partition_page.cpp && \
- mv third_party/base/allocator/partition_allocator/partition_root_base.cc third_party/base/allocator/partition_allocator/partition_root_base.cpp && \
- mv third_party/base/allocator/partition_allocator/random.cc third_party/base/allocator/partition_allocator/random.cpp && \
mv third_party/base/memory/aligned_memory.cc third_party/base/memory/aligned_memory.cpp && \
mv third_party/base/win/win_util.cc third_party/base/win/win_util.cpp && \
- mv third_party/libopenjpeg20/opj_malloc.cc third_party/libopenjpeg20/opj_malloc.cpp \
+ mv third_party/libopenjpeg/opj_malloc.cc third_party/libopenjpeg/opj_malloc.cpp && \
+ mv third_party/abseil-cpp/absl/types/bad_optional_access.cc third_party/abseil-cpp/absl/types/bad_optional_access.cpp && \
+ mv third_party/abseil-cpp/absl/types/bad_variant_access.cc third_party/abseil-cpp/absl/types/bad_variant_access.cpp \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1
index 60283ac63c74..909149d1d3ad 100644
--- a/external/pdfium/build.patch.1
+++ b/external/pdfium/build.patch.1
@@ -1,8 +1,66 @@
+-*- Mode: diff -*-
+diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp
+index f5a51b24e..8b308d0a6 100644
+--- a/core/fpdfapi/font/cpdf_cidfont.cpp
++++ b/core/fpdfapi/font/cpdf_cidfont.cpp
+@@ -755,7 +755,7 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) {
+ uint32_t maccode = CharCodeFromUnicodeForFreetypeEncoding(
+ FT_ENCODING_APPLE_ROMAN, name_unicode);
+ index = maccode ? FT_Get_Char_Index(face, maccode)
+- : FT_Get_Name_Index(face, name);
++ : FT_Get_Name_Index(face, const_cast<char*>(name));
+ }
+ if (index == 0 || index == 0xffff)
+ return charcode ? static_cast<int>(charcode) : -1;
+diff --git a/core/fpdfapi/font/cpdf_truetypefont.cpp b/core/fpdfapi/font/cpdf_truetypefont.cpp
+index 0a59b54eb..a96e11759 100644
+--- a/core/fpdfapi/font/cpdf_truetypefont.cpp
++++ b/core/fpdfapi/font/cpdf_truetypefont.cpp
+@@ -91,7 +91,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() {
+ FT_ENCODING_APPLE_ROMAN,
+ m_Encoding.UnicodeFromCharCode(charcode));
+ if (!maccode) {
+- m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name);
++ m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name));
+ } else {
+ m_GlyphIndex[charcode] = FT_Get_Char_Index(face, maccode);
+ }
+@@ -105,7 +105,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() {
+ m_GlyphIndex[charcode] = FT_Get_Char_Index(face, 32);
+ continue;
+ }
+- m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name);
++ m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name));
+ if (m_GlyphIndex[charcode] != 0 || !bToUnicode)
+ continue;
+
+diff --git a/core/fpdfapi/font/cpdf_type1font.cpp b/core/fpdfapi/font/cpdf_type1font.cpp
+index 55510e7d7..2f13f00b8 100644
+--- a/core/fpdfapi/font/cpdf_type1font.cpp
++++ b/core/fpdfapi/font/cpdf_type1font.cpp
+@@ -263,7 +263,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
+ static_cast<uint32_t>(charcode));
+ if (name) {
+ m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name));
+- m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name);
++ m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name));
+ } else {
+ m_GlyphIndex[charcode] = FT_Get_Char_Index(
+ m_Font.GetFaceRec(), static_cast<uint32_t>(charcode));
+@@ -294,7 +294,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
+ continue;
+
+ m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name));
+- m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name);
++ m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name));
+ if (m_GlyphIndex[charcode] != 0)
+ continue;
+
diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp
-index 323de4ffc..f11a0b0ad 100644
+index 228a0c137..bf512beb3 100644
--- a/core/fpdfdoc/cpdf_metadata.cpp
+++ b/core/fpdfdoc/cpdf_metadata.cpp
-@@ -74,7 +74,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const {
+@@ -77,7 +77,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const {
CFX_XMLParser parser(stream);
std::unique_ptr<CFX_XMLDocument> doc = parser.Parse();
if (!doc)
@@ -11,32 +69,6 @@ index 323de4ffc..f11a0b0ad 100644
std::vector<UnsupportedFeature> unsupported;
CheckForSharedFormInternal(doc->GetRoot(), &unsupported);
-diff --git a/third_party/base/span.h b/third_party/base/span.h
-index 0fb627ba8..f71c362e2 100644
---- a/third_party/base/span.h
-+++ b/third_party/base/span.h
-@@ -214,7 +214,7 @@ class span {
- // Conversions from spans of compatible types: this allows a span<T> to be
- // seamlessly used as a span<const T>, but not the other way around.
- template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>>
-- constexpr span(const span<U>& other) : span(other.data(), other.size()) {}
-+ span(const span<U>& other) : span(other.data(), other.size()) {}
- span& operator=(const span& other) noexcept = default;
- ~span() noexcept {
- if (!size_) {
-diff --git a/third_party/base/span.h b/third_party/base/span.h
-index 0fb627ba8..dda1fc8bc 100644
---- a/third_party/base/span.h
-+++ b/third_party/base/span.h
-@@ -204,7 +204,7 @@ class span {
- // size()|.
- template <typename Container,
- typename = internal::EnableIfSpanCompatibleContainer<Container, T>>
-- constexpr span(Container& container)
-+ span(Container& container)
- : span(container.data(), container.size()) {}
- template <
- typename Container,
--- a/core/fxge/dib/cfx_cmyk_to_srgb.cpp 2020-09-10 17:32:37.165872018 +0200
+++ b/core/fxge/dib/cfx_cmyk_to_srgb.cpp 2020-09-10 17:33:15.870395738 +0200
@@ -1740,10 +1740,12 @@
@@ -53,80 +85,93 @@ index 0fb627ba8..dda1fc8bc 100644
uint8_t r;
uint8_t g;
diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp
-index c66985a7f..817f81dfa 100644
+index 9391d61ab..490ce2230 100644
--- a/core/fxcodec/jpx/cjpx_decoder.cpp
+++ b/core/fxcodec/jpx/cjpx_decoder.cpp
-@@ -71,7 +71,7 @@ Optional<OpjImageRgbData> alloc_rgb(size_t size) {
+@@ -75,7 +75,7 @@ absl::optional<OpjImageRgbData> alloc_rgb(size_t size) {
if (!data.b)
- return pdfium::nullopt;
+ return absl::nullopt;
- return data;
+ return std::move(data);
}
void sycc_to_rgb(int offset,
-diff --git a/core/fdrm/fx_crypt_aes.cpp b/core/fdrm/fx_crypt_aes.cpp
-index f2170220b..ede18f581 100644
---- a/core/fdrm/fx_crypt_aes.cpp
-+++ b/core/fdrm/fx_crypt_aes.cpp
-@@ -437,7 +437,7 @@ const unsigned int D3[256] = {
- (block[0] ^= *keysched++, block[1] ^= *keysched++, block[2] ^= *keysched++, \
- block[3] ^= *keysched++)
- #define MOVEWORD(i) (block[i] = newstate[i])
--#define MAKEWORD(i) \
-+#define FMAKEWORD(i) \
- (newstate[i] = (E0[(block[i] >> 24) & 0xFF] ^ \
- E1[(block[(i + C1) % Nb] >> 16) & 0xFF] ^ \
- E2[(block[(i + C2) % Nb] >> 8) & 0xFF] ^ \
-@@ -458,10 +458,10 @@ void aes_encrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
- unsigned int newstate[4];
- for (i = 0; i < ctx->Nr - 1; i++) {
- ADD_ROUND_KEY_4();
-- MAKEWORD(0);
-- MAKEWORD(1);
-- MAKEWORD(2);
-- MAKEWORD(3);
-+ FMAKEWORD(0);
-+ FMAKEWORD(1);
-+ FMAKEWORD(2);
-+ FMAKEWORD(3);
- MOVEWORD(0);
- MOVEWORD(1);
- MOVEWORD(2);
-@@ -478,10 +478,10 @@ void aes_encrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
- MOVEWORD(3);
- ADD_ROUND_KEY_4();
+diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
+index a2a44df39..d6cedee46 100644
+--- a/core/fxge/cfx_font.cpp
++++ b/core/fxge/cfx_font.cpp
+@@ -48,25 +48,9 @@ struct OUTLINE_PARAMS {
+ // TODO(crbug.com/pdfium/1400): When FT_Done_MM_Var() is more likely to be
+ // available to all users in the future, remove FreeMMVar() and use
+ // FT_Done_MM_Var() directly.
+-//
+-// Use weak symbols to check if FT_Done_MM_Var() is available at runtime.
+-#if !BUILDFLAG(IS_WIN)
+-extern "C" __attribute__((weak)) decltype(FT_Done_MM_Var) FT_Done_MM_Var;
+-#endif
+
+ void FreeMMVar(FXFT_FaceRec* rec, FXFT_MM_VarPtr variation_desc) {
+-#if BUILDFLAG(IS_WIN)
+- // Assume `use_system_freetype` GN var is never set on Windows.
+- constexpr bool has_ft_done_mm_var_func = true;
+-#else
+- static const bool has_ft_done_mm_var_func = !!FT_Done_MM_Var;
+-#endif
+- if (has_ft_done_mm_var_func) {
+- FT_Done_MM_Var(CFX_GEModule::Get()->GetFontMgr()->GetFTLibrary(),
+- variation_desc);
+- } else {
+ FXFT_Free(rec, variation_desc);
+- }
}
--#undef MAKEWORD
-+#undef FMAKEWORD
- #undef LASTWORD
--#define MAKEWORD(i) \
-+#define FMAKEWORD(i) \
- (newstate[i] = (D0[(block[i] >> 24) & 0xFF] ^ \
- D1[(block[(i + C1) % Nb] >> 16) & 0xFF] ^ \
- D2[(block[(i + C2) % Nb] >> 8) & 0xFF] ^ \
-@@ -502,10 +502,10 @@ void aes_decrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
- unsigned int newstate[4];
- for (i = 0; i < ctx->Nr - 1; i++) {
- ADD_ROUND_KEY_4();
-- MAKEWORD(0);
-- MAKEWORD(1);
-- MAKEWORD(2);
-- MAKEWORD(3);
-+ FMAKEWORD(0);
-+ FMAKEWORD(1);
-+ FMAKEWORD(2);
-+ FMAKEWORD(3);
- MOVEWORD(0);
- MOVEWORD(1);
- MOVEWORD(2);
-@@ -522,7 +522,7 @@ void aes_decrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
- MOVEWORD(3);
- ADD_ROUND_KEY_4();
+ FX_RECT FXRectFromFTPos(FT_Pos left, FT_Pos top, FT_Pos right, FT_Pos bottom) {
+diff --git a/third_party/base/numerics/safe_conversions_impl.h b/third_party/base/numerics/safe_conversions_impl.h
+index 44c921a14..0152a89b7 100644
+--- a/third_party/base/numerics/safe_conversions_impl.h
++++ b/third_party/base/numerics/safe_conversions_impl.h
+@@ -89,7 +89,7 @@ constexpr typename std::make_unsigned<T>::type SafeUnsignedAbs(T value) {
+
+ // TODO(jschuh): Switch to std::is_constant_evaluated() once C++20 is supported.
+ // Alternately, the usage could be restructured for "consteval if" in C++23.
+-#define IsConstantEvaluated() (__builtin_is_constant_evaluated())
++#define IsConstantEvaluated() (false)
+
+ // TODO(jschuh): Debug builds don't reliably propagate constants, so we restrict
+ // some accelerated runtime paths to release builds until this can be forced
+diff --git a/third_party/base/span.h b/third_party/base/span.h
+index ed2a3c8de..87493861c 100644
+--- a/third_party/base/span.h
++++ b/third_party/base/span.h
+@@ -211,7 +211,7 @@ class TRIVIAL_ABI GSL_POINTER span {
+ #else
+ template <typename Container,
+ typename = internal::EnableIfSpanCompatibleContainer<Container, T>>
+- constexpr span(Container& container)
++ span(Container& container)
+ : span(container.data(), container.size()) {}
+ #endif
+
+@@ -225,7 +225,7 @@ class TRIVIAL_ABI GSL_POINTER span {
+ // Conversions from spans of compatible types: this allows a span<T> to be
+ // seamlessly used as a span<const T>, but not the other way around.
+ template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>>
+- constexpr span(const span<U>& other) : span(other.data(), other.size()) {}
++ span(const span<U>& other) : span(other.data(), other.size()) {}
+ span& operator=(const span& other) noexcept {
+ if (this != &other) {
+ ReleaseEmptySpan();
+diff --git a/third_party/libopenjpeg/openjpeg.c b/third_party/libopenjpeg/openjpeg.c
+index 29d3ee528..d5c7a1bc9 100644
+--- a/third_party/libopenjpeg/openjpeg.c
++++ b/third_party/libopenjpeg/openjpeg.c
+@@ -433,7 +433,7 @@ OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
+ return OPJ_FALSE;
}
--#undef MAKEWORD
-+#undef FMAKEWORD
- #undef LASTWORD
- void aes_setup(CRYPT_aes_context* ctx, const unsigned char* key, int keylen) {
+-OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec,
++OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec,
+ OPJ_BOOL strict)
+ {
+ if (p_codec) {
diff --git a/external/pdfium/c++20-comparison.patch b/external/pdfium/c++20-comparison.patch
index 025f9ba010db..d26fe66ad8b7 100644
--- a/external/pdfium/c++20-comparison.patch
+++ b/external/pdfium/c++20-comparison.patch
@@ -1,13 +1,13 @@
--- core/fxcrt/fx_memory_wrappers.h
+++ core/fxcrt/fx_memory_wrappers.h
-@@ -70,8 +70,8 @@
+@@ -70,8 +70,8 @@ struct FxPartitionAllocAllocator {
}
// There's no state, so they are all the same,
-- bool operator==(const FxAllocAllocator& that) { return true; }
-- bool operator!=(const FxAllocAllocator& that) { return false; }
-+ bool operator==(const FxAllocAllocator& that) const { return true; }
-+ bool operator!=(const FxAllocAllocator& that) const { return false; }
+- bool operator==(const FxPartitionAllocAllocator& that) { return true; }
+- bool operator!=(const FxPartitionAllocAllocator& that) { return false; }
++ bool operator==(const FxPartitionAllocAllocator& that) const { return true; }
++ bool operator!=(const FxPartitionAllocAllocator& that) const { return false; }
};
- #endif // CORE_FXCRT_FX_MEMORY_WRAPPERS_H_
+ // Used to put backing store for std::vector<> and such into the
diff --git a/external/pdfium/configs/build_config.h b/external/pdfium/configs/build_config.h
deleted file mode 100644
index ec93c278767c..000000000000
--- a/external/pdfium/configs/build_config.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file adds defines about the platform we're currently building on.
-// Operating System:
-// OS_WIN / OS_APPLE / OS_LINUX / OS_POSIX (MACOSX or LINUX)
-// Compiler:
-// COMPILER_MSVC / COMPILER_GCC
-// Processor:
-// ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64)
-// ARCH_CPU_32_BITS / ARCH_CPU_64_BITS
-
-#ifndef BUILD_BUILD_CONFIG_H_
-#define BUILD_BUILD_CONFIG_H_
-
-// A set of macros to use for platform detection.
-#if defined(ANDROID)
-#define OS_ANDROID 1
-#define OS_LINUX 1
-#elif defined(__APPLE__)
-#define OS_APPLE 1
-#elif defined(__linux__)
-#define OS_LINUX 1
-#elif defined(__DragonFly__)
-#define OS_DRAGONFLY 1
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-#define OS_FREEBSD 1
-#elif defined(__NetBSD__)
-#define OS_NETBSD 1
-#elif defined(__OpenBSD__)
-#define OS_OPENBSD 1
-#elif defined(__sun__)
-#define OS_SOLARIS 1
-#elif defined(_WIN32)
-#define OS_WIN 1
-#else
-#error Please add support for your platform in build/build_config.h
-#endif
-
-// For access to standard BSD features, use OS_BSD instead of a
-// more specific macro.
-#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(OS_OPENBSD)
-#define OS_BSD 1
-#endif
-
-// For access to standard POSIX features, use OS_POSIX instead of a more
-// specific macro.
-#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
-#define OS_POSIX 1
-#endif
-
-// Compiler detection.
-#if defined(__GNUC__)
-#define COMPILER_GCC 1
-#elif defined(_MSC_VER)
-#define COMPILER_MSVC 1
-#else
-#error Please add support for your compiler in build/build_config.h
-#endif
-
-// Processor architecture detection. For more info on what's defined, see:
-// http://msdn.microsoft.com/en-us/library/b0084kay.aspx
-// http://www.agner.org/optimize/calling_conventions.pdf
-// or with gcc, run: "echo | gcc -E -dM -"
-#if defined(_M_X64) || defined(__x86_64__)
-#define ARCH_CPU_X86_FAMILY 1
-#define ARCH_CPU_X86_64 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(_M_IX86) || defined(__i386__)
-#define ARCH_CPU_X86_FAMILY 1
-#define ARCH_CPU_X86 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__ARMEL__)
-#define ARCH_CPU_ARM_FAMILY 1
-#define ARCH_CPU_ARMEL 1
-#define ARCH_CPU_32_BITS 1
-#define WCHAR_T_IS_UNSIGNED 1
-#elif defined(__powerpc64__)
-#define ARCH_CPU_PPC64 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__ppc__) || defined(__powerpc__)
-#define ARCH_CPU_PPC 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__sparc__) && defined(__arch64__)
-#define ARCH_CPU_SPARC 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__sparc__)
-#define ARCH_CPU_SPARC 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__mips64) && defined(__LP64__)
-#define ARCH_CPU_MIPS 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__mips__)
-#define ARCH_CPU_MIPS 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__hppa__)
-#define ARCH_CPU_HPPA 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__ia64__)
-#define ARCH_CPU_IA64 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__s390x__)
-#define ARCH_CPU_S390X 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__s390__)
-#define ARCH_CPU_S390 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__sh__)
-#define ARCH_CPU_SH 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__alpha__)
-#define ARCH_CPU_ALPHA 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__aarch64__)
-#define ARCH_CPU_ARM_FAMILY 1
-#define ARCH_CPU_ARM64 1
-#define ARCH_CPU_64_BITS 1
-#else
-#error Please add support for your architecture in build/build_config.h
-#endif
-
-// Type detection for wchar_t.
-#if defined(OS_WIN)
-#define WCHAR_T_IS_UTF16
-#else
-#define WCHAR_T_IS_UTF32
-#endif
-
-#endif // BUILD_BUILD_CONFIG_H_
diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx
index 357c37d6a81e..6258e8036360 100644
--- a/external/pdfium/inc/pch/precompiled_pdfium.hxx
+++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-05-06 11:57:12 using:
+ Generated on 2022-11-08 17:05:53 using:
./bin/update_pch external/pdfium pdfium --cutoff=1 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -31,7 +31,6 @@
#include <agg_vcgen_stroke.h>
#include <algorithm>
#include <array>
-#include <atomic>
#include <cassert>
#include <cfloat>
#include <climits>
@@ -45,6 +44,7 @@
#include <map>
#include <math.h>
#include <memory>
+#include <new>
#include <numeric>
#include <ostream>
#include <set>
@@ -53,6 +53,7 @@
#include <stack>
#include <stdarg.h>
#include <stddef.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <string>
@@ -72,6 +73,7 @@
#include <constants/annotation_flags.h>
#include <constants/appearance.h>
#include <constants/ascii.h>
+#include <constants/font_encodings.h>
#include <constants/form_fields.h>
#include <constants/form_flags.h>
#include <constants/page_object.h>
@@ -93,7 +95,6 @@
#include <core/fpdfapi/font/cpdf_cid2unicodemap.h>
#include <core/fpdfapi/font/cpdf_cidfont.h>
#include <core/fpdfapi/font/cpdf_cmap.h>
-#include <core/fpdfapi/font/cpdf_cmapmanager.h>
#include <core/fpdfapi/font/cpdf_cmapparser.h>
#include <core/fpdfapi/font/cpdf_font.h>
#include <core/fpdfapi/font/cpdf_fontencoding.h>
@@ -125,10 +126,13 @@
#include <core/fpdfapi/page/cpdf_graphicstates.h>
#include <core/fpdfapi/page/cpdf_iccprofile.h>
#include <core/fpdfapi/page/cpdf_image.h>
+#include <core/fpdfapi/page/cpdf_imageloader.h>
#include <core/fpdfapi/page/cpdf_imageobject.h>
+#include <core/fpdfapi/page/cpdf_indexedcs.h>
#include <core/fpdfapi/page/cpdf_meshstream.h>
#include <core/fpdfapi/page/cpdf_occontext.h>
#include <core/fpdfapi/page/cpdf_page.h>
+#include <core/fpdfapi/page/cpdf_pageimagecache.h>
#include <core/fpdfapi/page/cpdf_pagemodule.h>
#include <core/fpdfapi/page/cpdf_pageobject.h>
#include <core/fpdfapi/page/cpdf_pageobjectholder.h>
@@ -186,10 +190,7 @@
#include <core/fpdfapi/render/charposlist.h>
#include <core/fpdfapi/render/cpdf_devicebuffer.h>
#include <core/fpdfapi/render/cpdf_docrenderdata.h>
-#include <core/fpdfapi/render/cpdf_imagecacheentry.h>
-#include <core/fpdfapi/render/cpdf_imageloader.h>
#include <core/fpdfapi/render/cpdf_imagerenderer.h>
-#include <core/fpdfapi/render/cpdf_pagerendercache.h>
#include <core/fpdfapi/render/cpdf_pagerendercontext.h>
#include <core/fpdfapi/render/cpdf_progressiverenderer.h>
#include <core/fpdfapi/render/cpdf_rendercontext.h>
@@ -270,19 +271,20 @@
#include <core/fxcodec/jpx/cjpx_decoder.h>
#include <core/fxcodec/jpx/jpx_decode_utils.h>
#include <core/fxcodec/scanlinedecoder.h>
+#include <core/fxcrt/autonuller.h>
#include <core/fxcrt/autorestorer.h>
+#include <core/fxcrt/binary_buffer.h>
#include <core/fxcrt/bytestring.h>
-#include <core/fxcrt/cfx_binarybuf.h>
#include <core/fxcrt/cfx_bitstream.h>
#include <core/fxcrt/cfx_datetime.h>
-#include <core/fxcrt/cfx_fixedbufgrow.h>
#include <core/fxcrt/cfx_memorystream.h>
-#include <core/fxcrt/cfx_readonlymemorystream.h>
+#include <core/fxcrt/cfx_read_only_span_stream.h>
+#include <core/fxcrt/cfx_read_only_string_stream.h>
+#include <core/fxcrt/cfx_read_only_vector_stream.h>
#include <core/fxcrt/cfx_seekablestreamproxy.h>
#include <core/fxcrt/cfx_timer.h>
#include <core/fxcrt/cfx_utf8decoder.h>
#include <core/fxcrt/cfx_utf8encoder.h>
-#include <core/fxcrt/cfx_widetextbuf.h>
#include <core/fxcrt/css/cfx_css.h>
#include <core/fxcrt/css/cfx_csscolorvalue.h>
#include <core/fxcrt/css/cfx_csscomputedstyle.h>
@@ -304,7 +306,12 @@
#include <core/fxcrt/css/cfx_cssvalue.h>
#include <core/fxcrt/css/cfx_cssvaluelist.h>
#include <core/fxcrt/css/cfx_cssvaluelistparser.h>
+#include <core/fxcrt/data_vector.h>
#include <core/fxcrt/fileaccess_iface.h>
+#include <core/fxcrt/fixed_try_alloc_zeroed_data_vector.h>
+#include <core/fxcrt/fixed_uninit_data_vector.h>
+#include <core/fxcrt/fixed_zeroed_data_vector.h>
+#include <core/fxcrt/fx_2d_size.h>
#include <core/fxcrt/fx_bidi.h>
#include <core/fxcrt/fx_codepage.h>
#include <core/fxcrt/fx_coordinates.h>
@@ -317,6 +324,7 @@
#include <core/fxcrt/fx_safe_types.h>
#include <core/fxcrt/fx_stream.h>
#include <core/fxcrt/fx_string.h>
+#include <core/fxcrt/fx_string_wrappers.h>
#include <core/fxcrt/fx_system.h>
#include <core/fxcrt/fx_unicode.h>
#include <core/fxcrt/maybe_owned.h>
@@ -324,12 +332,14 @@
#include <core/fxcrt/pauseindicator_iface.h>
#include <core/fxcrt/retain_ptr.h>
#include <core/fxcrt/scoped_set_insertion.h>
+#include <core/fxcrt/small_buffer.h>
#include <core/fxcrt/span_util.h>
#include <core/fxcrt/stl_util.h>
#include <core/fxcrt/string_data_template.h>
#include <core/fxcrt/string_pool_template.h>
#include <core/fxcrt/unowned_ptr.h>
#include <core/fxcrt/widestring.h>
+#include <core/fxcrt/widetext_buffer.h>
#include <core/fxcrt/xml/cfx_xmlchardata.h>
#include <core/fxcrt/xml/cfx_xmldocument.h>
#include <core/fxcrt/xml/cfx_xmlelement.h>
@@ -338,6 +348,7 @@
#include <core/fxcrt/xml/cfx_xmlparser.h>
#include <core/fxcrt/xml/cfx_xmltext.h>
#include <core/fxge/agg/fx_agg_driver.h>
+#include <core/fxge/calculate_pitch.h>
#include <core/fxge/cfx_cliprgn.h>
#include <core/fxge/cfx_color.h>
#include <core/fxge/cfx_defaultrenderdevice.h>
@@ -373,22 +384,18 @@
#include <core/fxge/dib/fx_dib.h>
#include <core/fxge/dib/scanlinecomposer_iface.h>
#include <core/fxge/fontdata/chromefontdata/chromefontdata.h>
+#include <core/fxge/freetype/fx_freetype.h>
#include <core/fxge/fx_font.h>
-#include <core/fxge/fx_freetype.h>
-#include <core/fxge/render_defines.h>
#include <core/fxge/renderdevicedriver_iface.h>
#include <core/fxge/scoped_font_transform.h>
#include <core/fxge/systemfontinfo_iface.h>
#include <core/fxge/text_char_pos.h>
#include <core/fxge/text_glyph_pos.h>
-#include <fpdfsdk/cpdfsdk_actionhandler.h>
#include <fpdfsdk/cpdfsdk_annot.h>
-#include <fpdfsdk/cpdfsdk_annothandlermgr.h>
#include <fpdfsdk/cpdfsdk_annotiteration.h>
#include <fpdfsdk/cpdfsdk_annotiterator.h>
#include <fpdfsdk/cpdfsdk_appstream.h>
#include <fpdfsdk/cpdfsdk_baannot.h>
-#include <fpdfsdk/cpdfsdk_baannothandler.h>
#include <fpdfsdk/cpdfsdk_customaccess.h>
#include <fpdfsdk/cpdfsdk_filewriteadapter.h>
#include <fpdfsdk/cpdfsdk_formfillenvironment.h>
@@ -398,7 +405,6 @@
#include <fpdfsdk/cpdfsdk_pauseadapter.h>
#include <fpdfsdk/cpdfsdk_renderpage.h>
#include <fpdfsdk/cpdfsdk_widget.h>
-#include <fpdfsdk/cpdfsdk_widgethandler.h>
#include <fpdfsdk/formfiller/cffl_button.h>
#include <fpdfsdk/formfiller/cffl_checkbox.h>
#include <fpdfsdk/formfiller/cffl_combobox.h>
@@ -411,7 +417,6 @@
#include <fpdfsdk/formfiller/cffl_radiobutton.h>
#include <fpdfsdk/formfiller/cffl_textfield.h>
#include <fpdfsdk/formfiller/cffl_textobject.h>
-#include <fpdfsdk/ipdfsdk_annothandler.h>
#include <fpdfsdk/pwl/cpwl_button.h>
#include <fpdfsdk/pwl/cpwl_caret.h>
#include <fpdfsdk/pwl/cpwl_cbbutton.h>
@@ -426,7 +431,6 @@
#include <fpdfsdk/pwl/cpwl_special_button.h>
#include <fpdfsdk/pwl/cpwl_wnd.h>
#include <fpdfsdk/pwl/ipwl_fillernotify.h>
-#include <fpdfsdk/pwl/ipwl_systemhandler.h>
#include <fxjs/cjs_event_context_stub.h>
#include <fxjs/cjs_runtimestub.h>
#include <fxjs/ijs_event_context.h>
@@ -450,6 +454,7 @@
#include <public/fpdf_text.h>
#include <public/fpdf_transformpage.h>
#include <public/fpdfview.h>
+#include <third_party/abseil-cpp/absl/types/optional.h>
#include <third_party/agg23/agg_clip_liang_barsky.h>
#include <third_party/agg23/agg_conv_dash.h>
#include <third_party/agg23/agg_conv_stroke.h>
@@ -459,22 +464,6 @@
#include <third_party/agg23/agg_rasterizer_scanline_aa.h>
#include <third_party/agg23/agg_renderer_scanline.h>
#include <third_party/agg23/agg_scanline_u.h>
-#include <third_party/base/allocator/partition_allocator/address_space_randomization.h>
-#include <third_party/base/allocator/partition_allocator/oom.h>
-#include <third_party/base/allocator/partition_allocator/oom_callback.h>
-#include <third_party/base/allocator/partition_allocator/page_allocator.h>
-#include <third_party/base/allocator/partition_allocator/page_allocator_internal.h>
-#include <third_party/base/allocator/partition_allocator/partition_alloc.h>
-#include <third_party/base/allocator/partition_allocator/partition_alloc_check.h>
-#include <third_party/base/allocator/partition_allocator/partition_alloc_constants.h>
-#include <third_party/base/allocator/partition_allocator/partition_bucket.h>
-#include <third_party/base/allocator/partition_allocator/partition_direct_map_extent.h>
-#include <third_party/base/allocator/partition_allocator/partition_oom.h>
-#include <third_party/base/allocator/partition_allocator/partition_page.h>
-#include <third_party/base/allocator/partition_allocator/partition_root_base.h>
-#include <third_party/base/allocator/partition_allocator/random.h>
-#include <third_party/base/allocator/partition_allocator/spin_lock.h>
-#include <third_party/base/bits.h>
#include <third_party/base/check.h>
#include <third_party/base/check_op.h>
#include <third_party/base/compiler_specific.h>
@@ -487,7 +476,6 @@
#include <third_party/base/notreached.h>
#include <third_party/base/numerics/safe_conversions.h>
#include <third_party/base/numerics/safe_math.h>
-#include <third_party/base/optional.h>
#include <third_party/base/ptr_util.h>
#include <third_party/base/span.h>
#include <third_party/skia_shared/SkFloatToDecimal.h>
diff --git a/external/pdfium/include.patch b/external/pdfium/include.patch
new file mode 100644
index 000000000000..75c0e3b9272a
--- /dev/null
+++ b/external/pdfium/include.patch
@@ -0,0 +1,11 @@
+--- constants/annotation_flags.h
++++ constants/annotation_flags.h
+@@ -5,6 +5,8 @@
+ #ifndef CONSTANTS_ANNOTATION_FLAGS_H_
+ #define CONSTANTS_ANNOTATION_FLAGS_H_
+
++#include <stdint.h>
++
+ namespace pdfium {
+ namespace annotation_flags {
+
diff --git a/external/pdfium/msvc2017.patch.1 b/external/pdfium/msvc2017.patch.1
new file mode 100644
index 000000000000..d19279bd3ca7
--- /dev/null
+++ b/external/pdfium/msvc2017.patch.1
@@ -0,0 +1,15 @@
+--- pdfium/third_party/abseil-cpp/absl/base/policy_checks.h.orig 2023-06-26 19:10:40.362247395 +0200
++++ pdfium/third_party/abseil-cpp/absl/base/policy_checks.h 2023-06-26 19:10:55.204269825 +0200
+@@ -46,9 +46,9 @@
+
+ // We support Visual Studio 2019 (MSVC++ 16.0) and later.
+ // This minimum will go up.
+-#if defined(_MSC_VER) && _MSC_VER < 1920 && !defined(__clang__)
+-#error "This package requires Visual Studio 2019 (MSVC++ 16.0) or higher."
+-#endif
++//#if defined(_MSC_VER) && _MSC_VER < 1920 && !defined(__clang__)
++//#error "This package requires Visual Studio 2019 (MSVC++ 16.0) or higher."
++//#endif
+
+ // We support GCC 7 and later.
+ // This minimum will go up.
diff --git a/external/poppler/README b/external/poppler/README
index 35a640264618..08d3612c3542 100644
--- a/external/poppler/README
+++ b/external/poppler/README
@@ -1 +1 @@
-From [http://poppler.freedesktop.org/]. Not modified. PDF rendering library based on the xpdf-3.0 code base.
+From [https://poppler.freedesktop.org/]. Not modified. PDF rendering library based on the xpdf-3.0 code base.
diff --git a/external/poppler/StaticLibrary_poppler.mk b/external/poppler/StaticLibrary_poppler.mk
index bcb66b49299a..62877a0f0059 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -11,7 +11,10 @@ $(eval $(call gb_StaticLibrary_StaticLibrary,poppler))
$(eval $(call gb_StaticLibrary_use_unpacked,poppler,poppler))
-$(eval $(call gb_StaticLibrary_use_external,poppler,libjpeg))
+$(eval $(call gb_StaticLibrary_use_externals,poppler,\
+ libjpeg \
+ zlib \
+))
$(eval $(call gb_StaticLibrary_set_warnings_disabled,poppler))
@@ -53,24 +56,26 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,poppler,\
))
$(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
+ UnpackedTarball/poppler/goo/gbase64 \
+ UnpackedTarball/poppler/goo/gbasename \
UnpackedTarball/poppler/goo/gfile \
- UnpackedTarball/poppler/goo/GooTimer \
+ UnpackedTarball/poppler/goo/glibc \
+ UnpackedTarball/poppler/goo/glibc_strtok_r \
+ UnpackedTarball/poppler/goo/grandom \
+ UnpackedTarball/poppler/goo/gstrtod \
UnpackedTarball/poppler/goo/GooString \
+ UnpackedTarball/poppler/goo/GooTimer \
+ UnpackedTarball/poppler/goo/ImgWriter \
+ UnpackedTarball/poppler/goo/JpegWriter \
UnpackedTarball/poppler/goo/NetPBMWriter \
UnpackedTarball/poppler/goo/PNGWriter \
UnpackedTarball/poppler/goo/TiffWriter \
- UnpackedTarball/poppler/goo/JpegWriter \
- UnpackedTarball/poppler/goo/ImgWriter \
- UnpackedTarball/poppler/goo/gstrtod \
- UnpackedTarball/poppler/goo/grandom \
- UnpackedTarball/poppler/goo/glibc \
- UnpackedTarball/poppler/goo/glibc_strtok_r \
UnpackedTarball/poppler/fofi/FoFiBase \
UnpackedTarball/poppler/fofi/FoFiEncodings \
+ UnpackedTarball/poppler/fofi/FoFiIdentifier \
UnpackedTarball/poppler/fofi/FoFiTrueType \
UnpackedTarball/poppler/fofi/FoFiType1 \
UnpackedTarball/poppler/fofi/FoFiType1C \
- UnpackedTarball/poppler/fofi/FoFiIdentifier \
UnpackedTarball/poppler/poppler/Annot \
UnpackedTarball/poppler/poppler/AnnotStampImageHelper \
UnpackedTarball/poppler/poppler/Array \
@@ -80,63 +85,65 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/CertificateInfo \
UnpackedTarball/poppler/poppler/CharCodeToUnicode \
UnpackedTarball/poppler/poppler/CMap \
+ UnpackedTarball/poppler/poppler/DCTStream \
UnpackedTarball/poppler/poppler/DateInfo \
UnpackedTarball/poppler/poppler/Decrypt \
UnpackedTarball/poppler/poppler/Dict \
UnpackedTarball/poppler/poppler/Error \
+ UnpackedTarball/poppler/poppler/FDPDFDocBuilder \
+ UnpackedTarball/poppler/poppler/FILECacheLoader \
UnpackedTarball/poppler/poppler/FileSpec \
+ UnpackedTarball/poppler/poppler/FlateEncoder \
UnpackedTarball/poppler/poppler/FontEncodingTables \
- UnpackedTarball/poppler/poppler/Form \
UnpackedTarball/poppler/poppler/FontInfo \
+ UnpackedTarball/poppler/poppler/Form \
UnpackedTarball/poppler/poppler/Function \
UnpackedTarball/poppler/poppler/Gfx \
UnpackedTarball/poppler/poppler/GfxFont \
UnpackedTarball/poppler/poppler/GfxState \
UnpackedTarball/poppler/poppler/GlobalParams \
UnpackedTarball/poppler/poppler/Hints \
+ UnpackedTarball/poppler/poppler/ImageEmbeddingUtils \
UnpackedTarball/poppler/poppler/JArithmeticDecoder \
UnpackedTarball/poppler/poppler/JBIG2Stream \
UnpackedTarball/poppler/poppler/JSInfo \
UnpackedTarball/poppler/poppler/Lexer \
- UnpackedTarball/poppler/poppler/Link \
UnpackedTarball/poppler/poppler/Linearization \
+ UnpackedTarball/poppler/poppler/Link \
UnpackedTarball/poppler/poppler/LocalPDFDocBuilder \
UnpackedTarball/poppler/poppler/MarkedContentOutputDev \
+ UnpackedTarball/poppler/poppler/Movie \
UnpackedTarball/poppler/poppler/NameToCharCode \
UnpackedTarball/poppler/poppler/Object \
UnpackedTarball/poppler/poppler/OptionalContent \
UnpackedTarball/poppler/poppler/Outline \
UnpackedTarball/poppler/poppler/OutputDev \
UnpackedTarball/poppler/poppler/Page \
+ UnpackedTarball/poppler/poppler/PageLabelInfo \
UnpackedTarball/poppler/poppler/PageTransition \
UnpackedTarball/poppler/poppler/Parser \
UnpackedTarball/poppler/poppler/PDFDoc \
UnpackedTarball/poppler/poppler/PDFDocBuilder \
UnpackedTarball/poppler/poppler/PDFDocEncoding \
UnpackedTarball/poppler/poppler/PDFDocFactory \
- UnpackedTarball/poppler/poppler/ProfileData \
UnpackedTarball/poppler/poppler/PreScanOutputDev \
+ UnpackedTarball/poppler/poppler/ProfileData \
+ UnpackedTarball/poppler/poppler/PSOutputDev \
UnpackedTarball/poppler/poppler/PSTokenizer \
+ UnpackedTarball/poppler/poppler/Rendition \
+ UnpackedTarball/poppler/poppler/SecurityHandler \
UnpackedTarball/poppler/poppler/SignatureInfo \
+ UnpackedTarball/poppler/poppler/Sound \
UnpackedTarball/poppler/poppler/Stream \
- UnpackedTarball/poppler/poppler/StructTreeRoot \
UnpackedTarball/poppler/poppler/StructElement \
+ UnpackedTarball/poppler/poppler/StructTreeRoot \
+ UnpackedTarball/poppler/poppler/TextOutputDev \
+ UnpackedTarball/poppler/poppler/UTF \
UnpackedTarball/poppler/poppler/UnicodeMap \
UnpackedTarball/poppler/poppler/UnicodeMapFuncs \
UnpackedTarball/poppler/poppler/UnicodeTypeTable \
- UnpackedTarball/poppler/poppler/UTF \
- UnpackedTarball/poppler/poppler/XRef \
- UnpackedTarball/poppler/poppler/PSOutputDev \
- UnpackedTarball/poppler/poppler/TextOutputDev \
- UnpackedTarball/poppler/poppler/PageLabelInfo \
- UnpackedTarball/poppler/poppler/SecurityHandler \
- UnpackedTarball/poppler/poppler/StdinCachedFile \
- UnpackedTarball/poppler/poppler/StdinPDFDocBuilder \
- UnpackedTarball/poppler/poppler/Sound \
UnpackedTarball/poppler/poppler/ViewerPreferences \
- UnpackedTarball/poppler/poppler/Movie \
- UnpackedTarball/poppler/poppler/Rendition \
- UnpackedTarball/poppler/poppler/DCTStream \
+ UnpackedTarball/poppler/poppler/XRef \
UnpackedTarball/poppler/splash/SplashBitmap \
))
diff --git a/external/poppler/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk
index 68fd06d9403b..cc4f67754a03 100644
--- a/external/poppler/UnpackedTarball_poppler.mk
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -12,6 +12,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,poppler))
$(eval $(call gb_UnpackedTarball_set_tarball,poppler,$(POPPLER_TARBALL),,poppler))
$(eval $(call gb_UnpackedTarball_add_patches,poppler,\
+ external/poppler/disable-freetype.patch.1 \
+ external/poppler/disable-nss-and-gpgmepp.patch.1 \
+ external/poppler/gcc7-EntityInfo.patch.1 \
+ external/poppler/gcc7-GfxFont.patch.1 \
external/poppler/poppler-config.patch.1 \
))
diff --git a/external/poppler/disable-freetype.patch.1 b/external/poppler/disable-freetype.patch.1
new file mode 100644
index 000000000000..3c4d1d0f7a8a
--- /dev/null
+++ b/external/poppler/disable-freetype.patch.1
@@ -0,0 +1,41 @@
+disable freetype dependent code
+
+--- poppler/poppler/Form.cc.orig 2023-06-05 19:29:14.000000000 +0900
++++ poppler/poppler/Form.cc 2023-06-14 18:50:22.232312300 +0900
+@@ -48,7 +48,7 @@
+ #include <cstdlib>
+ #include <cstring>
+ #include <cctype>
+-#include "goo/ft_utils.h"
++//#include "goo/ft_utils.h"
+ #include "goo/gmem.h"
+ #include "goo/gfile.h"
+ #include "goo/GooString.h"
+@@ -78,8 +78,8 @@
+ #include "fofi/FoFiTrueType.h"
+ #include "fofi/FoFiIdentifier.h"
+
+-#include <ft2build.h>
+-#include FT_FREETYPE_H
++//#include <ft2build.h>
++//#include FT_FREETYPE_H
+ #include <unordered_set>
+
+ // helper for using std::visit to get a dependent false for static_asserts
+@@ -2760,6 +2760,8 @@
+
+ Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath, int faceIndex, const std::string &fontFamily, const std::string &fontStyle, bool forceName)
+ {
++ return {};
++#if 0
+ if (!GooString::endsWith(filepath, ".ttf") && !GooString::endsWith(filepath, ".ttc") && !GooString::endsWith(filepath, ".otf")) {
+ error(errIO, -1, "We only support embedding ttf/ttc/otf fonts for now. The font file for {0:s} {1:s} was {2:s}", fontFamily.c_str(), fontStyle.c_str(), filepath.c_str());
+ return {};
+@@ -2994,6 +2996,7 @@
+ }
+
+ return { dictFontName, fontDictRef };
++#endif
+ }
+
+ std::string Form::getFallbackFontForChar(Unicode uChar, const GfxFont &fontToEmulate) const
diff --git a/external/poppler/disable-nss-and-gpgmepp.patch.1 b/external/poppler/disable-nss-and-gpgmepp.patch.1
new file mode 100644
index 000000000000..01b442f53a1c
--- /dev/null
+++ b/external/poppler/disable-nss-and-gpgmepp.patch.1
@@ -0,0 +1,76 @@
+disable NSS/GPGMEPP dependent code.
+
+--- poppler/poppler/Form.cc.orig 2023-06-05 19:29:14.000000000 +0900
++++ poppler/poppler/Form.cc 2023-06-17 16:51:27.873431500 +0900
+@@ -64,7 +64,7 @@
+ #include "Form.h"
+ #include "PDFDoc.h"
+ #include "DateInfo.h"
+-#include "CryptoSignBackend.h"
++/*#include "CryptoSignBackend.h"*/
+ #include "SignatureInfo.h"
+ #include "CertificateInfo.h"
+ #include "XRef.h"
+@@ -577,7 +577,7 @@
+ {
+ return static_cast<FormFieldSignature *>(field)->validateSignature(doVerifyCert, forceRevalidation, validationTime, ocspRevocationCheck, enableAIA);
+ }
+-
++#if 0
+ // update hash with the specified range of data from the file
+ static bool hashFileRange(FILE *f, CryptoSign::SigningInterface *handler, Goffset start, Goffset end)
+ {
+@@ -607,10 +607,12 @@
+ delete[] buf;
+ return true;
+ }
++#endif
+
+ bool FormWidgetSignature::signDocument(const std::string &saveFilename, const std::string &certNickname, const std::string &password, const GooString *reason, const GooString *location, const std::optional<GooString> &ownerPassword,
+ const std::optional<GooString> &userPassword)
+ {
++#if 0
+ auto backend = CryptoSign::Factory::createActive();
+ if (!backend) {
+ return false;
+@@ -698,6 +700,8 @@
+ fclose(file);
+
+ return true;
++#endif
++ return false;
+ }
+
+ bool FormWidgetSignature::signDocumentWithAppearance(const std::string &saveFilename, const std::string &certNickname, const std::string &password, const GooString *reason, const GooString *location,
+@@ -2316,6 +2320,7 @@
+
+ void FormFieldSignature::hashSignedDataBlock(CryptoSign::VerificationInterface *handler, Goffset block_len)
+ {
++#if 0
+ if (!handler) {
+ return;
+ }
+@@ -2335,6 +2340,7 @@
+ i += BLOCK_SIZE;
+ }
+ }
++#endif
+ }
+
+ FormSignatureType FormWidgetSignature::signatureType() const
+@@ -2349,6 +2355,7 @@
+
+ SignatureInfo *FormFieldSignature::validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime, bool ocspRevocationCheck, bool enableAIA)
+ {
++#if 0
+ auto backend = CryptoSign::Factory::createActive();
+ if (!backend) {
+ return signature_info;
+@@ -2425,6 +2432,7 @@
+ const CertificateValidationStatus cert_val_state = signature_handler->validateCertificate(std::chrono::system_clock::from_time_t(validationTime), ocspRevocationCheck, enableAIA);
+ signature_info->setCertificateValStatus(cert_val_state);
+
++#endif
+ return signature_info;
+ }
+
diff --git a/external/poppler/gcc7-EntityInfo.patch.1 b/external/poppler/gcc7-EntityInfo.patch.1
new file mode 100644
index 000000000000..1dd7c83ad475
--- /dev/null
+++ b/external/poppler/gcc7-EntityInfo.patch.1
@@ -0,0 +1,55 @@
+gcc 7.3.1 says:
+
+workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc:42:34: error: function ‘X509CertificateInfo::EntityInfo& X509CertificateInfo::EntityInfo::operator=(X509CertificateInfo::EntityInfo&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
+
+workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc: In member function ‘void X509CertificateInfo::setPublicKeyInfo(X509CertificateInfo::PublicKeyInfo&&)’:
+workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc:106:39: error: use of deleted function ‘X509CertificateInfo::PublicKeyInfo& X509CertificateInfo::PublicKeyInfo::operator=(X509CertificateInfo::PublicKeyInfo&&)’
+ public_key_info = std::move(pkInfo);
+ ^
+In file included from workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc:15:0:
+workdir/UnpackedTarball/poppler/poppler/CertificateInfo.h:58:24: note: ‘X509CertificateInfo::PublicKeyInfo& X509CertificateInfo::PublicKeyInfo::operator=(X509CertificateInfo::PublicKeyInfo&&) noexcept’ is implicitly deleted because its exception-specification does not match the implicit exception-specification ‘’
+ PublicKeyInfo &operator=(PublicKeyInfo &&) noexcept = default;
+ ^~~~~~~~
+
+--- poppler/poppler/CertificateInfo.h.orig 2023-06-05 19:29:14.000000000 +0900
++++ poppler/poppler/CertificateInfo.h 2023-06-19 18:10:55.760031700 +0900
+@@ -55,7 +55,7 @@
+ PublicKeyInfo() = default;
+
+ PublicKeyInfo(PublicKeyInfo &&) noexcept = default;
+- PublicKeyInfo &operator=(PublicKeyInfo &&) noexcept = default;
++ PublicKeyInfo &operator=(PublicKeyInfo &&) /*noexcept*/ = default;
+
+ PublicKeyInfo(const PublicKeyInfo &) = delete;
+ PublicKeyInfo &operator=(const PublicKeyInfo &) = delete;
+@@ -71,7 +71,7 @@
+ ~EntityInfo() = default;
+
+ EntityInfo(EntityInfo &&) noexcept = default;
+- EntityInfo &operator=(EntityInfo &&) noexcept = default;
++ EntityInfo &operator=(EntityInfo &&) /*noexcept*/ = default;
+
+ EntityInfo(const EntityInfo &) = delete;
+ EntityInfo &operator=(const EntityInfo &) = delete;
+--- poppler/poppler/GfxFont.cc.orig 2022-09-14 20:24:32.569607333 +0200
++++ poppler/poppler/GfxFont.cc 2022-09-14 20:24:52.323596186 +0200
+@@ -180,7 +180,7 @@
+
+ GfxFontLoc::GfxFontLoc(GfxFontLoc &&other) noexcept = default;
+
+-GfxFontLoc &GfxFontLoc::operator=(GfxFontLoc &&other) noexcept = default;
++GfxFontLoc &GfxFontLoc::operator=(GfxFontLoc &&other) /*noexcept*/ = default;
+
+ void GfxFontLoc::setPath(GooString *pathA)
+ {
+--- poppler/poppler/GfxFont.h.orig 2022-09-14 20:24:30.784608340 +0200
++++ poppler/poppler/GfxFont.h 2022-09-14 20:25:08.850586861 +0200
+@@ -124,7 +124,7 @@
+ GfxFontLoc(const GfxFontLoc &) = delete;
+ GfxFontLoc(GfxFontLoc &&) noexcept;
+ GfxFontLoc &operator=(const GfxFontLoc &) = delete;
+- GfxFontLoc &operator=(GfxFontLoc &&other) noexcept;
++ GfxFontLoc &operator=(GfxFontLoc &&other) /*noexcept*/;
+
+ // Set the 'path' string from a GooString on the heap.
+ // Ownership of the object is taken.
diff --git a/external/poppler/gcc7-GfxFont.patch.1 b/external/poppler/gcc7-GfxFont.patch.1
new file mode 100644
index 000000000000..a240b1b8bad2
--- /dev/null
+++ b/external/poppler/gcc7-GfxFont.patch.1
@@ -0,0 +1,94 @@
+Revert of upstream: https://gitlab.freedesktop.org/poppler/poppler/-/commit/d5ea5a24124badf2b32a7d08dd2c06a4a40f93fb
+
+gcc 7.5.0 says:
+
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc: In member function ‘std::optional<GfxFontLoc> GfxFont::locateFont(XRef*, PSOutputDev*)’:
+/home/taichi/libo-core/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:660:24: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:671:16: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:680:16: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+libo-core/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:711:24: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:723:20: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:752:20: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc: In static member function ‘static std::optional<GfxFontLoc> GfxFont::getExternalFont(GooString*, bool)’:
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:814:12: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+
+diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
+index cc2ce038..b0d0d610 100644
+--- a/poppler/GfxFont.cc
++++ b/poppler/GfxFont.cc
+@@ -657,7 +657,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.locType = gfxFontLocEmbedded;
+ fontLoc.fontType = type;
+ fontLoc.embFontID = embFontID;
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+ }
+ }
+@@ -668,7 +668,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.locType = gfxFontLocResident;
+ fontLoc.fontType = fontType1;
+ fontLoc.path = *name;
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+
+ //----- PS resident Base-14 font
+@@ -677,7 +677,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.locType = gfxFontLocResident;
+ fontLoc.fontType = fontType1;
+ fontLoc.path = ((Gfx8BitFont *)this)->base14->base14Name;
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+
+ //----- external font file (fontFile, fontDir)
+@@ -708,7 +708,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.fontType = fontCIDType2;
+ fontLoc.setPath(path);
+ fontLoc.fontNum = fontNum;
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+ } else {
+ GfxFontLoc fontLoc;
+@@ -720,7 +720,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.fontType = fontType1;
+ fontLoc.fontNum = fontNum;
+ }
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+ delete path;
+ }
+@@ -749,7 +749,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.fontType = fontType1;
+ fontLoc.path = substName;
+ fontLoc.substIdx = substIdx;
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ } else {
+ path = globalParams->findFontFile(substName);
+ if (path) {
+@@ -811,7 +811,7 @@ std::optional<GfxFontLoc> GfxFont::getExternalFont(GooString *path, bool cid)
+ fontLoc.locType = gfxFontLocExternal;
+ fontLoc.fontType = fontType;
+ fontLoc.setPath(path);
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+
+ std::optional<std::vector<unsigned char>> GfxFont::readEmbFontFile(XRef *xref)
diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1
index 2a24d4510197..8f71e987b2b9 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -2,7 +2,7 @@
note: to get the 3rd one, use -DENABLE_CPP=on
-mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off
+mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_GPGME=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off -DENABLE_QT6=off
manually disabled these because cmake failed to do it:
HAVE_CAIRO
@@ -16,7 +16,7 @@ new file mode 100644
index 0fbd336a..451213f8 100644
--- /dev/null
+++ b/config.h
-@@ -0,0 +1,223 @@
+@@ -0,0 +1,229 @@
+/* config.h. Generated from config.h.cmake by cmake. */
+
+/* Build against libcurl. */
@@ -37,15 +37,21 @@ index 0fbd336a..451213f8 100644
+/* Do not hardcode the library location */
+/* #undef ENABLE_RELOCATABLE */
+
-+/* Build against zlib. */
-+/* #undef ENABLE_ZLIB */
-+
+/* Use zlib instead of builtin zlib decoder to uncompress flate streams. */
+/* #undef ENABLE_ZLIB_UNCOMPRESS */
+
+/* Build against libnss3 for digital signature validation */
+/* #define ENABLE_NSS3 1 */
+
++/* Build against libgpgme for digital signature validation */
++/* #undef ENABLE_GPGME */
++
++/* Signatures enabled */
++/* #define ENABLE_SIGNATURES 1 */
++
++/* Default signature backend */
++/* #define DEFAULT_SIGNATURE_BACKEND "NSS" */
++
+/* Use cairo for rendering. */
+/* #define HAVE_CAIRO 1 */
+
@@ -105,9 +111,6 @@ index 0fbd336a..451213f8 100644
+#define HAVE_TIMEGM 1
+#endif
+
-+/* Define if you have the iconv() function and it works. */
-+/* #undef HAVE_ICONV */
-+
+/* Define to 1 if you have the `z' library (-lz). */
+/* #undef HAVE_LIBZ */
+
@@ -176,7 +179,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_NAME "poppler"
+
+/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "poppler 21.11.0"
++#define PACKAGE_STRING "poppler 23.09.0"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "poppler"
@@ -185,7 +188,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
-+#define PACKAGE_VERSION "21.11.0"
++#define PACKAGE_VERSION "23.09.0"
+
+/* Poppler data dir */
+#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -203,12 +206,15 @@ index 0fbd336a..451213f8 100644
+/* #undef USE_FLOAT */
+
+/* Version number of package */
-+#define VERSION "21.11.0"
++#define VERSION "23.09.0"
+
+#if defined(__APPLE__)
+#elif defined (_WIN32)
+/* Use win32 font configuration backend */
+#define WITH_FONTCONFIGURATION_WIN32 1
++#elif defined (__ANDROID__)
++/* Use android font configuration backend */
++#define WITH_FONTCONFIGURATION_ANDROID 1
+#else
+/* Use fontconfig font configuration backend */
+#define WITH_FONTCONFIGURATION_FONTCONFIG 1
@@ -229,7 +235,7 @@ index 0fbd336a..451213f8 100644
+#define popen _popen
+#define pclose _pclose
+#define strncasecmp _strnicmp
-+// error C4005: "strcasecmp": macro redefinition #define strcasecmp _stricmp
++#define strcasecmp _stricmp
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
@@ -245,12 +251,12 @@ new file mode 100644
index 0fbd336a..451213f8 100644
--- /dev/null
+++ b/poppler/poppler-config.h
-@@ -0,0 +1,161 @@
+@@ -0,0 +1,156 @@
+//================================================= -*- mode: c++ -*- ====
+//
+// poppler-config.h
+//
-+// Copyright 1996-2011 Glyph & Cog, LLC
++// Copyright 1996-2011, 2022 Glyph & Cog, LLC
+//
+//========================================================================
+
@@ -284,7 +290,7 @@ index 0fbd336a..451213f8 100644
+
+/* Defines the poppler version. */
+#ifndef POPPLER_VERSION
-+#define POPPLER_VERSION "21.11.0"
++#define POPPLER_VERSION "23.09.0"
+#endif
+
+/* Use single precision arithmetic in the Splash backend */
@@ -322,11 +328,6 @@ index 0fbd336a..451213f8 100644
+/* #define ENABLE_LIBPNG 1 */
+#endif
+
-+/* Use zlib instead of builtin zlib decoder. */
-+#ifndef ENABLE_ZLIB
-+/* #undef ENABLE_ZLIB */
-+#endif
-+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#ifndef HAVE_DIRENT_H
@@ -376,8 +377,8 @@ index 0fbd336a..451213f8 100644
+//------------------------------------------------------------------------
+
+// copyright notice
-+#define popplerCopyright "Copyright 2005-2021 The Poppler Developers - http://poppler.freedesktop.org"
-+#define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC"
++#define popplerCopyright "Copyright 2005-2023 The Poppler Developers - http://poppler.freedesktop.org"
++#define xpdfCopyright "Copyright 1996-2011, 2022 Glyph & Cog, LLC"
+
+//------------------------------------------------------------------------
+// Win32 stuff
@@ -436,9 +437,9 @@ index 0fbd336a..451213f8 100644
+
+#include "poppler-global.h"
+
-+#define POPPLER_VERSION "21.11.0"
-+#define POPPLER_VERSION_MAJOR 21
-+#define POPPLER_VERSION_MINOR 11
++#define POPPLER_VERSION "23.09.0"
++#define POPPLER_VERSION_MAJOR 23
++#define POPPLER_VERSION_MINOR 9
+#define POPPLER_VERSION_MICRO 0
+
+namespace poppler
diff --git a/external/postgresql/ExternalProject_postgresql.mk b/external/postgresql/ExternalProject_postgresql.mk
index 9df01cae9ef3..377f02c0174c 100644
--- a/external/postgresql/ExternalProject_postgresql.mk
+++ b/external/postgresql/ExternalProject_postgresql.mk
@@ -43,7 +43,7 @@ endif
ifeq ($(DISABLE_OPENSSL),)
ifeq ($(SYSTEM_OPENSSL),)
postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openssl)/include
-postgresql_LDFLAGS += -L$(call gb_UnpackedTarball_get_dir,openssl)/
+postgresql_LDFLAGS += -L$(call gb_UnpackedTarball_get_dir,openssl)/ $(if $(filter $(OS),LINUX),-pthread)
endif
endif
diff --git a/external/postgresql/postgres-msvc-build.patch.1 b/external/postgresql/postgres-msvc-build.patch.1
index 4ccd82aa28fb..c217a755918b 100644
--- a/external/postgresql/postgres-msvc-build.patch.1
+++ b/external/postgresql/postgres-msvc-build.patch.1
@@ -80,7 +80,7 @@ Also Cygwin perl has $Config{osname} different from MSWin32, and why even check
# Quote the .exe name in case it has spaces
my $opensslcmd =
- qq("$self->{options}->{openssl}\\bin\\openssl.exe" version 2>&1);
-+ qq("$self->{options}->{openssl}\\out32dll\\openssl.exe" version 2>&1);
++ qq("$self->{options}->{openssl}\\apps\\openssl.exe" version 2>&1);
+ print "$opensslcmd";
my $sslout = `$opensslcmd`;
@@ -101,10 +101,10 @@ Also Cygwin perl has $Config{osname} different from MSWin32, and why even check
# parameter.
$proj->AddLibrary(
- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0);
-+ $self->{options}->{openssl} . '\out32dll\ssleay32.lib', 0);
++ $self->{options}->{openssl} . '\ssleay32.lib', 0);
$proj->AddLibrary(
- $self->{options}->{openssl} . '\lib\libeay32.lib', 0);
-+ $self->{options}->{openssl} . '\out32dll\libeay32.lib', 0);
++ $self->{options}->{openssl} . '\libeay32.lib', 0);
}
}
}
diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk
index 4dfc3b196f82..833fe24f7bb3 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -25,17 +25,14 @@ endif
$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
PCbuild/$(python_arch_subdir)_asyncio$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_ctypes$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
- PCbuild/$(python_arch_subdir)_ctypes_test$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_decimal$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_elementtree$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_msi$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_multiprocessing$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
+ PCbuild/$(python_arch_subdir)_overlapped$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_queue$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_socket$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_ssl$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
- PCbuild/$(python_arch_subdir)_testbuffer$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
- PCbuild/$(python_arch_subdir)_testcapi$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
- PCbuild/$(python_arch_subdir)_testconsole$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)pyexpat$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)select$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)unicodedata$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
@@ -44,8 +41,8 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
else
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).so,libpython$(PYTHON_VERSION_MAJOR).so))
-$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so))
-$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so.1.0-gdb.py,Tools/gdb/libpython.py))
+$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so))
+$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so.1.0-gdb.py,Tools/gdb/libpython.py))
# Unfortunately the python build system does not allow to explicitly enable or
# disable these, it just tries to build them and then prints which did not
@@ -56,70 +53,68 @@ $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(
ifneq ($(OS),AIX)
$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/lib-dynload,\
- LO_lib/array.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_asyncio.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/audioop.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/binascii.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_bisect.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_blake2.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/cmath.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_cn.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_hk.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_iso2022.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_jp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_kr.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_tw.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_contextvars.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_crypt.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_csv.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_ctypes.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_ctypes_test.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_datetime.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_decimal.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_elementtree.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/fcntl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/grp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
+ LO_lib/array.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_asyncio.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/audioop.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/binascii.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_bisect.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_blake2.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/cmath.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_cn.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_hk.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_iso2022.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_jp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_kr.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_tw.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_contextvars.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_crypt.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_csv.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_ctypes.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_datetime.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_decimal.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_elementtree.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/fcntl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/grp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
$(if $(DISABLE_OPENSSL),, \
- LO_lib/_hashlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
+ LO_lib/_hashlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
) \
- LO_lib/_heapq.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_json.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_lsprof.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/math.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_md5.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/mmap.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_multibytecodec.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_multiprocessing.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_opcode.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/ossaudiodev.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/parser.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_pickle.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_posixsubprocess.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/pyexpat.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_queue.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_random.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/resource.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/select.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_sha1.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_sha256.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_sha3.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_sha512.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_socket.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/spwd.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
+ LO_lib/_heapq.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_json.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_lsprof.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/math.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_md5.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/mmap.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_multibytecodec.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_multiprocessing.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_opcode.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/ossaudiodev.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/parser.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_pickle.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_posixshmem.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_posixsubprocess.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/pyexpat.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_queue.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_random.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/resource.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/select.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_sha1.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_sha256.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_sha3.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_sha512.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_socket.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/spwd.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
$(if $(DISABLE_OPENSSL),, \
- LO_lib/_ssl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
+ LO_lib/_ssl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
) \
- LO_lib/_struct.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/syslog.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/termios.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_testbuffer.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_testcapi.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_testimportmultiple.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_testmultiphase.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/unicodedata.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/xxlimited.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_xxtestfuzz.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/zlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
+ LO_lib/_statistics.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_struct.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/syslog.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/termios.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/unicodedata.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/xxlimited.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_xxsubinterpreters.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_xxtestfuzz.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/zlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
))
endif
endif
@@ -140,7 +135,7 @@ endif
# put -pc in its linux platform triplets, so filter that...
ifneq ($(OS),WNT)
$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
- LO_lib/_sysconfigdata_m_$(python3_MACHDEP)_$(subst i686,i386,$(subst -pc,,$(HOST_PLATFORM))).py \
+ LO_lib/_sysconfigdata__$(python3_MACHDEP)_$(subst i686,i386,$(subst -pc,,$(HOST_PLATFORM))).py \
))
endif
@@ -150,6 +145,10 @@ endif
# idlelib, tkinter, turtledemo - need Tk to build the C module
# test - probably unnecessary? was explicitly removed #i116738#
# venv - why would we need virtual environments
+#
+# These lists are now sorted with "LC_COLLATE=C sort", by using
+# find Lib/ -name "*.py" | sort | sed -e 's/^/\t/' -e 's/$/ \\/'
+#
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
LICENSE \
@@ -162,6 +161,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/_dummy_thread.py \
Lib/_markupbase.py \
Lib/_osx_support.py \
+ Lib/_py_abc.py \
Lib/_pydecimal.py \
Lib/_pyio.py \
Lib/_sitebuiltins.py \
@@ -180,6 +180,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/binhex.py \
Lib/bisect.py \
Lib/bz2.py \
+ Lib/cProfile.py \
Lib/calendar.py \
Lib/cgi.py \
Lib/cgitb.py \
@@ -195,7 +196,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/contextvars.py \
Lib/copy.py \
Lib/copyreg.py \
- Lib/cProfile.py \
Lib/crypt.py \
Lib/csv.py \
Lib/dataclasses.py \
@@ -232,7 +232,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/linecache.py \
Lib/locale.py \
Lib/lzma.py \
- Lib/macpath.py \
Lib/mailbox.py \
Lib/mailcap.py \
Lib/mimetypes.py \
@@ -260,21 +259,20 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/profile.py \
Lib/pstats.py \
Lib/pty.py \
- Lib/pyclbr.py \
- Lib/_py_abc.py \
Lib/py_compile.py \
+ Lib/pyclbr.py \
Lib/pydoc.py \
Lib/queue.py \
Lib/quopri.py \
Lib/random.py \
- Lib/reprlib.py \
Lib/re.py \
+ Lib/reprlib.py \
Lib/rlcompleter.py \
Lib/runpy.py \
Lib/sched.py \
Lib/secrets.py \
- Lib/shelve.py \
Lib/selectors.py \
+ Lib/shelve.py \
Lib/shlex.py \
Lib/shutil.py \
Lib/signal.py \
@@ -288,10 +286,10 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/sre_constants.py \
Lib/sre_parse.py \
Lib/ssl.py \
- Lib/statistics.py \
Lib/stat.py \
- Lib/stringprep.py \
+ Lib/statistics.py \
Lib/string.py \
+ Lib/stringprep.py \
Lib/struct.py \
Lib/subprocess.py \
Lib/sunau.py \
@@ -306,10 +304,11 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/this.py \
Lib/threading.py \
Lib/timeit.py \
- Lib/tokenize.py \
Lib/token.py \
- Lib/traceback.py \
+ Lib/tokenize.py \
Lib/trace.py \
+ Lib/traceback.py \
+ Lib/tracemalloc.py \
Lib/tty.py \
Lib/turtle.py \
Lib/types.py \
@@ -321,14 +320,41 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/weakref.py \
Lib/webbrowser.py \
Lib/xdrlib.py \
+ Lib/zipapp.py \
Lib/zipfile.py \
+ Lib/zipimport.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/asyncio,\
+ Lib/asyncio/__init__.py \
+ Lib/asyncio/__main__.py \
+ Lib/asyncio/base_events.py \
Lib/asyncio/base_futures.py \
+ Lib/asyncio/base_subprocess.py \
Lib/asyncio/base_tasks.py \
+ Lib/asyncio/constants.py \
+ Lib/asyncio/coroutines.py \
+ Lib/asyncio/events.py \
+ Lib/asyncio/exceptions.py \
Lib/asyncio/format_helpers.py \
+ Lib/asyncio/futures.py \
+ Lib/asyncio/locks.py \
+ Lib/asyncio/log.py \
+ Lib/asyncio/proactor_events.py \
+ Lib/asyncio/protocols.py \
+ Lib/asyncio/queues.py \
Lib/asyncio/runners.py \
+ Lib/asyncio/selector_events.py \
+ Lib/asyncio/sslproto.py \
+ Lib/asyncio/staggered.py \
+ Lib/asyncio/streams.py \
+ Lib/asyncio/subprocess.py \
+ Lib/asyncio/tasks.py \
+ Lib/asyncio/transports.py \
+ Lib/asyncio/trsock.py \
+ Lib/asyncio/unix_events.py \
+ Lib/asyncio/windows_events.py \
+ Lib/asyncio/windows_utils.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/collections,\
@@ -383,8 +409,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/distutils/errors.py \
Lib/distutils/extension.py \
Lib/distutils/fancy_getopt.py \
- Lib/distutils/filelist.py \
Lib/distutils/file_util.py \
+ Lib/distutils/filelist.py \
Lib/distutils/log.py \
Lib/distutils/msvc9compiler.py \
Lib/distutils/msvccompiler.py \
@@ -393,44 +419,44 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/distutils/text_file.py \
Lib/distutils/unixccompiler.py \
Lib/distutils/util.py \
- Lib/distutils/versionpredicate.py \
Lib/distutils/version.py \
+ Lib/distutils/versionpredicate.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/distutils/command,\
Lib/distutils/command/__init__.py \
+ Lib/distutils/command/bdist.py \
Lib/distutils/command/bdist_dumb.py \
Lib/distutils/command/bdist_msi.py \
- Lib/distutils/command/bdist.py \
Lib/distutils/command/bdist_rpm.py \
Lib/distutils/command/bdist_wininst.py \
+ Lib/distutils/command/build.py \
Lib/distutils/command/build_clib.py \
Lib/distutils/command/build_ext.py \
- Lib/distutils/command/build.py \
Lib/distutils/command/build_py.py \
Lib/distutils/command/build_scripts.py \
Lib/distutils/command/check.py \
Lib/distutils/command/clean.py \
Lib/distutils/command/command_template \
Lib/distutils/command/config.py \
+ Lib/distutils/command/install.py \
Lib/distutils/command/install_data.py \
Lib/distutils/command/install_egg_info.py \
Lib/distutils/command/install_headers.py \
Lib/distutils/command/install_lib.py \
- Lib/distutils/command/install.py \
Lib/distutils/command/install_scripts.py \
Lib/distutils/command/register.py \
Lib/distutils/command/sdist.py \
Lib/distutils/command/upload.py \
- Lib/distutils/command/wininst-10.0-amd64.exe \
Lib/distutils/command/wininst-10.0.exe \
- Lib/distutils/command/wininst-14.0-amd64.exe \
+ Lib/distutils/command/wininst-10.0-amd64.exe \
Lib/distutils/command/wininst-14.0.exe \
+ Lib/distutils/command/wininst-14.0-amd64.exe \
Lib/distutils/command/wininst-6.0.exe \
Lib/distutils/command/wininst-7.1.exe \
Lib/distutils/command/wininst-8.0.exe \
- Lib/distutils/command/wininst-9.0-amd64.exe \
Lib/distutils/command/wininst-9.0.exe \
+ Lib/distutils/command/wininst-9.0-amd64.exe \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/email,\
@@ -474,8 +500,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/encodings/aliases.py \
Lib/encodings/ascii.py \
Lib/encodings/base64_codec.py \
- Lib/encodings/big5hkscs.py \
Lib/encodings/big5.py \
+ Lib/encodings/big5hkscs.py \
Lib/encodings/bz2_codec.py \
Lib/encodings/charmap.py \
Lib/encodings/cp037.py \
@@ -492,10 +518,10 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/encodings/cp1256.py \
Lib/encodings/cp1257.py \
Lib/encodings/cp1258.py \
+ Lib/encodings/cp273.py \
Lib/encodings/cp424.py \
Lib/encodings/cp437.py \
Lib/encodings/cp500.py \
- Lib/encodings/cp65001.py \
Lib/encodings/cp720.py \
Lib/encodings/cp737.py \
Lib/encodings/cp775.py \
@@ -529,20 +555,20 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/encodings/hp_roman8.py \
Lib/encodings/hz.py \
Lib/encodings/idna.py \
+ Lib/encodings/iso2022_jp.py \
Lib/encodings/iso2022_jp_1.py \
- Lib/encodings/iso2022_jp_2004.py \
Lib/encodings/iso2022_jp_2.py \
+ Lib/encodings/iso2022_jp_2004.py \
Lib/encodings/iso2022_jp_3.py \
Lib/encodings/iso2022_jp_ext.py \
- Lib/encodings/iso2022_jp.py \
Lib/encodings/iso2022_kr.py \
+ Lib/encodings/iso8859_1.py \
Lib/encodings/iso8859_10.py \
Lib/encodings/iso8859_11.py \
Lib/encodings/iso8859_13.py \
Lib/encodings/iso8859_14.py \
Lib/encodings/iso8859_15.py \
Lib/encodings/iso8859_16.py \
- Lib/encodings/iso8859_1.py \
Lib/encodings/iso8859_2.py \
Lib/encodings/iso8859_3.py \
Lib/encodings/iso8859_4.py \
@@ -565,8 +591,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/encodings/mac_greek.py \
Lib/encodings/mac_iceland.py \
Lib/encodings/mac_latin2.py \
- Lib/encodings/mac_romanian.py \
Lib/encodings/mac_roman.py \
+ Lib/encodings/mac_romanian.py \
Lib/encodings/mac_turkish.py \
Lib/encodings/mbcs.py \
Lib/encodings/oem.py \
@@ -576,19 +602,18 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/encodings/quopri_codec.py \
Lib/encodings/raw_unicode_escape.py \
Lib/encodings/rot_13.py \
- Lib/encodings/shift_jis_2004.py \
Lib/encodings/shift_jis.py \
+ Lib/encodings/shift_jis_2004.py \
Lib/encodings/shift_jisx0213.py \
Lib/encodings/tis_620.py \
Lib/encodings/undefined.py \
Lib/encodings/unicode_escape.py \
- Lib/encodings/unicode_internal.py \
+ Lib/encodings/utf_16.py \
Lib/encodings/utf_16_be.py \
Lib/encodings/utf_16_le.py \
- Lib/encodings/utf_16.py \
+ Lib/encodings/utf_32.py \
Lib/encodings/utf_32_be.py \
Lib/encodings/utf_32_le.py \
- Lib/encodings/utf_32.py \
Lib/encodings/utf_7.py \
Lib/encodings/utf_8.py \
Lib/encodings/utf_8_sig.py \
@@ -616,6 +641,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/importlib/_bootstrap_external.py \
Lib/importlib/abc.py \
Lib/importlib/machinery.py \
+ Lib/importlib/metadata.py \
Lib/importlib/resources.py \
Lib/importlib/util.py \
))
@@ -652,8 +678,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/lib2to3/fixes/fix_buffer.py \
Lib/lib2to3/fixes/fix_dict.py \
Lib/lib2to3/fixes/fix_except.py \
- Lib/lib2to3/fixes/fix_execfile.py \
Lib/lib2to3/fixes/fix_exec.py \
+ Lib/lib2to3/fixes/fix_execfile.py \
Lib/lib2to3/fixes/fix_exitfunc.py \
Lib/lib2to3/fixes/fix_filter.py \
Lib/lib2to3/fixes/fix_funcattrs.py \
@@ -662,13 +688,13 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/lib2to3/fixes/fix_has_key.py \
Lib/lib2to3/fixes/fix_idioms.py \
Lib/lib2to3/fixes/fix_import.py \
- Lib/lib2to3/fixes/fix_imports2.py \
Lib/lib2to3/fixes/fix_imports.py \
+ Lib/lib2to3/fixes/fix_imports2.py \
Lib/lib2to3/fixes/fix_input.py \
Lib/lib2to3/fixes/fix_intern.py \
Lib/lib2to3/fixes/fix_isinstance.py \
- Lib/lib2to3/fixes/fix_itertools_imports.py \
Lib/lib2to3/fixes/fix_itertools.py \
+ Lib/lib2to3/fixes/fix_itertools_imports.py \
Lib/lib2to3/fixes/fix_long.py \
Lib/lib2to3/fixes/fix_map.py \
Lib/lib2to3/fixes/fix_metaclass.py \
@@ -708,8 +734,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/lib2to3/pgen2/literals.py \
Lib/lib2to3/pgen2/parse.py \
Lib/lib2to3/pgen2/pgen.py \
- Lib/lib2to3/pgen2/tokenize.py \
Lib/lib2to3/pgen2/token.py \
+ Lib/lib2to3/pgen2/tokenize.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/logging,\
@@ -718,13 +744,25 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/logging/handlers.py \
))
+ifeq (WNT,$(OS))
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/msilib,\
+ Lib/msilib/__init__.py \
+ Lib/msilib/schema.py \
+ Lib/msilib/sequence.py \
+ Lib/msilib/text.py \
+))
+endif
+
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/multiprocessing,\
Lib/multiprocessing/__init__.py \
Lib/multiprocessing/connection.py \
Lib/multiprocessing/context.py \
+ Lib/multiprocessing/dummy/__init__.py \
+ Lib/multiprocessing/dummy/connection.py \
Lib/multiprocessing/forkserver.py \
Lib/multiprocessing/heap.py \
Lib/multiprocessing/managers.py \
+ Lib/multiprocessing/pool.py \
Lib/multiprocessing/popen_fork.py \
Lib/multiprocessing/popen_forkserver.py \
Lib/multiprocessing/popen_spawn_posix.py \
@@ -733,7 +771,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/multiprocessing/queues.py \
Lib/multiprocessing/reduction.py \
Lib/multiprocessing/resource_sharer.py \
- Lib/multiprocessing/semaphore_tracker.py \
+ Lib/multiprocessing/resource_tracker.py \
+ Lib/multiprocessing/shared_memory.py \
Lib/multiprocessing/sharedctypes.py \
Lib/multiprocessing/spawn.py \
Lib/multiprocessing/synchronize.py \
@@ -754,6 +793,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/unittest,\
Lib/unittest/__init__.py \
Lib/unittest/__main__.py \
+ Lib/unittest/async_case.py \
Lib/unittest/case.py \
Lib/unittest/loader.py \
Lib/unittest/main.py \
@@ -765,40 +805,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/unittest/util.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/unittest/test,\
- Lib/unittest/test/__init__.py \
- Lib/unittest/test/__main__.py \
- Lib/unittest/test/_test_warnings.py \
- Lib/unittest/test/dummy.py \
- Lib/unittest/test/support.py \
- Lib/unittest/test/test_assertions.py \
- Lib/unittest/test/test_break.py \
- Lib/unittest/test/test_case.py \
- Lib/unittest/test/test_discovery.py \
- Lib/unittest/test/test_functiontestcase.py \
- Lib/unittest/test/test_loader.py \
- Lib/unittest/test/test_program.py \
- Lib/unittest/test/test_result.py \
- Lib/unittest/test/test_runner.py \
- Lib/unittest/test/test_setups.py \
- Lib/unittest/test/test_skipping.py \
- Lib/unittest/test/test_suite.py \
-))
-
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/unittest/test/testmock,\
- Lib/unittest/test/testmock/__init__.py \
- Lib/unittest/test/testmock/__main__.py \
- Lib/unittest/test/testmock/support.py \
- Lib/unittest/test/testmock/testcallable.py \
- Lib/unittest/test/testmock/testhelpers.py \
- Lib/unittest/test/testmock/testmagicmethods.py \
- Lib/unittest/test/testmock/testmock.py \
- Lib/unittest/test/testmock/testpatch.py \
- Lib/unittest/test/testmock/testsealable.py \
- Lib/unittest/test/testmock/testsentinel.py \
- Lib/unittest/test/testmock/testwith.py \
-))
-
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/urllib,\
Lib/urllib/__init__.py \
Lib/urllib/error.py \
@@ -823,21 +829,21 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/dom,\
Lib/xml/dom/__init__.py \
- Lib/xml/dom/NodeFilter.py \
Lib/xml/dom/domreg.py \
Lib/xml/dom/expatbuilder.py \
Lib/xml/dom/minicompat.py \
Lib/xml/dom/minidom.py \
+ Lib/xml/dom/NodeFilter.py \
Lib/xml/dom/pulldom.py \
Lib/xml/dom/xmlbuilder.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/etree,\
Lib/xml/etree/__init__.py \
+ Lib/xml/etree/cElementTree.py \
Lib/xml/etree/ElementInclude.py \
Lib/xml/etree/ElementPath.py \
Lib/xml/etree/ElementTree.py \
- Lib/xml/etree/cElementTree.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/parsers,\
diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk
index 6c958431cd97..1ff06a2382ed 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -11,7 +11,7 @@ $(eval $(call gb_ExternalProject_ExternalProject,python3))
$(eval $(call gb_ExternalProject_use_externals,python3,\
expat \
- $(if $(filter LINUX,$(OS)),libffi) \
+ $(if $(filter WNT LINUX,$(OS)),libffi) \
openssl \
zlib \
))
@@ -30,16 +30,24 @@ ifeq ($(OS),WNT)
# TODO: using Debug configuration and related mangling of pyconfig.h
+python3_WIN_PLATFORM_MSBUILD := $(strip \
+ $(if $(filter INTEL,$(CPUNAME)),Win32) \
+ $(if $(filter X86_64,$(CPUNAME)),x64) \
+ $(if $(filter ARM64,$(CPUNAME)),arm64) \
+ )
+
# at least for MSVC 2008 it is necessary to clear MAKEFLAGS because
# nmake is invoked
$(call gb_ExternalProject_get_state_target,python3,build) :
$(call gb_ExternalProject_run,build,\
MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build \
/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
- /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
+ /p:Platform=$(python3_WIN_PLATFORM_MSBUILD) \
/p:opensslIncludeDir=$(call gb_UnpackedTarball_get_dir,openssl)/include \
- /p:opensslOutDir=$(call gb_UnpackedTarball_get_dir,openssl)/out32dll \
+ /p:opensslOutDir=$(call gb_UnpackedTarball_get_dir,openssl) \
/p:zlibDir=$(call gb_UnpackedTarball_get_dir,zlib) \
+ /p:libffiOutDir=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)/.libs \
+ /p:libffiIncludeDir=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)/include \
/maxcpucount \
$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
$(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 /p:VisualStudioVersion=16.0 /ToolsVersion:Current) \
@@ -128,14 +136,14 @@ python3_fw_prefix=$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@______
$(call gb_ExternalProject_get_state_target,python3,fixscripts) : $(call gb_ExternalProject_get_state_target,python3,build)
$(call gb_Output_announce,python3 - remove reference to installroot from scripts,build,CUS,5)
$(COMMAND_ECHO)for file in \
- $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3 \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
+ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/easy_install-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/idle$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
+ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pip$(PYTHON_VERSION_MAJOR) \
+ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pip$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pydoc$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)-config \
- $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m-config \
- $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pyvenv-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) ; do \
- { rm "$$file" && $(gb_AWK) '\
+ ; do { rm "$$file" && $(gb_AWK) '\
BEGIN {print "#!/bin/bash\n\
origpath=$$(pwd)\n\
bindir=$$(cd $$(dirname \"$$0\") ; pwd)\n\
@@ -157,16 +165,14 @@ $(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_
@loader_path/../../../LibreOfficePython $$file ; done
touch $@
-# also delete binaries that are symlinked in scp2
$(call gb_ExternalProject_get_state_target,python3,executables) : $(call gb_ExternalProject_get_state_target,python3,build)
cd $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin ; \
- for file in python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
- python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m ; do \
$(INSTALL_NAME_TOOL) -change \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
- @executable_path/../LibreOfficePython $$file ; done
+ @executable_path/../LibreOfficePython python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)
touch $@
+# also delete binaries that are symlinked in scp2
$(call gb_ExternalProject_get_state_target,python3,removeunnecessarystuff) : $(call gb_ExternalProject_get_state_target,python3,build)
$(call gb_Output_announce,python3 - remove the stuff we don't need to ship,build,CUS,5)
rm -rf $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test
diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk
index d04868b93a44..94950537386c 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -20,7 +20,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/python-3.3.0-darwin.patch.1 \
external/python3/python-3.7.6-msvc-ssl.patch.1 \
external/python3/python-3.5.4-msvc-disable.patch.1 \
- external/python3/python-3.3.0-clang.patch.1 \
external/python3/ubsan.patch.0 \
external/python3/python-3.5.tweak.strip.soabi.patch \
external/python3/darwin.patch.0 \
diff --git a/external/python3/i100492-freebsd.patch.1 b/external/python3/i100492-freebsd.patch.1
index 074e5fc489f8..b2ca1ee7117f 100644
--- a/external/python3/i100492-freebsd.patch.1
+++ b/external/python3/i100492-freebsd.patch.1
@@ -2,7 +2,7 @@ FreeBSD porting fixes, patch by maho@openoffice.org
--- Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:00:41.097955124 +0000
+++ Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:01:13.018329351 +0000
-@@ -186,6 +189,9 @@
+@@ -238,6 +238,9 @@
{
pthread_t th;
int status;
@@ -12,7 +12,7 @@ FreeBSD porting fixes, patch by maho@openoffice.org
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_t attrs;
#endif
-@@ -214,6 +220,10 @@
+@@ -277,6 +280,10 @@
callback->func = func;
callback->arg = arg;
@@ -23,7 +23,7 @@ FreeBSD porting fixes, patch by maho@openoffice.org
status = pthread_create(&th,
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
&attrs,
-@@ -225,6 +234,9 @@
+@@ -285,6 +292,9 @@
#endif
pythread_wrapper, callback);
diff --git a/external/python3/internal-zlib.patch.0 b/external/python3/internal-zlib.patch.0
index abe2630bd2e7..27bb737db0c7 100644
--- a/external/python3/internal-zlib.patch.0
+++ b/external/python3/internal-zlib.patch.0
@@ -19,32 +19,32 @@
--- setup.py
+++ setup.py
-@@ -1362,7 +1362,7 @@
+@@ -1483,7 +1483,7 @@
#
# You can upgrade zlib to version 1.1.4 yourself by going to
# http://www.gzip.org/zlib/
-- zlib_inc = find_file('zlib.h', [], inc_dirs)
+- zlib_inc = find_file('zlib.h', [], self.inc_dirs)
+ zlib_inc = [os.environ.get('ZLIB_INCDIR')]
have_zlib = False
if zlib_inc is not None:
zlib_h = zlib_inc[0] + '/zlib.h'
-@@ -1379,13 +1379,13 @@
+@@ -1500,13 +1500,13 @@
version = line.split()[2]
break
if version >= version_req:
-- if (self.compiler.find_library_file(lib_dirs, 'z')):
-+ if (self.compiler.find_library_file(lib_dirs, 'zlib')):
- if host_platform == "darwin":
+- if (self.compiler.find_library_file(self.lib_dirs, 'z')):
++ if (self.compiler.find_library_file(self.lib_dirs, 'zlib')):
+ if MACOS:
zlib_extra_link_args = ('-Wl,-search_paths_first',)
else:
zlib_extra_link_args = ()
- exts.append( Extension('zlib', ['zlibmodule.c'],
-- libraries = ['z'],
-+ libraries = ['zlib'],
- extra_link_args = zlib_extra_link_args))
+ self.add(Extension('zlib', ['zlibmodule.c'],
+- libraries=['z'],
++ libraries=['zlib'],
+ extra_link_args=zlib_extra_link_args))
have_zlib = True
else:
-@@ -1399,7 +1399,7 @@
+@@ -1520,7 +1520,7 @@
# crc32 if we have it. Otherwise binascii uses its own.
if have_zlib:
extra_compile_args = ['-DUSE_ZLIB_CRC32']
diff --git a/external/python3/python-3.3.0-clang.patch.1 b/external/python3/python-3.3.0-clang.patch.1
deleted file mode 100644
index 9001110fbed4..000000000000
--- a/external/python3/python-3.3.0-clang.patch.1
+++ /dev/null
@@ -1,13 +0,0 @@
--*- Mode: diff -*-
-
---- python3/setup.py
-+++ python3/setup.py
-@@ -436,7 +436,7 @@
- if ret >> 8 == 0:
- with open(tmpfile) as fp:
- for line in fp.readlines():
-- if line.startswith("gcc version"):
-+ if line.startswith("gcc version") or line.startswith("clang -cc1 version"):
- is_gcc = True
- elif line.startswith("#include <...>"):
- in_incdirs = True
diff --git a/external/python3/python-3.3.0-darwin.patch.1 b/external/python3/python-3.3.0-darwin.patch.1
index 10a696aa6e93..d262d55cd5b3 100644
--- a/external/python3/python-3.3.0-darwin.patch.1
+++ b/external/python3/python-3.3.0-darwin.patch.1
@@ -5,7 +5,7 @@ LO needs to build both against MacOSX SDK and not produce universal binaries.
diff -ru python3.orig/configure python3/configure
--- python3.orig/configure 2015-07-26 17:36:11.808497783 +0200
+++ python3/configure 2015-07-26 17:38:49.016508337 +0200
-@@ -6794,7 +6794,20 @@
+@@ -7385,7 +7385,20 @@
then
case "$UNIVERSAL_ARCHS" in
32-bit)
@@ -30,7 +30,7 @@ diff -ru python3.orig/configure python3/configure
diff -ru python3.orig/Mac/Makefile.in python3/Mac/Makefile.in
--- python3.orig/Mac/Makefile.in 2015-07-05 18:50:07.000000000 +0200
+++ python3/Mac/Makefile.in 2015-07-26 17:40:14.860514100 +0200
-@@ -43,7 +43,7 @@
+@@ -44,7 +44,7 @@
INSTALL_SCRIPT= @INSTALL_SCRIPT@
INSTALL_DATA=@INSTALL_DATA@
LN=@LN@
@@ -49,7 +49,7 @@ diff -ru python3.orig/Mac/Resources/app/Info.plist.in python3/Mac/Resources/app/
- <string>Python</string>
+ <string>LibreOfficePython</string>
<key>CFBundleGetInfoString</key>
- <string>%version%, (c) 2001-2020 Python Software Foundation.</string>
+ <string>%version%, (c) 2001-2023 Python Software Foundation.</string>
<key>CFBundleHelpBookFolder</key>
diff -ru python3.orig/Mac/Resources/framework/Info.plist.in python3/Mac/Resources/framework/Info.plist.in
--- python3.orig/Mac/Resources/framework/Info.plist.in 2015-07-05 18:50:07.000000000 +0200
@@ -63,19 +63,3 @@ diff -ru python3.orig/Mac/Resources/framework/Info.plist.in python3/Mac/Resource
<key>CFBundleGetInfoString</key>
<string>Python Runtime and Library</string>
<key>CFBundleIdentifier</key>
-diff -ru python3.orig/setup.py python3/setup.py
---- python3.orig/setup.py 2015-07-26 17:36:11.804497783 +0200
-+++ python3/setup.py 2015-07-26 17:39:48.599512337 +0200
-@@ -468,11 +468,11 @@
- # Ensure that /usr/local is always used, but the local build
- # directories (i.e. '.' and 'Include') must be first. See issue
- # 10520.
-- if not cross_compiling:
-+ if not cross_compiling and host_platform != 'darwin':
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
- # only change this for cross builds for 3.3, issues on Mageia
-- if cross_compiling:
-+ if cross_compiling or host_platform == 'darwin':
- self.add_gcc_paths()
- self.add_multiarch_paths()
diff --git a/external/python3/python-3.3.3-disable-obmalloc.patch.0 b/external/python3/python-3.3.3-disable-obmalloc.patch.0
index 0963a5f1bb1d..c4a1dea61ecf 100644
--- a/external/python3/python-3.3.3-disable-obmalloc.patch.0
+++ b/external/python3/python-3.3.3-disable-obmalloc.patch.0
@@ -1,6 +1,6 @@
--- Objects/obmalloc.c
+++ Objects/obmalloc.c
-@@ -413,8 +413,8 @@
+@@ -712,8 +712,8 @@
#ifdef WITH_PYMALLOC
@@ -10,7 +10,7 @@
/* If we're using GCC, use __builtin_expect() to reduce overhead of
the valgrind checks */
-@@ -1181,7 +1181,7 @@
+@@ -1430,7 +1430,7 @@
#ifdef WITH_VALGRIND
if (UNLIKELY(running_on_valgrind == -1)) {
diff --git a/external/python3/python-3.3.3-elf-rpath.patch.1 b/external/python3/python-3.3.3-elf-rpath.patch.1
index 0dfa16c8c247..a408858f5917 100644
--- a/external/python3/python-3.3.3-elf-rpath.patch.1
+++ b/external/python3/python-3.3.3-elf-rpath.patch.1
@@ -5,18 +5,16 @@ set RPATH (only to be used on ELF platforms)
diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in
--- python3.orig/Makefile.pre.in 2015-07-26 20:29:07.126194320 +0200
+++ python3/Makefile.pre.in 2015-07-26 20:37:21.814227530 +0200
-@@ -550,7 +550,7 @@
+@@ -566,7 +566,7 @@
# Build the interpreter
$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
-- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
-+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Wl,-rpath,\$$ORIGIN
+- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -Wl,-rpath,\$$ORIGIN
platform: $(BUILDPYTHON) pybuilddir.txt
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
---- python3.orig/Makefile.pre.in 2015-07-05 18:50:07.000000000 +0200
-+++ python3/Makefile.pre.in 2015-07-26 17:34:00.386488960 +0200
-@@ -607,7 +607,7 @@
+@@ -628,7 +628,7 @@
fi
libpython3.so: libpython$(LDVERSION).so
@@ -24,4 +22,4 @@ diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in
+ $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^ -Wl,-rpath,\$$ORIGIN
libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
- $(CC) -dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+ $(CC) -dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACE_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
diff --git a/external/python3/python-3.5.4-msvc-disable.patch.1 b/external/python3/python-3.5.4-msvc-disable.patch.1
index 416ab2c7b15b..d5b4e3f6264b 100644
--- a/external/python3/python-3.5.4-msvc-disable.patch.1
+++ b/external/python3/python-3.5.4-msvc-disable.patch.1
@@ -3,7 +3,7 @@ Disable some stuff LO does not need, especially stuff with external dependencies
diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
--- python3.orig/PCbuild/pcbuild.sln 2017-08-10 00:04:44.359879894 +0200
+++ python3/PCbuild/pcbuild.sln 2017-08-10 00:13:51.179873748 +0200
-@@ -12,8 +12,6 @@
+@@ -15,8 +15,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"
EndProject
@@ -12,7 +12,7 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_decimal", "_decimal.vcxproj", "{0E9791DB-593A-465F-98BC-681011311617}"
-@@ -28,32 +26,18 @@
+@@ -31,34 +29,20 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}"
EndProject
@@ -22,6 +22,8 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"
EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testinternalcapi", "_testinternalcapi.vcxproj", "{900342D7-516A-4469-B1AD-59A66E49A25F}"
+ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testimportmultiple", "_testimportmultiple.vcxproj", "{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"
@@ -45,7 +47,7 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
-@@ -75,8 +75,6 @@
+@@ -93,8 +77,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_queue", "_queue.vcxproj", "{78D80A15-BD8C-44E2-B49E-1F05B0A0A687}"
EndProject
diff --git a/external/python3/python-3.5.tweak.strip.soabi.patch b/external/python3/python-3.5.tweak.strip.soabi.patch
index 48ac7f82f8be..4c2bb2bb9a29 100644
--- a/external/python3/python-3.5.tweak.strip.soabi.patch
+++ b/external/python3/python-3.5.tweak.strip.soabi.patch
@@ -1,7 +1,7 @@
diff -ru python3.orig/configure python3/configure
--- misc/python3.orig/configure 2015-07-26 21:14:31.127377193 +0200
+++ misc/python3/configure 2015-07-26 21:21:34.975405648 +0200
-@@ -14388,7 +14388,7 @@
+@@ -15229,7 +15229,7 @@
$as_echo "$ABIFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
$as_echo_n "checking SOABI... " >&6; }
diff --git a/external/python3/python-3.7.6-msvc-ssl.patch.1 b/external/python3/python-3.7.6-msvc-ssl.patch.1
index e8e94f674c1f..17cc440f2204 100644
--- a/external/python3/python-3.7.6-msvc-ssl.patch.1
+++ b/external/python3/python-3.7.6-msvc-ssl.patch.1
@@ -2,7 +2,7 @@ No use for applink.c OPENSSL_Applink, everything is compiled with the same MSVC
--- python3/PCbuild/_ssl.vcxproj.orig2 2019-12-23 15:54:19.254298900 +0100
+++ python3/PCbuild/_ssl.vcxproj 2019-12-23 15:54:24.693251200 +0100
-@@ -67,9 +67,6 @@
+@@ -99,9 +99,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_ssl.c" />
@@ -14,27 +14,12 @@ No use for applink.c OPENSSL_Applink, everything is compiled with the same MSVC
<ResourceCompile Include="..\PC\python_nt.rc" />
--- python3/PCbuild/openssl.props.orig 2019-12-23 16:20:34.588135900 +0100
+++ python3/PCbuild/openssl.props 2019-12-23 16:20:51.074001300 +0100
-@@ -6,7 +6,7 @@
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>$(opensslOutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-- <AdditionalDependencies>ws2_32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <AdditionalDependencies>ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
+@@ -6,8 +6,6 @@
</ItemDefinitionGroup>
<PropertyGroup>
-@@ -15,10 +15,10 @@
- <_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64</_DLLSuffix>
+ <_DLLSuffix>-1_1</_DLLSuffix>
+- <_DLLSuffix Condition="$(Platform) == 'ARM'">$(_DLLSuffix)-arm</_DLLSuffix>
+- <_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64</_DLLSuffix>
</PropertyGroup>
<ItemGroup>
-- <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" />
-- <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).pdb" />
-- <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).dll" />
-- <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).pdb" />
-+ <_SSLDLL Include="$(opensslOutDir)\libeay32.dll" />
-+ <_SSLDLL Include="$(opensslOutDir)\libeay32.pdb" />
-+ <_SSLDLL Include="$(opensslOutDir)\ssleay32.dll" />
-+ <_SSLDLL Include="$(opensslOutDir)\ssleay32.pdb" />
- </ItemGroup>
- <Target Name="_CopySSLDLL" Inputs="@(_SSLDLL)" Outputs="@(_SSLDLL->'$(OutDir)%(Filename)%(Extension)')" AfterTargets="Build">
- <Copy SourceFiles="@(_SSLDLL)" DestinationFolder="$(OutDir)" />
+ <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" />
diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index 938acc1f1725..d44fbe055c86 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -18,3 +18,26 @@
/* Set the carry bit if the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp. */
+--- Modules/posixmodule.c
++++ Modules/posixmodule.c
+@@ -13998,6 +13998,9 @@
+ };
+
+ static int
++#if defined __clang__
++__attribute__((no_sanitize("shift-base"))) // MFD_HUGE_16GB in /usr/include/linux/memfd.h
++#endif
+ all_ins(PyObject *m)
+ {
+ #ifdef F_OK
+--- Objects/listobject.c
++++ Objects/listobject.c
+@@ -554,7 +554,7 @@
+ dest[i] = v;
+ }
+ src = b->ob_item;
+- dest = np->ob_item + Py_SIZE(a);
++ dest = Py_SIZE(a) == 0 ? np->ob_item : np->ob_item + Py_SIZE(a);
+ for (i = 0; i < Py_SIZE(b); i++) {
+ PyObject *v = src[i];
+ Py_INCREF(v);
diff --git a/external/redland/UnpackedTarball_raptor.mk b/external/redland/UnpackedTarball_raptor.mk
index fbdc8b6f5510..92bc586a3e60 100644
--- a/external/redland/UnpackedTarball_raptor.mk
+++ b/external/redland/UnpackedTarball_raptor.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,raptor,\
external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1 \
external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1 \
external/redland/raptor/libtool.patch \
+ external/redland/raptor/raptor-libxml2-11.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/redland/raptor/raptor-libxml2-11.patch.1 b/external/redland/raptor/raptor-libxml2-11.patch.1
new file mode 100644
index 000000000000..9bed29e50d0b
--- /dev/null
+++ b/external/redland/raptor/raptor-libxml2-11.patch.1
@@ -0,0 +1,15 @@
+--- raptor/src/raptor_libxml.c 2023-05-24 09:55:21.589275008 +0100
++++ raptor/src/raptor_libxml.c 2023-05-24 09:56:41.100324810 +0100
+@@ -246,9 +246,11 @@
+
+ ret->owner = 1;
+
+-#if LIBXML_VERSION >= 20627
++#if LIBXML_VERSION >= 20627 && LIBXML_VERSION < 21100
+ /* Checked field was released in 2.6.27 on 2006-10-25
+ * http://git.gnome.org/browse/libxml2/commit/?id=a37a6ad91a61d168ecc4b29263def3363fff4da6
++ * and removed with
++ * https://gitlab.gnome.org/GNOME/libxml2/-/commit/ce76ebfd1312459951d555ad9d87fb9a89eede55
+ *
+ */
+
diff --git a/external/zlib/UnpackedTarball_zlib.mk b/external/zlib/UnpackedTarball_zlib.mk
index e74039d25089..dd9fc1c31445 100644
--- a/external/zlib/UnpackedTarball_zlib.mk
+++ b/external/zlib/UnpackedTarball_zlib.mk
@@ -18,8 +18,4 @@ $(eval $(call gb_UnpackedTarball_set_post_action,zlib,\
$(eval $(call gb_UnpackedTarball_set_patchlevel,zlib,0))
-$(eval $(call gb_UnpackedTarball_add_patches,zlib, \
- external/zlib/ubsan.patch \
-))
-
# vim: set noet sw=4 ts=4:
diff --git a/external/zlib/ubsan.patch b/external/zlib/ubsan.patch
deleted file mode 100644
index 2d7ff8d67967..000000000000
--- a/external/zlib/ubsan.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- trees.c
-+++ trees.c
-@@ -870,7 +870,7 @@
- bi_windup(s); /* align on byte boundary */
- put_short(s, (ush)stored_len);
- put_short(s, (ush)~stored_len);
-- zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);
-+ if (stored_len != 0) zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);
- s->pending += stored_len;
- #ifdef ZLIB_DEBUG
- s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;