commit:     32a09b129bc57135b6e11a9c813a94b6a0336468
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  9 18:14:01 2026 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Feb  9 20:34:59 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32a09b12

app-office/calligra: add 25.12.2, fixes build w/ poppler-26.02

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 app-office/calligra/Manifest                       |   1 +
 app-office/calligra/calligra-25.12.2.ebuild        | 144 +++++++++++++++++++++
 .../files/calligra-25.12.2-poppler-26.02.patch     |  84 ++++++++++++
 3 files changed, 229 insertions(+)

diff --git a/app-office/calligra/Manifest b/app-office/calligra/Manifest
index e13635e3d0c4..135501b43f20 100644
--- a/app-office/calligra/Manifest
+++ b/app-office/calligra/Manifest
@@ -1,2 +1,3 @@
 DIST calligra-25.12.1.tar.xz 58052012 BLAKE2B 
beaa3d4883490e9d9b9390f633b71af7d7784a9a51ba5d051d8759722bc4799a8e3bf6eceb66d4dfe36c28fee0bce79cf60017eb9f001158fce1c5cf6125fd58
 SHA512 
5e5b1f6c983fb9eaca12afc4448efd7f5617a6094020de8ca6c75321a1e73fdcaa343a835ac487ce0e7d4c666fcc92e37c63c9747ec93fb0630d550fbdf78237
+DIST calligra-25.12.2.tar.xz 58041816 BLAKE2B 
91ef105062c6d683b5c7811a113758c833c5216094bfffbaecc6de4d84a6f00d6c0a7e0fb8a4ea355262cb63e4a26ff23d02f30a0e7861057d2e67d70d01b9f6
 SHA512 
affaa766bc68d58cb3c3791aff3dcf42e5101c95339eb376161a38d9ffd3f164e140546727e85b1f9f0c5f350950767329bdd961682e91c13160959f4043e5c9
 DIST calligra-3.2.1-patchset-1.tar.xz 11924 BLAKE2B 
5a71a7960a6d2a4d5e55129f4812fb13a2fb56613283d4582266e1836f107b711be43cb158e29c440fbda6992c03a3f4907f0600d21522fd9ab07c66354234a9
 SHA512 
26ec818f2415c43b116b716557710361621e1e4446087fe123e29107f82400ec82f19ab3a76dde9b749ed4b9f15da9c05c3fa6137fc814241c48ffc12f5628fc

diff --git a/app-office/calligra/calligra-25.12.2.ebuild 
b/app-office/calligra/calligra-25.12.2.ebuild
new file mode 100644
index 000000000000..5530f36f187c
--- /dev/null
+++ b/app-office/calligra/calligra-25.12.2.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CHECKREQS_DISK_BUILD="4G"
+ECM_HANDBOOK="forceoptional"
+ECM_TEST="forceoptional"
+KFMIN=6.19.0
+QTMIN=6.9.1
+inherit check-reqs ecm gear.kde.org xdg
+
+DESCRIPTION="KDE Office Suite"
+HOMEPAGE="https://calligra.org/";
+PATCHSET="${PN}-3.2.1-patchset-1"
+SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}.tar.xz";
+
+LICENSE="GPL-2"
+SLOT="0"
+if [[ ${KDE_BUILD_TYPE} == release ]]; then
+       KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+fi
+CAL_FTS=( karbon sheets stage words )
+IUSE="+charts +fontconfig gsl +import-filter +lcms okular +pdf phonon
+       +truetype webengine X $(printf 'calligra_features_%s ' ${CAL_FTS[@]})"
+
+RESTRICT="test"
+
+# TODO: Not packaged: Cauchy (https://bitbucket.org/cyrille/cauchy)
+# Required for the matlab/octave formula tool
+COMMON_DEPEND="
+       dev-lang/perl
+       dev-libs/openssl:=
+       >=dev-libs/qtkeychain-0.14.2:=[qt6(+)]
+       >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,network,widgets,xml]
+       >=dev-qt/qtdeclarative-${QTMIN}:6[widgets]
+       >=dev-qt/qtsvg-${QTMIN}:6
+       >=dev-qt/qttools-${QTMIN}:6[designer]
+       >=kde-frameworks/karchive-${KFMIN}:6
+       >=kde-frameworks/kcmutils-${KFMIN}:6
+       >=kde-frameworks/kcompletion-${KFMIN}:6
+       >=kde-frameworks/kconfig-${KFMIN}:6
+       >=kde-frameworks/kconfigwidgets-${KFMIN}:6
+       >=kde-frameworks/kcoreaddons-${KFMIN}:6
+       >=kde-frameworks/kcrash-${KFMIN}:6
+       >=kde-frameworks/kdbusaddons-${KFMIN}:6
+       >=kde-frameworks/kguiaddons-${KFMIN}:6
+       >=kde-frameworks/ki18n-${KFMIN}:6
+       >=kde-frameworks/kiconthemes-${KFMIN}:6
+       >=kde-frameworks/kio-${KFMIN}:6
+       >=kde-frameworks/kirigami-${KFMIN}:6
+       >=kde-frameworks/kitemviews-${KFMIN}:6
+       >=kde-frameworks/kjobwidgets-${KFMIN}:6
+       >=kde-frameworks/knotifications-${KFMIN}:6
+       >=kde-frameworks/knotifyconfig-${KFMIN}:6
+       >=kde-frameworks/ktextwidgets-${KFMIN}:6
+       >=kde-frameworks/kwidgetsaddons-${KFMIN}:6
+       >=kde-frameworks/kwindowsystem-${KFMIN}:6
+       >=kde-frameworks/kxmlgui-${KFMIN}:6
+       >=kde-frameworks/sonnet-${KFMIN}:6
+       virtual/libiconv
+       virtual/zlib:=
+       charts? ( dev-libs/kdiagram:6 )
+       fontconfig? ( media-libs/fontconfig )
+       gsl? ( sci-libs/gsl:= )
+       import-filter? (
+               app-text/libetonyek
+               app-text/libodfgen
+               app-text/libwpd:*
+               app-text/libwpg:*
+               >=app-text/libwps-0.4
+               dev-libs/librevenge
+               media-libs/libvisio
+       )
+       lcms? ( media-libs/lcms:2 )
+       okular? ( kde-apps/okular:6 )
+       pdf? ( app-text/poppler:=[qt6] )
+       phonon? ( >=media-libs/phonon-4.12.0[qt6(+)] )
+       truetype? ( media-libs/freetype:2 )
+       webengine? ( >=dev-qt/qtwebengine-${QTMIN}:6[widgets] )
+       calligra_features_sheets? ( dev-cpp/eigen:= )
+       calligra_features_words? ( dev-libs/libxslt )
+"
+DEPEND="${COMMON_DEPEND}
+       dev-libs/boost
+       lcms? ( dev-libs/imath:3 )
+       test? ( >=kde-frameworks/threadweaver-${KFMIN}:6 )
+"
+RDEPEND="${COMMON_DEPEND}
+       !${CATEGORY}/${PN}:5
+       calligra_features_karbon? ( media-gfx/pstoedit[plotutils] )
+"
+BDEPEND="
+       sys-devel/gettext
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${WORKDIR}"/${PATCHSET}/${PN}-3.1.89-no-arch-detection.patch # 
downstream
+       "${FILESDIR}"/${PN}-25.08.2-cmake4.patch # pending MR
+       "${FILESDIR}"/${P}-poppler-26.02.patch # pending MR
+)
+
+src_configure() {
+       local cal_ft myproducts
+
+       # applications
+       for cal_ft in ${CAL_FTS[@]}; do
+               use calligra_features_${cal_ft} && myproducts+=( "${cal_ft^^}" )
+       done
+
+       use lcms && myproducts+=( PLUGIN_COLORENGINES )
+       use okular && myproducts+=( OKULAR )
+
+       local mycmakeargs=(
+               -DPACKAGERS_BUILD=OFF
+               -DRELEASE_BUILD=ON
+               -DWITH_Iconv=ON
+               -DWITH_Imath=ON # w/ LCMS: 16 bit floating point Grayscale 
colorspace
+               -DCMAKE_DISABLE_FIND_PACKAGE_Cauchy=ON
+               -DPRODUCTSET="${myproducts[*]}"
+               $(cmake_use_find_package charts KChart6)
+               -DWITH_Fontconfig=$(usex fontconfig)
+               -DWITH_GSL=$(usex gsl)
+               -DWITH_LibEtonyek=$(usex import-filter)
+               -DWITH_LibOdfGen=$(usex import-filter)
+               -DWITH_LibRevenge=$(usex import-filter)
+               -DWITH_LibVisio=$(usex import-filter)
+               -DWITH_LibWpd=$(usex import-filter)
+               -DWITH_LibWpg=$(usex import-filter)
+               -DWITH_LibWps=$(usex import-filter)
+               $(cmake_use_find_package phonon Phonon4Qt6)
+               -DWITH_LCMS2=$(usex lcms)
+               -DWITH_Okular6=$(usex okular)
+               -DWITH_Poppler=$(usex pdf)
+               -DWITH_PopplerXPDFHeaders=$(usex pdf)
+               -DWITH_Eigen3=$(usex calligra_features_sheets)
+               -DBUILD_UNMAINTAINED=$(usex calligra_features_stage)
+               -DWITH_Freetype=$(usex truetype)
+               $(cmake_use_find_package webengine Qt6WebEngineWidgets)
+       )
+
+       ecm_src_configure
+}

diff --git a/app-office/calligra/files/calligra-25.12.2-poppler-26.02.patch 
b/app-office/calligra/files/calligra-25.12.2-poppler-26.02.patch
new file mode 100644
index 000000000000..d797e6fffabb
--- /dev/null
+++ b/app-office/calligra/files/calligra-25.12.2-poppler-26.02.patch
@@ -0,0 +1,84 @@
+Source: https://invent.kde.org/office/calligra/-/merge_requests/170
+
+From e374f34eb570cdcd22fecf328282a7956b6e9f76 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <[email protected]>
+Date: Sat, 7 Feb 2026 00:15:21 +0100
+Subject: [PATCH] Fix build with poppler 26.02.0
+
+...and adapt to the changes introduced with
+https://gitlab.freedesktop.org/poppler/poppler/-/commit/99433381912d2d5963646cc54ddd22e3c5db071b
+---
+ filters/karbon/pdf/SvgOutputDev.cpp | 12 ++++++++++++
+ filters/karbon/pdf/SvgOutputDev.h   |  8 ++++++++
+ 2 files changed, 20 insertions(+)
+
+diff --git a/filters/karbon/pdf/SvgOutputDev.cpp 
b/filters/karbon/pdf/SvgOutputDev.cpp
+index 178631e02af..94a5e91087d 100644
+--- a/filters/karbon/pdf/SvgOutputDev.cpp
++++ b/filters/karbon/pdf/SvgOutputDev.cpp
+@@ -210,7 +210,11 @@ QString SvgOutputDev::convertMatrix(const QTransform 
&matrix)
+     return QString("matrix(%1 %2 %3 %4 %5 
%6)").arg(matrix.m11()).arg(matrix.m12()).arg(matrix.m21()).arg(matrix.m22()).arg(matrix.dx()).arg(matrix.dy());
+ }
+ 
++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 2, 0)
+ QString SvgOutputDev::convertMatrix(const double *matrix)
++#else
++QString SvgOutputDev::convertMatrix(const std::array<double, 6> &matrix)
++#endif
+ {
+     return QString("matrix(%1 %2 %3 %4 %5 
%6)").arg(matrix[0]).arg(matrix[1]).arg(matrix[2]).arg(matrix[3]).arg(matrix[4]).arg(matrix[5]);
+ }
+@@ -434,7 +438,11 @@ void SvgOutputDev::drawString(GfxState *state, const 
GooString *s)
+     double x = state->getCurX();
+     double y = state->getCurY();
+ 
++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 2, 0)
+     const double *ctm = state->getCTM();
++#else
++    const std::array<double, 6> &ctm = state->getCTM();
++#endif
+     QTransform transform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ 
+     QTransform mirror;
+@@ -539,7 +547,11 @@ void SvgOutputDev::drawImage(GfxState *state,
+         return;
+     }
+ 
++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 2, 0)
+     const double *ctm = state->getCTM();
++#else
++    const std::array<double, 6> &ctm = state->getCTM();
++#endif
+     QTransform m(ctm[0] / width, ctm[1] / width, -ctm[2] / height, -ctm[3] / 
height, ctm[2] + ctm[4], ctm[3] + ctm[5]);
+ 
+     QByteArray ba;
+diff --git a/filters/karbon/pdf/SvgOutputDev.h 
b/filters/karbon/pdf/SvgOutputDev.h
+index e2a78285332..721894b1de6 100644
+--- a/filters/karbon/pdf/SvgOutputDev.h
++++ b/filters/karbon/pdf/SvgOutputDev.h
+@@ -12,6 +12,10 @@
+ 
+ #include <QString>
+ 
++#include <poppler-version.h>
++
++#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | 
(POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO))
++
+ class GfxPath;
+ class QTransform;
+ class GooString;
+@@ -69,7 +73,11 @@ public:
+ private:
+     QString convertPath(const GfxPath *path);
+     QString convertMatrix(const QTransform &matrix);
++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 2, 0)
+     QString convertMatrix(const double *matrix);
++#else
++    QString convertMatrix(const std::array<double, 6> &matrix);
++#endif
+     QString printFill();
+     QString printStroke();
+ 
+-- 
+GitLab
+

Reply via email to