From 4239d38f1d53ebe6181492950e67bc118b9c98be Mon Sep 17 00:00:00 2001 From: projectmoon Date: Wed, 26 Mar 2025 20:14:31 -0400 Subject: [PATCH] librem-ec-acpi: add patch to fix compilation on new kernels --- sys-kernel/librem-ec-acpi/Manifest | 1 - .../files/0001-kernel-6-10-3.patch | 26 +++++++++++++ .../librem-ec-acpi-0.9.1.ebuild | 38 ------------------- ....ebuild => librem-ec-acpi-0.9.2-r1.ebuild} | 6 ++- 4 files changed, 31 insertions(+), 40 deletions(-) create mode 100644 sys-kernel/librem-ec-acpi/files/0001-kernel-6-10-3.patch delete mode 100644 sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1.ebuild rename sys-kernel/librem-ec-acpi/{librem-ec-acpi-0.9.1-r1.ebuild => librem-ec-acpi-0.9.2-r1.ebuild} (86%) diff --git a/sys-kernel/librem-ec-acpi/Manifest b/sys-kernel/librem-ec-acpi/Manifest index 7a14d92..bcbdae5 100644 --- a/sys-kernel/librem-ec-acpi/Manifest +++ b/sys-kernel/librem-ec-acpi/Manifest @@ -1,2 +1 @@ -DIST librem-ec-acpi-dkms-v0.9.1.tar.gz 13003 BLAKE2B 87d7988be2de75d491eaaa49918db354d426deefd57b4afa72b1447e5993d9b5b06b6964092c050ef039d7d9faa33e55137c1879a1b959e6f4f3ce877137e6db SHA512 93ee26917eddbef9aa9c0eb83007452ebf57c279f41c3061ee52756bb1f748c72935067b19c3417ed7b8a9795990b0f060241c0b7f2348d7f8ec01e9f88dcd3c DIST librem-ec-acpi-dkms-v0.9.2.tar.gz 13093 BLAKE2B 0c29aeec2f4804be98f628b16c2219acf805d3659d8dd4797db2cdcc94316bfb5ab5c396d2b3584de12b573907e671b0422e89c0a774516e4b1e573032fd5843 SHA512 b5d10fcf34a8b424138f9db1b06e916d809462ea55c7ca2565f13154da4fa49736ac95fb1b131c27ee49aa5f170f3e8a1a9c9a61c69e0364bcee37669759e8f6 diff --git a/sys-kernel/librem-ec-acpi/files/0001-kernel-6-10-3.patch b/sys-kernel/librem-ec-acpi/files/0001-kernel-6-10-3.patch new file mode 100644 index 0000000..d74c17b --- /dev/null +++ b/sys-kernel/librem-ec-acpi/files/0001-kernel-6-10-3.patch @@ -0,0 +1,26 @@ +From 13fc2a3949c30cfd8624acdbc97c7942aee588f8 Mon Sep 17 00:00:00 2001 +From: primalmotion +Date: Tue, 6 Aug 2024 18:14:10 +0200 +Subject: [PATCH] fixed: build on linux 6.10.3 + +--- + librem_ec_acpi.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/librem_ec_acpi.c b/librem_ec_acpi.c +index 4e8ebf3..d53f580 100644 +--- a/librem_ec_acpi.c ++++ b/librem_ec_acpi.c +@@ -779,7 +779,9 @@ static SIMPLE_DEV_PM_OPS(librem_ec_pm, librem_ec_suspend, librem_ec_resume); + + static struct acpi_driver librem_ec_driver = { + .name = "Librem EC ACPI Driver", ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 3) + .owner = THIS_MODULE, ++#endif + .class = "hotkey", + .ids = device_ids, + // .flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS, +-- +GitLab + diff --git a/sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1.ebuild b/sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1.ebuild deleted file mode 100644 index 54d43da..0000000 --- a/sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2021 projectmoon -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit linux-info linux-mod - -DESCRIPTION="Librem EC ACPI Driver" -HOMEPAGE="https://source.puri.sm/nicole.faerber/librem-ec-acpi-dkms" -SRC_URI="https://source.puri.sm/nicole.faerber/librem-ec-acpi-dkms/-/archive/v${PV}/librem-ec-acpi-dkms-v${PV}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64" - -S="${WORKDIR}/librem-ec-acpi-dkms-v${PV}/" -MODULE_NAMES="librem_ec_acpi(librem:${S}:${S})" -BUILD_TARGETS="clean all" - -src_prepare() { - default - - # Makefile hardcoded to point at running kernel - # but we want the user-chosen kernel. - linux-info_get_any_version - sed -i "s/\$(shell uname -r)/${KV_FULL}/" Makefile \ - || die "could not set kernel version in makefile" -} - -pkg_setup() { - linux-mod_pkg_setup - BUILD_PARAMS="KERNELDIR=${KV_DIR}" -} - -src_install() { - linux-mod_src_install - einstalldocs -} diff --git a/sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1-r1.ebuild b/sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.2-r1.ebuild similarity index 86% rename from sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1-r1.ebuild rename to sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.2-r1.ebuild index 27a3479..48e19a7 100644 --- a/sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1-r1.ebuild +++ b/sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.2-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 2021 projectmoon +# Copyright 2021-2023 projectmoon # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -8,6 +8,7 @@ inherit linux-info linux-mod DESCRIPTION="Librem EC ACPI Driver" HOMEPAGE="https://source.puri.sm/nicole.faerber/librem-ec-acpi-dkms" SRC_URI="https://source.puri.sm/nicole.faerber/librem-ec-acpi-dkms/-/archive/v${PV}/librem-ec-acpi-dkms-v${PV}.tar.gz" +RESTRICT="mirror" LICENSE="GPL-2" SLOT="0" @@ -29,6 +30,9 @@ src_prepare() { linux-info_get_any_version sed -i "s/\$(shell uname -r)/${KV_FULL}/" Makefile \ || die "could not set kernel version in makefile" + + # Apply patch to fix compilation issue on newer Linux kernels. + eapply "${FILESDIR}"/0001-kernel-6-10-3.patch } pkg_setup() {