diff options
Diffstat (limited to 'dev-util/rocminfo')
15 files changed, 302 insertions, 161 deletions
diff --git a/dev-util/rocminfo/Manifest b/dev-util/rocminfo/Manifest index 904d889fa683..b4888c9bbca0 100644 --- a/dev-util/rocminfo/Manifest +++ b/dev-util/rocminfo/Manifest @@ -1,8 +1,6 @@ -DIST rocminfo-3.10.0.tar.gz 15106 BLAKE2B 7cc90a1c0b9c5f8664dc6c9bebe83f590526565df8ccb3b3d137ca1db42a7ae9640c43a2de01ae13319d8ea3267709ff8b0a70d2b4473d84d5350f7568a897fa SHA512 79eae3c294c1f3077515b807f9b0070a32122542ac6330704b9e0130366717361e046a9ccd5f43a02770746d2123292020d94de6878d053aec58519f1bd36521 -DIST rocminfo-3.7.0.tar.gz 15104 BLAKE2B 728ce471e52dadca8b59aa3196c2f75933650e3002335014accd7f8eada19d4936a7404f908d50747a0e51faa8a65764200072cf598f9d0855a3052db8290160 SHA512 25a6a9216366e310ece9db50a21bc0eb7741760a7b46fa1818ee102557000348f430f9269e2ba9e872437dfafcb31ac563476e2bf83a10705fde8dd5fc854404 -DIST rocminfo-3.8.0.tar.gz 15103 BLAKE2B afa6a2cd3315b18f2711cf1de4701e672beac76d08548453f9377c865f2b108f4f50340f545a9040450c7acded3ac093d334908a7ceddba35c847136fe92aa77 SHA512 c75fa7a4116b9cfa75d6b7ff3920c85ad19fea09ab5f6a7abebde9cd184763905aea8684574f6b1919044806af8ab35a81d7f6010cbd0fb18b36699a182b5f39 -DIST rocminfo-3.9.0.tar.gz 15106 BLAKE2B 0be734ee03298a83892fb237f7b171c7bb5779d153efa2f49ceadd27a32709fd7f6fe4895d43c7d55763be6a5ddf22a4ab9c6b42e4f28946b0d35d44cd897d54 SHA512 aaa2feaad1e0c8583f5211d629934c270f30c046d4e4067c142ea5ddc4fba95c6719d38cd623d1f5190962ccbbfc63196a3f4618d84e9b223bc6ee8cc5544530 -DIST rocminfo-4.0.0.tar.gz 15104 BLAKE2B 858d0856a63af88bfb8d948f729fa4108aff0bbe21270d9679d14a2b5bb3230471f498143ce67921af3271e619896ca2cb1a624029f3154e7aa127c018dc9d74 SHA512 40496919dd40cd3a551c01be6023d81a60aebefa5aebdd2aee87cdec44fde4b54b89b67c380d65e25747ae7fc4d5b592dd01d4728dde447079ee7f63396c0c1a -DIST rocminfo-4.1.0.tar.gz 15379 BLAKE2B dcf7a663792538dbe5c02fbc9e5874d1e716f2986db0a82f49c20130b4f26e8689be9821dd2e3a7363ad1f54106280e511f157b0d9ba2f67b9bc6fd064c7fe82 SHA512 a0bca3c42f360dfee6739de30d932d6eb0b627cd5d369b437d2fac6054a007a3b958ddf6f8b318bf9cab71b051cdf66ecd123b4cce4ef071bf98e0f2bb739c37 -DIST rocminfo-4.2.0.tar.gz 15379 BLAKE2B a76dd3f0d550d5b8a8c39454ef44d5f0a76ad24e4a3b75a9fd2a1b0d4d983a02a877c0eb4d2e4158f9c8c97602b52a2de9a1f535fad609a52e8cad48c4c8a833 SHA512 801c29ae88878b9448ad2f2c9faaa7ffba3a46c77887bebf2fa8d3db7e9258fb4678cf2b898ddfc88a34fcc0fdcc91c9aa2f4a1509eeb05db6a7b085ae28f3dc -DIST rocminfo-4.3.0.tar.gz 15379 BLAKE2B 86683d8e88d26a8730cf84b3a1d4f69231ff7158186ca6b867b5a029ae485978cf0d67db2b07c05c046bb300b55b6e80e280b9429cef903e3077dc1da0945b8d SHA512 88b7f1ad86e76ede270d12fc3065eba192fcf3938d749b8345dac3b71be0985071dc5139a801ff46015369cd09b3eefcd8ff9ea71ab297476dda195f57792849 +DIST rocminfo-5.1.3.tar.gz 16772 BLAKE2B 1b35661f9e6cd8cd5180ef3e4fd3dd8e7d6b282947d25c81b0b8bd347a5bee11cf87d950bbd8adcbd7a8a3053c41622b8e99fc0b56f4a14bdf4acf20992becc7 SHA512 998d499b0ae9a22bde30b2c26e31587a78b5ed63a19649d5b203eb47a044f17d1d4d3e951ec094d5be1ca3ba37efa4b19f5b53047727158170fa90c13a8c7563 +DIST rocminfo-5.3.3.tar.gz 16829 BLAKE2B 341908048b9726a22ab5e81317916166d4ba114c5060fd8b7b455e0f4df3857b16a735cfccce2d013cd6632680e29b2e0c9ef91461d46b7e94dc71b0751aa42e SHA512 336a408eb49eb8d40b506f58d62de3fd406d00b0de169bc3f6176c76f1f50366347d212de8783b5c48ae1b6660d307b276ba6b3bac8d8286f5e93cfe739c4dae +DIST rocminfo-5.4.3.tar.gz 16832 BLAKE2B 2344b6bd3ffecdfa657559e4d4d8c09de862ebcda287fd67db9864d19aab0a928b071bc43ddd4a24a31037c61500b1bb9697d11b3031c860c5bac77392c664ef SHA512 80221c91f56cd04ba8dcbddd53bb47cb57bb97b74102890a7a43203e9a2fd572762025feb65676774f774a9a5f0d0a1293fc4508fc82d21b6b4042ad92210096 +DIST rocminfo-5.5.1.tar.gz 17020 BLAKE2B 42fdbd32b7092306dc4442910ae922b616c859439511e2acfb17dee32557d77a9731aeb1d7ce25d32ae76f9cafd1e56476ac522545efe516d238d9285fa7b4a3 SHA512 5710979ee885bf35d40b7d07b157226ea4bb84bd14a2c57bdf8c93ca483685a8ce39d01f15b828d015968102457e9a94335a5273524d98eca76d0f8ceed2e8c1 +DIST rocminfo-5.7.1.tar.gz 17302 BLAKE2B 395c695ed0b79c771c4240310c457aec893ffd889ddd551866753d2a0c8d4e98399672d74a7114a89faf8b1960dd54fbb0425ea00f7d15e5c740e33ce4046d0b SHA512 38726bc52bd045b6281cccd702706fd6ea5b57cdc421ad23106d5447a002f4b530e8d4e4430d2bb8eb30803af3bacdaf34646a965cea26f42d726bf7f6aafbab +DIST rocminfo-6.0.0.tar.gz 17614 BLAKE2B f296d43103062c492c3a13a8f79a70ebe719126136abe38b020035f0e31819b9b25928aa538416ec9cc733a4e352e83fe8550d15c10f8071b7f889b361814fa6 SHA512 66de2e84b78f69a0c7d302e5432b08874374a45f7d577b158f23abbb40455c574868a7093e64c3a7d19e21dd13b48865a36bd626ef34b99ce52f3363bbb261a7 diff --git a/dev-util/rocminfo/files/rocminfo-4.3.0-detect-builtin-amdgpu.patch b/dev-util/rocminfo/files/rocminfo-4.3.0-detect-builtin-amdgpu.patch deleted file mode 100644 index a01eb3ec3909..000000000000 --- a/dev-util/rocminfo/files/rocminfo-4.3.0-detect-builtin-amdgpu.patch +++ /dev/null @@ -1,25 +0,0 @@ -/sys/module/amdgpu instead of lsmod for builtin amdgpu kernel module - -https://github.com/RadeonOpenCompute/rocminfo/pull/43 -https://github.com/RadeonOpenCompute/rocminfo/issues/42 ---- a/rocminfo.cc -+++ b/rocminfo.cc -@@ -1035,14 +1035,15 @@ AcquireAndDisplayAgentInfo(hsa_agent_t agent, void* data) { - - int CheckInitialState(void) { - // Check kernel module for ROCk is loaded -- FILE *fd = popen("lsmod | grep amdgpu", "r"); -- char buf[16]; -- if (fread (buf, 1, sizeof (buf), fd) <= 0) { -+ int module_dir; -+ module_dir = open("/sys/module/amdgpu", O_DIRECTORY); -+ if (module_dir < 0) { - printf("%sROCk module is NOT loaded, possibly no GPU devices%s\n", - COL_RED, COL_RESET); - return -1; - } else { - printf("%sROCk module is loaded%s\n", COL_WHT, COL_RESET); -+ close(module_dir); - } - - // Check if user belongs to the group for /dev/kfd (e.g. "video" or diff --git a/dev-util/rocminfo/files/rocminfo-5.1.3-detect-builtin-amdgpu.patch b/dev-util/rocminfo/files/rocminfo-5.1.3-detect-builtin-amdgpu.patch new file mode 100644 index 000000000000..5d0b2ed284bd --- /dev/null +++ b/dev-util/rocminfo/files/rocminfo-5.1.3-detect-builtin-amdgpu.patch @@ -0,0 +1,50 @@ +/sys/module/amdgpu instead of lsmod for builtin amdgpu kernel module + +https://github.com/RadeonOpenCompute/rocminfo/pull/43 +https://github.com/RadeonOpenCompute/rocminfo/issues/42 +From ea4f017ed035928b1970e2589b02ec9b348c863e Mon Sep 17 00:00:00 2001 +From: YiyangWu <xgreenlandforwyy@gmail.com> +Date: Wed, 18 Aug 2021 21:05:20 +0800 +Subject: [PATCH] Check /sys/module/amdgpu for ROCk instead of lsmod + +Closes: #42 + +Signed-off-by: YiyangWu <xgreenlandforwyy@gmail.com> +--- + rocminfo.cc | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/rocminfo.cc b/rocminfo.cc +index 871f406..58c847d 100755 +--- a/rocminfo.cc ++++ b/rocminfo.cc +@@ -995,6 +995,8 @@ AcquireAndDisplayAgentInfo(hsa_agent_t agent, void* data) { + err = AcquireAgentInfo(agent, &agent_i); + RET_IF_HSA_ERR(err); + ++ std::string ind(kIndentSize, ' '); ++ + printLabel("*******", true); + std::string agent_ind("Agent "); + agent_ind += std::to_string(*agent_number).c_str(); +@@ -1031,16 +1033,16 @@ AcquireAndDisplayAgentInfo(hsa_agent_t agent, void* data) { + + int CheckInitialState(void) { + // Check kernel module for ROCk is loaded +- FILE *fd = popen("lsmod | grep amdgpu", "r"); +- char buf[16]; +- if (fread (buf, 1, sizeof (buf), fd) == 0) { ++ int module_dir; ++ module_dir = open("/sys/module/amdgpu", O_DIRECTORY); ++ if (module_dir < 0) { + printf("%sROCk module is NOT loaded, possibly no GPU devices%s\n", + COL_RED, COL_RESET); + return -1; + } else { + printf("%sROCk module is loaded%s\n", COL_WHT, COL_RESET); ++ close(module_dir); + } +- pclose(fd); + + // Check if user belongs to the group for /dev/kfd (e.g. "video" or + // "render") diff --git a/dev-util/rocminfo/files/rocminfo-5.5.1-detect-builtin-amdgpu.patch b/dev-util/rocminfo/files/rocminfo-5.5.1-detect-builtin-amdgpu.patch new file mode 100644 index 000000000000..dd1aefe4df4f --- /dev/null +++ b/dev-util/rocminfo/files/rocminfo-5.5.1-detect-builtin-amdgpu.patch @@ -0,0 +1,105 @@ +From 3a4d533a1e2a179ad873c480dc4a42ea23681263 Mon Sep 17 00:00:00 2001 +From: Mike Li <Tianxinmike.Li@amd.com> +Date: Wed, 17 Aug 2022 11:44:09 -0400 +Subject: [PATCH 1/2] Check permission and handle PermissionError exception + +Signed-off-by: Mike Li <Tianxinmike.Li@amd.com> +Change-Id: If7cb8464d0b761e4be45c85eb7147ceed609da61 +--- + rocm_agent_enumerator | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/rocm_agent_enumerator b/rocm_agent_enumerator +index 6264a5f..ceb9e11 100755 +--- a/rocm_agent_enumerator ++++ b/rocm_agent_enumerator +@@ -195,10 +195,15 @@ def readFromKFD(): + node_path = os.path.join(topology_dir, node) + if os.path.isdir(node_path): + prop_path = node_path + '/properties' +- if os.path.isfile(prop_path): ++ if os.path.isfile(prop_path) and os.access(prop_path, os.R_OK): + target_search_term = re.compile("gfx_target_version.+") + with open(prop_path) as f: +- line = f.readline() ++ try: ++ line = f.readline() ++ except PermissionError: ++ # We may have a subsystem (e.g. scheduler) limiting device visibility which ++ # could cause a permission error. ++ line = '' + while line != '' : + search_result = target_search_term.search(line) + if search_result is not None: + +From 94b4b3f0a66eb70912177ca7076b4267f8b5449b Mon Sep 17 00:00:00 2001 +From: Johannes Dieterich <johannes.dieterich@amd.com> +Date: Mon, 21 Nov 2022 18:09:55 +0000 +Subject: [PATCH 2/2] Fix rocminfo when run within docker environments + +Currently, rocminfo will fail when executed inside a docker container +due to being unable to lsmod inside docker. This has impacts on +rocprofiler use. + +Fix this behavior by querying initstate of the amdgpu module from +/sys/module/amdgpu instead. If initstate is marked "live" everything if +fine - error out with either "not loaded" (initstate file does not +exist) or "not live" (initstate file does not contain "live" string). + +Change-Id: I6f2e9655942fd4cf840fd3f56b7d69e893fa84d7 +--- + rocminfo.cc | 30 ++++++++++++++++++++++++------ + 1 file changed, 24 insertions(+), 6 deletions(-) + +diff --git a/rocminfo.cc b/rocminfo.cc +index 0842d57..8ed9111 100755 +--- a/rocminfo.cc ++++ b/rocminfo.cc +@@ -51,6 +51,7 @@ + #include <unistd.h> + #include <pwd.h> + ++#include <fstream> + #include <vector> + #include <string> + #include <sstream> +@@ -1039,16 +1040,33 @@ AcquireAndDisplayAgentInfo(hsa_agent_t agent, void* data) { + + int CheckInitialState(void) { + // Check kernel module for ROCk is loaded +- FILE *fd = popen("lsmod | grep amdgpu", "r"); +- char buf[16]; +- if (fread (buf, 1, sizeof (buf), fd) == 0) { ++ ++ std::ifstream amdgpu_initstate("/sys/module/amdgpu/initstate"); ++ if (amdgpu_initstate){ ++ std::stringstream buffer; ++ buffer << amdgpu_initstate.rdbuf(); ++ amdgpu_initstate.close(); ++ ++ std::string line; ++ bool is_live = false; ++ while (std::getline(buffer, line)){ ++ if (line.find( "live" ) != std::string::npos){ ++ is_live = true; ++ break; ++ } ++ } ++ if (is_live){ ++ printf("%sROCk module is loaded%s\n", COL_WHT, COL_RESET); ++ } else { ++ printf("%sROCk module is NOT live, possibly no GPU devices%s\n", ++ COL_RED, COL_RESET); ++ return -1; ++ } ++ } else { + printf("%sROCk module is NOT loaded, possibly no GPU devices%s\n", + COL_RED, COL_RESET); + return -1; +- } else { +- printf("%sROCk module is loaded%s\n", COL_WHT, COL_RESET); + } +- pclose(fd); + + // Check if user belongs to the group for /dev/kfd (e.g. "video" or + // "render") diff --git a/dev-util/rocminfo/rocminfo-3.9.0.ebuild b/dev-util/rocminfo/rocminfo-3.9.0.ebuild deleted file mode 100644 index 6de4e9b7cca0..000000000000 --- a/dev-util/rocminfo/rocminfo-3.9.0.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" - inherit git-r3 -else - SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" - S="${WORKDIR}/rocminfo-rocm-${PV}" -fi - -DESCRIPTION="ROCm Application for Reporting System Info" -HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="MIT" -SLOT="0/$(ver_cut 1-2)" - -RDEPEND=">=dev-libs/rocr-runtime-${PV}" -DEPEND="${RDEPEND}" diff --git a/dev-util/rocminfo/rocminfo-4.0.0.ebuild b/dev-util/rocminfo/rocminfo-4.0.0.ebuild deleted file mode 100644 index 6de4e9b7cca0..000000000000 --- a/dev-util/rocminfo/rocminfo-4.0.0.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" - inherit git-r3 -else - SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" - S="${WORKDIR}/rocminfo-rocm-${PV}" -fi - -DESCRIPTION="ROCm Application for Reporting System Info" -HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="MIT" -SLOT="0/$(ver_cut 1-2)" - -RDEPEND=">=dev-libs/rocr-runtime-${PV}" -DEPEND="${RDEPEND}" diff --git a/dev-util/rocminfo/rocminfo-4.1.0.ebuild b/dev-util/rocminfo/rocminfo-4.1.0.ebuild deleted file mode 100644 index a4b4217d09b1..000000000000 --- a/dev-util/rocminfo/rocminfo-4.1.0.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" - inherit git-r3 -else - SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" - S="${WORKDIR}/rocminfo-rocm-${PV}" -fi - -DESCRIPTION="ROCm Application for Reporting System Info" -HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="MIT" -SLOT="0/$(ver_cut 1-2)" - -RDEPEND=">=dev-libs/rocr-runtime-${PV}" -DEPEND="${RDEPEND}" diff --git a/dev-util/rocminfo/rocminfo-4.2.0.ebuild b/dev-util/rocminfo/rocminfo-4.2.0.ebuild deleted file mode 100644 index a4b4217d09b1..000000000000 --- a/dev-util/rocminfo/rocminfo-4.2.0.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" - inherit git-r3 -else - SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" - S="${WORKDIR}/rocminfo-rocm-${PV}" -fi - -DESCRIPTION="ROCm Application for Reporting System Info" -HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="MIT" -SLOT="0/$(ver_cut 1-2)" - -RDEPEND=">=dev-libs/rocr-runtime-${PV}" -DEPEND="${RDEPEND}" diff --git a/dev-util/rocminfo/rocminfo-4.3.0.ebuild b/dev-util/rocminfo/rocminfo-5.1.3.ebuild index ba629c1e3b72..6c175c0a3bd4 100644 --- a/dev-util/rocminfo/rocminfo-4.3.0.ebuild +++ b/dev-util/rocminfo/rocminfo-5.1.3.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit cmake @@ -16,10 +16,21 @@ fi DESCRIPTION="ROCm Application for Reporting System Info" HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="MIT" +LICENSE="UoI-NCSA" SLOT="0/$(ver_cut 1-2)" RDEPEND=">=dev-libs/rocr-runtime-${PV}" DEPEND="${RDEPEND}" -PATCHES=("${FILESDIR}/${PN}-4.3.0-detect-builtin-amdgpu.patch") +PATCHES=("${FILESDIR}/${PN}-5.1.3-detect-builtin-amdgpu.patch") + +src_prepare() { + sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die + sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) + cmake_src_configure +} diff --git a/dev-util/rocminfo/rocminfo-3.10.0.ebuild b/dev-util/rocminfo/rocminfo-5.3.3.ebuild index 6de4e9b7cca0..6c175c0a3bd4 100644 --- a/dev-util/rocminfo/rocminfo-3.10.0.ebuild +++ b/dev-util/rocminfo/rocminfo-5.3.3.ebuild @@ -1,7 +1,7 @@ -# 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 inherit cmake @@ -16,8 +16,21 @@ fi DESCRIPTION="ROCm Application for Reporting System Info" HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="MIT" +LICENSE="UoI-NCSA" SLOT="0/$(ver_cut 1-2)" RDEPEND=">=dev-libs/rocr-runtime-${PV}" DEPEND="${RDEPEND}" + +PATCHES=("${FILESDIR}/${PN}-5.1.3-detect-builtin-amdgpu.patch") + +src_prepare() { + sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die + sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) + cmake_src_configure +} diff --git a/dev-util/rocminfo/rocminfo-3.7.0.ebuild b/dev-util/rocminfo/rocminfo-5.4.3.ebuild index 6de4e9b7cca0..15e50f8d07fa 100644 --- a/dev-util/rocminfo/rocminfo-3.7.0.ebuild +++ b/dev-util/rocminfo/rocminfo-5.4.3.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit cmake @@ -16,8 +16,21 @@ fi DESCRIPTION="ROCm Application for Reporting System Info" HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="MIT" +LICENSE="UoI-NCSA" SLOT="0/$(ver_cut 1-2)" RDEPEND=">=dev-libs/rocr-runtime-${PV}" DEPEND="${RDEPEND}" + +PATCHES=("${FILESDIR}/${PN}-5.1.3-detect-builtin-amdgpu.patch") + +src_prepare() { + sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die + sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) + cmake_src_configure +} diff --git a/dev-util/rocminfo/rocminfo-3.8.0.ebuild b/dev-util/rocminfo/rocminfo-5.5.1.ebuild index 6de4e9b7cca0..296b859a1fd3 100644 --- a/dev-util/rocminfo/rocminfo-3.8.0.ebuild +++ b/dev-util/rocminfo/rocminfo-5.5.1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit cmake @@ -16,8 +16,23 @@ fi DESCRIPTION="ROCm Application for Reporting System Info" HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="MIT" +LICENSE="UoI-NCSA" SLOT="0/$(ver_cut 1-2)" RDEPEND=">=dev-libs/rocr-runtime-${PV}" DEPEND="${RDEPEND}" + +#PATCHES=( +# "${FILESDIR}/${PN}-5.5.1-detect-builtin-amdgpu.patch" +#) + +src_prepare() { + sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die + sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) + cmake_src_configure +} diff --git a/dev-util/rocminfo/rocminfo-5.7.1.ebuild b/dev-util/rocminfo/rocminfo-5.7.1.ebuild new file mode 100644 index 000000000000..296b859a1fd3 --- /dev/null +++ b/dev-util/rocminfo/rocminfo-5.7.1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" + inherit git-r3 +else + SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/rocminfo-rocm-${PV}" +fi + +DESCRIPTION="ROCm Application for Reporting System Info" +HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" +LICENSE="UoI-NCSA" +SLOT="0/$(ver_cut 1-2)" + +RDEPEND=">=dev-libs/rocr-runtime-${PV}" +DEPEND="${RDEPEND}" + +#PATCHES=( +# "${FILESDIR}/${PN}-5.5.1-detect-builtin-amdgpu.patch" +#) + +src_prepare() { + sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die + sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) + cmake_src_configure +} diff --git a/dev-util/rocminfo/rocminfo-6.0.0.ebuild b/dev-util/rocminfo/rocminfo-6.0.0.ebuild new file mode 100644 index 000000000000..296b859a1fd3 --- /dev/null +++ b/dev-util/rocminfo/rocminfo-6.0.0.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" + inherit git-r3 +else + SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/rocminfo-rocm-${PV}" +fi + +DESCRIPTION="ROCm Application for Reporting System Info" +HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" +LICENSE="UoI-NCSA" +SLOT="0/$(ver_cut 1-2)" + +RDEPEND=">=dev-libs/rocr-runtime-${PV}" +DEPEND="${RDEPEND}" + +#PATCHES=( +# "${FILESDIR}/${PN}-5.5.1-detect-builtin-amdgpu.patch" +#) + +src_prepare() { + sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die + sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) + cmake_src_configure +} diff --git a/dev-util/rocminfo/rocminfo-9999.ebuild b/dev-util/rocminfo/rocminfo-9999.ebuild deleted file mode 100644 index c993e808caf5..000000000000 --- a/dev-util/rocminfo/rocminfo-9999.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" - inherit git-r3 -else - SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" - S="${WORKDIR}/rocminfo-rocm-${PV}" -fi - -DESCRIPTION="ROCm Application for Reporting System Info" -HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="MIT" -SLOT="0/$(ver_cut 1-2)" - -RDEPEND="dev-libs/rocr-runtime" -DEPEND="${RDEPEND}" |