summaryrefslogtreecommitdiff
path: root/dev-util
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-07-20 12:29:37 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-07-20 12:29:37 +0100
commitd3ae3ea75073c53ed5f3a4418e76383436bb0f58 (patch)
treee7bdf993ecf567ea3b6d9c8c00797f63ae25ea02 /dev-util
parentc59df12b8749ab7bbd5a0692072652d4fbb0d2cf (diff)
gentoo auto-resync : 20:07:2024 - 12:29:37
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/Manifest.gzbin64953 -> 64952 bytes
-rw-r--r--dev-util/bpftool/Manifest5
-rw-r--r--dev-util/bpftool/bpftool-7.5.0.ebuild124
-rw-r--r--dev-util/bpftool/metadata.xml9
-rw-r--r--dev-util/perf/Manifest3
-rw-r--r--dev-util/perf/files/perf-6.10-expr.patch22
-rw-r--r--dev-util/perf/perf-6.10.ebuild340
-rw-r--r--dev-util/rocm-smi/Manifest6
-rw-r--r--dev-util/rocm-smi/files/rocm-smi-5.4.2-fix-readonly-object.patch14
-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
11 files changed, 537 insertions, 24 deletions
diff --git a/dev-util/Manifest.gz b/dev-util/Manifest.gz
index e6496e058d18..9c67baba64f2 100644
--- a/dev-util/Manifest.gz
+++ b/dev-util/Manifest.gz
Binary files differ
diff --git a/dev-util/bpftool/Manifest b/dev-util/bpftool/Manifest
index 355fedd9519b..b60941bb28a0 100644
--- a/dev-util/bpftool/Manifest
+++ b/dev-util/bpftool/Manifest
@@ -1,7 +1,10 @@
+DIST linux-6.10.tar.xz 145142812 BLAKE2B bb243ea7493b9d63aa2df2050a3f1ae2b89ee84a20015239cf157e3f4f51c7ac5efedc8a51132b2d7482f9276ac418de6624831c8a3b806130d9c2d2124c539b SHA512 baa2487954044f991d2ae254d77d14a1f0185dd62c9f0fcaff69f586c9f906823017b8db1c4588f27b076dfa3ebb606929fec859f60ea419e7974330b9289cc2
DIST linux-6.8.tar.xz 142502100 BLAKE2B c6f17f816cea16e629f63e9379b98888713f57b2c5173306926471f139a9d612a0c74e119341f8075390e55e203d787d9edeb4ad5a064b18870f6f0f7ffaafb2 SHA512 5c4eb4aa1d3f7d1ea01c0f7ddeadacdece6e144fd4bdfc16b2b925d3e10dc04de3a6db69320b79a96c3560052616f001d2c09e7a1bb4f7b731e2380a7ecce068
DIST linux-6.9.tar.xz 144034416 BLAKE2B 4cf86c3cfe6e6534745d42dfaeca59b17ea1168c4e8b615c80e6d8aac735f11283cd85fa992b440b5d4452917e94b9f08397a64af0be5894e3df23c68892377e SHA512 fed3b4cd1fbfb4d94618587c1934273d2ecc8b6e42a3d586ff8a5f24980be930f2ef803aa2923ca3bfa5e4e619f967f3af315368f24fa76f610b10443624a579
+DIST patch-6.10.xz 6489436 BLAKE2B 96ab8c23a804ae0d3dc5834efa19f9f9d8b4cd1e84d7519670e3e5213af0ef016079d4c0624f45d4163af7b250cb5ab30aec28bb62433d7480ab3d3a11e681b6 SHA512 adbc39835028aa67aa949310c9d44d83c6fddf6a12fbc305960d935bd7e2009e1ff813f2388cd59e59bf64efb2e1df51a6d266594fa12e75074d7346c78bb2eb
DIST patch-6.8.2.xz 247244 BLAKE2B a85078230548543c38550a5546689d0b44a54208cdad591ab34e10dec9348ce2f74e45bf85f373b14977d40556067e2e2c17ac4b6791fbb8aaba98feccd3cdac SHA512 a8e32b89f7680670c69c62f356846bb65b57614f979114627a9a2f945d7dc97c921d30197dffa993e5b18e499ba8c7196046ffdf0e721528a5378d1ee65a9ba5
DIST patch-6.9.2.xz 16184 BLAKE2B 8a37e96c253b55b57c86f1654f2ea8bf65af96b1b38213e90032cb918bb8eea992d6ddbfa6a6774a229ab2e2288ab57bdb6cbad6e7e393c123f24850e06847c9 SHA512 a27af24f0caaa5de3811b6db5acc2d72b96df9ebb5c44bad99a949d871fb06c6ffd2be10cfc35b246d430c7be2291701f802aed47eaa8818ad12b8818a60f3ec
EBUILD bpftool-6.8.2.ebuild 3101 BLAKE2B b032c5133f13d0a2f789a08fa054bd5d88cc729026974189d20b9d91f6295fdbad39056acc1223e78923b6201d91799c8cb833948135bccf25b84b4c25f00d5d SHA512 1efcf7572c1aa378394f38d2b939752aaf3215f92ffa227c493d0e3e9c8f945bcca82f759487386cd62e9c5996400395a944962f61af20fc62f8a206b57740d5
EBUILD bpftool-6.9.2.ebuild 3125 BLAKE2B a8395a94a01d8fe758246cc158713ca30f928aa4051380f6fbb4a285f7a16a223db02b199b422242adca3df4032d79daa20b9420f3a4543aeefca128e41ddfad SHA512 3931abd489a3cbb7aaaf4ea8fd004a45c4a27c8a645fb7eb5088fab3186ebc59b61d58e4b0704dd1c264eee50a95288ad1824af0aff482da306c282465d3013b
-MISC metadata.xml 333 BLAKE2B 68272d411c28ff70b4e5f7d8a0dd8667ec01ee7e73f03c79cce54d47fe18306cba8dc52437b283e3018a572ec409cd3820d1dffc256658132d6209f5701eb553 SHA512 3527a7c4866b2f7a840cee65958734932c3f1bd76d1a3bad069e10abe174ed11d7e7995f094a30a3a4b6ad33b34989172c29a5bebda115e4c6da2afe0fde3720
+EBUILD bpftool-7.5.0.ebuild 3114 BLAKE2B dc70c80e66f00283994cceebc3ccb2349e98d9f366cbdb1eb4c2bb41469aa8f9fddf1c0b502d5c90a5c84bb5242547271a69caca34591ff4380808c569a1b290 SHA512 bffab4a310e3876bf7c94d1d18408fe32ef0d0e8efd1372e46a8c1b2396180fea57e7081479358e3fa83403c2625d17d2bcce03d63329f14a653354341102dc3
+MISC metadata.xml 576 BLAKE2B 43e31ea0f23589a48d8169dfff0ae2a18fd665c7fe323d454ad9a6f13b46f39886ce92bf7ce1fc1f047fd25b1a6085e873234a1c9d30462251ad7c56ea7ef731 SHA512 bd878bf328a7bd08614e5a152d6f8f653d2faf30cecbdb94af9fb11662e19252ef96df921588260dd90b55c981babd0c92766aa6ae2b04638364c761887e1cea
diff --git a/dev-util/bpftool/bpftool-7.5.0.ebuild b/dev-util/bpftool/bpftool-7.5.0.ebuild
new file mode 100644
index 000000000000..1e317304dc31
--- /dev/null
+++ b/dev-util/bpftool/bpftool-7.5.0.ebuild
@@ -0,0 +1,124 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit estack linux-info optfeature python-any-r1 bash-completion-r1 toolchain-funcs
+
+DESCRIPTION="Tool for inspection and simple manipulation of eBPF programs and maps"
+HOMEPAGE="https://kernel.org/"
+
+# Use PV to indicate the full kernel version
+PV=6.10
+LINUX_V="${PV:0:1}.x"
+LINUX_VER=$(ver_cut 1-2)
+
+LINUX_SOURCES="linux-${LINUX_VER}.tar.xz"
+SRC_URI+="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
+
+LINUX_PATCH=patch-${PV}.xz
+SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
+
+S_K="${WORKDIR}/linux-${LINUX_VER}"
+S="${S_K}/tools/bpf/bpftool"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="caps +llvm"
+
+RDEPEND="
+ sys-libs/binutils-libs:=
+ sys-libs/zlib:=
+ virtual/libelf:=
+ caps? ( sys-libs/libcap:= )
+ llvm? ( sys-devel/llvm:= )
+"
+DEPEND="
+ ${RDEPEND}
+ >=sys-kernel/linux-headers-5.8
+"
+BDEPEND="
+ ${LINUX_PATCH+dev-util/patchutils}
+ ${PYTHON_DEPS}
+ app-arch/tar
+ dev-python/docutils
+"
+
+CONFIG_CHECK="~DEBUG_INFO_BTF"
+
+# src_unpack and src_prepare are copied from dev-util/perf since
+# it's building from the same tarball, please keep it in sync with perf
+src_unpack() {
+ local paths=(
+ kernel/bpf tools/{arch,bpf,build,include,lib,perf,scripts}
+ scripts include lib "arch/*/include" "arch/*/lib" "arch/*/tools"
+ )
+
+ # We expect the tar implementation to support the -j and --wildcards option
+ echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}"
+ gtar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \
+ "${paths[@]/#/linux-${LINUX_VER}/}" || die
+
+ if [[ -n ${LINUX_PATCH} ]] ; then
+ eshopts_push -o noglob
+ ebegin "Filtering partial source patch"
+ filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \
+ > ${P}.patch
+ eend $? || die "filterdiff failed"
+ eshopts_pop
+ fi
+
+ local a
+ for a in ${A}; do
+ [[ ${a} == ${LINUX_SOURCES} ]] && continue
+ [[ ${a} == ${LINUX_PATCH} ]] && continue
+ unpack ${a}
+ done
+}
+
+src_prepare() {
+ default
+
+ if [[ -n ${LINUX_PATCH} ]] ; then
+ pushd "${S_K}" >/dev/null || die
+ eapply "${WORKDIR}"/${P}.patch
+ popd || die
+ fi
+
+ # Use rst2man or rst2man.py depending on which one exists (#930076)
+ type -P rst2man >/dev/null || sed -i -e 's/rst2man/rst2man.py/g' Documentation/Makefile || die
+
+ # remove -Werror (bug 887981)
+ sed -i -e 's/\-Werror//g' ../../lib/bpf/Makefile || die
+}
+
+bpftool_make() {
+ local arch=$(tc-arch-kernel)
+ tc-export AR CC LD
+
+ emake V=1 VF=1 \
+ HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \
+ EXTRA_CFLAGS="${CFLAGS}" ARCH="${arch}" \
+ prefix="${EPREFIX}"/usr \
+ bash_compdir="$(get_bashcompdir)" \
+ feature-libcap="$(usex caps 1 0)" \
+ feature-llvm="$(usex llvm 1 0)" \
+ "$@"
+}
+
+src_compile() {
+ bpftool_make
+ bpftool_make -C Documentation
+}
+
+src_install() {
+ bpftool_make DESTDIR="${D}" install
+ bpftool_make mandir="${ED}"/usr/share/man -C Documentation install
+}
+
+pkg_postinst() {
+ optfeature "clang-bpf-co-re support" sys-devel/clang[llvm_targets_BPF]
+}
diff --git a/dev-util/bpftool/metadata.xml b/dev-util/bpftool/metadata.xml
index 84c0375fb162..ddb15174a596 100644
--- a/dev-util/bpftool/metadata.xml
+++ b/dev-util/bpftool/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>holger@applied-asynchrony.com</email>
+ <name>Holger Hoffstätte</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<use>
<flag name="caps">Use <pkg>sys-libs/libcap</pkg> to enable unprivileged run support</flag>
<flag name="llvm">Use <pkg>sys-devel/llvm</pkg></flag>
diff --git a/dev-util/perf/Manifest b/dev-util/perf/Manifest
index 4e6081599585..56dce826dceb 100644
--- a/dev-util/perf/Manifest
+++ b/dev-util/perf/Manifest
@@ -1,11 +1,14 @@
AUX perf-6.0-c++17.patch 1127 BLAKE2B 923390f761b588a01935e2b36ff25f916f91e752f76fc6e02999ddc51e297a13798b38a9d3523deab327c8fd6ee2ea02e93f454a4b799f61552c11c1cad574aa SHA512 add3956108a83fd58ca949f6f6a611c44a0f29a4b4eef28c4883a1ba6058b66203064837878becbd64d8afebef57beb1cefcfcedb2a95c221f6792dffcaf38cb
AUX perf-6.0-clang.patch 1862 BLAKE2B e88655e51cb785b80cd44fefb73bb7668bf6d57205e478b106a0d0fbbee4e7089850c2328e796530347c354eb8e7e46e947c18e03ded488bede41de5f74f0b8e SHA512 0e92ba2e878b2b20f6d7c30ba5fde43388378c7f8e752a7c07dd65abc66e576be8f74cf9c06abb79713cc8c1cab37c9cd678f4e5bba8bb99ed1020317f278eb2
+AUX perf-6.10-expr.patch 1355 BLAKE2B d4dcb3b8b79944f304fd8789cd680e91e2fb1deffaa0ac108e200130f9ab669bea6a8ad65efc66b730b3282d523f839812cc4de6861b665c86bf2ba400645743 SHA512 0b031a675c49149b0f7623c0e663e4b6c2866ab4fa7e7e29712a55ebbceccef68bdde8ebe1f70a0f3e035e75e6e8e6fb90c06d0c16d39d2866ecbded4ff0c5cc
AUX perf-6.4-libtracefs.patch 780 BLAKE2B dc97e42f1d3ece03722441b5a2c1f87ab9871ca92b9cf9f57b2e44627fddfcedaf6d7f64ddf74fd103c23aa0db71c4d147f7841743eb5c5a466c9bbb150597ea SHA512 da1b69c190491dd926ba1e98a43965a5ffd543df4134e6a10d187ab544695617fcffede3190bce4cbef13b897d113dee743f67a98ff249a486f8de2d49e62f9f
AUX perf-6.7-expr.patch 1257 BLAKE2B 1ff41975d84f835a343d2b2f9f049edd817bf80ca576879c7f819608506341b5d19147cf3ecd67a731ab6ecf9a45ce494a8a665aa1bff86cc14f3967a6dd12a0 SHA512 8f1a5a8412464f7623b10da562552b2ac17ca8e70eb4507a3751493662e64066828f2b7a73f1bc7546f463d8d21919f59622b978a6bacafed6a93f232a15ff0b
+DIST linux-6.10.tar.xz 145142812 BLAKE2B bb243ea7493b9d63aa2df2050a3f1ae2b89ee84a20015239cf157e3f4f51c7ac5efedc8a51132b2d7482f9276ac418de6624831c8a3b806130d9c2d2124c539b SHA512 baa2487954044f991d2ae254d77d14a1f0185dd62c9f0fcaff69f586c9f906823017b8db1c4588f27b076dfa3ebb606929fec859f60ea419e7974330b9289cc2
DIST linux-6.3.tar.xz 136891752 BLAKE2B f1887c8924efa8d0cb14c4e604affd0b0168bcf20f56a37c027405c7bc11aba822a43fcb38ccb55a81a26f747d00e1ab5a6554818affbf1e1c7ef5220150fc69 SHA512 768979440f4907ba64d4481b383d6101faf208f27a0b897156123aa278c5743fe3c4f61945b2541429c532d45382aaee8899ea9d44a1d2895bfbb79bfd937f65
DIST linux-6.7.tar.xz 141406528 BLAKE2B cecdbd19905e43e485ab73b352ced18b37f2a138c97a6956cadcda5d3d271001117dc1cf896b166ff019fc7f405f9539e2ed0d6112b0890efb04d182adf4fd0e SHA512 de06de556191614bd9daf077ae239360352a402bab407748e67f1e5108c92fd933e451707840ab22fe0f9976db3d1e1b60ca9d41cf894f015ca09b3f652b74ad
DIST linux-6.8.tar.xz 142502100 BLAKE2B c6f17f816cea16e629f63e9379b98888713f57b2c5173306926471f139a9d612a0c74e119341f8075390e55e203d787d9edeb4ad5a064b18870f6f0f7ffaafb2 SHA512 5c4eb4aa1d3f7d1ea01c0f7ddeadacdece6e144fd4bdfc16b2b925d3e10dc04de3a6db69320b79a96c3560052616f001d2c09e7a1bb4f7b731e2380a7ecce068
DIST linux-6.9.tar.xz 144034416 BLAKE2B 4cf86c3cfe6e6534745d42dfaeca59b17ea1168c4e8b615c80e6d8aac735f11283cd85fa992b440b5d4452917e94b9f08397a64af0be5894e3df23c68892377e SHA512 fed3b4cd1fbfb4d94618587c1934273d2ecc8b6e42a3d586ff8a5f24980be930f2ef803aa2923ca3bfa5e4e619f967f3af315368f24fa76f610b10443624a579
+EBUILD perf-6.10.ebuild 9219 BLAKE2B 08efab0eaaeb0cc12d490dea13d4ae5e5b7e6ffe506bb9614d433ec8c1cfdaef54648bf36bd5026998c2301cd63ba4437c0bdf73ce59abd795a52dcb9aaa7aeb SHA512 dacc8ff9d4f82c5964360d2447de00b68f8be82491c7f421b749b3d9a8a9e870efa61d80a01eaa59e207765bbc6a0c9fedc6e65db4a9d93ddf98a692d2daf073
EBUILD perf-6.3.ebuild 7858 BLAKE2B c571be537787a682baea6755bfb8df0c1ca1e62be4982ca3bb440aa513189dfe7388705720531d47fe8c18f1c6d04871e96a1804e29296181c194237efaabcea SHA512 3f1aed8b58ce5f3b2b3449e8661d596d31f7991054c86d33b836bed80ba06a042f10681a16be6b67327da1797f144926a30a383c5388c694769e48785e2f5bda
EBUILD perf-6.7.ebuild 9070 BLAKE2B b20b9e581e7ec7e5587882bb7529e172134fde86d8bde0953c1d02114c45238d3052c76b02b877f650c92dc3b5de622929ec67af756bfced9156bf0d16604139 SHA512 5dfed5bff7320a35a71d2fe84068b19d653f81ba8a1a4b38daeb0d1aaa2e8a402d65a30b659de39cc3c415e4d914bccd2824f48f77e0bdd399acc9fa9b7a60a0
EBUILD perf-6.8.ebuild 9094 BLAKE2B 6d08a549e098b38ddc79fe12d1458725742570176720cc29156d01a171f5d1810e6704b215df121ad23a54aa7bc3f349f170189fb4fa58229c4ee3d66bc80226 SHA512 007b468f181524514ffd325789a07c4f4e640ff9137abdbe71f411b67b2b7394e154ad2aea0994966bab53877105608b7a08bebd0b454cf2504e068dadae1f04
diff --git a/dev-util/perf/files/perf-6.10-expr.patch b/dev-util/perf/files/perf-6.10-expr.patch
new file mode 100644
index 000000000000..b4220a062f61
--- /dev/null
+++ b/dev-util/perf/files/perf-6.10-expr.patch
@@ -0,0 +1,22 @@
+diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
+index bc980fd..a7f1e1e 100644
+--- a/tools/perf/Makefile.config
++++ b/tools/perf/Makefile.config
+@@ -1184,7 +1184,7 @@ ifneq ($(NO_LIBTRACEEVENT),1)
+ CFLAGS += -DHAVE_LIBTRACEEVENT $(LIBTRACEEVENT_CFLAGS)
+ LDFLAGS += $(LIBTRACEEVENT_LDFLAGS)
+ EXTLIBS += ${TRACEEVENTLIBS}
+- LIBTRACEEVENT_VERSION := $(shell PKG_CONFIG_PATH=$(LIBTRACEEVENT_DIR) $(PKG_CONFIG) --modversion libtraceevent)
++ LIBTRACEEVENT_VERSION := $(shell PKG_CONFIG_PATH=$(LIBTRACEEVENT_DIR) $(PKG_CONFIG) --modversion libtraceevent).0
+ LIBTRACEEVENT_VERSION_1 := $(word 1, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
+ LIBTRACEEVENT_VERSION_2 := $(word 2, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
+ LIBTRACEEVENT_VERSION_3 := $(word 3, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
+@@ -1198,7 +1198,7 @@ ifneq ($(NO_LIBTRACEEVENT),1)
+ $(call feature_check,libtracefs)
+ ifeq ($(feature-libtracefs), 1)
+ EXTLIBS += -ltracefs
+- LIBTRACEFS_VERSION := $(shell $(PKG_CONFIG) --modversion libtracefs)
++ LIBTRACEFS_VERSION := $(shell $(PKG_CONFIG) --modversion libtracefs).0
+ LIBTRACEFS_VERSION_1 := $(word 1, $(subst ., ,$(LIBTRACEFS_VERSION)))
+ LIBTRACEFS_VERSION_2 := $(word 2, $(subst ., ,$(LIBTRACEFS_VERSION)))
+ LIBTRACEFS_VERSION_3 := $(word 3, $(subst ., ,$(LIBTRACEFS_VERSION)))
diff --git a/dev-util/perf/perf-6.10.ebuild b/dev-util/perf/perf-6.10.ebuild
new file mode 100644
index 000000000000..3a49940473e4
--- /dev/null
+++ b/dev-util/perf/perf-6.10.ebuild
@@ -0,0 +1,340 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit bash-completion-r1 estack flag-o-matic linux-info llvm toolchain-funcs python-r1
+
+DESCRIPTION="Userland tools for Linux Performance Counters"
+HOMEPAGE="https://perf.wiki.kernel.org/"
+
+LINUX_V="${PV:0:1}.x"
+if [[ ${PV} == *_rc* ]] ; then
+ LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1))
+ PATCH_VERSION=$(ver_cut 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.xz
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH}
+ https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
+elif [[ ${PV} == *.*.* ]] ; then
+ # stable-release series
+ LINUX_VER=$(ver_cut 1-2)
+ LINUX_PATCH=patch-${PV}.xz
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+fi
+
+LINUX_SOURCES="linux-${LINUX_VER}.tar.xz"
+SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
+
+S_K="${WORKDIR}/linux-${LINUX_VER}"
+S="${S_K}/tools/perf"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
+IUSE="abi_mips_o32 abi_mips_n32 abi_mips_n64 audit babeltrace capstone big-endian bpf caps crypt debug +doc gtk java libpfm +libtraceevent +libtracefs lzma numa perl python slang systemtap tcmalloc unwind zstd"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+"
+
+# setuptools (and Python) are always needed even if not building Python bindings
+BDEPEND="
+ ${LINUX_PATCH+dev-util/patchutils}
+ ${PYTHON_DEPS}
+ >=app-arch/tar-1.34-r2
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ app-alternatives/yacc
+ app-alternatives/lex
+ virtual/pkgconfig
+ doc? (
+ app-text/asciidoc
+ app-text/sgml-common
+ app-text/xmlto
+ sys-process/time
+ )
+"
+
+RDEPEND="
+ audit? ( sys-process/audit )
+ babeltrace? ( dev-util/babeltrace:0/1 )
+ bpf? (
+ dev-libs/libbpf
+ dev-util/bpftool
+ dev-util/pahole
+ sys-devel/clang:=
+ sys-devel/llvm:=
+ )
+ caps? ( sys-libs/libcap )
+ capstone? ( dev-libs/capstone )
+ crypt? ( dev-libs/openssl:= )
+ gtk? ( x11-libs/gtk+:2 )
+ java? ( virtual/jre:* )
+ libpfm? ( dev-libs/libpfm:= )
+ libtraceevent? ( dev-libs/libtraceevent )
+ libtracefs? ( dev-libs/libtracefs )
+ lzma? ( app-arch/xz-utils )
+ numa? ( sys-process/numactl )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ slang? ( sys-libs/slang )
+ systemtap? ( dev-debug/systemtap )
+ tcmalloc? ( dev-util/google-perftools )
+ unwind? ( sys-libs/libunwind:= )
+ zstd? ( app-arch/zstd:= )
+ dev-libs/elfutils
+ sys-libs/binutils-libs:=
+ sys-libs/zlib
+ virtual/libcrypt
+"
+
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-5.10
+ java? ( virtual/jdk )
+"
+
+QA_FLAGS_IGNORED=(
+ 'usr/bin/perf-read-vdso32' # not linked with anything except for libc
+ 'usr/libexec/perf-core/dlfilters/.*' # plugins
+)
+
+pkg_pretend() {
+ if ! use doc ; then
+ ewarn "Without the doc USE flag you won't get any documentation nor man pages."
+ ewarn "And without man pages, you won't get any --help output for perf and its"
+ ewarn "sub-tools."
+ fi
+}
+
+pkg_setup() {
+ local CONFIG_CHECK="
+ ~DEBUG_INFO
+ ~FTRACE
+ ~FTRACE_SYSCALLS
+ ~FUNCTION_TRACER
+ ~KALLSYMS
+ ~KALLSYMS_ALL
+ ~KPROBES
+ ~KPROBE_EVENTS
+ ~PERF_EVENTS
+ ~UPROBES
+ ~UPROBE_EVENTS
+ "
+
+ use bpf && llvm_pkg_setup
+ # We enable python unconditionally as libbpf always generates
+ # API headers using python script
+ python_setup
+
+ if use bpf ; then
+ CONFIG_CHECK+="~BPF ~BPF_EVENTS ~BPF_SYSCALL ~DEBUG_INFO_BTF ~HAVE_EBPF_JIT"
+ fi
+
+ linux-info_pkg_setup
+}
+
+# src_unpack and src_prepare are copied to dev-util/bpftool since
+# it's building from the same tarball, please keep it in sync with bpftool
+src_unpack() {
+ local paths=(
+ kernel/bpf tools/{arch,bpf,build,include,lib,perf,scripts}
+ scripts include lib "arch/*/include" "arch/*/lib" "arch/*/tools"
+ )
+
+ # We expect the tar implementation to support the -j option (both
+ # GNU tar and libarchive's tar support that).
+ echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}"
+ gtar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \
+ "${paths[@]/#/linux-${LINUX_VER}/}" || die
+
+ if [[ -n ${LINUX_PATCH} ]] ; then
+ eshopts_push -o noglob
+ ebegin "Filtering partial source patch"
+ filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \
+ > ${P}.patch
+ eend $? || die "filterdiff failed"
+ eshopts_pop
+ fi
+
+ local a
+ for a in ${A}; do
+ [[ ${a} == ${LINUX_SOURCES} ]] && continue
+ [[ ${a} == ${LINUX_PATCH} ]] && continue
+ unpack ${a}
+ done
+}
+
+src_prepare() {
+ default
+ if [[ -n ${LINUX_PATCH} ]] ; then
+ pushd "${S_K}" >/dev/null || die
+ eapply "${WORKDIR}"/${P}.patch
+ popd || die
+ fi
+
+ pushd "${S_K}" >/dev/null || die
+ eapply "${FILESDIR}"/perf-6.4-libtracefs.patch
+ eapply "${FILESDIR}"/perf-6.10-expr.patch
+ popd || die
+
+ # Drop some upstream too-developer-oriented flags and fix the
+ # Makefile in general
+ sed -i \
+ -e "s@\$(sysconfdir_SQ)/bash_completion.d@$(get_bashcompdir)@" \
+ "${S}"/Makefile.perf || die
+ # A few places still use -Werror w/out $(WERROR) protection.
+ sed -i -e 's@-Werror@@' \
+ "${S}"/Makefile.perf "${S_K}"/tools/lib/bpf/Makefile \
+ "${S_K}"/tools/lib/perf/Makefile || die
+
+ # Avoid the call to make kernelversion
+ sed -i -e '/PERF-VERSION-GEN/d' Makefile.perf || die
+ echo "#define PERF_VERSION \"${PV}\"" > PERF-VERSION-FILE
+
+ # The code likes to compile local assembly files which lack ELF markings.
+ find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} +
+}
+
+puse() { usex $1 "" 1; }
+perf_make() {
+ # The arch parsing is a bit funky. The perf tools package is integrated
+ # into the kernel, so it wants an ARCH that looks like the kernel arch,
+ # but it also wants to know about the split value -- i386/x86_64 vs just
+ # x86. We can get that by telling the func to use an older linux version.
+ # It's kind of a hack, but not that bad ...
+
+ # LIBDIR sets a search path of perf-gtk.so. Bug 515954
+
+ local arch=$(tc-arch-kernel)
+ local java_dir
+ use java && java_dir="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+ # sync this with the whitelist in tools/perf/Makefile.config
+ local disable_libdw
+ if ! use amd64 && ! use x86 && \
+ ! use arm && \
+ ! use arm64 && \
+ ! use ppc && ! use ppc64 \
+ ! use s390 && \
+ ! use riscv && \
+ ! use loong
+ then
+ disable_libdw=1
+ fi
+
+ # perf directly invokes LD for linking without going through CC, on mips
+ # it is required to specify the emulation. port of below buildroot patch
+ # https://patchwork.ozlabs.org/project/buildroot/patch/20170217105905.32151-1-Vincent.Riera@imgtec.com/
+ local linker="$(tc-getLD)"
+ if use mips
+ then
+ if use big-endian
+ then
+ use abi_mips_n64 && linker+=" -m elf64btsmip"
+ use abi_mips_n32 && linker+=" -m elf32btsmipn32"
+ use abi_mips_o32 && linker+=" -m elf32btsmip"
+ else
+ use abi_mips_n64 && linker+=" -m elf64ltsmip"
+ use abi_mips_n32 && linker+=" -m elf32ltsmipn32"
+ use abi_mips_o32 && linker+=" -m elf32ltsmip"
+ fi
+ fi
+
+ # FIXME: NO_CORESIGHT
+ local emakeargs=(
+ V=1 VF=1
+ HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)"
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="${linker}" NM="$(tc-getNM)"
+ PKG_CONFIG="$(tc-getPKG_CONFIG)"
+ prefix="${EPREFIX}/usr" bindir_relative="bin"
+ tipdir="share/doc/${PF}"
+ EXTRA_CFLAGS="${CFLAGS}"
+ EXTRA_LDFLAGS="${LDFLAGS}"
+ ARCH="${arch}"
+ BUILD_BPF_SKEL=$(usex bpf 1 "") \
+ BUILD_NONDISTRO=1
+ JDIR="${java_dir}"
+ CORESIGHT=
+ GTK2=$(usex gtk 1 "")
+ feature-gtk2-infobar=$(usex gtk 1 "")
+ NO_AUXTRACE=
+ NO_BACKTRACE=
+ NO_CAPSTONE=$(puse capstone)
+ NO_DEMANGLE=
+ NO_JEVENTS=$(puse python)
+ NO_JVMTI=$(puse java)
+ NO_LIBAUDIT=$(puse audit)
+ NO_LIBBABELTRACE=$(puse babeltrace)
+ NO_LIBBIONIC=1
+ NO_LIBBPF=$(puse bpf)
+ NO_LIBCAP=$(puse caps)
+ NO_LIBCRYPTO=$(puse crypt)
+ NO_LIBDW_DWARF_UNWIND="${disable_libdw}"
+ NO_LIBELF=
+ NO_LIBNUMA=$(puse numa)
+ NO_LIBPERL=$(puse perl)
+ NO_LIBPFM4=$(puse libpfm)
+ NO_LIBPYTHON=$(puse python)
+ NO_LIBTRACEEVENT=$(puse libtraceevent)
+ NO_LIBUNWIND=$(puse unwind)
+ NO_LIBZSTD=$(puse zstd)
+ NO_SDT=$(puse systemtap)
+ NO_SHELLCHECK=1
+ NO_SLANG=$(puse slang)
+ NO_LZMA=$(puse lzma)
+ NO_ZLIB=
+ TCMALLOC=$(usex tcmalloc 1 "")
+ WERROR=0
+ DEBUG=$(usex debug 1 "")
+ LIBDIR="/usr/libexec/perf-core"
+ libdir="${EPREFIX}/usr/$(get_libdir)"
+ plugindir="${EPREFIX}/usr/$(get_libdir)/perf/plugins"
+ "$@"
+ )
+ emake "${emakeargs[@]}"
+}
+
+src_compile() {
+ filter-lto
+
+ perf_make -f Makefile.perf
+ use doc && perf_make -C Documentation man
+}
+
+src_test() {
+ :
+}
+
+src_install() {
+ _install_python_ext() {
+ perf_make -f Makefile.perf install-python_ext DESTDIR="${D}"
+ }
+
+ perf_make -f Makefile.perf install DESTDIR="${D}"
+
+ if use python; then
+ python_foreach_impl _install_python_ext
+ fi
+
+ if use gtk; then
+ local libdir
+ libdir="$(get_libdir)"
+ # on some arches it ends up in lib even on 64bit, ppc64 for instance.
+ [[ -f "${ED}"/usr/lib/libperf-gtk.so ]] && libdir="lib"
+ mv "${ED}"/usr/${libdir}/libperf-gtk.so \
+ "${ED}"/usr/libexec/perf-core || die
+ fi
+
+ dodoc CREDITS
+
+ dodoc *txt Documentation/*.txt
+
+ # perf needs this decompressed to print out tips for users
+ docompress -x /usr/share/doc/${PF}/tips.txt
+
+ if use doc ; then
+ doman Documentation/*.1
+ fi
+}
diff --git a/dev-util/rocm-smi/Manifest b/dev-util/rocm-smi/Manifest
index 0fc8e5a1f444..e5b39faf9a17 100644
--- a/dev-util/rocm-smi/Manifest
+++ b/dev-util/rocm-smi/Manifest
@@ -1,18 +1,18 @@
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
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.1.3.tar.gz 1701386 BLAKE2B c5e779f5c33fec0b1b39b09c758dfadd3c24e28f15381593f2959e5c2fb9f49af3a7ca1f9ab7d6bf34c5af4fbe3f0c0ae20c6c049cbf9421a9184735bb4a64a2 SHA512 7bf7af2b42a035c298c2f9009b6123671af41f9ca1a50607cfa362f39dbd82ff88f8c13ece6c4edab585edadd9072ed096a400dd3850851e1beef3633a8eb14e
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
DIST rocm-smi-6.1.1.tar.gz 872628 BLAKE2B 35830fd0eb36688b3803bed2059f29ba4d8613112ae4cfff2e0a3b1d7afef9f0d77ec16771e2205ba351df0aa678c3b0d2436940b76d10d020f1a30d14d760e9 SHA512 3e31ff0d94e7f0ea650c985973b27107e3f7293b92857fbf2fe196b61632c530e95c3228ad7550d44f8ee9f5f1abfd17e5c2b19164759728fb6d4b0995455fa7
-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
+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 769 BLAKE2B 4b19247215c20587c6c7b6958dbd2ed57a242e8718d642c602b4067c4ad3e7cc7778a62e2f20b2b940b3281cc6e0a793153e8ff7bfd54aaa7a16e74b8e54ac6c SHA512 76648eff089ed88259457dfea04a4db19393b0d1285b3556a583b7750782a3b2406e2c407c2c7cdff47cabf1c7377fdf8a053b74226f73c32426155361dc0c83
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/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
}