diff --git a/add-patch-to-fix-build-poppler-error.patch b/add-patch-to-fix-build-poppler-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..3b8d5bbc3b96e92abd5c71b9a61f2a0d07e2ebbd --- /dev/null +++ b/add-patch-to-fix-build-poppler-error.patch @@ -0,0 +1,60 @@ +From a689e2189ff0a464f3150ed8b2dd5a3cc1194012 Mon Sep 17 00:00:00 2001 +From: Even Rouault +Date: Sun, 4 May 2025 21:00:18 +0200 +Subject: [PATCH] PDF: Fix build against Poppler 2025.05.0 + +--- + frmts/pdf/pdfio.cpp | 13 +++++++++++++ + frmts/pdf/pdfio.h | 8 ++++++++ + 2 files changed, 21 insertions(+) + +diff --git a/frmts/pdf/pdfio.cpp b/frmts/pdf/pdfio.cpp +index 9bf39f495020..39cb1285ef40 100644 +--- a/frmts/pdf/pdfio.cpp ++++ b/frmts/pdf/pdfio.cpp +@@ -77,12 +77,25 @@ BaseStream *VSIPDFFileStream::copy() + /************************************************************************/ + /* makeSubStream() */ + /************************************************************************/ ++ ++#if POPPLER_MAJOR_VERSION > 25 || \ ++ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 5) ++std::unique_ptr VSIPDFFileStream::makeSubStream(Goffset startA, ++ bool limitedA, ++ Goffset lengthA, ++ Object &&dictA) ++{ ++ return std::make_unique(this, startA, limitedA, lengthA, ++ std::move(dictA)); ++} ++#else + Stream *VSIPDFFileStream::makeSubStream(Goffset startA, bool limitedA, + Goffset lengthA, Object &&dictA) + { + return new VSIPDFFileStream(this, startA, limitedA, lengthA, + std::move(dictA)); + } ++#endif + + /************************************************************************/ + /* getPos() */ +diff --git a/frmts/pdf/pdfio.h b/frmts/pdf/pdfio.h +index f3adf9707ead..e2223bd87fa5 100644 +--- a/frmts/pdf/pdfio.h ++++ b/frmts/pdf/pdfio.h +@@ -31,8 +31,16 @@ class VSIPDFFileStream final : public BaseStream + + virtual BaseStream *copy() override; + ++#if POPPLER_MAJOR_VERSION > 25 || \ ++ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 5) ++ virtual std::unique_ptr makeSubStream(Goffset startA, bool limitedA, ++ Goffset lengthA, ++ Object &&dictA) override; ++#else + virtual Stream *makeSubStream(Goffset startA, bool limitedA, + Goffset lengthA, Object &&dictA) override; ++ ++#endif + virtual Goffset getPos() override; + virtual Goffset getStart() override; diff --git a/gdal.spec b/gdal.spec index bc1096ac57b43d3190dc5f0d54235a4309145450..f67cf6cc3d6df4aa47b47a85096f7ada123461ec 100644 --- a/gdal.spec +++ b/gdal.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %global run_tests 0 %global bashcompletiondir %(pkg-config --variable=compatdir bash-completion) @@ -45,6 +45,8 @@ Source5: %{name}-cleaner.sh Patch0: gdal_utils.patch Patch1: gdal_incompatible-pointer-types.patch Patch2: gdal-3.10.2-integer-types.patch +# https://github.com/OSGeo/gdal/commit/a689e2189ff0a464f3150ed8b2dd5a3cc1194012 +Patch3: add-patch-to-fix-build-poppler-error.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -568,6 +570,9 @@ cp -a %{SOURCE3} %{buildroot}%{_bindir}/%{name}-config %changelog +* Tue Dec 30 2025 lzq11122 - 3.10.3-2 +- Fix build poppler error + * Thu Aug 07 2025 wenxin - 3.10.3-1 - Update to 3.10.3