aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonçalo Negrier Duarte <gonegrier.duarte@gmail.com>2024-03-13 11:08:38 +0000
committerGonçalo Negrier Duarte <gonegrier.duarte@gmail.com>2024-03-13 11:09:20 +0000
commita89e76200f65404b2d1e9a4aa8526fb3ffc92f62 (patch)
treee07f3fcac1a1ef1535b4537817985a589e8bc044 /sys-firmware
parentapp-crypt/pinentry-bemenu: drop 0.11.0, 0.12.0 (diff)
downloadguru-a89e76200f65404b2d1e9a4aa8526fb3ffc92f62.tar.gz
guru-a89e76200f65404b2d1e9a4aa8526fb3ffc92f62.tar.bz2
guru-a89e76200f65404b2d1e9a4aa8526fb3ffc92f62.zip
sys-firmware/lenovolegionlinux: Improving ebuild
Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
Diffstat (limited to 'sys-firmware')
-rw-r--r--sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild31
-rw-r--r--sys-firmware/lenovolegionlinux/metadata.xml1
2 files changed, 10 insertions, 22 deletions
diff --git a/sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild b/sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild
index 672fcb964..3346d2ff6 100644
--- a/sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild
+++ b/sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild
@@ -21,7 +21,8 @@ fi
DESCRIPTION="Lenovo Legion Linux kernel module"
HOMEPAGE="https://github.com/johnfanv2/LenovoLegionLinux"
-BDEPEND="sys-kernel/linux-headers
+BDEPEND="
+ sys-kernel/linux-headers
sys-apps/lm-sensors
sys-apps/dmidecode
sys-apps/sed
@@ -35,7 +36,7 @@ RDEPEND="
dev-python/darkdetect
)
downgrade-nvidia? ( <=x11-drivers/nvidia-drivers-525 )
- sys-power/acpid
+ systemd? ( sys-power/acpid )
radeon-dgpu? ( dev-util/rocm-smi )
ryzenadj? ( sys-power/RyzenAdj )
undervolt-intel? ( dev-python/undervolt )
@@ -45,8 +46,8 @@ DEPEND="${RDEPEND}"
LICENSE="GPL-2"
SLOT="0"
-IUSE="gui acpi systemd radeon-dgpu downgrade-nvidia ryzenadj undervolt-intel"
-REQUIRED_USE="|| ( systemd acpi radeon-dgpu downgrade-nvidia ryzenadj gui undervolt-intel ) acpi? ( gui ) radeon-dgpu? ( !downgrade-nvidia gui ) downgrade-nvidia? ( !radeon-dgpu gui ) undervolt-intel? ( !ryzenadj gui ) ryzenadj? ( !undervolt-intel gui )"
+IUSE="+gui systemd radeon-dgpu downgrade-nvidia ryzenadj undervolt-intel"
+REQUIRED_USE="|| ( systemd radeon-dgpu downgrade-nvidia ryzenadj gui undervolt-intel ) radeon-dgpu? ( !downgrade-nvidia gui ) downgrade-nvidia? ( !radeon-dgpu gui ) undervolt-intel? ( !ryzenadj gui ) ryzenadj? ( !undervolt-intel gui )"
MODULES_KERNEL_MIN=5.10
@@ -65,25 +66,21 @@ src_compile() {
sed -i "s/version = _VERSION/version = ${PV}/g" "${WORKDIR}/${P}/python/legion_linux/setup.cfg"
fi
#Define build dir (fix sandboxed)
- cd "${WORKDIR}/${P}/python/legion_linux"
+ cd "${WORKDIR}/${P}/python/legion_linux" || die
distutils-r1_src_compile --build-dir "${WORKDIR}/${P}/python/legion_linux/build"
- cd "legion_linux/extra/service/legiond"
- emake || die
+ cd "legion_linux/extra/service/legiond" || die
+ emake
fi
}
src_install() {
linux-mod-r1_src_install
- #Load the module without reboot
- pushd python/legion_linux/ || die
- make forcereloadmodule
- popd || die
if use gui; then
#Define build dir (fix sandboxed)
- cd "${WORKDIR}/${P}/python/legion_linux/"
+ cd "${WORKDIR}/${P}/python/legion_linux/" || die
distutils-r1_src_install --build-dir "${WORKDIR}/${P}/python/legion_linux/build"
- cd "${WORKDIR}/${P}/extra"
+ cd "${WORKDIR}/${P}/extra" || die
if use systemd; then
systemd_dounit service/legiond.service service/legiond-onresume.service
@@ -92,13 +89,6 @@ src_install() {
dobin service/legiond/legiond
dobin service/legiond/legiond-cli
fi
-
- if use acpi; then
- insinto /usr/share/legion_linux/acpi/events
- doins acpi/events/{ac_adapter_legion-fancurve,novo-button,PrtSc-button,fn-r-refrate}
- insinto /usr/share/legion_linux/acpi/actions
- doins acpi/actions/{battery-legion-quiet.sh,snipping-tool.sh,fn-r-refresh-rate.sh}
- fi
fi
}
@@ -115,7 +105,6 @@ pkg_postinst() {
ewarn "Note: Edit /etc/legion_linux/.env to enable nvidia TDP control\n"
fi
fi
- use acpi && ewarn "Acpi exemples are included in /usr/share/legion_linux/acpi\n"
ewarn "Note for 2023-2023 Legion user: It need help for testing the features"
ewarn "Pls test the feature how is decribe in the README of the project!"
ewarn "and also go to this issue in github: https://github.com/johnfanv2/LenovoLegionLinux/issues/46"
diff --git a/sys-firmware/lenovolegionlinux/metadata.xml b/sys-firmware/lenovolegionlinux/metadata.xml
index 0bf12c93d..bd4ddf302 100644
--- a/sys-firmware/lenovolegionlinux/metadata.xml
+++ b/sys-firmware/lenovolegionlinux/metadata.xml
@@ -3,7 +3,6 @@
<pkgmetadata>
<use>
<flag name="gui">Build and install legion_gui and legion_cli</flag>
- <flag name="acpi">Provide acpi exemple /usr/share/legion_linux/acpi </flag>
<flag name="radeon-dgpu">Enable AMD GPU TDP control (systemd-service)</flag>
<flag name="downgrade-nvidia">Downgrade nvidia for 525 to enable TDP control (systemd-service)</flag>
<flag name="ryzenadj">[AMD] CPU and APU control using ryzenadj (systemd-service)</flag>