commit:     451c3c92ac0da2759ed0083867bb4d688441365d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  5 13:17:17 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep  5 13:18:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=451c3c92

kde-frameworks/kirigami: backport System Settings cache fix

Was planning on pulling this in as a workaround for now given it's
a nasty bug but it's been merged upstream now too. Not doing
straight-to-stable as might introduce performance regressions so let's
give it a (small) amount of soaking time first.

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=488326
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/kirigami-6.5.0-disable-cachegen.patch    | 35 ++++++++++++++
 kde-frameworks/kirigami/kirigami-6.5.0-r1.ebuild   | 53 ++++++++++++++++++++++
 2 files changed, 88 insertions(+)

diff --git 
a/kde-frameworks/kirigami/files/kirigami-6.5.0-disable-cachegen.patch 
b/kde-frameworks/kirigami/files/kirigami-6.5.0-disable-cachegen.patch
new file mode 100644
index 000000000000..e7aac3c64576
--- /dev/null
+++ b/kde-frameworks/kirigami/files/kirigami-6.5.0-disable-cachegen.patch
@@ -0,0 +1,35 @@
+https://bugs.kde.org/show_bug.cgi?id=488326
+https://invent.kde.org/frameworks/kirigami/-/commit/7dea849cc263ddb33986e1e93669459ddde6990e
+https://invent.kde.org/frameworks/kirigami/-/merge_requests/1589
+
+From 7dea849cc263ddb33986e1e93669459ddde6990e Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <[email protected]>
+Date: Sun, 21 Jul 2024 00:32:51 +0200
+Subject: [PATCH] Disable cachegen
+
+For some reason it breaks kirigami
+
+BUGS: 488326
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -9,12 +9,12 @@ add_subdirectory(layouts)
+ add_library(Kirigami)
+ add_library(KF6::Kirigami ALIAS Kirigami)
+ 
+-if (WIN32)
+-    # Kirigami apparently adds too many sources so on Windows we end
+-    # up running into command line length limits. So disable cache
+-    # generation on Windows for now.
+-    set(_extra_options NO_CACHEGEN)
+-endif()
++# On Windows Kirigami apparently adds too many sources so on Windows we end
++# up running into command line length limits. So disable cache
++# generation on Windows for now.
++# On Qt 6.7.2 cachegen is causing https://bugs.kde.org/show_bug.cgi?id=488326
++# investigate if future versions fix it and we can re-enable it
++set(_extra_options NO_CACHEGEN)
+ if (BUILD_SHARED_LIBS)
+     set(_extra_options ${_extra_options} NO_PLUGIN_OPTIONAL)
+ endif()
+-- 
+GitLab

diff --git a/kde-frameworks/kirigami/kirigami-6.5.0-r1.ebuild 
b/kde-frameworks/kirigami/kirigami-6.5.0-r1.ebuild
new file mode 100644
index 000000000000..5557807a5eb2
--- /dev/null
+++ b/kde-frameworks/kirigami/kirigami-6.5.0-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_EXAMPLES="true"
+ECM_QTHELP="false"
+ECM_TEST="true"
+QTMIN=6.6.2
+inherit ecm frameworks.kde.org toolchain-funcs
+
+DESCRIPTION="Lightweight user interface framework for mobile and convergent 
applications"
+HOMEPAGE="https://community.kde.org/Kirigami";
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="openmp"
+
+# requires package to already be installed
+RESTRICT="test"
+
+# slot op: Uses Qt6::GuiPrivate for qguiapplication_p.h
+DEPEND="
+       >=dev-qt/qtbase-${QTMIN}:6=[concurrent,dbus,gui,network]
+       >=dev-qt/qtdeclarative-${QTMIN}:6
+       >=dev-qt/qtsvg-${QTMIN}:6
+"
+RDEPEND="${DEPEND}
+       examples? ( !${CATEGORY}/${PN}:5[examples(-)] )
+       >=dev-qt/qt5compat-${QTMIN}:6[qml]
+"
+BDEPEND=">=dev-qt/qttools-${QTMIN}:6[linguist]"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-6.5.0-disable-cachegen.patch
+)
+
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_EXAMPLES=$(usex examples)
+               $(cmake_use_find_package openmp OpenMP)
+       )
+
+       ecm_src_configure
+}

Reply via email to