]> git.pld-linux.org Git - packages/gdal.git/blobdiff - gdal-poppler.patch
upstream patch to fix build with new poppler
[packages/gdal.git] / gdal-poppler.patch
diff --git a/gdal-poppler.patch b/gdal-poppler.patch
new file mode 100644 (file)
index 0000000..c4d34d5
--- /dev/null
@@ -0,0 +1,26 @@
+From 2d789902ffb48251ec2ff632320d78ee088c2c5f Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+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<const GByte*>(gooString->getCString()),
+                                                       static_cast<int>(gooString->getLength())));
+     }
This page took 0.030329 seconds and 4 git commands to generate.