librem-ec-acpi: add patch to fix compilation on new kernels

This commit is contained in:
projectmoon 2025-03-26 20:14:31 -04:00
parent ef2bed6c38
commit 4239d38f1d
4 changed files with 31 additions and 40 deletions

View File

@ -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

View File

@ -0,0 +1,26 @@
From 13fc2a3949c30cfd8624acdbc97c7942aee588f8 Mon Sep 17 00:00:00 2001
From: primalmotion <primalmotion@pm.me>
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

View File

@ -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
}

View File

@ -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() {