Source: xpdf Version: 3.04+git20260220-1 Severity: normal Tags: ftbfs patch
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Dear Maintainer, xpdf fails to build against poppler >= 26.05 (26.07.0 has been uploaded to experimental and is currently in NEW). Two poppler API changes break the build: * poppler 26.05 added a required EndOfLineHyphenMode parameter to TextPage::getText() * poppler 26.07 removed appendToPath() from goo/gfile.h ``` xpdf/PDFCore.cc:1684:38: error: no matching function for call to 'TextPage::getText(PDFRectangle&, EndOfLineKind, bool)' xpdf/XPDFCore.cc:736:3: error: 'appendToPath' was not declared in this scope ``` The attached patch adds poppler version probes to configure.ac following the existing convention, passes EndOfLineHyphenMode::RemoveAll (matching the previous hard-coded behaviour), and inlines the trivial Unix path append. All changes are version-guarded, so the patch is a no-op with the current poppler (26.01) and is safe to apply now, ahead of the transition Thanks, Nadzeya -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEuVOE/FJ0HcdfWSw//lAdKwFeZPsFAmpiURcACgkQ/lAdKwFe ZPtXQg//VRIO/7cgED6Pe/g6XhgHWAWPGr4QLy3C3FcvRzfIHcE9aNXjfa+g5nHG wPiZ9PWtxJOcc8U9E/yrl45RHkbg6af+bNAw4uAuPxa81GSMOKy8rzWGYL3ti5vm jLmL4+59YdDF9GbBwDQu3RRjOz+7ib/6Kv9vSVa6yAc0WG5sOq1K0W3OrAjRosDY 6PX3oOGcfqAx3B5gWIv91GAKjD76zut3zZwL4zAxHSgfw16d7Xtj8/KKe35LHRjl qKhUt6Zvbr4GS4X+JQq0aO2I2wvN+mwGa5x471upmUZ9JBlx+ybkq14Q3Nir8oXk 5xmhlAXbPXUTo4LztgiKQvr5sa9agvP5KEDSmg0mKr4WvfLGS5u7bv8GdX2g4u8Q +o8asWcS5VSmjLrwzT/Bph31TDpQ1aO5OGpQxpEX673rt3/Y6SNbjRs5QgJaATRF bn0G1YaPNIGRgw6zAJofaokDvMfUbEc4DVAE+itykGcaT6qDJivG8qIQPrjFcaBt 3AzttDnoDaiUG5l8S/I410j5GGf2TbHiRdGtRd8+dh1OtPqSOqNICcbiGe1bRQ6U KFSCu7VEl11GTM9D2x9rjLKXpfqMJMhn8NfxCFEEFOaDI3wKodL0nB9P+eLaryus hrRkFJZUWWHp3Hcnf0KgksrO0x134MB6iYiEQePkvoGsmyIjBXg= =Do3o -----END PGP SIGNATURE-----
Description: Fix FTBFS with poppler >= 26.05 Two poppler API changes break the build: 26.05 added a required EndOfLineHyphenMode parameter to TextPage::getText() (pass RemoveAll, matching the previous hard-coded behaviour), and 26.07 removed appendToPath() from goo/gfile.h (inline the trivial Unix path append). Both are guarded by version checks following the existing convention, so older poppler still builds Author: Nadzeya Hutsko <[email protected]> Bug-Ubuntu: https://bugs.launchpad.net/bugs/2161658 Forwarded: no Last-Update: 2026-07-23 --- a/configure.ac +++ b/configure.ac @@ -98,6 +98,12 @@ AC_DEFINE([TEXTPAGE_NO_REFCOUNT]) AC_DEFINE([SPLASHOUTPUTDEV_NO_REVERSEVIDEO]) ]) +PKG_CHECK_EXISTS([poppler >= 26.05.0], [ + AC_DEFINE([TEXTPAGE_GETTEXT_HYPHENMODE]) +]) +PKG_CHECK_EXISTS([poppler >= 26.07.0], [ + AC_DEFINE([NO_APPENDTOPATH]) +]) CPPFLAGS="$CPPFLAGS -std=c++${cxx_standard}" --- a/xpdf/PDFCore.cc +++ b/xpdf/PDFCore.cc @@ -1681,7 +1681,12 @@ #ifdef TEXTOUTPUTDEV_GETTEXT_RECTANGLE PDFRectangle rect(selectULX, selectULY, selectLRX, selectLRY); +#ifdef TEXTPAGE_GETTEXT_HYPHENMODE + text = toString(page->text->getText(rect, eolUnix, true, + EndOfLineHyphenMode::RemoveAll)); +#else text = toString(page->text->getText(rect, eolUnix, true)); +#endif #else text = toString(page->text->getText(selectULX, selectULY, selectLRX, selectLRY #ifdef TEXTPAGE_GETTEXT_EOL --- a/xpdf/XPDFCore.cc +++ b/xpdf/XPDFCore.cc @@ -733,7 +733,15 @@ std::unique_ptr<GooString> absPath = makeGooStringPtr(xpdfDirName(docFileName)); +#ifdef NO_APPENDTOPATH + // poppler 26.07 removed appendToPath from goo/gfile.h + if (!absPath->empty() && absPath->getChar(absPath->size() - 1) != '/') { + absPath->push_back('/'); + } + absPath->append(relPath); +#else appendToPath(absPath.get(), relPath.c_str()); +#endif return toString(absPath.get()); }

