Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Oct 2021 10:35:42 GMT
From:      "Tobias C. Berner" <tcberner@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: a6b2bfcb415d - main - graphics/gdal: prepare for poppler 21.10
Message-ID:  <202110061035.196AZgnG007456@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by tcberner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a6b2bfcb415d315f37e6c1ea4512e9c608212403

commit a6b2bfcb415d315f37e6c1ea4512e9c608212403
Author:     Tobias C. Berner <tcberner@FreeBSD.org>
AuthorDate: 2021-10-06 10:30:28 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
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, "<?xpacket begin="))
+@@ -4996,7 +4996,9 @@ PDFDataset *PDFDataset::Open( GDALOpenInfo * poOpenInf
+             const char * const apszMDList[2] = { pszContent, nullptr };
+             poDS->SetMetadata(const_cast<char**>(apszMDList), "xml:XMP");
+         }
++#if (POPPLER_MAJOR_VERSION < 21 || (POPPLER_MAJOR_VERSION == 21 && POPPLER_MINOR_VERSION <= 9))
+         delete poMetadata;
++#endif
+     }
+ 
+     /* Read Info object */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110061035.196AZgnG007456>