commit: 4250afb426995e7d5757a07e4451311a798556de Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Thu Jan 8 23:20:24 2026 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Fri Jan 9 11:51:03 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4250afb4
app-office/libreoffice: Fix build w/ poppler-26.01 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> .../files/libreoffice-25.2.7.2-poppler-26.01.patch | 116 +++++++++++++++++++++ .../libreoffice/libreoffice-25.2.7.2-r1.ebuild | 1 + 2 files changed, 117 insertions(+) diff --git a/app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.01.patch b/app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.01.patch new file mode 100644 index 000000000000..b914c90a309d --- /dev/null +++ b/app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.01.patch @@ -0,0 +1,116 @@ +From b307d254a88a87fe59f9c041346657790c75ac16 Mon Sep 17 00:00:00 2001 +From: Xisco Fauli <[email protected]> +Date: Wed, 7 Jan 2026 14:06:55 +0100 +Subject: [PATCH] poppler: upgrade to 26.01.0 + +stripped of all the bundled update stuff ... + +--- + .../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 15 +- + .../pdfimport/xpdfwrapper/pnghelper.cxx | 25 +- + 2 files changed, 32 insertions(+), 8 deletions(-) + +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +index a3b34db15464d..6b9184809803d 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -231,7 +231,10 @@ static void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* str ) + #else + str = ((DCTStream *)str)->getRawStream(); + #endif +-#if POPPLER_CHECK_VERSION(25, 2, 0) ++#if POPPLER_CHECK_VERSION(26, 1, 0) ++ if (!str->rewind()) ++ return; ++#elif POPPLER_CHECK_VERSION(25, 2, 0) + if (!str->reset()) + return; + #else +@@ -272,7 +275,10 @@ static void writePbm_(OutputBuffer& o_rOutputBuf, Stream* str, int width, int he + o_rOutputBuf.resize(header_size); + + // initialize stream +-#if POPPLER_CHECK_VERSION(25, 2, 0) ++#if POPPLER_CHECK_VERSION(26, 1, 0) ++ if (!str->rewind()) ++ return; ++#elif POPPLER_CHECK_VERSION(25, 2, 0) + if (!str->reset()) + return; + #else +@@ -334,7 +340,10 @@ static void writePpm_( OutputBuffer& o_rOutputBuf, + width, + colorMap->getNumPixelComps(), + colorMap->getBits())); +-#if POPPLER_CHECK_VERSION(25, 2, 0) ++#if POPPLER_CHECK_VERSION(26, 1, 0) ++ if (!imgStr->rewind()) ++ return; ++#elif POPPLER_CHECK_VERSION(25, 2, 0) + if (!imgStr->reset()) + return; + #else +diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx +index e21d9192f563e..6e9784d4aa6bb 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx +@@ -214,7 +214,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, + int nLineSize = (width + 7)/8; + aScanlines.reserve( nLineSize * height + height ); + +-#if POPPLER_CHECK_VERSION(25, 2, 0) ++#if POPPLER_CHECK_VERSION(26, 1, 0) ++ if (!str->rewind()) ++ return; ++#elif POPPLER_CHECK_VERSION(25, 2, 0) + if (!str->reset()) + return; + #else +@@ -257,7 +260,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, + width, + colorMap->getNumPixelComps(), + colorMap->getBits())); +-#if POPPLER_CHECK_VERSION(25, 2, 0) ++#if POPPLER_CHECK_VERSION(26, 1, 0) ++ if (!imgStr->rewind()) ++ return; ++#elif POPPLER_CHECK_VERSION(25, 2, 0) + if (!imgStr->reset()) + return; + #else +@@ -299,7 +305,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, + maskColorMap->getNumPixelComps(), + maskColorMap->getBits())); + +-#if POPPLER_CHECK_VERSION(25, 2, 0) ++#if POPPLER_CHECK_VERSION(26, 1, 0) ++ if (!imgStrMask->rewind()) ++ return; ++#elif POPPLER_CHECK_VERSION(25, 2, 0) + if (!imgStrMask->reset()) + return; + #else +@@ -353,7 +362,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, + width, + colorMap->getNumPixelComps(), + colorMap->getBits())); +-#if POPPLER_CHECK_VERSION(25, 2, 0) ++#if POPPLER_CHECK_VERSION(26, 1, 0) ++ if (!imgStr->rewind()) ++ return; ++#elif POPPLER_CHECK_VERSION(25, 2, 0) + if (!imgStr->reset()) + return; + #else +@@ -392,7 +404,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, + std::unique_ptr<ImageStream> imgStrMask( + new ImageStream(maskStr, maskWidth, 1, 1)); + +-#if POPPLER_CHECK_VERSION(25, 2, 0) ++#if POPPLER_CHECK_VERSION(26, 1, 0) ++ if (!imgStrMask->rewind()) ++ return; ++#elif POPPLER_CHECK_VERSION(25, 2, 0) + if (!imgStrMask->reset()) + return; + #else diff --git a/app-office/libreoffice/libreoffice-25.2.7.2-r1.ebuild b/app-office/libreoffice/libreoffice-25.2.7.2-r1.ebuild index 47999ca2e243..29498a4de626 100644 --- a/app-office/libreoffice/libreoffice-25.2.7.2-r1.ebuild +++ b/app-office/libreoffice/libreoffice-25.2.7.2-r1.ebuild @@ -299,6 +299,7 @@ PATCHES=( "${FILESDIR}/${P}-poppler-25.10.patch" "${FILESDIR}/${P}-icu-77.1.patch" "${FILESDIR}/${P}-icu-78.1.patch" + "${FILESDIR}/${P}-poppler-26.01.patch" # add qt6 backend as possible fallback for gtk-based desktop environments: # https://bugs.gentoo.org/950170
