From 97e98e5c923dbc9c2f79a2a19c28097faf09dfa5 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sun, 17 Nov 2024 17:25:12 +0100 Subject: [PATCH] kde-plasma/powerdevil: set cap_sys_nice=ep on org_kde_powerdevil Upstream commit 54a85ddf51448ac1e94aafe2786e664f2b688b45 Signed-off-by: Andreas Sturmlechner --- kde-plasma/powerdevil/metadata.xml | 1 - .../powerdevil/powerdevil-6.2.49.9999.ebuild | 19 ++++++++++++++----- kde-plasma/powerdevil/powerdevil-9999.ebuild | 19 ++++++++++++++----- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/kde-plasma/powerdevil/metadata.xml b/kde-plasma/powerdevil/metadata.xml index d3fa55fe307..cbdb11c08fc 100644 --- a/kde-plasma/powerdevil/metadata.xml +++ b/kde-plasma/powerdevil/metadata.xml @@ -11,6 +11,5 @@ Enable screen brightness control using app-misc/ddcutil - Capabilities support for scheduled wakeup which can wake from suspend (CAP_WAKE_ALARM) diff --git a/kde-plasma/powerdevil/powerdevil-6.2.49.9999.ebuild b/kde-plasma/powerdevil/powerdevil-6.2.49.9999.ebuild index d1f2711b894..58dfa73f1ee 100644 --- a/kde-plasma/powerdevil/powerdevil-6.2.49.9999.ebuild +++ b/kde-plasma/powerdevil/powerdevil-6.2.49.9999.ebuild @@ -8,7 +8,7 @@ ECM_TEST="forceoptional" KFMIN=6.6.0 PVCUT=$(ver_cut 1-3) QTMIN=6.7.2 -inherit ecm plasma.kde.org +inherit ecm fcaps plasma.kde.org DESCRIPTION="Power management for KDE Plasma Shell" HOMEPAGE="https://invent.kde.org/plasma/powerdevil" @@ -16,7 +16,7 @@ HOMEPAGE="https://invent.kde.org/plasma/powerdevil" LICENSE="GPL-2" # TODO: CHECK SLOT="6" KEYWORDS="" -IUSE="brightness-control caps" +IUSE="brightness-control" RESTRICT="test" # bug 926513 @@ -51,7 +51,6 @@ DEPEND=" virtual/libudev:= x11-libs/libxcb brightness-control? ( app-misc/ddcutil:= ) - caps? ( sys-libs/libcap ) " RDEPEND="${DEPEND} !=kde-frameworks/kcmutils-${KFMIN}:6 " +# -m 0755 to avoid suid with USE="-filecaps" +FILECAPS=( -m 0755 cap_sys_nice=ep usr/libexec/org_kde_powerdevil ) + src_configure() { local mycmakeargs=( - -DCMAKE_DISABLE_FIND_PACKAGE_SeleniumWebDriverATSPI=ON # not packaged + -DCMAKE_DISABLE_FIND_PACKAGE_Libcap=ON $(cmake_use_find_package brightness-control DDCUtil) - $(cmake_use_find_package caps Libcap) + ) + use test && mycmakeargs+=( + -DCMAKE_DISABLE_FIND_PACKAGE_SeleniumWebDriverATSPI=ON # not packaged ) ecm_src_configure @@ -79,3 +83,8 @@ src_test() { # bug 926513 ecm_src_test -j1 } + +pkg_postinst() { + ecm_pkg_postinst + fcaps_pkg_postinst +}