Index | Thread | Search

From:
Matthias Kilian <kili@outback.escape.de>
Subject:
geo/gdal fix build with new poppler
To:
landry@openbsd.org
Cc:
ports@openbsd.org
Date:
Wed, 29 Oct 2025 21:22:44 +0100

Download raw body.

Thread
Hi,

this fixes the build of geo/gdal with the new version of poppler.

Ok?

Ciao,
	Kili

Index: patches/patch-frmts_pdf_pdfobject_cpp
===================================================================
RCS file: patches/patch-frmts_pdf_pdfobject_cpp
diff -N patches/patch-frmts_pdf_pdfobject_cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-frmts_pdf_pdfobject_cpp	27 Oct 2025 20:43:54 -0000
@@ -0,0 +1,23 @@
+Fix build with poppler-25.10.0.
+
+Index: frmts/pdf/pdfobject.cpp
+--- frmts/pdf/pdfobject.cpp.orig
++++ frmts/pdf/pdfobject.cpp
+@@ -1437,7 +1437,7 @@ int64_t GDALPDFStreamPoppler::GetLength(int64_t nMaxSi
+ 
+ static char *GooStringToCharStart(GooString &gstr)
+ {
+-    auto nLength = gstr.getLength();
++    auto nLength = gstr.size();
+     if (nLength)
+     {
+         char *pszContent = static_cast<char *>(VSI_MALLOC_VERBOSE(nLength + 1));
+@@ -1514,7 +1514,7 @@ char *GDALPDFStreamPoppler::GetRawBytes()
+                  "GDALPDFStreamPoppler::GetRawBytes(): %s", e.what());
+         return nullptr;
+     }
+-    m_nRawLength = gstr.getLength();
++    m_nRawLength = gstr.size();
+     return GooStringToCharStart(gstr);
+ }
+