commit: c651935c838262ec0dffd7b124ff6743070cb24e
Author: Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Thu Jun 5 14:13:07 2025 +0000
Commit: Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Thu Jun 5 14:20:34 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c651935c
sys-power/system76-power: sync live changes to version 1.2.4
No revbump because version 1.2.4 hasn't been merged to master yet.
Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>
.../system76-power/system76-power-1.2.4.ebuild | 60 ++++++++++++++++------
1 file changed, 45 insertions(+), 15 deletions(-)
diff --git a/sys-power/system76-power/system76-power-1.2.4.ebuild
b/sys-power/system76-power/system76-power-1.2.4.ebuild
index 672c1f5f61..2de923f72d 100644
--- a/sys-power/system76-power/system76-power-1.2.4.ebuild
+++ b/sys-power/system76-power/system76-power-1.2.4.ebuild
@@ -1,5 +1,6 @@
-# Copyright 2022-2024 Gentoo Authors
+# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
CRATES="
@@ -145,7 +146,6 @@ CRATES="
[email protected]
[email protected]
[email protected]
- [email protected]
[email protected]
[email protected]
[email protected]
@@ -199,15 +199,27 @@ CRATES="
[email protected]
"
+declare -A GIT_CRATES=(
+
[sysfs-class]='https://github.com/pop-os/sysfs-class;ab63e7f638aadfaf896a02e53cf330343d331337;sysfs-class-%commit%'
+)
+
inherit cargo
DESCRIPTION="System76 Power Management Tool"
HOMEPAGE="https://github.com/pop-os/system76-power"
-SRC_URI="
- https://github.com/pop-os/system76-power/archive/refs/tags/${PV}.tar.gz
-> ${P}.tar.gz
- ${CARGO_CRATE_URIS}
-"
+if [[ ${PV} == *9999* ]]; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/pop-os/system76-power"
+else
+ SRC_URI="
+
https://github.com/pop-os/system76-power/archive/refs/tags/${PV}.tar.gz
+ -> ${P}.tar.gz
+ ${CARGO_CRATE_URIS}
+ "
+ KEYWORDS="~amd64"
+fi
LICENSE="GPL-3"
# Dependent crate licenses
@@ -216,24 +228,42 @@ LICENSE+="
|| ( Apache-2.0 Boost-1.0 )
"
SLOT="0"
-KEYWORDS="~amd64"
-DEPEND="
- dev-libs/libusb:1
-"
+DEPEND="virtual/libusb:1"
RDEPEND="
${DEPEND}
+ sys-apps/dbus
+ sys-auth/polkit
"
+BDEPEND="virtual/pkgconfig"
+
+src_unpack(){
+ if [[ ${PV} == *9999* ]]; then
+ git-r3_src_unpack
+ cargo_live_src_unpack
+ else
+ cargo_src_unpack
+ fi
+}
src_prepare() {
+ # Install the Rust binary using the cargo eclass as the Makefile
hardcodes the release path
+ sed -i '/\s*install -D -m 0755/d' Makefile || die
default
- # Replace dynamic git dependency of 'sysfs-class' with a static one
- sed -i 's|sysfs-class = { git = "https://github.com/pop-os/sysfs-class"
}|sysfs-class = "0.1.3"|' Cargo.toml
- cargo_gen_config
}
-src_install() {
- default
+src_configure() {
+ if [[ ${PV} == *9999* ]]; then
+ # prevent network access during src_install due to git crate
sysfs-class
+ cargo_src_configure --frozen
+ else
+ cargo_src_configure
+ fi
+}
+
+src_install(){
+ cargo_src_install
+ emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install
elog "Enable the service: 'systemctl enable --now
com.system76.PowerDaemon.service'"
}