Hello community, here is the log from the commit of package gdal for openSUSE:Factory checked in at 2019-02-01 11:48:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gdal (Old) and /work/SRC/openSUSE:Factory/.gdal.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gdal" Fri Feb 1 11:48:10 2019 rev:36 rq:670316 version:2.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/gdal/gdal.changes 2018-12-27 00:30:08.875625890 +0100 +++ /work/SRC/openSUSE:Factory/.gdal.new.28833/gdal.changes 2019-02-01 11:48:31.940362284 +0100 @@ -1,0 +2,8 @@ +Wed Jan 30 19:51:14 UTC 2019 - Wolfgang Bauer <[email protected]> + +- Add upstream patches to fix build with the latest poppler in + Tumbleweed: + * Poppler-revision-version-management.patch + * add-support-for-poppler-0.72.0-and-0.73.0.patch + +------------------------------------------------------------------- New: ---- Poppler-revision-version-management.patch add-support-for-poppler-0.72.0-and-0.73.0.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gdal.spec ++++++ --- /var/tmp/diff_new_pack.AELRWh/_old 2019-02-01 11:48:33.764360412 +0100 +++ /var/tmp/diff_new_pack.AELRWh/_new 2019-02-01 11:48:33.764360412 +0100 @@ -35,6 +35,10 @@ Patch0: gdal-perl.patch # Fix occasional parallel build failure Patch1: GDALmake.opt.in.patch +# PATCH-FIX-UPSTREAM -- https://github.com/OSGeo/gdal/commit/d9ff536713c1bcaff00657f5fb9a94f36b92c0d8 +Patch2: Poppler-revision-version-management.patch +# PATCH-FIX-UPSTREAM -- https://github.com/OSGeo/gdal/commit/d295d0ebc3b41092ad072790c704c772098da210 +Patch3: add-support-for-poppler-0.72.0-and-0.73.0.patch BuildRequires: KEALib-devel BuildRequires: blas-devel BuildRequires: chrpath @@ -169,6 +173,8 @@ %setup -q -n %{sourcename}-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p2 +%patch3 -p2 # Set the right (build) libproj.so version PROJSOVER=$(ls -1 %_libdir/libproj.so.?? | awk -F '.' '{print $3}') ++++++ Poppler-revision-version-management.patch ++++++ ++++ 1144 lines (skipped) ++++++ add-support-for-poppler-0.72.0-and-0.73.0.patch ++++++ >From d295d0ebc3b41092ad072790c704c772098da210 Mon Sep 17 00:00:00 2001 From: Even Rouault <[email protected]> Date: Thu, 17 Jan 2019 22:52:36 +0100 Subject: [PATCH] PDF: add support for 0.72.0 and 0.73.0 (fixes #1207, fixes #1208) --- gdal/frmts/pdf/pdfdataset.cpp | 8 ++++++++ gdal/frmts/pdf/pdfobject.cpp | 5 +++++ gdal/frmts/pdf/pdfsdk_headers.h | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/gdal/frmts/pdf/pdfdataset.cpp b/gdal/frmts/pdf/pdfdataset.cpp index 27c9b552431..2eff2189fad 100644 --- a/gdal/frmts/pdf/pdfdataset.cpp +++ b/gdal/frmts/pdf/pdfdataset.cpp @@ -3416,7 +3416,11 @@ void PDFDataset::FindLayersPoppler() #endif if( ocg != nullptr && ocg->getName() != nullptr ) { +#if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72) + const char* pszLayerName = (const char*)ocg->getName()->c_str(); +#else const char* pszLayerName = (const char*)ocg->getName()->getCString(); +#endif AddLayer(pszLayerName); oLayerOCGMapPoppler[pszLayerName] = ocg; } @@ -4740,7 +4744,11 @@ GDALDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo ) GooString* poMetadata = poCatalogPoppler->readMetadata(); if (poMetadata) { +#if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72) + const char* pszContent = poMetadata->c_str(); +#else const char* pszContent = poMetadata->getCString(); +#endif if (pszContent != nullptr && STARTS_WITH(pszContent, "<?xpacket begin=")) { diff --git a/gdal/frmts/pdf/pdfobject.cpp b/gdal/frmts/pdf/pdfobject.cpp index cc87a8ec258..bcd093e9310 100644 --- a/gdal/frmts/pdf/pdfobject.cpp +++ b/gdal/frmts/pdf/pdfobject.cpp @@ -1061,8 +1061,13 @@ const CPLString& GDALPDFObjectPoppler::GetString() #else GooString* gooString = m_po->getString(); #endif +#if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72) + return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->c_str()), + static_cast<int>(gooString->getLength()))); +#else return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->getCString()), static_cast<int>(gooString->getLength()))); +#endif } else return (osStr = ""); diff --git a/gdal/frmts/pdf/pdfsdk_headers.h b/gdal/frmts/pdf/pdfsdk_headers.h index 9150b0f4102..41e48ae91d6 100644 --- a/gdal/frmts/pdf/pdfsdk_headers.h +++ b/gdal/frmts/pdf/pdfsdk_headers.h @@ -50,7 +50,11 @@ #pragma warning( disable : 4244 ) /* conversion from 'const int' to 'Guchar', possible loss of data */ #endif +#if !(POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 73) #include <goo/gtypes.h> +#else +typedef unsigned char Guchar; +#endif #include <goo/GooList.h> /* begin of poppler xpdf includes */
