[Git][debian-gis-team/gdal][master] Add upstream patch for Poppler 0.71.0 support. (closes: #915722)
Bas Couwenberg
gitlab at salsa.debian.org
Thu Dec 6 12:33:15 GMT 2018
Bas Couwenberg pushed to branch master at Debian GIS Project / gdal
Commits:
ef396364 by Bas Couwenberg at 2018-12-06T12:33:02Z
Add upstream patch for Poppler 0.71.0 support. (closes: #915722)
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/0001-Add-support-for-Poppler-0.71.0-fixes-1121.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+gdal (2.3.2+dfsg-4) UNRELEASED; urgency=medium
+
+ * Add upstream patch for Poppler 0.71.0 support.
+ (closes: #915722)
+
+ -- Bas Couwenberg <sebastic at debian.org> Thu, 06 Dec 2018 13:32:24 +0100
+
gdal (2.3.2+dfsg-3) unstable; urgency=medium
* Add Build-Depends-Package field to symbols file.
=====================================
debian/patches/0001-Add-support-for-Poppler-0.71.0-fixes-1121.patch
=====================================
@@ -0,0 +1,82 @@
+Description: Add support for Poppler 0.71.0.
+Author: Even Rouault <even.rouault at spatialys.com>
+Origin: https://github.com/OSGeo/gdal/commit/4cc0215b8f2cef3582265cdfaf16589390697706
+Bug: https://github.com/OSGeo/gdal/issues/1121
+Bug-Debian: https://bugs.debian.org/915722
+
+--- a/frmts/pdf/pdfdataset.cpp
++++ b/frmts/pdf/pdfdataset.cpp
+@@ -2593,18 +2593,25 @@ static void PDFDatasetErrorFunctionCommo
+ }
+
+ #ifdef POPPLER_0_20_OR_LATER
+-static void PDFDatasetErrorFunction(CPL_UNUSED void* userData, CPL_UNUSED ErrorCategory eErrCategory,
++
++static void PDFDatasetErrorFunction(void* /* userData*/,
++ ErrorCategory /* eErrCategory */,
+ #ifdef POPPLER_0_23_OR_LATER
+ Goffset nPos,
+ #else
+ int nPos,
+ #endif
+- char *pszMsg)
++#ifdef POPPLER_0_71_OR_LATER
++ const char *pszMsg
++#else
++ char *pszMsg
++#endif
++ )
+ {
+ CPLString osError;
+
+ if (nPos >= 0)
+- osError.Printf("Pos = %d, ", (int)nPos);
++ osError.Printf("Pos = " CPL_FRMT_GUIB ", ", static_cast<GUIntBig>(nPos));
+ osError += pszMsg;
+ PDFDatasetErrorFunctionCommon(osError);
+ }
+@@ -4442,7 +4449,7 @@ GDALDataset *PDFDataset::Open( GDALOpenI
+ #ifdef HAVE_POPPLER
+ if (bUseLib.test(PDFLIB_POPPLER))
+ {
+- PDFRectangle* psMediaBox = poPagePoppler->getMediaBox();
++ const auto* psMediaBox = poPagePoppler->getMediaBox();
+ dfX1 = psMediaBox->x1;
+ dfY1 = psMediaBox->y1;
+ dfX2 = psMediaBox->x2;
+@@ -4780,14 +4787,12 @@ GDALDataset *PDFDataset::Open( GDALOpenI
+ GooString* poMetadata = poCatalogPoppler->readMetadata();
+ if (poMetadata)
+ {
+- char* pszContent = poMetadata->getCString();
++ const char* pszContent = poMetadata->getCString();
+ if (pszContent != nullptr &&
+ STARTS_WITH(pszContent, "<?xpacket begin="))
+ {
+- char *apszMDList[2];
+- apszMDList[0] = pszContent;
+- apszMDList[1] = nullptr;
+- poDS->SetMetadata(apszMDList, "xml:XMP");
++ const char * const apszMDList[2] = { pszContent, nullptr };
++ poDS->SetMetadata(const_cast<char**>(apszMDList), "xml:XMP");
+ }
+ delete poMetadata;
+ }
+--- a/frmts/pdf/pdfio.h
++++ b/frmts/pdf/pdfio.h
+@@ -58,6 +58,15 @@
+ #define makeSubStream_object_type Object*
+ #endif
+
++// Detect Poppler 0.71 that no longer defines GBool
++#ifdef POPPLER_0_69_OR_LATER
++#ifndef initObj
++#define POPPLER_0_71_OR_LATER
++#define GBool bool
++#define gFalse false
++#endif
++#endif
++
+ class VSIPDFFileStream: public BaseStream
+ {
+ public:
=====================================
debian/patches/series
=====================================
@@ -10,3 +10,4 @@ privacy-breach-logo.patch
privacy-breach-generic.patch
perl-doxyfile
0001-Add-support-for-Poppler-0.69-fixes-1004.patch
+0001-Add-support-for-Poppler-0.71.0-fixes-1121.patch
View it on GitLab: https://salsa.debian.org/debian-gis-team/gdal/commit/ef39636497c2618a629f9f37d59122759d1208ff
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/gdal/commit/ef39636497c2618a629f9f37d59122759d1208ff
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20181206/d51d0d1a/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list