commit: 0fe76920d05269d35854ccfc781bc473ca69b74d
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 9 06:17:43 2025 +0000
Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org>
CommitDate: Sun Nov 9 09:07:09 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fe76920
dev-util/rocm-smi: add 7.1.0
Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>
dev-util/rocm-smi/Manifest | 1 +
dev-util/rocm-smi/rocm-smi-7.1.0.ebuild | 73 +++++++++++++++++++++++++++++++++
2 files changed, 74 insertions(+)
diff --git a/dev-util/rocm-smi/Manifest b/dev-util/rocm-smi/Manifest
index 2d797bf0d2e7..5a5d58455216 100644
--- a/dev-util/rocm-smi/Manifest
+++ b/dev-util/rocm-smi/Manifest
@@ -1,3 +1,4 @@
DIST rocm-smi-6.3.3.tar.gz 902980 BLAKE2B
8a8f80c4fb5485dc65b340ba4da2bb73061b989757ca6147d7d401dcbdbba5edbd1f68de78f66adcc5a6611a8ce870dfea6cbc31863918d6da9e9a7cb812746b
SHA512
0f722effb404f605bef08f22eb4c4ecfb076ee10d112daf6a82f81d78e5279a185f497919b2d9ea414236761d1fa52231a6168a156f33b7f47a93857e30d7449
DIST rocm-smi-6.4.3.tar.gz 934885 BLAKE2B
b7e5ee132cd9f3b9f36791df7feec77186fdb170ee62acfb2c494b8960caef8815a6c220cc517e567e7045ad0353e7ff773185808e963b597854199a23c96450
SHA512
034a5e6d672d88e9a138d862fbafa5552c80638795c791f955258d0fc917a02e4aabd954154ad457eb2ba1a59c4e54f5702635ceb757165c212856068580a72d
DIST rocm-smi-7.0.2.tar.gz 936001 BLAKE2B
a36553bb3f98245bb443365dc2ec5db6663eda32f8de4a709ad31b2cde03ca066a08b79bc76ee8474c3627e399992e6692b0ba17314e5c76d9f940d3a461ff7a
SHA512
a18c0d2e40193562aeb7f19c2b304eb7762efe27681578aebcf805b81e5993013e0f873d8409d0e370341a730228379b03d02acb189cf3970fd122bdb17cf971
+DIST rocm-smi-7.1.0.tar.gz 936018 BLAKE2B
e78b443a943cea760cc4f75e4cfd9274ed7015193fae5712cdfab074f0576d50973243a7dbc667d9cfc427d204b615e9d80b123273300939ec9e3200493267cb
SHA512
8698bc69184bca6491d76ce612209cca5cf3396aec3496843191039222f026bb0451a14d6d6504968e9904199f65bc3d0cd1df3de3fd4bb003bb0ef7aabe2cd4
diff --git a/dev-util/rocm-smi/rocm-smi-7.1.0.ebuild
b/dev-util/rocm-smi/rocm-smi-7.1.0.ebuild
new file mode 100644
index 000000000000..9aceaae06297
--- /dev/null
+++ b/dev-util/rocm-smi/rocm-smi-7.1.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} python3_13t )
+
+inherit cmake linux-info optfeature python-r1
+
+DESCRIPTION="ROCm System Management Interface Library"
+HOMEPAGE="https://github.com/ROCm/rocm-systems/tree/develop/projects/rocm-smi-lib"
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-r3
+ EGIT_SUBMODULES=()
+ EGIT_REPO_URI="https://github.com/ROCm/rocm-systems.git"
+ S="${WORKDIR}/${P}/projects/rocm-smi-lib"
+else
+ SRC_URI="https://github.com/ROCm/rocm_smi_lib/archive/rocm-${PV}.tar.gz
-> rocm-smi-${PV}.tar.gz"
+ KEYWORDS="~amd64"
+ S="${WORKDIR}/rocm_smi_lib-rocm-${PV}"
+fi
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers
+ x11-libs/libdrm[video_cards_amdgpu]
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.7.1-no-strip.patch
+ "${FILESDIR}"/${PN}-5.7.1-remove-example.patch
+)
+
+CONFIG_CHECK="~HSA_AMD ~DRM_AMDGPU"
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Disable code that relies on missing .git directory.
+ # Just silences potential "git: command not found" QA warnings.
+ sed -e "/find_program (GIT NAMES git)/d" -i CMakeLists.txt || die
+ sed -e "/num_change_since_prev_pkg(\${VERSION_PREFIX})/d" -i
cmake_modules/utils.cmake || die
+
+ local
rocm_lib="${EPREFIX}/usr/$(get_libdir)/librocm_smi64.so.@VERSION_MAJOR@"
+ sed -E "s|path_librocm =.+__file__.+|path_librocm = '${rocm_lib}'|" \
+ -i python_smi_tools/rsmiBindingsInit.py.in || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ python_foreach_impl python_newscript python_smi_tools/rocm_smi.py
rocm-smi
+ python_foreach_impl python_domodule python_smi_tools/rsmiBindings.py
+ python_foreach_impl python_domodule python_smi_tools/rsmiBindingsInit.py
+
+ mv "${ED}"/usr/share/doc/rocm-smi-lib/* "${ED}/usr/share/doc/${PF}" ||
die
+ rm -r "${ED}"/usr/share/doc/rocm-smi-lib || die
+}
+
+pkg_postinst() {
+ optfeature "vendor and device names instead of hex device IDs"
sys-apps/hwdata
+}