From nobody Wed Oct 6 10:35:42 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8B45712BFF01; Wed, 6 Oct 2021 10:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HPW7f2zT1z4pkC; Wed, 6 Oct 2021 10:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 263DF1EB87; Wed, 6 Oct 2021 10:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 196AZgL6007457; Wed, 6 Oct 2021 10:35:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 196AZgnG007456; Wed, 6 Oct 2021 10:35:42 GMT (envelope-from git) Date: Wed, 6 Oct 2021 10:35:42 GMT Message-Id: <202110061035.196AZgnG007456@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Tobias C. Berner" Subject: git: a6b2bfcb415d - main - graphics/gdal: prepare for poppler 21.10 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tcberner X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a6b2bfcb415d315f37e6c1ea4512e9c608212403 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tcberner: URL: https://cgit.FreeBSD.org/ports/commit/?id=a6b2bfcb415d315f37e6c1ea4512e9c608212403 commit a6b2bfcb415d315f37e6c1ea4512e9c608212403 Author: Tobias C. Berner AuthorDate: 2021-10-06 10:30:28 +0000 Commit: Tobias C. Berner CommitDate: 2021-10-06 10:35:19 +0000 graphics/gdal: prepare for poppler 21.10 Obtained from: https://github.com/OSGeo/gdal/commit/9c09870e374ca21d558101af3f4c09a6164fdfc3 PR: 258836 --- graphics/gdal/files/patch-frmts-pdf-pdfdataset.cpp | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/graphics/gdal/files/patch-frmts-pdf-pdfdataset.cpp b/graphics/gdal/files/patch-frmts-pdf-pdfdataset.cpp index 247bc4a4fdb0..486541d94a06 100644 --- a/graphics/gdal/files/patch-frmts-pdf-pdfdataset.cpp +++ b/graphics/gdal/files/patch-frmts-pdf-pdfdataset.cpp @@ -1,6 +1,6 @@ ---- frmts/pdf/pdfdataset.cpp.orig 2021-04-27 09:12:27 UTC +--- frmts/pdf/pdfdataset.cpp.orig 2021-09-01 09:50:03 UTC +++ frmts/pdf/pdfdataset.cpp -@@ -3584,7 +3584,7 @@ void PDFDataset::FindLayersPoppler() +@@ -3593,7 +3593,7 @@ void PDFDataset::FindLayersPoppler() #if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72) const char* pszLayerName = (const char*)ocg->getName()->c_str(); #else @@ -9,7 +9,14 @@ #endif AddLayer(pszLayerName); oLayerOCGListPoppler.push_back(std::make_pair(CPLString(pszLayerName), ocg)); -@@ -4969,7 +4969,7 @@ PDFDataset *PDFDataset::Open( GDALOpenInfo * poOpenInf +@@ -4982,13 +4982,13 @@ PDFDataset *PDFDataset::Open( GDALOpenInfo * poOpenInf + #ifdef HAVE_POPPLER + if (bUseLib.test(PDFLIB_POPPLER)) + { +- GooString* poMetadata = poCatalogPoppler->readMetadata(); ++ auto poMetadata = poCatalogPoppler->readMetadata(); + if (poMetadata) + { #if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72) const char* pszContent = poMetadata->c_str(); #else @@ -18,3 +25,13 @@ #endif if (pszContent != nullptr && STARTS_WITH(pszContent, "SetMetadata(const_cast(apszMDList), "xml:XMP"); + } ++#if (POPPLER_MAJOR_VERSION < 21 || (POPPLER_MAJOR_VERSION == 21 && POPPLER_MINOR_VERSION <= 9)) + delete poMetadata; ++#endif + } + + /* Read Info object */