public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/rocm-smi/, licenses/
@ 2022-03-11  8:31 Joonas Niilola
  0 siblings, 0 replies; only message in thread
From: Joonas Niilola @ 2022-03-11  8:31 UTC (permalink / raw
  To: gentoo-commits

commit:     de79099b1b0e08eed29d26a9c902aa5c5e418726
Author:     YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Sun Mar  6 10:28:31 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Mar 11 08:31:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de79099b

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 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24419
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-util/rocm-smi/Manifest              |  3 ++
 dev-util/rocm-smi/rocm-smi-4.3.0.ebuild | 56 +++++++++++++++++++++++++++++++++
 dev-util/rocm-smi/rocm-smi-4.5.2.ebuild | 56 +++++++++++++++++++++++++++++++++
 dev-util/rocm-smi/rocm-smi-5.0.2.ebuild | 56 +++++++++++++++++++++++++++++++++
 dev-util/rocm-smi/rocm-smi-9999.ebuild  | 48 ++++++++++++++++++++--------
 licenses/NCSA-AMD                       | 37 ++++++++++++++++++++++
 6 files changed, 243 insertions(+), 13 deletions(-)

diff --git a/dev-util/rocm-smi/Manifest b/dev-util/rocm-smi/Manifest
index d19074784f55..d45d584c8345 100644
--- a/dev-util/rocm-smi/Manifest
+++ b/dev-util/rocm-smi/Manifest
@@ -1 +1,4 @@
 DIST rocm-smi-4.0.0.tar.gz 45065 BLAKE2B 90a28c162099deaa67c98701b79328c760973d88fa598f8a66116927483f25dbfd85366312c4c6e8e64fa2199dfb32fb661db04b464bd58cb39dea09a84ac51e SHA512 63c1274470df079320164d29cb4c009f52e59ffebdadfefe73cbe21238a70858fd5a86417b9f81ab2c405bc64707b02ddbf65e9d301f757f245b60152cd63dcf
+DIST rocm-smi-4.3.0.tar.gz 1672482 BLAKE2B 21b35daa565ce368ac10110ba73f723c5d2125e401f5c8fa2d8e3300f450f39dd0c1de74681249868a842b568af0f2cf0d1f7bf0d40d338a7d1ee7c9e25b67dd SHA512 2bf5d3f1be50636c7c848cfa982fcdb6fbf25d648bcbe2a195e1153c7f4c8b11b2b3650aaa110eec780a218a1503afe84637c7d6e7e868e7065f8c51d8d3b8dd
+DIST rocm-smi-4.5.2.tar.gz 1674835 BLAKE2B 7cf69170a4a8dedfdc467e3b8dc64bd829136062487814e169cca0deabcd05d8adaf4fc440173e10cd8117ae63119f10a09c3042b0915b865e0620322c940e91 SHA512 640645d07dbc93a85d4e498bcc88fa0caab36b5af0f9feabf8a2383786ccb2b588be625f46e90d1b71803c011891a62a3642098fd0eb83530d5d8e0a49d204dc
+DIST rocm-smi-5.0.2.tar.gz 1677784 BLAKE2B 28e136a8b3c630ed7d5b514ad5bf985ff540df8e1fc2378b855032a6ebd2bcbcd4aab5e8a5a9e6462eacd2ac9ada0b8940aed582ce118d1066bded115af42e22 SHA512 bbad2bbebb81de42a15d8aa48e4751dbf9b8f9ee74633d16828f6977fadff35e9db0b7c9ee465a61c40a3e8f2f0f99b79cd5c5b142785cf61958d432f13d7f05

diff --git a/dev-util/rocm-smi/rocm-smi-4.3.0.ebuild b/dev-util/rocm-smi/rocm-smi-4.3.0.ebuild
new file mode 100644
index 000000000000..10683f1541f3
--- /dev/null
+++ b/dev-util/rocm-smi/rocm-smi-4.3.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake multilib prefix python-r1 python-utils-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="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() {
+	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
+}

diff --git a/dev-util/rocm-smi/rocm-smi-4.5.2.ebuild b/dev-util/rocm-smi/rocm-smi-4.5.2.ebuild
new file mode 100644
index 000000000000..10683f1541f3
--- /dev/null
+++ b/dev-util/rocm-smi/rocm-smi-4.5.2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake multilib prefix python-r1 python-utils-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="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() {
+	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
+}

diff --git a/dev-util/rocm-smi/rocm-smi-5.0.2.ebuild b/dev-util/rocm-smi/rocm-smi-5.0.2.ebuild
new file mode 100644
index 000000000000..10683f1541f3
--- /dev/null
+++ b/dev-util/rocm-smi/rocm-smi-5.0.2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake multilib prefix python-r1 python-utils-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="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() {
+	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
+}

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
 }

diff --git a/licenses/NCSA-AMD b/licenses/NCSA-AMD
new file mode 100644
index 000000000000..e03b2c008088
--- /dev/null
+++ b/licenses/NCSA-AMD
@@ -0,0 +1,37 @@
+The University of Illinois/NCSA
+Open Source License (NCSA)
+
+Copyright (c) 2014-2018, Advanced Micro Devices, Inc. All rights reserved.
+
+Developed by:
+
+                AMD Research and AMD HSA Software Development
+
+                Advanced Micro Devices, Inc.
+
+                www.amd.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal with the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+ - Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimers.
+ - Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimers in
+   the documentation and/or other materials provided with the distribution.
+ - Neither the names of Advanced Micro Devices, Inc,
+   nor the names of its contributors may be used to endorse or promote
+   products derived from this Software without specific prior written
+   permission.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS WITH THE SOFTWARE.


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-11  8:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-11  8:31 [gentoo-commits] repo/gentoo:master commit in: dev-util/rocm-smi/, licenses/ Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox