diff --git a/app-admin/ryzen_smu/files/ryzen_smu-kernel7.2.patch b/app-admin/ryzen_smu/files/ryzen_smu-kernel7.2.patch new file mode 100644 index 0000000000000..a7023220a3992 --- /dev/null +++ b/app-admin/ryzen_smu/files/ryzen_smu-kernel7.2.patch @@ -0,0 +1,32 @@ +From d2983668300dd2a598e5a7dc40e71ce0678cc270 Mon Sep 17 00:00:00 2001 +From: Kyle Gospodnetich +Date: Sat, 15 Aug 2026 10:43:41 -0700 +Subject: [PATCH] Fix cpuid include on 7.2+ kernels (#53) + +--- + smu.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/smu.c b/smu.c +index 3636bb6..e6bf768 100755 +--- a/smu.c ++++ b/smu.c +@@ -8,6 +8,18 @@ + #include + #include + ++#ifdef __has_include ++#if __has_include() ++#include ++#elif __has_include() ++#include ++#else ++#include ++#endif ++#else ++#include ++#endif ++ + #include "smu.h" + + static struct { diff --git a/app-admin/ryzen_smu/ryzen_smu-0.1.5-r1.ebuild b/app-admin/ryzen_smu/ryzen_smu-0.1.5-r1.ebuild new file mode 100644 index 0000000000000..6f35dce3b84da --- /dev/null +++ b/app-admin/ryzen_smu/ryzen_smu-0.1.5-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-mod-r1 + +DESCRIPTION="Kernel driver for AMD Ryzen's System Management Unit" +HOMEPAGE="https://gitlab.com/leogx9r/ryzen_smu" +SRC_URI="https://gitlab.com/leogx9r/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +S="${WORKDIR}/${PN}-v${PV}" + +PATCHES=( "${FILESDIR}/ryzen_smu-kernel7.2.patch" ) + +src_compile() { + local modlist=( ryzen_smu ) + local modargs=( KERNEL_BUILD="${KV_OUT_DIR}" ) + + linux-mod-r1_src_compile +} + +src_install() { + linux-mod-r1_src_install + + insinto /usr/lib/modules-load.d + doins "${FILESDIR}"/ryzen_smu.conf +}