From: Matthias Kilian Subject: geo/gdal: fix with new poppler To: Landry Breuil Cc: ports@openbsd.org Date: Tue, 7 Apr 2026 00:07:24 +0200 Prepare for the next poppler update. 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 6 Apr 2026 22:05:08 -0000 @@ -0,0 +1,18 @@ +Fix build with poppler-26.04.0. + +Index: frmts/pdf/pdfobject.cpp +--- frmts/pdf/pdfobject.cpp.orig ++++ frmts/pdf/pdfobject.cpp +@@ -1122,8 +1122,12 @@ const std::string &GDALPDFObjectPoppler::GetString() + { + if (GetType() == PDFObjectType_String) + { ++#if POPPLER_MAJOR_VERSION >= 26 && POPPLER_MINOR_VERSION >= 4 ++ const std::string &osStdStr = m_poConst->getString(); ++#else + const GooString *gooString = m_poConst->getString(); + const std::string &osStdStr = gooString->toStr(); ++#endif + const bool bLEUnicodeMarker = + osStdStr.size() >= 2 && static_cast(osStdStr[0]) == 0xFE && + static_cast(osStdStr[1]) == 0xFF;