public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Gonçalo Negrier Duarte" <gonegrier.duarte@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sys-firmware/lenovolegionlinux/
Date: Wed, 13 Mar 2024 11:09:24 +0000 (UTC)	[thread overview]
Message-ID: <1710328160.a89e76200f65404b2d1e9a4aa8526fb3ffc92f62.gonegrier.duarte@gentoo> (raw)

commit:     a89e76200f65404b2d1e9a4aa8526fb3ffc92f62
Author:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Wed Mar 13 11:08:38 2024 +0000
Commit:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
CommitDate: Wed Mar 13 11:09:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a89e7620

sys-firmware/lenovolegionlinux: Improving ebuild

Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail.com>

 .../lenovolegionlinux-9999.ebuild                  | 31 +++++++---------------
 sys-firmware/lenovolegionlinux/metadata.xml        |  1 -
 2 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild b/sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild
index 672fcb964b..3346d2ff6b 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 0bf12c93d9..bd4ddf3020 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>


             reply	other threads:[~2024-03-13 11:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 11:09 Gonçalo Negrier Duarte [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-24 10:43 [gentoo-commits] repo/proj/guru:dev commit in: sys-firmware/lenovolegionlinux/ Gonçalo Negrier Duarte
2024-08-22  0:39 Gonçalo Negrier Duarte
2024-04-02 19:54 Gonçalo Negrier Duarte
2024-03-29 11:39 Gonçalo Negrier Duarte
2024-03-17 20:27 Gonçalo Negrier Duarte
2024-03-17 14:53 Gonçalo Negrier Duarte
2024-03-17 13:44 Gonçalo Negrier Duarte
2024-03-13 11:24 Gonçalo Negrier Duarte
2024-03-12 20:40 Gonçalo Negrier Duarte
2024-03-10 18:00 Gonçalo Negrier Duarte
2024-01-08 13:03 Gonçalo Negrier Duarte
2023-11-26 17:09 Gonçalo Negrier Duarte
2023-09-15 10:54 Gonçalo Negrier Duarte
2023-08-30 12:53 Gonçalo Negrier Duarte
2023-08-29  9:53 Gonçalo Negrier Duarte
2023-08-24 11:26 Gonçalo Negrier Duarte
2023-08-01 11:02 [gentoo-commits] repo/proj/guru:dev commit in: sys-firmware/LenovoLegionLinux/ Gonçalo Negrier Duarte
2023-07-28 17:01 Gonçalo Negrier Duarte
2023-07-26 13:03 Gonçalo Negrier Duarte
2023-07-26 13:03 Gonçalo Negrier Duarte
2023-07-15 16:53 Gonçalo Negrier Duarte
2023-07-10 11:44 Gonçalo Negrier Duarte
2023-07-08 12:52 Gonçalo Negrier Duarte
2023-07-07 22:47 [gentoo-commits] repo/proj/guru:dev commit in: sys-firmware/lenovolegionlinux/ Gonçalo Negrier Duarte
2023-07-07 10:38 Gonçalo Negrier Duarte
2023-07-05 15:10 Gonçalo Negrier Duarte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1710328160.a89e76200f65404b2d1e9a4aa8526fb3ffc92f62.gonegrier.duarte@gentoo \
    --to=gonegrier.duarte@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox