diff --git a/backport-Add-compatibility-with-Poppler-25.10-support-for-older-versions-kept.patch b/backport-Add-compatibility-with-Poppler-25.10-support-for-older-versions-kept.patch new file mode 100644 index 0000000000000000000000000000000000000000..6e46949209ca556ea5a0399bf58556f12684cfe9 --- /dev/null +++ b/backport-Add-compatibility-with-Poppler-25.10-support-for-older-versions-kept.patch @@ -0,0 +1,42 @@ +From a716a6cd5ffd779b30950f046fce91878fc97b9d Mon Sep 17 00:00:00 2001 +From: Even Rouault +Date: Sun, 5 Oct 2025 00:50:51 +0200 +Subject: [PATCH] Add compatibility with Poppler 25.10 (support for older + versions kept) + +Fixes #13173 +--- + frmts/pdf/pdfobject.cpp | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/frmts/pdf/pdfobject.cpp b/frmts/pdf/pdfobject.cpp +index d8ded01d3e4b..2c5c44ba04d9 100644 +--- a/frmts/pdf/pdfobject.cpp ++++ b/frmts/pdf/pdfobject.cpp +@@ -1437,7 +1437,12 @@ int64_t GDALPDFStreamPoppler::GetLength(int64_t nMaxSize) + + static char *GooStringToCharStart(GooString &gstr) + { +- auto nLength = gstr.getLength(); ++#if POPPLER_MAJOR_VERSION > 25 || \ ++ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 10) ++ const auto nLength = gstr.size(); ++#else ++ const auto nLength = gstr.getLength(); ++#endif + if (nLength) + { + char *pszContent = static_cast(VSI_MALLOC_VERBOSE(nLength + 1)); +@@ -1514,7 +1519,12 @@ char *GDALPDFStreamPoppler::GetRawBytes() + "GDALPDFStreamPoppler::GetRawBytes(): %s", e.what()); + return nullptr; + } ++#if POPPLER_MAJOR_VERSION > 25 || \ ++ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 10) ++ m_nRawLength = gstr.size(); ++#else + m_nRawLength = gstr.getLength(); ++#endif + return GooStringToCharStart(gstr); + } + diff --git a/gdal.spec b/gdal.spec index 9932308b941253d9d1c28c4664c6ace762f57820..9f2a9e1a5f2046d27b2eaa87b83edc9a375429e1 100644 --- a/gdal.spec +++ b/gdal.spec @@ -23,7 +23,7 @@ Name: gdal Version: 3.11.4 -Release: 1 +Release: 2 Summary: GIS file format library License: MIT URL: https://www.gdal.org @@ -39,6 +39,9 @@ Patch1: gdal_incompatible-pointer-types.patch # Add definitions of missing int16_t and int32_t Patch2: gdal-3.10.2-integer-types.patch +# Fix build with poppler 25.10 +Patch6000: backport-Add-compatibility-with-Poppler-25.10-support-for-older-versions-kept.patch + BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: gmock-devel @@ -345,6 +348,9 @@ cp -a %{SOURCE3} %{buildroot}%{_bindir}/%{name}-config %{_jnidir}/%{name}/gdal-%{version}-javadoc.jar %changelog +* Sat Oct 11 2025 lingsheng - 3.11.4-2 +- Add compatibility with Poppler 25.10 (support for older versions kept) + * Tue Oct 07 2025 Funda Wang - 3.11.4-1 - update to 3.11.4