diff options
author | 2022-03-06 18:28:31 +0800 | |
---|---|---|
committer | 2022-03-11 10:31:01 +0200 | |
commit | de79099b1b0e08eed29d26a9c902aa5c5e418726 (patch) | |
tree | a83958a6fc85161ced871b629b7f317595a57ccc /dev-util/rocm-smi/rocm-smi-9999.ebuild | |
parent | media-gfx/libimagequant: remove unused patches (diff) | |
download | gentoo-de79099b1b0e08eed29d26a9c902aa5c5e418726.tar.gz gentoo-de79099b1b0e08eed29d26a9c902aa5c5e418726.tar.bz2 gentoo-de79099b1b0e08eed29d26a9c902aa5c5e418726.zip |
dev-util/rocm-smi: new versions (rocm_smi_lib)
The rocm-smi https://github.com/RadeonOpenCompute/ROC-smi is long deprecated.
The last version is 4.1.0. The new implementation is at
https://github.com/RadeonOpenCompute/rocm_smi_lib. These are the new
ebuilds, with the appropriate license file NCSA-AMD added.
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24419
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-util/rocm-smi/rocm-smi-9999.ebuild')
-rw-r--r-- | dev-util/rocm-smi/rocm-smi-9999.ebuild | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/dev-util/rocm-smi/rocm-smi-9999.ebuild b/dev-util/rocm-smi/rocm-smi-9999.ebuild index f05a44aba607..10683f1541f3 100644 --- a/dev-util/rocm-smi/rocm-smi-9999.ebuild +++ b/dev-util/rocm-smi/rocm-smi-9999.ebuild @@ -1,34 +1,56 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_COMPAT=( python3_{8..10} ) -inherit python-single-r1 +inherit cmake multilib prefix python-r1 python-utils-r1 -DESCRIPTION="ROCm System Management Interface" -HOMEPAGE="https://github.com/RadeonOpenCompute/ROC-smi" +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/ROC-smi" + EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocm_smi_lib" EGIT_BRANCH="master" else - SRC_URI="https://github.com/RadeonOpenCompute/ROC-smi/archive/rocm-${PV}.tar.gz -> rocm-smi-${PV}.tar.gz" + SRC_URI="https://github.com/RadeonOpenCompute/rocm_smi_lib/archive/rocm-${PV}.tar.gz -> rocm-smi-${PV}.tar.gz" KEYWORDS="~amd64" - S="${WORKDIR}/ROC-smi-rocm-${PV}" + S="${WORKDIR}/rocm_smi_lib-rocm-${PV}" fi -LICENSE="MIT" -SLOT="0" +LICENSE="NCSA-AMD" +SLOT="0/$(ver_cut 1-2)" IUSE="" REQUIRED_USE="${PYTHON_REQUIRED_USE}" DEPEND="" RDEPEND="${PYTHON_DEPS}" +BDEPEND="" + +src_prepare() { + sed -e "/DESTINATION/s,\${OAM_NAME}/lib,$(get_libdir)," \ + -e "/DESTINATION/s,oam/include/oam,include/oam," -i oam/CMakeLists.txt || die + sed -e "/link DESTINATION/,+1d" \ + -e "/DESTINATION/s,\${ROCM_SMI}/lib,$(get_libdir)," \ + -e "/bindings_link/,+3d" \ + -e "/rsmiBindings.py/,+1d" \ + -e "/DESTINATION/s,rocm_smi/include/rocm_smi,include/rocm_smi," -i rocm_smi/CMakeLists.txt || die + sed -e "/LICENSE.txt/d" -e "s,\${ROCM_SMI}/lib/cmake,$(get_libdir)/cmake,g" -i CMakeLists.txt || die + sed -e "/^path_librocm = /c\path_librocm = '${EPREFIX}/usr/lib64/librocm_smi64.so'" -i python_smi_tools/rsmiBindings.py || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + ) + cmake_src_configure +} src_install() { - python_scriptinto /usr/bin - python_newscript rocm_smi.py rocm-smi + cmake_src_install + python_foreach_impl python_newexe python_smi_tools/rocm_smi.py rocm-smi + python_foreach_impl python_domodule python_smi_tools/rsmiBindings.py } |