From 7318576fc7037412b755f038f8148f2d299587aa Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Tue, 26 Nov 2019 14:33:32 +0100
Subject: [PATCH] PDF: fix to build against latest Poppler master (0.83dev)
gdal/frmts/pdf/pdfio.cpp | 3 +++
gdal/frmts/pdf/pdfio.h | 7 ++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/gdal/frmts/pdf/pdfio.cpp b/gdal/frmts/pdf/pdfio.cpp
index 917e92330ae..c0b9dad93cb 100644
@@ -170,6 +170,9 @@ getStart_ret_type VSIPDFFileStream::getStart()
/************************************************************************/
StreamKind VSIPDFFileStream::getKind()
+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 83
diff --git a/gdal/frmts/pdf/pdfio.h b/gdal/frmts/pdf/pdfio.h
index aa34ab7210d..23344d33f77 100644
@@ -81,7 +81,12 @@ class VSIPDFFileStream final: public BaseStream
virtual void setPos(setPos_offset_type pos, int dir = 0) override;
virtual void moveStart(moveStart_delta_type delta) override;
- virtual StreamKind getKind() override;
+ virtual StreamKind getKind()
+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 83
virtual GooString *getFileName() override;
virtual int getChar() override;
From 1f8fa16f58cfe0364099ddad0e1d86522d8de41a Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Wed, 13 Nov 2019 14:07:22 +0100
Subject: [PATCH] PDF: fix build against Poppler 0.83.0dev
gdal/frmts/pdf/pdfdataset.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gdal/frmts/pdf/pdfdataset.cpp b/gdal/frmts/pdf/pdfdataset.cpp
index 8f944c40d30..88017953de5 100644
--- frmts/pdf/pdfdataset.cpp
+++ frmts/pdf/pdfdataset.cpp
@@ -4076,7 +4076,13 @@ PDFDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo )
CPLMutexHolderD(&hGlobalParamsMutex);
/* poppler global variable */
if (globalParams == nullptr)
+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 83
+ globalParams.reset(new GlobalParams());