summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-09-25 15:50:43 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2023-09-27 12:16:23 +0200
commitf543a8a849e6287b88b2d28ff49a01b2b09c3e94 (patch)
treee7173eba6951d5bf0537e78beb5f933ec53baf4b
parentc2626475425f386acfb4ec213b7255aa6db1634f (diff)
poppler: upgrade to release 23.09.0
Fixes CVE-2023-34872 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157247 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 3d31dfa9b99d0df5e400c1a6d7e8df6c46129b3c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157253 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 6d1c0e802eaefa1c42051c1456be61cef2dc2e86) Change-Id: I289b3016695a01aff7d393cb09d66cd726d9b592 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157293 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--download.lst4
-rw-r--r--external/poppler/StaticLibrary_poppler.mk6
-rw-r--r--external/poppler/disable-freetype.patch.12
-rw-r--r--external/poppler/poppler-config.patch.127
4 files changed, 19 insertions, 20 deletions
diff --git a/download.lst b/download.lst
index 89ebf334a889..1874fbbf3846 100644
--- a/download.lst
+++ b/download.lst
@@ -475,8 +475,8 @@ LIBPNG_TARBALL := libpng-1.6.37.tar.xz
# three static lines
# so that git cherry-pick
# will not run into conflicts
-POPPLER_SHA256SUM := d38c6b2f31c8f6f3727fb60a011a0e6c567ebf56ef1ccad36263ca9ed6448a65
-POPPLER_TARBALL := poppler-23.06.0.tar.xz
+POPPLER_SHA256SUM := 80d1d44dd8bdf4ac1a47d56c5065075eb9991790974b1ed7d14b972acde88e55
+POPPLER_TARBALL := poppler-23.09.0.tar.xz
# three static lines
# so that git cherry-pick
# will not run into conflicts
diff --git a/external/poppler/StaticLibrary_poppler.mk b/external/poppler/StaticLibrary_poppler.mk
index 4915c5e81fff..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))
@@ -90,6 +93,7 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/FDPDFDocBuilder \
UnpackedTarball/poppler/poppler/FILECacheLoader \
UnpackedTarball/poppler/poppler/FileSpec \
+ UnpackedTarball/poppler/poppler/FlateEncoder \
UnpackedTarball/poppler/poppler/FontEncodingTables \
UnpackedTarball/poppler/poppler/FontInfo \
UnpackedTarball/poppler/poppler/Form \
diff --git a/external/poppler/disable-freetype.patch.1 b/external/poppler/disable-freetype.patch.1
index 77c643de40f5..3c4d1d0f7a8a 100644
--- a/external/poppler/disable-freetype.patch.1
+++ b/external/poppler/disable-freetype.patch.1
@@ -19,9 +19,9 @@ disable freetype dependent code
-#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
- // to help get compile errors if one ever extends variants
@@ -2760,6 +2760,8 @@
Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath, int faceIndex, const std::string &fontFamily, const std::string &fontStyle, bool forceName)
diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1
index be8fc98556a7..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_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
+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
@@ -37,9 +37,6 @@ 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 */
+
@@ -182,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 23.06.0"
++#define PACKAGE_STRING "poppler 23.09.0"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "poppler"
@@ -191,7 +188,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
-+#define PACKAGE_VERSION "23.06.0"
++#define PACKAGE_VERSION "23.09.0"
+
+/* Poppler data dir */
+#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -209,12 +206,15 @@ index 0fbd336a..451213f8 100644
+/* #undef USE_FLOAT */
+
+/* Version number of package */
-+#define VERSION "23.06.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
@@ -251,7 +251,7 @@ 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
@@ -290,7 +290,7 @@ index 0fbd336a..451213f8 100644
+
+/* Defines the poppler version. */
+#ifndef POPPLER_VERSION
-+#define POPPLER_VERSION "23.06.0"
++#define POPPLER_VERSION "23.09.0"
+#endif
+
+/* Use single precision arithmetic in the Splash backend */
@@ -328,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
@@ -442,9 +437,9 @@ index 0fbd336a..451213f8 100644
+
+#include "poppler-global.h"
+
-+#define POPPLER_VERSION "23.06.0"
++#define POPPLER_VERSION "23.09.0"
+#define POPPLER_VERSION_MAJOR 23
-+#define POPPLER_VERSION_MINOR 06
++#define POPPLER_VERSION_MINOR 9
+#define POPPLER_VERSION_MICRO 0
+
+namespace poppler