From 441359e5e753412e5fb419f0c40213f3ec332de6 Mon Sep 17 00:00:00 2001 From: projectmoon Date: Mon, 12 Jul 2021 21:56:04 +0000 Subject: [PATCH] Compile librem-ec for user chosen kernel --- sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1.ebuild | 9 +++++++++ 1 file changed, 9 insertions(+) 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 index b464c60..490090c 100644 --- 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 @@ -17,6 +17,15 @@ 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}"