Accepting request 670314 from home:wolfi323:branches:Application:Geo
- 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 OBS-URL: https://build.opensuse.org/request/show/670314 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gdal?expand=0&rev=82
This commit is contained in:
parent
2bdf647cbf
commit
54fac41f93
1144
Poppler-revision-version-management.patch
Normal file
1144
Poppler-revision-version-management.patch
Normal file
File diff suppressed because it is too large
Load Diff
74
add-support-for-poppler-0.72.0-and-0.73.0.patch
Normal file
74
add-support-for-poppler-0.72.0-and-0.73.0.patch
Normal file
@ -0,0 +1,74 @@
|
||||
From d295d0ebc3b41092ad072790c704c772098da210 Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
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 */
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 30 19:51:14 UTC 2019 - Wolfgang Bauer <wbauer@tmo.at>
|
||||
|
||||
- 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 24 09:59:19 UTC 2018 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
|
@ -35,6 +35,10 @@ Source1: http://download.osgeo.org/%{name}/%{version}/%{sourcename}-%{ver
|
||||
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 @@ The GDAL python modules provide support to handle multiple GIS file formats.
|
||||
%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}')
|
||||
|
Loading…
x
Reference in New Issue
Block a user