From 2cf2808d06f6c15fd10dfe8ca099257c6d6048b1 Mon Sep 17 00:00:00 2001 From: "Sv. Lockal" Date: Sun, 15 Jun 2025 12:12:23 +0000 Subject: [PATCH] dev-util/rocm-smi: add logging patch to 6.3.3, check for HSA_AMD, suggest sys-apps/hwdata Bug: https://bugs.gentoo.org/957064 Signed-off-by: Sv. Lockal Part-of: https://github.com/gentoo/gentoo/pull/42608 Signed-off-by: Sam James --- ...ocm-smi-6.3.3.ebuild => rocm-smi-6.3.3-r1.ebuild} | 12 +++++++++++- dev-util/rocm-smi/rocm-smi-6.4.1.ebuild | 11 ++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) rename dev-util/rocm-smi/{rocm-smi-6.3.3.ebuild => rocm-smi-6.3.3-r1.ebuild} (83%) diff --git a/dev-util/rocm-smi/rocm-smi-6.3.3.ebuild b/dev-util/rocm-smi/rocm-smi-6.3.3-r1.ebuild similarity index 83% rename from dev-util/rocm-smi/rocm-smi-6.3.3.ebuild rename to dev-util/rocm-smi/rocm-smi-6.3.3-r1.ebuild index e555519ada9c5..fe31310588225 100644 --- a/dev-util/rocm-smi/rocm-smi-6.3.3.ebuild +++ b/dev-util/rocm-smi/rocm-smi-6.3.3-r1.ebuild @@ -5,7 +5,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..13} python3_13t ) -inherit cmake python-r1 +inherit cmake linux-info python-r1 DESCRIPTION="ROCm System Management Interface Library" HOMEPAGE="https://github.com/ROCm/rocm_smi_lib" @@ -31,8 +31,11 @@ PATCHES=( "${FILESDIR}"/${PN}-5.7.1-remove-example.patch "${FILESDIR}"/${PN}-6.3.0-set-soversion.patch "${FILESDIR}"/${PN}-6.3.0-fix-flags.patch + "${FILESDIR}"/${PN}-6.4.1-log-exceptions.patch ) +CONFIG_CHECK="~HSA_AMD ~DRM_AMDGPU" + src_prepare() { cmake_src_prepare @@ -58,3 +61,10 @@ src_install() { mv "${ED}"/usr/share/doc/rocm_smi "${ED}/usr/share/doc/${PF}" || die } + +pkg_postinst() { + if ! has_version sys-apps/hwdata; then + elog "Install sys-apps/hwdata to see vendor and device names" + elog "instead of hex device IDs in rocm-smi output" + fi +} diff --git a/dev-util/rocm-smi/rocm-smi-6.4.1.ebuild b/dev-util/rocm-smi/rocm-smi-6.4.1.ebuild index c2bc046c9aeeb..c295e3f119330 100644 --- a/dev-util/rocm-smi/rocm-smi-6.4.1.ebuild +++ b/dev-util/rocm-smi/rocm-smi-6.4.1.ebuild @@ -5,7 +5,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{11..14} python3_13t ) -inherit cmake python-r1 +inherit cmake linux-info python-r1 DESCRIPTION="ROCm System Management Interface Library" HOMEPAGE="https://github.com/ROCm/rocm_smi_lib" @@ -34,6 +34,8 @@ PATCHES=( "${FILESDIR}"/${PN}-6.4.1-log-exceptions.patch ) +CONFIG_CHECK="~HSA_AMD ~DRM_AMDGPU" + src_prepare() { cmake_src_prepare @@ -59,3 +61,10 @@ src_install() { mv "${ED}"/usr/share/doc/rocm_smi "${ED}/usr/share/doc/${PF}" || die } + +pkg_postinst() { + if ! has_version sys-apps/hwdata; then + elog "Install sys-apps/hwdata to see vendor and device names" + elog "instead of hex device IDs in rocm-smi output" + fi +}