public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/gdal/files/, sci-libs/gdal/
Date: Sat, 12 Mar 2022 15:53:06 +0000 (UTC)	[thread overview]
Message-ID: <1647100367.6399fdc2f4348d9e14cf983fa1c3b24e7ec324ee.asturm@gentoo> (raw)

commit:     6399fdc2f4348d9e14cf983fa1c3b24e7ec324ee
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  7 16:41:08 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Mar 12 15:52:47 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6399fdc2

sci-libs/gdal: Fix build with >=app-text/poppler-22.03.0

Closes: https://bugs.gentoo.org/834536
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../gdal/files/gdal-3.4.1-poppler-22.03.0.patch    | 54 ++++++++++++++++++++++
 sci-libs/gdal/gdal-3.4.1.ebuild                    |  4 +-
 2 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/sci-libs/gdal/files/gdal-3.4.1-poppler-22.03.0.patch b/sci-libs/gdal/files/gdal-3.4.1-poppler-22.03.0.patch
new file mode 100644
index 000000000000..94640e046a1b
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-3.4.1-poppler-22.03.0.patch
@@ -0,0 +1,54 @@
+From 17e98757e78969a199d1d6318f53d088da192191 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
+
+---
+ frmts/pdf/pdfdataset.cpp | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/frmts/pdf/pdfdataset.cpp b/frmts/pdf/pdfdataset.cpp
+index 22238bd74822..08f8e31c86a7 100644
+--- a/frmts/pdf/pdfdataset.cpp
++++ b/frmts/pdf/pdfdataset.cpp
+@@ -4241,8 +4241,6 @@ PDFDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo )
+ #ifdef HAVE_POPPLER
+   if(bUseLib.test(PDFLIB_POPPLER))
+   {
+-    GooString* poUserPwd = nullptr;
+-
+     static bool globalParamsCreatedByGDAL = false;
+     {
+         CPLMutexHolderD(&hGlobalParamsMutex);
+@@ -4310,9 +4308,6 @@ PDFDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo )
+     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( GDALOpenInfo * poOpenInfo )
+         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);

diff --git a/sci-libs/gdal/gdal-3.4.1.ebuild b/sci-libs/gdal/gdal-3.4.1.ebuild
index d78b7ddda904..904b9e2d0280 100644
--- a/sci-libs/gdal/gdal-3.4.1.ebuild
+++ b/sci-libs/gdal/gdal-3.4.1.ebuild
@@ -12,9 +12,8 @@ DESCRIPTION="Translator library for raster geospatial data formats (includes OGR
 HOMEPAGE="https://gdal.org/"
 SRC_URI="https://download.osgeo.org/${PN}/${PV}/${P}.tar.gz"
 
-# subslot is libgdal.so.<SONAME>
-SLOT="0/30"
 LICENSE="BSD Info-ZIP MIT"
+SLOT="0/30" # subslot is libgdal.so.<SONAME>
 KEYWORDS="amd64 ~arm arm64 ~ia64 ppc ppc64 ~riscv x86 ~amd64-linux ~x86-linux ~ppc-macos"
 IUSE="armadillo +aux-xml curl cpu_flags_x86_avx cpu_flags_x86_sse cpu_flags_x86_ssse3 debug doc fits geos gif gml hdf5 heif java jpeg jpeg2k lzma mdb mysql netcdf odbc ogdi opencl oracle pdf perl png postgres python spatialite sqlite threads webp xls zstd"
 
@@ -92,6 +91,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-2.3.0-curl.patch" # bug 659840
 	"${FILESDIR}/${PN}-3.3.0-libdir.patch"
 	"${FILESDIR}/${P}-poppler-22.01.0-c++17.patch"
+	"${FILESDIR}/${P}-poppler-22.03.0.patch" # bug 834536
 )
 
 src_prepare() {


             reply	other threads:[~2022-03-12 15:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-12 15:53 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-10 20:11 [gentoo-commits] repo/gentoo:master commit in: sci-libs/gdal/files/, sci-libs/gdal/ Andreas Sturmlechner
2025-02-09 15:12 Andreas Sturmlechner
2023-11-21 22:36 Andreas Sturmlechner
2022-10-09 18:29 Andreas Sturmlechner
2022-01-10 23:19 Sam James
2021-10-02 12:58 Andreas Sturmlechner
2021-05-28  3:47 Sam James
2020-04-13  9:21 Andreas Sturmlechner
2019-12-25 20:46 Andreas Sturmlechner
2019-11-01 18:53 Andreas Sturmlechner
2019-07-15  5:36 Andreas Sturmlechner
2019-06-12 10:03 Andreas Sturmlechner
2019-05-19 20:55 Andreas Sturmlechner
2019-01-16 20:01 Andreas Sturmlechner
2018-01-16 20:25 Andreas Sturmlechner
2017-12-20 20:08 Andreas Sturmlechner
2017-12-20 18:23 Amy Liffey
2017-07-19 18:54 Andreas Sturmlechner
2016-12-03 10:35 Amy Winston
2016-11-07 13:56 Amy Winston
2016-07-18 20:41 Sven Wegener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1647100367.6399fdc2f4348d9e14cf983fa1c3b24e7ec324ee.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox