summaryrefslogtreecommitdiff
path: root/dev-util/rocm-smi
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/rocm-smi')
-rw-r--r--dev-util/rocm-smi/Manifest13
-rw-r--r--dev-util/rocm-smi/files/rocm-smi-5.1.3-detect-builtin-amdgpu.patch26
-rw-r--r--dev-util/rocm-smi/files/rocm-smi-5.4.2-fix-readonly-object.patch14
-rw-r--r--dev-util/rocm-smi/files/rocm-smi-6.0.2-set-soversion.patch165
-rw-r--r--dev-util/rocm-smi/files/rocm-smi-6.1.1-fix-const-qualifier.patch13
-rw-r--r--dev-util/rocm-smi/metadata.xml6
-rw-r--r--dev-util/rocm-smi/rocm-smi-5.4.2-r1.ebuild (renamed from dev-util/rocm-smi/rocm-smi-5.4.2.ebuild)5
-rw-r--r--dev-util/rocm-smi/rocm-smi-5.7.1-r3.ebuild (renamed from dev-util/rocm-smi/rocm-smi-5.1.3-r1.ebuild)33
-rw-r--r--dev-util/rocm-smi/rocm-smi-6.1.1.ebuild59
9 files changed, 283 insertions, 51 deletions
diff --git a/dev-util/rocm-smi/Manifest b/dev-util/rocm-smi/Manifest
index 3fa0a1500d13..b2585b299483 100644
--- a/dev-util/rocm-smi/Manifest
+++ b/dev-util/rocm-smi/Manifest
@@ -1,14 +1,17 @@
AUX rocm-smi-5.0.2-gcc12-memcpy.patch 605 BLAKE2B 8dcf4c74b9f1ccf832d71cc8b54d50aa1c7c2978bd70c359875548b753bcf52b54bfefe30b34aecc211499c9b46a9b0e62661ef8725c1c1ef3cde81da669b581 SHA512 7a39dcae0fd99fc82b92fca0a9080d42f9378065f120712132a42841ed67c056ff469e3b13760181f5d96861c1169fe8c6f0426e5351e5b67d6439605a11c41f
-AUX rocm-smi-5.1.3-detect-builtin-amdgpu.patch 983 BLAKE2B c1d926ce5ce1bef272f718f1f37869e5432993ca016ff7278cc14d7744d61efc813ee100e462bb9bb1bd61975fb620e82eaab37abe94bf415a9e40815919f59a SHA512 cd22af4b79ef366d10a36d663faf89c60a618aa9394fcac96d3521a9b9d1d270d20e216d918f18222930d883a8e2c72588ef97ab5a60086eed950a0ccfc7cddb
AUX rocm-smi-5.4.2-detect-builtin-amdgpu.patch 1071 BLAKE2B 1957d49b0c3c1f9db24add59b8dd464c6ce8571ded2601cb259a0686938e4fb718b6affd99c366f6e8aa360f53034c0e7c231dd3518bcab84bb8d5a755c4ebb5 SHA512 a531b3ae4b73dcd03e6f3de3da4dbf1250e6a6d05ec052fa8ff412f65233b5fcd418a7128f9b913aa71e1bbf970ba5b74c7b407a0654e1030f695e7f13ebd5dc
+AUX rocm-smi-5.4.2-fix-readonly-object.patch 667 BLAKE2B aa29f949c4c5b4a0e09a3345f99d9b6e22820b75f7e53cc8cbad14ae808714a7faa93f5aabb152df2cee7e0b6415a74160c7d7f0bdb6aaf7b50646afda207def SHA512 fb6f5229f0e77fab327812712f8a6f00a04dd46d2ddad0564326be8292ea1ec245c62d549da905e0511f3bfe2d34c6434c6955896e1720d3beabfea9284c97d5
AUX rocm-smi-5.7.1-no-strip.patch 1405 BLAKE2B 703eafdfe552afe3d2d4d67af2e847b42669b09b8b553b7a77e46f39f3a960174380187f5927b3a4c686dded54b4d9fa6be6c5c862ea2a023bf84224de3be5b6 SHA512 60806893c6ae7fe4c66ae927528f0db13c75f74c464885a251ac5e021bf61aaa5f529cca3de72c9c49dd993375039e0052bbccb4c3065a17849852c9283e20c5
AUX rocm-smi-5.7.1-remove-example.patch 560 BLAKE2B 6f541822947e6f458e5c553c307e137de63db884d7933dd5dad752990c7f4c15d02c47d66dd399d053368d79ab0b6d8237adb1d7c3fae28a9b03d0c34006d027 SHA512 e3be170af0d6f8b4e238e9f9940ac91748fd9b45a0f43fb1c7286d676c2a878a05aeb260e6248bc66ba93adcea5d4c7bc22ce6db6a248cee20d678fdfa7d07ec
AUX rocm-smi-5.7.1-set-soversion.patch 5234 BLAKE2B b2e40d803d0511e98c87125dae05a415b2ddf38b28f774edfe6fca1bf552e630f872631b3cfe82c1302a1c2d7be83bf7a6b4e67c0f8eb271612999eaec3cba68 SHA512 af51867d0baeca303932b0d38f716a657bf14f57e595056694eadb2c120c741e03615837eee9b86932f1fa04815c2803b6115e5e2cb81ea51b07d558155eb398
-DIST rocm-smi-5.1.3.tar.gz 1701386 BLAKE2B c5e779f5c33fec0b1b39b09c758dfadd3c24e28f15381593f2959e5c2fb9f49af3a7ca1f9ab7d6bf34c5af4fbe3f0c0ae20c6c049cbf9421a9184735bb4a64a2 SHA512 7bf7af2b42a035c298c2f9009b6123671af41f9ca1a50607cfa362f39dbd82ff88f8c13ece6c4edab585edadd9072ed096a400dd3850851e1beef3633a8eb14e
+AUX rocm-smi-6.0.2-set-soversion.patch 7897 BLAKE2B 3b18e771001c651b1ab4cb041b7e3da4e799073ef94a1ae9db42ba072430a3f79f5ccb1896190217807105a185235209b4411b33159f4a457fff1d82ebec8aa7 SHA512 9e67af5545b890a3a830a34334c551ec6934146268670549d43fe7a4b249ff8729225b31a603efee0beee3cff910ca14a000dc6b3384d456b8481fbae3864614
+AUX rocm-smi-6.1.1-fix-const-qualifier.patch 517 BLAKE2B d5a35233910380d6a5bb7931bc7861efb22254ce33f4f015ae27d44bef7afa13b5e66afbe5c33dce228a95bb3d82783d3e95570f0a0ec77f6043c69bfe828bf1 SHA512 03c06d0fc663b9e5c57f970596444cf851047c40c5a2511fa5d1c1d196f20ddcfec013bdf6d7789cb62ec60d858abeac69a35b57784de4dfc92bfb8e4131d5e0
DIST rocm-smi-5.4.2.tar.gz 1553259 BLAKE2B 0560e115028caafb1d5dd8892cfa677431b792714ecd8c75f31451fa7685d1c7070cbd687c894d7eefd112de5e2df9aa7895aa57821db207dffc4e8890898638 SHA512 0fd651593df0ebbcb2c2327d030d2674efacdb6e883daa5a8adf733db2bde3e5d16dc304856221f4bb07a3cd834944ffcc7ebd689624f7ba24ffd6c262ba74b8
DIST rocm-smi-5.7.1.tar.gz 801646 BLAKE2B b4799bbdaeb7203c16117cd30511d589a2b96e15801bb9f1382fe7a4d87d43e1d4b458d6923b6ebd602fdccba74bd65bcb98766dbd83c48fc3e02219be8c1022 SHA512 ad364278f137228a39108c93d482635137ea2724a5a39debb5b32329493ebf5c706dcf3863e2e24b6f0b6286f3877942277f5ae447446f155518972b957f7d9d
-EBUILD rocm-smi-5.1.3-r1.ebuild 1850 BLAKE2B 9f7cbf7d5ec55ac112980609f8a924b5678aa4fa5cf75cdda3d80ad90c15ecb5f1d129a21c0248985d7f4e792abbcd3f0d822e8e10e76314ebaa5fc240632ae9 SHA512 30181897335c17d81a9d9dce8c4417c62fe66a20d557251158bf2a8ffe6fc075e51878a4bd42708ef47a89022fd03a97b4dccca1f5ee450d098cf66af1095158
-EBUILD rocm-smi-5.4.2.ebuild 1454 BLAKE2B 1025768cbe75bb5d815631868c8d9f72ba6dd19a2a0483b0f6fa992a89af4b018731ab247df3679bb836e88e961d80cc94f6550dab70dc00ba25e3d642f5af74 SHA512 5e124efaa71e74ab5b5063244d757f8e9eddc22dbf10d1878c1a5d7ad04dbc88b366470596d4ee48bb489b26bb30e90f8fab51ca756fa0315e5a673971ae8d7e
+DIST rocm-smi-6.1.1.tar.gz 872628 BLAKE2B 35830fd0eb36688b3803bed2059f29ba4d8613112ae4cfff2e0a3b1d7afef9f0d77ec16771e2205ba351df0aa678c3b0d2436940b76d10d020f1a30d14d760e9 SHA512 3e31ff0d94e7f0ea650c985973b27107e3f7293b92857fbf2fe196b61632c530e95c3228ad7550d44f8ee9f5f1abfd17e5c2b19164759728fb6d4b0995455fa7
+EBUILD rocm-smi-5.4.2-r1.ebuild 1507 BLAKE2B 76ea13792d19af4ed76e6ddf11fa45b91a1cf20b4d13dcc14307f6829d0d03ee2a37901aa07ef6b3091adeb1c4e2e5c7a2a25267ce181718208f0d249845618d SHA512 d84c0feaf23ec2d098b45db3e128fb840677d75a0bcef59046b544efc588e7ad7c3b97f6b4d38aa98088428e856cd28438686684e8db89c1d739d5ecbec71a2a
EBUILD rocm-smi-5.7.1-r2.ebuild 1604 BLAKE2B 213d8d92f900537d4b84b419deca531a8b29bbb9d4ce3a6e64368b789aa341af02d8d5a2417acdc5267e370f16cd9b08a98f24156ce5ae93cae3bb648721b77d SHA512 3ad7dc560bad8eae69e3d78cff802f5a00a3984524bf94a7fab8491a1c043691deb61fe02f41b060caf834dd7210442471a72771b96162e7ff643e7ef918ec55
+EBUILD rocm-smi-5.7.1-r3.ebuild 1657 BLAKE2B cdd28775af1bf308376a951f46ae70e9f2d7d1b5cb7ee9854c6b6d96aa24cc2964c2f793b1a75b8fd7f9903aefaf493e2913e3681e4a94cb3f2a32cc2e5a9abe SHA512 bd64d50bf9247c1de26808b92374310bc9e9001a62a7277ed1808f8f52bcc509c52120de34e665487552b8f9bee16edab597f67627f3697711c974c7e83528bd
+EBUILD rocm-smi-6.1.1.ebuild 1479 BLAKE2B 56815b93b97e4e20f0405ce35467b10d8d8c5813044d995f94da8dcff468af8deb17f6cca2ce43cefdf4bdb63baceb4be64c284d5d4862ea03ad076bc6a974c4 SHA512 3627f49d454a34295ed75031f4480e5cb7758a57a641495b8c1abb19139e307db4a3b72c4e7302550817e02899f28c3fee481cd0a3e058fde473375e12810e77
EBUILD rocm-smi-9999.ebuild 1454 BLAKE2B 1025768cbe75bb5d815631868c8d9f72ba6dd19a2a0483b0f6fa992a89af4b018731ab247df3679bb836e88e961d80cc94f6550dab70dc00ba25e3d642f5af74 SHA512 5e124efaa71e74ab5b5063244d757f8e9eddc22dbf10d1878c1a5d7ad04dbc88b366470596d4ee48bb489b26bb30e90f8fab51ca756fa0315e5a673971ae8d7e
-MISC metadata.xml 661 BLAKE2B ed6ec563956132012b44907f348091135c7a463fc47a51ac0726e7749da9a4c33811df87442e576fb510799a50c14949cd20c8ca10a5850ee941a8794b70ef7d SHA512 c047963068b4ccefb73539ecd91b4c3310f0863a674acb15e9843dda7f0c917616dc8cbfe5f859e42d9ee25323bf1b66b1ce7fbe9a2e8292963ac38aa0bd72f3
+MISC metadata.xml 769 BLAKE2B 4b19247215c20587c6c7b6958dbd2ed57a242e8718d642c602b4067c4ad3e7cc7778a62e2f20b2b940b3281cc6e0a793153e8ff7bfd54aaa7a16e74b8e54ac6c SHA512 76648eff089ed88259457dfea04a4db19393b0d1285b3556a583b7750782a3b2406e2c407c2c7cdff47cabf1c7377fdf8a053b74226f73c32426155361dc0c83
diff --git a/dev-util/rocm-smi/files/rocm-smi-5.1.3-detect-builtin-amdgpu.patch b/dev-util/rocm-smi/files/rocm-smi-5.1.3-detect-builtin-amdgpu.patch
deleted file mode 100644
index 3f322aef3582..000000000000
--- a/dev-util/rocm-smi/files/rocm-smi-5.1.3-detect-builtin-amdgpu.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Detect amdgpu module for amdgpu-builtin kernel
-From dc2a4b5b256692e1a6ecef45210682c316b961e0 Mon Sep 17 00:00:00 2001
-From: YiyangWu <xgreenlandforwyy@gmail.com>
-Date: Sat, 2 Apr 2022 16:40:11 +0800
-Subject: [PATCH] Check /sys/module/amdgpu for ROCk instead of lsmod
-
-Closes: #102
-
-Signed-off-by: YiyangWu <xgreenlandforwyy@gmail.com>
----
- python_smi_tools/rocm_smi.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/python_smi_tools/rocm_smi.py b/python_smi_tools/rocm_smi.py
-index 57606ee..35be495 100755
---- a/python_smi_tools/rocm_smi.py
-+++ b/python_smi_tools/rocm_smi.py
-@@ -66,7 +66,7 @@ def driverInitialized():
- """
- driverInitialized = ''
- try:
-- driverInitialized = str(subprocess.check_output("cat /proc/modules|grep amdgpu", shell=True))
-+ driverInitialized = str(subprocess.check_output("test -d /sys/module/amdgpu", shell=True))
- except subprocess.CalledProcessError:
- pass
- if len(driverInitialized) > 0:
diff --git a/dev-util/rocm-smi/files/rocm-smi-5.4.2-fix-readonly-object.patch b/dev-util/rocm-smi/files/rocm-smi-5.4.2-fix-readonly-object.patch
new file mode 100644
index 000000000000..914fd2f6b426
--- /dev/null
+++ b/dev-util/rocm-smi/files/rocm-smi-5.4.2-fix-readonly-object.patch
@@ -0,0 +1,14 @@
+bug https://bugs.gentoo.org/918709
+patch from https://github.com/ROCm/rocm_smi_lib/issues/170#issuecomment-2130745220
+upstreamed in https://github.com/ROCm/rocm_smi_lib/commit/7fdc6e56c40ed6f02c888dcb1492944a9373ba74
+--- a/include/rocm_smi/rocm_smi_utils.h 2024-05-25 00:02:19.127412816 -0400
++++ b/include/rocm_smi/rocm_smi_utils.h 2024-05-25 00:03:25.359416227 -0400
+@@ -149,7 +149,7 @@
+ __forceinline ~ScopeGuard() {
+ if (!dismiss_) release_();
+ }
+- __forceinline ScopeGuard& operator=(const ScopeGuard& rhs) {
++ __forceinline ScopeGuard& operator=(ScopeGuard& rhs) {
+ dismiss_ = rhs.dismiss_;
+ release_ = rhs.release_;
+ rhs.dismiss_ = true;
diff --git a/dev-util/rocm-smi/files/rocm-smi-6.0.2-set-soversion.patch b/dev-util/rocm-smi/files/rocm-smi-6.0.2-set-soversion.patch
new file mode 100644
index 000000000000..6d28c7bb8e3e
--- /dev/null
+++ b/dev-util/rocm-smi/files/rocm-smi-6.0.2-set-soversion.patch
@@ -0,0 +1,165 @@
+Switch from extracting version with git to version from ebuild filename.
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,20 +33,17 @@ set(SHARE_INSTALL_PREFIX
+ "share/${ROCM_SMI}"
+ CACHE STRING "Tests and Example install directory")
+
+-# provide git to utilities
+-find_program (GIT NAMES git)
+-
+-## Setup the package version based on git tags.
+-set(PKG_VERSION_GIT_TAG_PREFIX "rsmi_pkg_ver")
+-get_package_version_number("7.0.0" ${PKG_VERSION_GIT_TAG_PREFIX} GIT)
+-message("Package version: ${PKG_VERSION_STR}")
+-set(${ROCM_SMI_LIBS_TARGET}_VERSION_MAJOR "${CPACK_PACKAGE_VERSION_MAJOR}")
+-set(${ROCM_SMI_LIBS_TARGET}_VERSION_MINOR "${CPACK_PACKAGE_VERSION_MINOR}")
+-set(${ROCM_SMI_LIBS_TARGET}_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}")
+-set(${ROCM_SMI_LIBS_TARGET}_VERSION_BUILD "0")
+-set(${ROCM_SMI_LIBS_TARGET}_VERSION_HASH "${PKG_VERSION_HASH}")
+-
+-set(${ROCM_SMI_LIBS_TARGET}_VERSION_STRING "${${ROCM_SMI_LIBS_TARGET}_VERSION_MAJOR}.${${ROCM_SMI_LIBS_TARGET}_VERSION_MINOR}.${${ROCM_SMI_LIBS_TARGET}_VERSION_PATCH}+${${ROCM_SMI_LIBS_TARGET}_VERSION_HASH}")
++set(VERSION_MAJOR "@VERSION_MAJOR@")
++set(VERSION_MINOR "@VERSION_MINOR@")
++set(VERSION_PATCH "@VERSION_PATCH@")
++set(PKG_VERSION_STR "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
++set(SO_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}")
++set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
++set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
++set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
++set(rocm_smi_VERSION_MAJOR "${VERSION_MAJOR}")
++set(rocm_smi_VERSION_MINOR "${VERSION_MINOR}")
++set(rocm_smi_VERSION_PATCH "${VERSION_PATCH}")
+
+ # The following default version values should be updated as appropriate for
+ # ABI breaks (update MAJOR and MINOR), and ABI/API additions (update MINOR).
+--- a/oam/CMakeLists.txt
++++ b/oam/CMakeLists.txt
+@@ -29,17 +29,6 @@ set(OAM_NAME "oam")
+ set(OAM_COMPONENT "lib${OAM_NAME}")
+ set(OAM_TARGET "${OAM_NAME}")
+
+-################# Determine the library version #########################
+-set(SO_VERSION_GIT_TAG_PREFIX "oam_so_ver")
+-
+-# VERSION_* variables should be set by get_version_from_tag
+-message("Package version: ${PKG_VERSION_STR}")
+-
+-# Debian package specific variables
+-# Set a default value for the package version
+-get_version_from_tag("1.0.0.0" ${SO_VERSION_GIT_TAG_PREFIX} GIT)
+-
+-# VERSION_* variables should be set by get_version_from_tag
+ if ( ${ROCM_PATCH_VERSION} )
+ set ( VERSION_PATCH ${ROCM_PATCH_VERSION})
+ set(SO_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
+--- a/python_smi_tools/rsmiBindings.py
++++ b/python_smi_tools/rsmiBindings.py
+@@ -26,17 +26,7 @@ def initRsmiBindings(silent=False):
+ if (rocm_smi_lib_path != None):
+ path_librocm = rocm_smi_lib_path
+ else:
+- path_librocm = os.path.dirname(os.path.realpath(__file__)) + '/../../lib/librocm_smi64.so.7'
+-
+- if not os.path.isfile(path_librocm):
+- print_silent('Unable to find %s . Trying /opt/rocm*' % path_librocm)
+- for root, dirs, files in os.walk('/opt', followlinks=True):
+- if 'librocm_smi64.so.7' in files:
+- path_librocm = os.path.join(os.path.realpath(root), 'librocm_smi64.so.7')
+- if os.path.isfile(path_librocm):
+- print_silent('Using lib from %s' % path_librocm)
+- else:
+- print('Unable to find librocm_smi64.so.7')
++ path_librocm = 'librocm_smi64.so'
+
+ # ----------> TODO: Support static libs as well as SO
+ try:
+@@ -44,7 +34,7 @@ def initRsmiBindings(silent=False):
+ return CDLL(path_librocm)
+ except OSError:
+ print('Unable to load the rocm_smi library.\n'\
+- 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so.7\n'\
++ 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so\n'\
+ '{0}Please refer to https://github.com/'\
+ 'RadeonOpenCompute/rocm_smi_lib for the installation guide.{1}'\
+ .format('\33[33m', '\033[0m'))
+--- a/python_smi_tools/rsmiBindings.py.in
++++ b/python_smi_tools/rsmiBindings.py.in
+@@ -26,17 +26,7 @@ def initRsmiBindings(silent=False):
+ if (rocm_smi_lib_path != None):
+ path_librocm = rocm_smi_lib_path
+ else:
+- path_librocm = os.path.dirname(os.path.realpath(__file__)) + '/../../@CMAKE_INSTALL_LIBDIR@/librocm_smi64.so.@VERSION_MAJOR@'
+-
+- if not os.path.isfile(path_librocm):
+- print_silent('Unable to find %s . Trying /opt/rocm*' % path_librocm)
+- for root, dirs, files in os.walk('/opt', followlinks=True):
+- if 'librocm_smi64.so.@VERSION_MAJOR@' in files:
+- path_librocm = os.path.join(os.path.realpath(root), 'librocm_smi64.so.@VERSION_MAJOR@')
+- if os.path.isfile(path_librocm):
+- print_silent('Using lib from %s' % path_librocm)
+- else:
+- print('Unable to find librocm_smi64.so.@VERSION_MAJOR@')
++ path_librocm = 'librocm_smi64.so'
+
+ # ----------> TODO: Support static libs as well as SO
+ try:
+@@ -44,7 +34,7 @@ def initRsmiBindings(silent=False):
+ return CDLL(path_librocm)
+ except OSError:
+ print('Unable to load the rocm_smi library.\n'\
+- 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so.@VERSION_MAJOR@\n'\
++ 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so\n'\
+ '{0}Please refer to https://github.com/'\
+ 'RadeonOpenCompute/rocm_smi_lib for the installation guide.{1}'\
+ .format('\33[33m', '\033[0m'))
+--- a/python_smi_tools/rsmiBindingsInit.py.in
++++ b/python_smi_tools/rsmiBindingsInit.py.in
+@@ -26,17 +26,7 @@ def initRsmiBindings(silent=False):
+ if (rocm_smi_lib_path != None):
+ path_librocm = rocm_smi_lib_path
+ else:
+- path_librocm = os.path.dirname(os.path.realpath(__file__)) + '/../../@CMAKE_INSTALL_LIBDIR@/librocm_smi64.so.@VERSION_MAJOR@'
+-
+- if not os.path.isfile(path_librocm):
+- print_silent('Unable to find %s . Trying /opt/rocm*' % path_librocm)
+- for root, dirs, files in os.walk('/opt', followlinks=True):
+- if 'librocm_smi64.so.@VERSION_MAJOR@' in files:
+- path_librocm = os.path.join(os.path.realpath(root), 'librocm_smi64.so.@VERSION_MAJOR@')
+- if os.path.isfile(path_librocm):
+- print_silent('Using lib from %s' % path_librocm)
+- else:
+- print('Unable to find librocm_smi64.so.@VERSION_MAJOR@')
++ path_librocm = 'librocm_smi64.so'
+
+ # ----------> TODO: Support static libs as well as SO
+ try:
+@@ -44,7 +34,7 @@ def initRsmiBindings(silent=False):
+ return CDLL(path_librocm)
+ except OSError:
+ print('Unable to load the rocm_smi library.\n'\
+- 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so.@VERSION_MAJOR@\n'\
++ 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so\n'\
+ '{0}Please refer to https://github.com/'\
+ 'RadeonOpenCompute/rocm_smi_lib for the installation guide.{1}'\
+ .format('\33[33m', '\033[0m'))
+--- a/rocm_smi/CMakeLists.txt
++++ b/rocm_smi/CMakeLists.txt
+@@ -31,17 +31,6 @@ set(ROCM_SMI_TARGET "${ROCM_SMI}64")
+ ## Include common cmake modules
+ include(utils)
+
+-################# Determine the library version #########################
+-set(SO_VERSION_GIT_TAG_PREFIX "rsmi_so_ver")
+-
+-# VERSION_* variables should be set by get_version_from_tag
+-message("Package version: ${PKG_VERSION_STR}")
+-
+-# Debian package specific variables
+-# Set a default value for the package version
+-get_version_from_tag("1.0.0.0" ${SO_VERSION_GIT_TAG_PREFIX} GIT)
+-
+-# VERSION_* variables should be set by get_version_from_tag
+ if ( ${ROCM_PATCH_VERSION} )
+ set ( VERSION_PATCH ${ROCM_PATCH_VERSION})
+ set(SO_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
diff --git a/dev-util/rocm-smi/files/rocm-smi-6.1.1-fix-const-qualifier.patch b/dev-util/rocm-smi/files/rocm-smi-6.1.1-fix-const-qualifier.patch
new file mode 100644
index 000000000000..6c4197091575
--- /dev/null
+++ b/dev-util/rocm-smi/files/rocm-smi-6.1.1-fix-const-qualifier.patch
@@ -0,0 +1,13 @@
+Fix error "cannot assign to variable 'rhs' with const-qualified type"
+PR: https://github.com/ROCm/rocm_smi_lib/pull/156
+--- a/include/rocm_smi/rocm_smi_utils.h
++++ b/include/rocm_smi/rocm_smi_utils.h
+@@ -216,7 +216,7 @@ class ScopeGuard {
+ __forceinline ~ScopeGuard() {
+ if (!dismiss_) release_();
+ }
+- __forceinline ScopeGuard& operator=(const ScopeGuard& rhs) {
++ __forceinline ScopeGuard& operator=(ScopeGuard& rhs) {
+ dismiss_ = rhs.dismiss_;
+ release_ = rhs.release_;
+ rhs.dismiss_ = true;
diff --git a/dev-util/rocm-smi/metadata.xml b/dev-util/rocm-smi/metadata.xml
index 6ae700d1f577..c909acfea388 100644
--- a/dev-util/rocm-smi/metadata.xml
+++ b/dev-util/rocm-smi/metadata.xml
@@ -9,11 +9,15 @@
<email>gentoo@holzke.net</email>
<name>Wilfried Holzke</name>
</maintainer>
+ <maintainer type="person">
+ <email>lockalsash@gmail.com</email>
+ <name>Sv. Lockal</name>
+ </maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<upstream>
- <remote-id type="github">RadeonOpenCompute/ROC-smi</remote-id>
+ <remote-id type="github">ROCm/ROC-smi</remote-id>
</upstream>
</pkgmetadata>
diff --git a/dev-util/rocm-smi/rocm-smi-5.4.2.ebuild b/dev-util/rocm-smi/rocm-smi-5.4.2-r1.ebuild
index bc4f8b802371..e77f370cd678 100644
--- a/dev-util/rocm-smi/rocm-smi-5.4.2.ebuild
+++ b/dev-util/rocm-smi/rocm-smi-5.4.2-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{9..12} )
inherit cmake python-r1
@@ -32,6 +32,7 @@ BDEPEND=""
PATCHES=(
"${FILESDIR}"/${PN}-5.0.2-gcc12-memcpy.patch
"${FILESDIR}"/${PN}-5.4.2-detect-builtin-amdgpu.patch
+ "${FILESDIR}"/${PN}-5.4.2-fix-readonly-object.patch
)
src_prepare() {
diff --git a/dev-util/rocm-smi/rocm-smi-5.1.3-r1.ebuild b/dev-util/rocm-smi/rocm-smi-5.7.1-r3.ebuild
index 71783873843a..9d1d975d0e84 100644
--- a/dev-util/rocm-smi/rocm-smi-5.1.3-r1.ebuild
+++ b/dev-util/rocm-smi/rocm-smi-5.7.1-r3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit cmake python-r1
@@ -22,35 +22,32 @@ fi
LICENSE="MIT NCSA-AMD"
SLOT="0/$(ver_cut 1-2)"
-IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-DEPEND=""
RDEPEND="${PYTHON_DEPS}"
-BDEPEND=""
+
+S="${WORKDIR}/rocm_smi_lib-rocm-${PV}"
PATCHES=(
- "${FILESDIR}"/${PN}-5.0.2-gcc12-memcpy.patch
- "${FILESDIR}"/${PN}-5.1.3-detect-builtin-amdgpu.patch
+ "${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
+ "${FILESDIR}"/${PN}-5.4.2-fix-readonly-object.patch
)
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
+
+ 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"
- -DCMAKE_DISABLE_FIND_PACKAGE_LATEX=ON
+ -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
)
cmake_src_configure
}
@@ -59,4 +56,6 @@ 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
}
diff --git a/dev-util/rocm-smi/rocm-smi-6.1.1.ebuild b/dev-util/rocm-smi/rocm-smi-6.1.1.ebuild
new file mode 100644
index 000000000000..056dd80b453a
--- /dev/null
+++ b/dev-util/rocm-smi/rocm-smi-6.1.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit cmake python-r1
+
+DESCRIPTION="ROCm System Management Interface Library"
+HOMEPAGE="https://github.com/ROCm/rocm_smi_lib"
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/ROCm/rocm_smi_lib"
+ EGIT_BRANCH="master"
+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 NCSA-AMD"
+SLOT="0/$(ver_cut 1-2)"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.7.1-no-strip.patch
+ "${FILESDIR}"/${PN}-5.7.1-remove-example.patch
+ "${FILESDIR}"/${PN}-6.0.2-set-soversion.patch
+ "${FILESDIR}"/${PN}-6.1.1-fix-const-qualifier.patch
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ sed -e "s/@VERSION_MAJOR@/$(ver_cut 1)/" \
+ -e "s/@VERSION_MINOR@/$(ver_cut 2)/" \
+ -e "s/@VERSION_PATCH@/$(ver_cut 3)/" \
+ -i 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
+}