summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2024-03-17 10:47:53 +0800
committerSam James <sam@gentoo.org>2024-03-21 02:24:43 +0000
commit2a7979949568a169a060a6fb4dbf77e68c661244 (patch)
treec18b0dda5ccfc9cc4f98aefa8f0a2b703b9413ae /dev-util/rocm-smi/rocm-smi-5.7.1-r2.ebuild
parentgames-emulation/nestopia-jg: drop media-libs/soxr dependency (diff)
downloadgentoo-2a7979949568a169a060a6fb4dbf77e68c661244.tar.gz
gentoo-2a7979949568a169a060a6fb4dbf77e68c661244.tar.bz2
gentoo-2a7979949568a169a060a6fb4dbf77e68c661244.zip
dev-util/rocm-smi: keep the patch for builtin amdgpu in 5.7.1
The patch is still needed when amdgpu builtin kernel module. Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/35795 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/rocm-smi/rocm-smi-5.7.1-r2.ebuild')
-rw-r--r--dev-util/rocm-smi/rocm-smi-5.7.1-r2.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/dev-util/rocm-smi/rocm-smi-5.7.1-r2.ebuild b/dev-util/rocm-smi/rocm-smi-5.7.1-r2.ebuild
new file mode 100644
index 000000000000..ddbcbee3ba91
--- /dev/null
+++ b/dev-util/rocm-smi/rocm-smi-5.7.1-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake python-r1
+
+DESCRIPTION="ROCm System Management Interface Library"
+HOMEPAGE="https://github.com/RadeonOpenCompute/rocm_smi_lib"
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocm_smi_lib"
+ EGIT_BRANCH="master"
+else
+ SRC_URI="https://github.com/RadeonOpenCompute/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 NCSA-AMD"
+SLOT="0/$(ver_cut 1-2)"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+
+S="${WORKDIR}/rocm_smi_lib-rocm-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.7.1-set-soversion.patch
+ "${FILESDIR}"/${PN}-5.7.1-no-strip.patch
+ "${FILESDIR}"/${PN}-5.7.1-remove-example.patch
+ "${FILESDIR}"/${PN}-5.4.2-detect-builtin-amdgpu.patch
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ sed "s/\${PKG_VERSION_STR}/${PV}/" -i CMakeLists.txt || die
+ sed -e "s/@VERSION_MAJOR@/$(ver_cut 1)/ ; s/@VERSION_MINOR@/$(ver_cut 2)/" \
+ -i oam/CMakeLists.txt -i rocm_smi/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
+ )
+ 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
+
+ mv "${ED}"/usr/share/doc/rocm_smi "${ED}"/usr/share/doc/${PF} || die
+}