diff --git a/sys-kernel/zenpower3/Manifest b/sys-kernel/zenpower3/Manifest index c3cebb41aed..0f4770070f8 100644 --- a/sys-kernel/zenpower3/Manifest +++ b/sys-kernel/zenpower3/Manifest @@ -1 +1 @@ -DIST zenpower3-0.2.0.tar.gz 14019 BLAKE2B ce7d28f2f5f83fc2e44cbc720855816916b6ad6801c7ccdd8845fd385366c8967b0090ed8f94909e4c2488f0f7e11de6dc66f56b2b72dae988325b76014c9004 SHA512 cf4a930dd7a1f8670cee9f364d57acca17c11726c6ff671bdb6209c0f7ea9af1e7c707cd77b20214fdb38a930cfd1e1e0b59c1d9cc738e1bf0fd8e6ee8302a3f +DIST zenpower3-0.2.0.tar.gz 14201 BLAKE2B 6adce14eaf4fba98ba942c55dcf6b277f643eae749eecc10b8709fec1289dbf24d5ab6949b1195f0eda60341a284f3932b44d1ead813ba1f5fb0ec91926a3257 SHA512 27ea8d1937b179257efa6138461dce0b3f038db2fa71fe257f17e216a495e34acf6c5b65a4eb68e9386de747055394cde2fd68ee28d511dcbeecad806f9e25ec diff --git a/sys-kernel/zenpower3/files/zenpower3-0.2.0-use-symlink-to-detect-kernel-version.patch b/sys-kernel/zenpower3/files/zenpower3-0.2.0-use-symlink-to-detect-kernel-version.patch deleted file mode 100644 index f66d966ecfd..00000000000 --- a/sys-kernel/zenpower3/files/zenpower3-0.2.0-use-symlink-to-detect-kernel-version.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -1,5 +1,5 @@ - VERSION := 0.2.0 --TARGET := $(shell uname -r) -+TARGET ?= $(shell uname -r) - DKMS_ROOT_PATH := /usr/src/zenpower-$(VERSION) - - KERNEL_MODULES := /lib/modules/$(TARGET) diff --git a/sys-kernel/zenpower3/files/zenpower3-use-symlink-to-detect-kernel-version.patch b/sys-kernel/zenpower3/files/zenpower3-use-symlink-to-detect-kernel-version.patch new file mode 100644 index 00000000000..629c1982835 --- /dev/null +++ b/sys-kernel/zenpower3/files/zenpower3-use-symlink-to-detect-kernel-version.patch @@ -0,0 +1,37 @@ +From 580c957c1159e38b3b909504652782acc0317deb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Gon=C3=A7alo=20Negrier=20Duarte?= + +Date: Sun, 29 Dec 2024 10:56:13 +0000 +Subject: [PATCH] zenpower3: use KV_FULL to detect kernel version. * fix CFLAGS + for clang +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Gonçalo Negrier Duarte +--- + Makefile | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 72c831c..03cbdc3 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,12 @@ + VERSION := 0.2.0 +-TARGET := $(shell uname -r) ++TARGET := ${KV_FULL} + DKMS_ROOT_PATH := /usr/src/zenstats-$(VERSION) + +-KBUILD_CFLAGS += -Wimplicit-fallthrough=3 ++ifeq ($(CC),clang) ++ CXXFLAGS += -Wimplicit-fallthrough ++else ifeq ($(CC),gcc) ++ CXXFLAGS += -Wimplicit-fallthrough=3 ++endif + + KERNEL_MODULES := /lib/modules/$(TARGET) + +-- +2.47.1 + diff --git a/sys-kernel/zenpower3/metadata.xml b/sys-kernel/zenpower3/metadata.xml index 095435dbd44..cdabf4b13e8 100644 --- a/sys-kernel/zenpower3/metadata.xml +++ b/sys-kernel/zenpower3/metadata.xml @@ -6,6 +6,6 @@ gonegrier.duarte@gmail.com - Ta180m/zenpower3 + Sid127/zenstats diff --git a/sys-kernel/zenpower3/zenpower3-0.2.0-r1.ebuild b/sys-kernel/zenpower3/zenpower3-0.2.0-r1.ebuild new file mode 100644 index 00000000000..0b202643761 --- /dev/null +++ b/sys-kernel/zenpower3/zenpower3-0.2.0-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-mod-r1 +_PN="zenstats" +_P="${_PN}-${PV}" +DESCRIPTION="Linux kernel driver for reading sensors of AMD Zen family CPUs" +HOMEPAGE=" + https://github.com/Sid127/zenstats + https://github.com/ocerman/zenpower +" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + # Mantain fork of zenpower3 + EGIT_REPO_URI="https://github.com/Sid127/zenstats" +else + SRC_URI="https://github.com/Sid127/zenstats/archive/v0.1.0.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/zenstats-0.1.0" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-2" +SLOT="0" + +CONFIG_CHECK="HWMON PCI AMD_NB" + +PATCHES="${FILESDIR}/${PN}-use-symlink-to-detect-kernel-version.patch" + +src_compile() { + MODULES_MAKEARGS+=( + TARGET="${KV_FULL}" + ) + local modlist=( + ${_PN}=kernel/drivers/hwmon:::all + ) + linux-mod-r1_src_compile +} + +src_install() { + linux-mod-r1_src_install + dodoc README.md +} diff --git a/sys-kernel/zenpower3/zenpower3-0.2.0.ebuild b/sys-kernel/zenpower3/zenpower3-0.2.0.ebuild deleted file mode 100644 index 877ff626a2f..00000000000 --- a/sys-kernel/zenpower3/zenpower3-0.2.0.ebuild +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2020-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit linux-mod-r1 - -DESCRIPTION="Linux kernel driver for reading sensors of AMD Zen family CPUs" -HOMEPAGE="https://git.exozy.me/a/zenpower3" -SRC_URI="https://github.com/koweda/zenpower3/archive/refs/tags/v0.2.0.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${P}" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64" - -CONFIG_CHECK="HWMON PCI AMD_NB" - -PATCHES="${FILESDIR}/${P}-use-symlink-to-detect-kernel-version.patch" - -src_compile() { - export TARGET=${KV_FULL} - local modlist=( - zenpower=misc:::all - ) - linux-mod-r1_src_compile -} - -src_install() { - linux-mod-r1_src_install - dobin zp_read_debug.sh - dodoc README.md -} diff --git a/sys-kernel/zenpower3/zenpower3-9999.ebuild b/sys-kernel/zenpower3/zenpower3-9999.ebuild new file mode 100644 index 00000000000..65825e8702b --- /dev/null +++ b/sys-kernel/zenpower3/zenpower3-9999.ebuild @@ -0,0 +1,45 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-mod-r1 +_PN="zenstats" +_P="${_PN}-${PV}" +DESCRIPTION="Linux kernel driver for reading sensors of AMD Zen family CPUs" +HOMEPAGE=" + https://github.com/Sid127/zenstats + https://github.com/ocerman/zenpower +" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + # Mantain fork of zenpower3 + EGIT_REPO_URI="https://github.com/Sid127/zenstats" +else + SRC_URI="https://github.com/Sid127/zenstats/archive/v${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${_P}" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-2" +SLOT="0" + +CONFIG_CHECK="HWMON PCI AMD_NB" + +PATCHES="${FILESDIR}/${PN}-use-symlink-to-detect-kernel-version.patch" + +src_compile() { + MODULES_MAKEARGS+=( + TARGET="${KV_FULL}" + ) + local modlist=( + ${_PN}=kernel/drivers/hwmon:::all + ) + linux-mod-r1_src_compile +} + +src_install() { + linux-mod-r1_src_install + dodoc README.md +}