Skip to content

Commit

Permalink
kde-plasma/powerdevil: set cap_sys_nice=ep on org_kde_powerdevil
Browse files Browse the repository at this point in the history
Upstream commit 54a85ddf51448ac1e94aafe2786e664f2b688b45

Signed-off-by: Andreas Sturmlechner <[email protected]>
  • Loading branch information
a17r committed Nov 17, 2024
1 parent 43e0b96 commit 97e98e5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
1 change: 0 additions & 1 deletion kde-plasma/powerdevil/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
</upstream>
<use>
<flag name="brightness-control">Enable screen brightness control using <pkg>app-misc/ddcutil</pkg></flag>
<flag name="caps">Capabilities support for scheduled wakeup which can wake from suspend (CAP_WAKE_ALARM)</flag>
</use>
</pkgmetadata>
19 changes: 14 additions & 5 deletions kde-plasma/powerdevil/powerdevil-6.2.49.9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ 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"

LICENSE="GPL-2" # TODO: CHECK
SLOT="6"
KEYWORDS=""
IUSE="brightness-control caps"
IUSE="brightness-control"

RESTRICT="test" # bug 926513

Expand Down Expand Up @@ -51,7 +51,6 @@ DEPEND="
virtual/libudev:=
x11-libs/libxcb
brightness-control? ( app-misc/ddcutil:= )
caps? ( sys-libs/libcap )
"
RDEPEND="${DEPEND}
!<kde-plasma/plasma-workspace-6.1.90:6
Expand All @@ -65,11 +64,16 @@ BDEPEND="
>=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
Expand All @@ -79,3 +83,8 @@ src_test() {
# bug 926513
ecm_src_test -j1
}

pkg_postinst() {
ecm_pkg_postinst
fcaps_pkg_postinst
}
19 changes: 14 additions & 5 deletions kde-plasma/powerdevil/powerdevil-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ ECM_TEST="forceoptional"
KFMIN=9999
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"

LICENSE="GPL-2" # TODO: CHECK
SLOT="6"
KEYWORDS=""
IUSE="brightness-control caps"
IUSE="brightness-control"

RESTRICT="test" # bug 926513

Expand Down Expand Up @@ -51,7 +51,6 @@ DEPEND="
virtual/libudev:=
x11-libs/libxcb
brightness-control? ( app-misc/ddcutil:= )
caps? ( sys-libs/libcap )
"
RDEPEND="${DEPEND}
!<kde-plasma/plasma-workspace-6.1.90:6
Expand All @@ -65,11 +64,16 @@ BDEPEND="
>=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
Expand All @@ -79,3 +83,8 @@ src_test() {
# bug 926513
ecm_src_test -j1
}

pkg_postinst() {
ecm_pkg_postinst
fcaps_pkg_postinst
}

0 comments on commit 97e98e5

Please sign in to comment.