commit:     8e168d32cee95275a865774d6538c7555e8cc016
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  5 11:38:58 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct  5 11:44:16 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e168d32

kde-apps/konqueror: Fix build with >=kde-plasma/plasma-activities-6.5

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=509937

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

 .../konqueror-25.04.3-plasma-activities-6.5.patch  | 173 +++++++++++++++++++++
 kde-apps/konqueror/konqueror-25.04.3-r2.ebuild     |  90 +++++++++++
 kde-apps/konqueror/konqueror-25.08.1-r1.ebuild     |  85 ++++++++++
 3 files changed, 348 insertions(+)

diff --git 
a/kde-apps/konqueror/files/konqueror-25.04.3-plasma-activities-6.5.patch 
b/kde-apps/konqueror/files/konqueror-25.04.3-plasma-activities-6.5.patch
new file mode 100644
index 000000000000..6cfe1f391ca6
--- /dev/null
+++ b/kde-apps/konqueror/files/konqueror-25.04.3-plasma-activities-6.5.patch
@@ -0,0 +1,173 @@
+From a33e34c749acbd6247279863aac3b90d44f27814 Mon Sep 17 00:00:00 2001
+From: Stefano Crocco <[email protected]>
+Date: Sat, 27 Sep 2025 18:34:23 +0000
+Subject: [PATCH] Disable functionality related to running activities when
+ compiling with Plasma 6.5
+
+BUG: 509937
+
+
+(cherry picked from commit 7cdfaa103c24ba5aa3ba716c2026e34bd270b47a)
+
+c90d9095 Disable functionality related to running activities when compiling 
with Plasma 6.5
+2fe10347 Use correct include
+
+Co-authored-by: Stefano Crocco <[email protected]>
+---
+ src/activitymanager.cpp | 13 +++++++++++++
+ src/activitymanager.h   | 22 ++++++++++++++++++----
+ 2 files changed, 31 insertions(+), 4 deletions(-)
+
+diff --git a/src/activitymanager.cpp b/src/activitymanager.cpp
+index 02fbd5a823..ba1488679e 100644
+--- a/src/activitymanager.cpp
++++ b/src/activitymanager.cpp
+@@ -22,7 +22,9 @@
+ 
+ ActivityManager::ActivityManager(QObject* parent) : QObject(parent), 
m_activitiesConsumer(new KActivities::Consumer(this))
+ {
++#ifdef ACTIVITIES_CAN_BE_STOPPED
+     connect(m_activitiesConsumer, 
&KActivities::Consumer::runningActivitiesChanged, this, 
&ActivityManager::handleRunningActivitiesChange);
++#endif
+     connect(m_activitiesConsumer, &KActivities::Consumer::activityRemoved, 
this, &ActivityManager::removeActivityState);
+     connect(KX11Extras::self(), &KX11Extras::windowChanged, this, 
&ActivityManager::handleWindowChanged);
+ }
+@@ -43,6 +45,7 @@ QString ActivityManager::activitiesGroupName()
+     return s_activitiesGroupName;
+ }
+ 
++#ifdef ACTIVITIES_CAN_BE_STOPPED
+ void 
ActivityManager::closeWindowBecauseNotInRunningActivities(KonqMainWindow* 
window)
+ {
+     disconnect(window, &KonqMainWindow::closing, this, 
&ActivityManager::removeWindowFromActivities);
+@@ -56,7 +59,9 @@ void 
ActivityManager::closeWindowBecauseNotInRunningActivities(KonqMainWindow* w
+         window->close();
+     }
+ }
++#endif
+ 
++#ifdef ACTIVITIES_CAN_BE_STOPPED
+ void ActivityManager::handleRunningActivitiesChange(const QStringList& 
runningActivities)
+ {
+     QList<KonqMainWindow*> *windows = KonqMainWindow::mainWindowList();
+@@ -116,6 +121,7 @@ void ActivityManager::handleRunningActivitiesChange(const 
QStringList& runningAc
+         closeWindowBecauseNotInRunningActivities(it.key());
+     }
+ }
++#endif //ACTIVITIES_CAN_BE_STOPPED
+ 
+ void ActivityManager::saveWindowsActivityInfo(const QHash<KonqMainWindow *, 
QStringList>& windowsWithActivities)
+ {
+@@ -184,16 +190,21 @@ void ActivityManager::handleWindowChanged(WId id, 
NET::Properties, NET::Properti
+     if (activities.isEmpty()) {
+         return;
+     }
++
++#ifdef ACTIVITIES_CAN_BE_STOPPED
+     QStringList runningActivities = m_activitiesConsumer->runningActivities();
+     auto isRunning = [runningActivities](const QString &act){return 
runningActivities.contains(act);};
+     if (std::any_of(activities.constBegin(), activities.constEnd(), 
isRunning)) {
+         return;
+     }
++#endif
+ 
+     QHash<KonqMainWindow*, QStringList> hash;
+     hash.insert(w, activities);
+     saveWindowsActivityInfo(hash);
++#ifdef ACTIVITIES_CAN_BE_STOPPED
+     closeWindowBecauseNotInRunningActivities(w);
++#endif
+ }
+ 
+ void ActivityManager::removeWindowFromActivities(KonqMainWindow* window)
+@@ -244,6 +255,7 @@ void ActivityManager::removeActivityState(const QString& 
id)
+     config->sync();
+ }
+ 
++#ifdef ACTIVITIES_CAN_BE_STOPPED
+ KonqMainWindow* ActivityManager::restoreWindowFromActivityState(const 
QString& uuid)
+ {
+     //WARNING: for efficiency reasons, this method assumes no window with the 
given uuid exists. It's up to the caller to make sure of that
+@@ -275,6 +287,7 @@ KonqMainWindow* 
ActivityManager::restoreWindowFromActivityState(const QString& u
+ 
+     return w;
+ }
++#endif
+ 
+ void ActivityManager::registerMainWindow(KonqMainWindow* window)
+ {
+diff --git a/src/activitymanager.h b/src/activitymanager.h
+index 1cc11aa0b4..fba26c8d0c 100644
+--- a/src/activitymanager.h
++++ b/src/activitymanager.h
+@@ -11,6 +11,16 @@
+ 
+ #include <KX11Extras>
+ 
++#ifdef KActivities_FOUND
++//Functions allowing to query about running activities has been removed from 
Plasma 6.5.0
++//since activities are always considered to be running. Code making use of 
that
++//functionality needs to be skipped
++#include <PlasmaActivities/Version>
++#if PLASMA_ACTIVITIES_VERSION < QT_VERSION_CHECK(6, 4, 90)
++#define ACTIVITIES_CAN_BE_STOPPED
++#endif
++#endif
++
+ class KonqMainWindow;
+ namespace KActivities {
+   class Consumer;
+@@ -20,9 +30,9 @@ namespace KActivities {
+  * @brief Class which handles closing and restoring windows according to the 
current activity
+  *
+  * In particular, this class:
+- * - closes windows when all the activities they belong to are stopped
+- * - stores information about windows which are closed because they only 
belong to stopped activities
+- * - creates windows belonging to activities which are restarted
++ * - closes windows when all the activities they belong to are stopped (only 
for Plasma versions less than 6.5)
++ * - stores information about windows which are closed because they only 
belong to stopped activities (only for Plasma versions less than 6.5)
++ * - creates windows belonging to activities which are restarted (only for 
Plasma versions less than 6.5)
+  * - removes information about deleted activities
+  * - removes information about windows closed by the user
+  *
+@@ -72,18 +82,20 @@ private slots:
+      */
+     void removeWindowFromActivities(KonqMainWindow *window);
+ 
++#ifdef ACTIVITIES_CAN_BE_STOPPED
+     /**
+      * @brief Performs the operations needed to keep windows in sync with 
running activities
+      *
+      * In particular, this method:
+      * - finds out which windows should be closed because all the activities 
they belong to are closed
+-     * - saves informations about the windows to close
++     * - saves information about the windows to close
+      * - closes the windows which only belong to stopped activities
+      * - checks whether there are windows which belong to running activities 
but which don't exist and creates them
+      * @note this method ignores preloaded windows (if any)
+      * @param runningActivities the list of identifiers of all running 
activities
+      */
+     void handleRunningActivitiesChange(const QStringList &runningActivities);
++#endif
+ 
+     /**
+      * @brief Removes information about a deleted activity
+@@ -131,6 +143,7 @@ private:
+      */
+     void handleWindowChanged(WId id, NET::Properties prop, NET::Properties2 
prop2);
+ 
++#ifdef ACTIVITIES_CAN_BE_STOPPED
+     /**
+      * @brief Closes a window in a way which works correctly with activities 
management
+      *
+@@ -155,6 +168,7 @@ private:
+      * @return the restored window
+      */
+     KonqMainWindow* restoreWindowFromActivityState(const QString &uuid);
++#endif
+ 
+     /**
+      * @return The path of the configuration file where activities 
information is stored
+-- 
+GitLab
+

diff --git a/kde-apps/konqueror/konqueror-25.04.3-r2.ebuild 
b/kde-apps/konqueror/konqueror-25.04.3-r2.ebuild
new file mode 100644
index 000000000000..d2ed5510ee2e
--- /dev/null
+++ b/kde-apps/konqueror/konqueror-25.04.3-r2.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="true"
+KFMIN=6.13.0
+QTMIN=6.7.2
+inherit flag-o-matic ecm gear.kde.org optfeature xdg
+
+DESCRIPTION="Web browser and file manager based on KDE Frameworks"
+HOMEPAGE="https://apps.kde.org/konqueror/";
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="6"
+KEYWORDS="~amd64 ~arm64"
+IUSE="activities speech"
+
+# 4 of 4 tests fail. Last checked for 4.0.3
+RESTRICT="test"
+
+# slot op: Uses Qt6::GuiPrivate for qtx11extras_p.h
+COMMON_DEPEND="
+       >=dev-qt/qtbase-${QTMIN}:6=[dbus,gui,widgets,X,xml]
+       >=dev-qt/qtwebengine-${QTMIN}:6[widgets]
+       >=kde-frameworks/karchive-${KFMIN}:6
+       >=kde-frameworks/kbookmarks-${KFMIN}:6
+       >=kde-frameworks/kcmutils-${KFMIN}:6
+       >=kde-frameworks/kcodecs-${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/kdesu-${KFMIN}:6
+       >=kde-frameworks/kguiaddons-${KFMIN}:6
+       >=kde-frameworks/ki18n-${KFMIN}:6
+       >=kde-frameworks/kiconthemes-${KFMIN}:6
+       >=kde-frameworks/kio-${KFMIN}:6
+       >=kde-frameworks/kitemviews-${KFMIN}:6
+       >=kde-frameworks/kjobwidgets-${KFMIN}:6
+       >=kde-frameworks/kparts-${KFMIN}:6
+       >=kde-frameworks/kservice-${KFMIN}:6
+       >=kde-frameworks/ktextwidgets-${KFMIN}:6
+       >=kde-frameworks/kwallet-${KFMIN}:6
+       >=kde-frameworks/kwidgetsaddons-${KFMIN}:6
+       >=kde-frameworks/kwindowsystem-${KFMIN}:6[X]
+       >=kde-frameworks/kxmlgui-${KFMIN}:6
+       >=kde-frameworks/sonnet-${KFMIN}:6
+       sys-libs/zlib
+       speech? ( >=dev-qt/qtspeech-${QTMIN}:6 )
+"
+DEPEND="${COMMON_DEPEND}
+       activities? ( kde-plasma/plasma-activities:6= )
+"
+RDEPEND="${COMMON_DEPEND}
+       !<kde-apps/kio-extras-23.08.5-r100:5
+       kde-apps/kfind:6
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-desktop.patch" # bug 955036
+       "${FILESDIR}/${P}-plasma-activities-6.5.patch" # KDE-bug 509937
+)
+
+src_prepare() {
+       [[ ${CHOST} == *-solaris* ]] && append-ldflags -lmalloc
+
+       ecm_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DCMAKE_DISABLE_FIND_PACKAGE_Hunspell=ON # requires fixing bug 
634122
+               $(cmake_use_find_package activities PlasmaActivities)
+               $(cmake_use_find_package speech QtTextToSpeech)
+       )
+       ecm_src_configure
+}
+
+pkg_postinst() {
+       if [[ -z "${REPLACING_VERSIONS}" ]]; then
+               optfeature "bookmarks support" "kde-apps/keditbookmarks:${SLOT}"
+               optfeature "filemanager component" "kde-apps/dolphin:${SLOT}"
+               optfeature "SVG support" "kde-apps/svg:${SLOT}"
+       fi
+       xdg_pkg_postinst
+}

diff --git a/kde-apps/konqueror/konqueror-25.08.1-r1.ebuild 
b/kde-apps/konqueror/konqueror-25.08.1-r1.ebuild
new file mode 100644
index 000000000000..7eee2f81ed84
--- /dev/null
+++ b/kde-apps/konqueror/konqueror-25.08.1-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="true"
+KFMIN=6.16.0
+QTMIN=6.9.1
+inherit flag-o-matic ecm gear.kde.org optfeature xdg
+
+DESCRIPTION="Web browser and file manager based on KDE Frameworks"
+HOMEPAGE="https://apps.kde.org/konqueror/";
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="6"
+KEYWORDS="~amd64 ~arm64"
+IUSE="activities speech"
+
+# 4 of 4 tests fail. Last checked for 4.0.3
+RESTRICT="test"
+
+# slot op: Uses Qt6::GuiPrivate for qtx11extras_p.h
+DEPEND="
+       >=dev-qt/qtbase-${QTMIN}:6=[dbus,gui,widgets,X,xml]
+       >=dev-qt/qtwebengine-${QTMIN}:6[widgets]
+       >=kde-frameworks/karchive-${KFMIN}:6
+       >=kde-frameworks/kbookmarks-${KFMIN}:6
+       >=kde-frameworks/kcmutils-${KFMIN}:6
+       >=kde-frameworks/kcodecs-${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/kdesu-${KFMIN}:6
+       >=kde-frameworks/kguiaddons-${KFMIN}:6
+       >=kde-frameworks/ki18n-${KFMIN}:6
+       >=kde-frameworks/kiconthemes-${KFMIN}:6
+       >=kde-frameworks/kio-${KFMIN}:6
+       >=kde-frameworks/kitemviews-${KFMIN}:6
+       >=kde-frameworks/kjobwidgets-${KFMIN}:6
+       >=kde-frameworks/kparts-${KFMIN}:6
+       >=kde-frameworks/kservice-${KFMIN}:6
+       >=kde-frameworks/ktextwidgets-${KFMIN}:6
+       >=kde-frameworks/kwallet-${KFMIN}:6
+       >=kde-frameworks/kwidgetsaddons-${KFMIN}:6
+       >=kde-frameworks/kwindowsystem-${KFMIN}:6[X]
+       >=kde-frameworks/kxmlgui-${KFMIN}:6
+       >=kde-frameworks/sonnet-${KFMIN}:6
+       sys-libs/zlib
+       activities? ( kde-plasma/plasma-activities:6= )
+       speech? ( >=dev-qt/qtspeech-${QTMIN}:6 )
+"
+RDEPEND="${DEPEND}
+       !<kde-apps/kio-extras-23.08.5-r100:5
+       kde-apps/kfind:6
+"
+
+PATCHES=( "${FILESDIR}/${PN}-25.04.3-plasma-activities-6.5.patch" ) # KDE-bug 
509937
+
+src_prepare() {
+       [[ ${CHOST} == *-solaris* ]] && append-ldflags -lmalloc
+
+       ecm_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DCMAKE_DISABLE_FIND_PACKAGE_Hunspell=ON # requires fixing bug 
634122
+               $(cmake_use_find_package activities PlasmaActivities)
+               $(cmake_use_find_package speech QtTextToSpeech)
+       )
+       ecm_src_configure
+}
+
+pkg_postinst() {
+       if [[ -z "${REPLACING_VERSIONS}" ]]; then
+               optfeature "bookmarks support" "kde-apps/keditbookmarks:${SLOT}"
+               optfeature "filemanager component" "kde-apps/dolphin:${SLOT}"
+               optfeature "SVG support" "kde-apps/svg:${SLOT}"
+       fi
+       xdg_pkg_postinst
+}

Reply via email to