commit:     2cf2808d06f6c15fd10dfe8ca099257c6d6048b1
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Sun Jun 15 12:12:23 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 15 16:10:47 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cf2808d

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 <lockalsash <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42608
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{rocm-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(-)

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 e555519ada9c..fe3131058822 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 c2bc046c9aee..c295e3f11933 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
+}

Reply via email to