From ee43bca4943e0fb0ef37985922350bbf4e1c724c Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Tue, 22 May 2018 22:54:40 +0200 Subject: [PATCH] upstream patch to fix build with new poppler --- gdal-poppler.patch | 26 ++++++++++++++++++++++++++ gdal.spec | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 gdal-poppler.patch diff --git a/gdal-poppler.patch b/gdal-poppler.patch new file mode 100644 index 0000000..c4d34d5 --- /dev/null +++ b/gdal-poppler.patch @@ -0,0 +1,26 @@ +From 2d789902ffb48251ec2ff632320d78ee088c2c5f Mon Sep 17 00:00:00 2001 +From: Even Rouault +Date: Sat, 5 May 2018 22:18:37 +0200 +Subject: [PATCH] Fix build with recent Poppler (0.64) (fix #573) + +--- + gdal/frmts/pdf/pdfobject.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/gdal/frmts/pdf/pdfobject.cpp b/gdal/frmts/pdf/pdfobject.cpp +index ae734a74e4c..5eab5dd1546 100644 +--- a/gdal/frmts/pdf/pdfobject.cpp ++++ b/gdal/frmts/pdf/pdfobject.cpp +@@ -1055,7 +1055,12 @@ const CPLString& GDALPDFObjectPoppler::GetString() + { + if (GetType() == PDFObjectType_String) + { ++#ifdef POPPLER_0_58_OR_LATER ++ // At least available since poppler 0.41 ++ const GooString* gooString = m_po->getString(); ++#else + GooString* gooString = m_po->getString(); ++#endif + return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast(gooString->getCString()), + static_cast(gooString->getLength()))); + } diff --git a/gdal.spec b/gdal.spec index 77a3726..aa12bbf 100644 --- a/gdal.spec +++ b/gdal.spec @@ -56,6 +56,7 @@ Group: Libraries Source0: http://download.osgeo.org/gdal/%{version}/%{name}-%{version}.tar.xz # Source0-md5: 51b1df61dbdf81473689fab3075e7a5e Patch0: %{name}-perl.patch +Patch1: %{name}-poppler.patch Patch2: %{name}-php.patch Patch3: %{name}-fpic.patch Patch9: %{name}-dds.patch @@ -280,6 +281,7 @@ osr. %prep %setup -q %patch0 -p1 +%patch1 -p2 %patch2 -p1 %patch3 -p1 %patch9 -p1 -- 2.43.0