Accepting request 960067 from home:iznogood:branches:Application:Geo
- Add gdal-fix-build-poppler.patch: Fix build with poppler 22.03.0 and newer. OBS-URL: https://build.opensuse.org/request/show/960067 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gdal?expand=0&rev=147
This commit is contained in:
parent
8133bd2fd3
commit
06fc56bdb2
54
gdal-fix-build-poppler.patch
Normal file
54
gdal-fix-build-poppler.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 2d5f96f233e6bda613e98e056bb9a39d12409e32 Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
Date: Fri, 18 Feb 2022 22:47:01 +0100
|
||||
Subject: [PATCH] PDF: fix build against Poppler > 22.2
|
||||
|
||||
---
|
||||
gdal/frmts/pdf/pdfdataset.cpp | 17 +++++++++++------
|
||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: gdal-3.4.1/frmts/pdf/pdfdataset.cpp
|
||||
===================================================================
|
||||
--- gdal-3.4.1.orig/frmts/pdf/pdfdataset.cpp
|
||||
+++ gdal-3.4.1/frmts/pdf/pdfdataset.cpp
|
||||
@@ -4241,8 +4241,6 @@ PDFDataset *PDFDataset::Open( GDALOpenIn
|
||||
#ifdef HAVE_POPPLER
|
||||
if(bUseLib.test(PDFLIB_POPPLER))
|
||||
{
|
||||
- GooString* poUserPwd = nullptr;
|
||||
-
|
||||
static bool globalParamsCreatedByGDAL = false;
|
||||
{
|
||||
CPLMutexHolderD(&hGlobalParamsMutex);
|
||||
@@ -4310,9 +4308,6 @@ PDFDataset *PDFDataset::Open( GDALOpenIn
|
||||
while( true )
|
||||
{
|
||||
VSIFSeekL(fp, 0, SEEK_SET);
|
||||
- if (pszUserPwd)
|
||||
- poUserPwd = new GooString(pszUserPwd);
|
||||
-
|
||||
g_nPopplerErrors = 0;
|
||||
if( globalParamsCreatedByGDAL )
|
||||
registerErrorCallback();
|
||||
@@ -4322,10 +4317,20 @@ PDFDataset *PDFDataset::Open( GDALOpenIn
|
||||
oObj.getObj()->initNull();
|
||||
auto poStream = new VSIPDFFileStream(fp, pszFilename, oObj.getObj());
|
||||
#endif
|
||||
+#if POPPLER_MAJOR_VERSION > 22 || (POPPLER_MAJOR_VERSION == 22 && POPPLER_MINOR_VERSION > 2)
|
||||
+ std::optional<GooString> osUserPwd;
|
||||
+ if (pszUserPwd)
|
||||
+ osUserPwd = std::optional<GooString>(pszUserPwd);
|
||||
+ poDocPoppler = new PDFDoc(poStream, std::optional<GooString>(), osUserPwd);
|
||||
+#else
|
||||
+ GooString* poUserPwd = nullptr;
|
||||
+ if (pszUserPwd)
|
||||
+ poUserPwd = new GooString(pszUserPwd);
|
||||
poDocPoppler = new PDFDoc(poStream, nullptr, poUserPwd);
|
||||
+ delete poUserPwd;
|
||||
+#endif
|
||||
if( globalParamsCreatedByGDAL )
|
||||
registerErrorCallback();
|
||||
- delete poUserPwd;
|
||||
if( g_nPopplerErrors >= MAX_POPPLER_ERRORS )
|
||||
{
|
||||
PDFFreeDoc(poDocPoppler);
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 7 20:33:32 UTC 2022 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Add gdal-fix-build-poppler.patch: Fix build with poppler 22.03.0
|
||||
and newer.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 4 15:10:17 UTC 2022 - Bruno Friedmann <bruno@ioda-net.ch>
|
||||
|
||||
|
@ -38,6 +38,9 @@ Source0: https://download.osgeo.org/%{name}/%{version}/%{sourcename}-%{ve
|
||||
Source1: https://download.osgeo.org/%{name}/%{version}/%{sourcename}-%{version}.tar.xz.md5
|
||||
Source2: https://download.osgeo.org/%{name}/%{version}/%{sourcename}autotest-%{version}.tar.gz
|
||||
Patch0: gdal-perl.patch
|
||||
# PATCH-FIX-UPSTREAM gdal-fix-build-poppler.patch -- Fix build with poppler 22.03.0 and newer
|
||||
Patch1: gdal-fix-build-poppler.patch
|
||||
|
||||
BuildRequires: KEALib-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
|
Loading…
x
Reference in New Issue
Block a user