diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2023-04-19 21:37:29 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2023-04-19 21:54:21 +0200 |
commit | 471ca614cfd094c72a99ea02da427ab8cceae9e2 (patch) | |
tree | fc2ee708bc5d8f568485a71797f6ee524bc2ef81 /kde-plasma/plasma-welcome | |
parent | dev-libs/libclc: Bump to 16.0.2 (diff) | |
download | gentoo-471ca614cfd094c72a99ea02da427ab8cceae9e2.tar.gz gentoo-471ca614cfd094c72a99ea02da427ab8cceae9e2.tar.bz2 gentoo-471ca614cfd094c72a99ea02da427ab8cceae9e2.zip |
kde-plasma/plasma-welcome: Add IUSE discover, kaccounts
Make dependencies optional. USE flag defaults mirror their status in
kde-plasma/plasma-desktop and kde-plasma/plasma-meta respectively.
Bug: https://bugs.gentoo.org/899706
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma/plasma-welcome')
3 files changed, 162 insertions, 0 deletions
diff --git a/kde-plasma/plasma-welcome/files/plasma-welcome-5.27.4.1-kaccounts-optional.patch b/kde-plasma/plasma-welcome/files/plasma-welcome-5.27.4.1-kaccounts-optional.patch new file mode 100644 index 000000000000..fc4eaa684a63 --- /dev/null +++ b/kde-plasma/plasma-welcome/files/plasma-welcome-5.27.4.1-kaccounts-optional.patch @@ -0,0 +1,99 @@ +From 24092946ed95b4ddf7e7f4c0f5bd9000e45fecad Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Wed, 19 Apr 2023 21:16:59 +0200 +Subject: [PATCH] Make KAccounts optional + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 2 +- + src/CMakeLists.txt | 1 + + src/contents/ui/main.qml | 4 +++- + src/controller.cpp | 9 +++++++++ + src/controller.h | 1 + + src/kuserfeedbacksettings.h.cmake | 1 + + 6 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 772d79e..86db439 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,7 +41,7 @@ ecm_setup_version(${PROJECT_VERSION} + find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Core Gui Network Qml QuickControls2 Svg) + find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Kirigami2 CoreAddons ConfigWidgets DBusAddons Declarative I18n KIO NewStuff Notifications Plasma Service WindowSystem) + find_package(KUserFeedback) +-find_package(KAccounts REQUIRED) ++find_package(KAccounts) + + ecm_set_disabled_deprecation_versions(QT 5.15.2 + KF 5.101 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 4eab33d..e0cc179 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -3,6 +3,7 @@ + # SPDX-FileCopyrightText: 2022 Nate Graham <nate@kde.org> + + set(HAVE_KUSERFEEDBACK ${KUserFeedback_FOUND}) ++set(HAVE_KACCOUNTS ${KAccounts_FOUND}) + configure_file(kuserfeedbacksettings.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kuserfeedbacksettings.h) + + add_executable(plasma-welcome main.cpp controller.cpp resources.qrc module.cpp) +diff --git a/src/contents/ui/main.qml b/src/contents/ui/main.qml +index 380c074..86da39b 100644 +--- a/src/contents/ui/main.qml ++++ b/src/contents/ui/main.qml +@@ -124,7 +124,9 @@ Kirigami.ApplicationWindow { + pageStack.push(kcm_feedback); + } + +- pageStack.push(kcm_kaccounts); ++ if (Controller.kAccountsAvailable()) { ++ pageStack.push(kcm_kaccounts); ++ } + + // Append any distro-specific pages that were found + let distroPages = Controller.distroPages() +diff --git a/src/controller.cpp b/src/controller.cpp +index 7586c23..de8fa85 100644 +--- a/src/controller.cpp ++++ b/src/controller.cpp +@@ -50,6 +50,15 @@ bool Controller::networkAlreadyConnected() + return false; + } + ++bool Controller::kAccountsAvailable() ++{ ++#if HAVE_KACCOUNTS ++ return true; ++#else ++ return false; ++#endif ++} ++ + bool Controller::userFeedbackAvailable() + { + #if HAVE_KUSERFEEDBACK +diff --git a/src/controller.h b/src/controller.h +index 20ba44c..97a9d1c 100644 +--- a/src/controller.h ++++ b/src/controller.h +@@ -15,6 +15,7 @@ public: + Q_INVOKABLE static void runCommand(const QString &command, const QString &desktopFilename); + Q_INVOKABLE bool networkAlreadyConnected(); + Q_INVOKABLE bool userFeedbackAvailable(); ++ Q_INVOKABLE bool kAccountsAvailable(); + Q_INVOKABLE QStringList distroPages(); + + Q_PROPERTY(QString newPlasmaVersion MEMBER m_newPlasmaVersion NOTIFY newPlasmaVersionChanged) +diff --git a/src/kuserfeedbacksettings.h.cmake b/src/kuserfeedbacksettings.h.cmake +index f30924f..a76aedf 100644 +--- a/src/kuserfeedbacksettings.h.cmake ++++ b/src/kuserfeedbacksettings.h.cmake +@@ -5,3 +5,4 @@ + */ + + #cmakedefine01 HAVE_KUSERFEEDBACK ++#cmakedefine01 HAVE_KACCOUNTS +-- +2.40.0 + diff --git a/kde-plasma/plasma-welcome/metadata.xml b/kde-plasma/plasma-welcome/metadata.xml index d925f2439758..7499be9e7e7d 100644 --- a/kde-plasma/plasma-welcome/metadata.xml +++ b/kde-plasma/plasma-welcome/metadata.xml @@ -8,4 +8,8 @@ <upstream> <bugs-to>https://bugs.kde.org/</bugs-to> </upstream> + <use> + <flag name="discover">Pull in resources management GUI; a centralised GHNS alternative and optional <pkg>sys-apps/fwupd</pkg> frontend</flag> + <flag name="kaccounts">Build the OpenDesktop integration plugin</flag> + </use> </pkgmetadata> diff --git a/kde-plasma/plasma-welcome/plasma-welcome-5.27.4.1-r1.ebuild b/kde-plasma/plasma-welcome/plasma-welcome-5.27.4.1-r1.ebuild new file mode 100644 index 000000000000..1f431b9ad2da --- /dev/null +++ b/kde-plasma/plasma-welcome/plasma-welcome-5.27.4.1-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +KFMIN=5.102.0 +QTMIN=5.15.7 +inherit ecm plasma.kde.org + +DESCRIPTION="A friendly onboarding wizard for Plasma" + +LICENSE="GPL-2+" +SLOT="5" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="discover +kaccounts telemetry" + +DEPEND=" + >=dev-qt/qtdeclarative-${QTMIN}:5[widgets] + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtnetwork-${QTMIN}:5 + >=dev-qt/qtquickcontrols2-${QTMIN}:5 + >=dev-qt/qtsvg-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/kdbusaddons-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kio-${KFMIN}:5 + >=kde-frameworks/kirigami-${KFMIN}:5 + >=kde-frameworks/knewstuff-${KFMIN}:5 + >=kde-frameworks/knotifications-${KFMIN}:5 + >=kde-frameworks/kservice-${KFMIN}:5 + >=kde-frameworks/kwindowsystem-${KFMIN}:5 + kaccounts? ( kde-apps/kaccounts-integration:5 ) + telemetry? ( dev-libs/kuserfeedback:5 ) +" +RDEPEND="${DEPEND} + discover? ( kde-plasma/discover:5 ) +" + +PATCHES=( "${FILESDIR}/${P}-kaccounts-optional.patch" ) + +src_prepare() { + ecm_src_prepare + + if ! use discover; then + sed -e "s:pageStack.push(discover);:// & disabled by IUSE=discover:" \ + -i src/contents/ui/main.qml || die + fi +} + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package kaccounts KAccounts) + $(cmake_use_find_package telemetry KUserFeedback) + ) + ecm_src_configure +} |