From e3be057790daa092a7670de3daa7f0f4e6a459b2 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sun, 20 Sep 2026 20:33:01 +0200 Subject: [PATCH] app-office/libreoffice: Fix build w/ app-text/poppler-26.06.0 Signed-off-by: Andreas Sturmlechner --- .../libreoffice-25.2.7.2-poppler-26.04.patch | 6 +- .../libreoffice-25.2.7.2-poppler-26.06.patch | 72 +++++++++++++++++++ .../libreoffice-25.2.7.2-r1.ebuild | 1 + 3 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.06.patch diff --git a/app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.04.patch b/app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.04.patch index 4b0dd3b16b764..7532447ef089d 100644 --- a/app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.04.patch +++ b/app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.04.patch @@ -3,12 +3,8 @@ From: Xisco Fauli Date: Thu, 2 Apr 2026 11:32:02 +0200 Subject: [PATCH] poppler: upgrade to 26.04 -Downloaded from https://poppler.freedesktop.org/poppler-26.04.0.tar.xz +stripped of all the bundled update stuff ... -Change-Id: I1e43d4a63da2f380b613718a897c3973ec9e16ce -Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203153 -Reviewed-by: Xisco Fauli -Tested-by: Jenkins --- .../source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 +++- .../source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 +++- diff --git a/app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.06.patch b/app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.06.patch new file mode 100644 index 0000000000000..62a73d160ecfa --- /dev/null +++ b/app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.06.patch @@ -0,0 +1,72 @@ +From b08afae7e41fd5ca3a4101de07366783b17b3887 Mon Sep 17 00:00:00 2001 +From: Xisco Fauli +Date: Wed, 3 Jun 2026 17:37:11 +0200 +Subject: [PATCH] poppler: upgrade to 26.06 + +stripped of all the bundled update stuff ... + +--- + .../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 20 +++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +index 18c855908f024..ed91b55533349 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -60,6 +60,10 @@ + #include "UTF8.h" + #endif + ++#if POPPLER_CHECK_VERSION(26, 6, 0) ++#include ++#endif ++ + #ifdef _WIN32 + # define snprintf _snprintf + +@@ -1223,7 +1227,9 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, + { + GfxRGB aMinRGB; + colorMap->getColorSpace()->getRGB( +-#if POPPLER_CHECK_VERSION(0, 82, 0) ++#if POPPLER_CHECK_VERSION(26, 6, 0) ++ *reinterpret_cast(maskColors), ++#elif POPPLER_CHECK_VERSION(0, 82, 0) + reinterpret_cast(maskColors), + #else + reinterpret_cast(maskColors), +@@ -1232,7 +1238,9 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, + + GfxRGB aMaxRGB; + colorMap->getColorSpace()->getRGB( +-#if POPPLER_CHECK_VERSION(0, 82, 0) ++#if POPPLER_CHECK_VERSION(26, 6, 0) ++ *(reinterpret_cast(maskColors)+gfxColorMaxComps), ++#elif POPPLER_CHECK_VERSION(0, 82, 0) + reinterpret_cast(maskColors)+gfxColorMaxComps, + #else + reinterpret_cast(maskColors)+gfxColorMaxComps, +@@ -1365,7 +1373,11 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState *state, Gfx *, Catalog *, + aBox.y2 = pBbox[3]; + + const int nDPI = 72; // GfxState seems to have 72.0 as magic for some reason ++#if POPPLER_CHECK_VERSION(26, 6, 0) ++ auto pSplashGfxState = new GfxState(nDPI, nDPI, aBox, 0, false); ++#else + auto pSplashGfxState = new GfxState(nDPI, nDPI, &aBox, 0, false); ++#endif + #if POPPLER_CHECK_VERSION(26, 2, 0) + auto pSplashOut = new SplashOutputDev(splashModeRGB8, 1, nullptr); + #else +@@ -1375,7 +1387,11 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState *state, Gfx *, Catalog *, + pSplashOut->startDoc(m_pDoc); + pSplashOut->startPage(0 /* pageNum */, pSplashGfxState, nullptr /* xref */); + ++#if POPPLER_CHECK_VERSION(26, 6, 0) ++ auto pSplashGfx = new Gfx(m_pDoc, pSplashOut, pResDict, aBox, nullptr); ++#else + auto pSplashGfx = new Gfx(m_pDoc, pSplashOut, pResDict, &aBox, nullptr); ++#endif + pSplashGfx->display(aStr); + std::unique_ptr pSplashBitmap(pSplashOut->takeBitmap()); + // Poppler tells us to free the splash device immediately after taking the 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 1faba559b142e..c2a5baf559ed7 100644 --- a/app-office/libreoffice/libreoffice-25.2.7.2-r1.ebuild +++ b/app-office/libreoffice/libreoffice-25.2.7.2-r1.ebuild @@ -302,6 +302,7 @@ PATCHES=( "${FILESDIR}/${P}-poppler-26.01.patch" "${FILESDIR}/${P}-poppler-26.02.patch" "${FILESDIR}/${P}-poppler-26.04.patch" + "${FILESDIR}/${P}-poppler-26.06.patch" # add qt6 backend as possible fallback for gtk-based desktop environments: # https://bugs.gentoo.org/950170