summaryrefslogtreecommitdiff
path: root/dev-util
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/Manifest.gzbin64781 -> 64943 bytes
-rw-r--r--dev-util/Tensile/Manifest3
-rw-r--r--dev-util/Tensile/Tensile-5.7.1-r2.ebuild (renamed from dev-util/Tensile/Tensile-5.7.1-r1.ebuild)7
-rw-r--r--dev-util/Tensile/files/Tensile-5.7.1-fix-msgpack-dependency.patch29
-rw-r--r--dev-util/hip/Manifest3
-rw-r--r--dev-util/hip/files/hip-5.7.1-fix-mmap-oom-check.patch41
-rw-r--r--dev-util/hip/hip-5.7.1-r2.ebuild (renamed from dev-util/hip/hip-5.7.1-r1.ebuild)26
-rw-r--r--dev-util/hipify-clang/Manifest4
-rw-r--r--dev-util/hipify-clang/files/hipify-clang-5.7.1-fix-clang-libs.patch47
-rw-r--r--dev-util/hipify-clang/hipify-clang-5.7.1.ebuild41
-rw-r--r--dev-util/hipify-clang/metadata.xml15
-rw-r--r--dev-util/maturin/Manifest2
-rw-r--r--dev-util/maturin/maturin-1.5.0.ebuild5
-rw-r--r--dev-util/rocm-smi/Manifest5
-rw-r--r--dev-util/rocm-smi/files/rocm-smi-5.7.1-no-strip.patch36
-rw-r--r--dev-util/rocm-smi/files/rocm-smi-5.7.1-remove-example.patch14
-rw-r--r--dev-util/rocm-smi/files/rocm-smi-5.7.1-set-soversion.patch112
-rw-r--r--dev-util/rocm-smi/rocm-smi-5.7.1.ebuild58
-rw-r--r--dev-util/roctracer/Manifest3
-rw-r--r--dev-util/roctracer/files/roctracer-5.7.1-with-tests.patch11
-rw-r--r--dev-util/roctracer/roctracer-5.7.1-r1.ebuild87
21 files changed, 536 insertions, 13 deletions
diff --git a/dev-util/Manifest.gz b/dev-util/Manifest.gz
index fe3edebee33f..07644d27bdb1 100644
--- a/dev-util/Manifest.gz
+++ b/dev-util/Manifest.gz
Binary files differ
diff --git a/dev-util/Tensile/Manifest b/dev-util/Tensile/Manifest
index 5a6854be51c4..1c4c02b31a58 100644
--- a/dev-util/Tensile/Manifest
+++ b/dev-util/Tensile/Manifest
@@ -8,6 +8,7 @@ AUX Tensile-5.4.2-gentoopath.patch 3149 BLAKE2B fd033093654683524f4ce51ee36ea1d8
AUX Tensile-5.4.2-gfx1031.patch 5051 BLAKE2B d043b94403069f9b4b4c379cf7c361b30f3c0c145f740d37e5cf787636fa3f5c00ca1b7c375f311c9f067e8e6c7d383fbc34157e4b9d4f65a93ed53e9e14b814 SHA512 53cae079788f0478ba7a0af48ddb279a39496a3238263352ff17f555f588ebc1e9463d5b466f1e819ba29a4857c65a644d7a93fe0c2dca3403f994ade4f2bc0f
AUX Tensile-5.4.2-use-ninja.patch 1164 BLAKE2B 41d6dbb68fa41b53d230afd06af95acb014163d14b7f0e61d5a2945ef02c7a3d376f327a3f82fa86085c8eb95820d95883bdc05024e87b69dad61caf39c3b124 SHA512 b73271b637b4b3c045813638b1cebf6c3b4ac50350a62a76351e6fdf3e74b20104bbb135085c96c9c0e99f20f971af316d9686c8347a894361ee90abb66175fa
AUX Tensile-5.7.1-expand-isa-compatibility.patch 1632 BLAKE2B 807df38c99852b58801cb84bccf8cdd28b5575a460130e4463b483fb875f7adfb1d7902a47ca7e9f8735285bfaf3aa1a422595e57ec616faf2af423892301384 SHA512 3cf82928780532d32dfd0680a0ea8d8b990055186795ddc6d93a85941eeb9f0968979fe33fc4155f79413c54b8809d52eb3327624d51c187bfb8cd8bfef66bd4
+AUX Tensile-5.7.1-fix-msgpack-dependency.patch 1069 BLAKE2B 888447b0e8d3b2314c104b7cbf85fecc7645e681fdd91e325197f016274f3f7bd5c6f0e9a84c84a17ee31611c661a15a5fbf203814a932bfe5bda731af1ee766 SHA512 39198a95351584b1693c714cbe571012e8ad49aafda4c68ba2fe252685314d40213d6c23bae39834cc98207a58fe5881aae08e6bdedfbab63b9e2acf26ee79dc
AUX Tensile-5.7.1-gentoopath.patch 2284 BLAKE2B 36f55d7eefe595395c108671d55a07cb8bd4d8d8c21944edb53465e32076d99cd23c38709993408694d54022c2e9362dd2c1943423b99e4829d2d5a663c1aec7 SHA512 5f5f96ce2ffa7b9e18a2ad82ebaa419537586356602de0feddf5884de3ecbf358d19cc2f59f2c6d883e18de9c029a901143d98ed2c48bb70fee3d7d8501f622e
AUX Tensile-change-cmake-name-for-msgpack-cxx-6-release.patch 422 BLAKE2B 791a8041667c29f2cd06d036e6f54530fc88ac4afff9bd2f3f5dd6ab3a6daa6b52ba7459c156e12dae02bd918f740d1e1d22bd6bc7e26bd14269a5ffd877aa13 SHA512 a738be31fd735bf3d8ff17d844771e6113f9868c1d73f1eecd75e1ecfb5d04c743c9463a1e599712b9bc0d7877d8d90fa38fbc7a266add8b61e7fb575693eb4f
DIST Tensile-5.0.2-PR1419.patch.gz 43754 BLAKE2B 3b1d7333ed0115f77816806e7735e25d897dbae3f7a40ece61d655c8f016d9d1c804b586b4e0e75661e20c517f5937a61d5ead25a545f0ce2e4a178bcbb3e7be SHA512 0154d8e14d335f4ecd86e5db335289f8662cede7e5d4b93bf6c56d8e48c1d7d0457271c078c9abbbca1f4aa91f028f6ce6a89efb783ba0207d0f39fd5de8a42c
@@ -16,5 +17,5 @@ DIST rocm-Tensile-5.4.2.tar.gz 14413805 BLAKE2B ca1c13785164439f6fe83f16b36b7a0b
DIST rocm-Tensile-5.7.1.tar.gz 12396002 BLAKE2B ec2c2bc3f07fe22abd800b642c998ea80b9e4e2d0d28c4763d574dbd2fcb14c735223ddc7571d4ab3a48f0bd819cc835c16df9882049c5bf56f25ef729e6d654 SHA512 8f356f36cfec74ee9b000d1180cf52077dc5c595e5c5a40792fc3eb13f3139980c7440f9bc912218f946cf8137e2481d23fe39f110511c1bb55fe85a933ffd36
EBUILD Tensile-5.1.3-r3.ebuild 2811 BLAKE2B 77f941574f7586da7f8122c126ede4288004ca1a31860e12bdb22d340c7e9b017871bc362e698f8b797c3699965babd332742ff2832314aeef96324ea06142c6 SHA512 0275dfcec4c5b417444a5ebbff9eb1e896db69ca735ff082aa863e1aa6da12ea4b227d59d8794bf1d512d6a965d9ce1768418db830c2f27a3baf528f3f60b687
EBUILD Tensile-5.4.2-r2.ebuild 3348 BLAKE2B e92698536854d4157a2b408b781cdec49e0c9caedacca8ee5902d976867ec8712d721adacb9973178cffe96de4d5de44cbcf70bb58494958663e9dc4c101452e SHA512 985b6dbac41eeae088247a11adb387043afff952ea7f1e87a24eb94f81f18970ad9360bbf0a683bee26234afaf698da108e75a39eeda7ccb386ec9607c0359a8
-EBUILD Tensile-5.7.1-r1.ebuild 3479 BLAKE2B 9ccae568bef633982cd9b48162efdab134b51d55ac6361a4a08e6eade52097e9e904c1470f742cd6ae3e3ac4e68711dbc36340a5792e803a5975eeb096e41557 SHA512 00bb959dd1c5f8a9b27e91db43535b18955804a6ce2e6175a0e729ec6bc74f1796f572cb8aa3f0cfdf47b8b541499313c5c9c49a8c9dae007afbed3681810f73
+EBUILD Tensile-5.7.1-r2.ebuild 3496 BLAKE2B 5dce5371520fd9f491b69f147a845baa42d212c07e2ff7f71f1f5a33cdc4290e888fcc1e79f19115841316161f601c335f3fc7b123b2e219fbb2cebe4c065fec SHA512 93007f1ca76a0a9961f11cff3c3eaedd62591d7063e334b2002f61770fbf9abeecc836b59331128dfc69780456ae89f3fa54f85c561f1289150207f0d243e856
MISC metadata.xml 478 BLAKE2B 4931f453630761d3272371d09065c23cd9fea6e9a80f3b78a07e672e5d2e891c2ad7661883e1cb1f41e89fb2cd725a7189937c7b3cc7fc39b23ef0caaf0b3ce7 SHA512 d57284ff50913d95f092a5b8e4e566d0d6668b56afadfeb2e7003f2af6ed2106f14df82be880b2ea71dec29b614c5cb286a085098fbe8eed16e8bd3588149be6
diff --git a/dev-util/Tensile/Tensile-5.7.1-r1.ebuild b/dev-util/Tensile/Tensile-5.7.1-r2.ebuild
index 709189734d4a..94b4aac75b1b 100644
--- a/dev-util/Tensile/Tensile-5.7.1-r1.ebuild
+++ b/dev-util/Tensile/Tensile-5.7.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -24,10 +24,11 @@ REQUIRED_USE="client? ( ${ROCM_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
RDEPEND="${PYTHON_DEPS}
+ client? ( dev-libs/boost )
>=dev-cpp/msgpack-cxx-6.0.0
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/msgpack[${PYTHON_USEDEP}]
- dev-util/hip
+ =dev-util/hip-5*
>=dev-util/rocm-smi-4.3.0
sys-devel/clang:${LLVM_MAX_SLOT}
"
@@ -43,11 +44,11 @@ BDEPEND="
distutils_enable_tests pytest
PATCHES=(
- "${FILESDIR}"/${PN}-change-cmake-name-for-msgpack-cxx-6-release.patch
"${FILESDIR}"/${PN}-4.3.0-output-commands.patch
"${FILESDIR}"/${PN}-5.4.2-fix-arch-parse.patch
"${FILESDIR}"/${PN}-5.4.2-use-ninja.patch
"${FILESDIR}"/${PN}-5.7.1-expand-isa-compatibility.patch
+ "${FILESDIR}"/${PN}-5.7.1-fix-msgpack-dependency.patch
)
CMAKE_USE_DIR="${S}/${PN}/Source"
diff --git a/dev-util/Tensile/files/Tensile-5.7.1-fix-msgpack-dependency.patch b/dev-util/Tensile/files/Tensile-5.7.1-fix-msgpack-dependency.patch
new file mode 100644
index 000000000000..f6f3f0e24c1a
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.7.1-fix-msgpack-dependency.patch
@@ -0,0 +1,29 @@
+Gentoo uses "msgpack-cxx" as library name and adds important
+MSGPACK_NO_BOOST compile definition when msgpack-cxx us installed with USE=-boost
+--- a/Tensile/Source/lib/CMakeLists.txt
++++ b/Tensile/Source/lib/CMakeLists.txt
+@@ -98,22 +98,9 @@ if(TENSILE_USE_LLVM OR TENSILE_USE_MSGPACK)
+ endif()
+
+ if(TENSILE_USE_MSGPACK)
+- find_package(msgpack REQUIRED)
++ find_package(msgpack-cxx REQUIRED)
+ target_compile_definitions(TensileHost PUBLIC -DTENSILE_MSGPACK=1)
+-
+- if(TARGET msgpackc-cxx)
+- get_target_property(msgpack_inc msgpackc-cxx INTERFACE_INCLUDE_DIRECTORIES)
+- elseif(TARGET msgpackc)
+- get_target_property(msgpack_inc msgpackc INTERFACE_INCLUDE_DIRECTORIES)
+- endif()
+-
+- if(DEFINED msgpack_inc)
+- # include C++ headers manually
+- # External header includes included as system files
+- target_include_directories(TensileHost
+- SYSTEM PRIVATE $<BUILD_INTERFACE:${msgpack_inc}>
+- )
+- endif()
++ target_link_libraries(TensileHost PRIVATE msgpack-cxx)
+ endif()
+
+ if(TENSILE_USE_LLVM)
diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index f379da190436..53cdc7903a28 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -28,6 +28,7 @@ AUX hip-5.7.0-install.patch 576 BLAKE2B b3c5437a81bcc901327ba4ee9419ad77ea94aab3
AUX hip-5.7.1-disable-stack-protector.patch 771 BLAKE2B 46ea4b48ae32c7e120418fec467fedc7c496fec2c0589c04e4b62a0afe9b7e6b6e9aae8a4502d5772eefc07c5f71d39b37e4a47d1796d7688b1804814a0274da SHA512 30b82c3b8e7403e8098d1d564c94a85cd29fbf0d6fb4d4af26874bbc5ed03477933fb61064d57c2e2c724182b4816598752b38b1bb9f9384685be72a774d81af
AUX hip-5.7.1-exec-stack.patch 1136 BLAKE2B b45560c1cd3410ba9340d5dea7fc2ab7167126a3dbcee6fdaa5ccdab6140db8a6ce9c9f588451f77a1cd27154551a4cb00743d7b2ac3dcb6c36e87f2bc182fe1 SHA512 66a6a9518975a9702f365ae6e9b09835ff93cde49209714b4cbb19c375052859ac26f3d4d2b61052280eee93e237f930a4b7b2d837245a7d477e30893ca6a0b4
AUX hip-5.7.1-extend-isa-compatibility-check.patch 9043 BLAKE2B 8effc992b0d3478939fed4b003b4cbc1ef09ca1f59792f46d4c5c9253ac1a4d9a32357294b15c50e9c0dc867ebf284fe1823f3c7d829097c69d6633ff2027adc SHA512 ccab928a25089e6f9260dcdda665258fb71b6aefaae444ea25274475b3d668785b5bf4396ca4fbefb1471c06115b139b13f0af4d9b1f76e66821d585e7c8b781
+AUX hip-5.7.1-fix-mmap-oom-check.patch 1317 BLAKE2B d1e9db74bb815cd9194b47688bb125630a8baf8c3df14e454b2f8c59303c136c6c69b7ca89fddabb2533bfa034c984d88ec276851daf2241d9abeda7f5a50f87 SHA512 b6a5d7b861fe4138c72f91b765df822cce00fda94d3b8b85c0a40c3697455b018256f37317adf714280aa387ebe5da14a092ab69e375e8a804f01243837f7b60
AUX hip-5.7.1-fix-unaligned-access.patch 3011 BLAKE2B d8a6a130edcf51c40e88250508ff3db13f134fb3833d1eadfac32dfdee09c7635091b1f32ed640bcba0c5ca2b745c401183ee8adaa392977ecece12a03450f9e SHA512 f9b85117927d18921d939daa73d2d97477bb49eb6ff7e496f9b110b8e70e00734b698517ae4235a03c560bdfc3618367d7eb2970c9d90dc2bcf07e2ab803d994
AUX hip-5.7.1-no_asan_doc.patch 817 BLAKE2B 4bc80470f9cb476289086ae561560bb54fcdd9d1e66ef420dc60f129f29b0de02025be0ed2a7bfd2143b9bc0b456a354abc574dcbff509872a35e2e0c06f7760 SHA512 10a97524acce0c45c8edeccd11b64445f6edeb380e8262e1fc63163c4758efd731af36701dae1c9988264e8ce10971c9b3959ea881e81646994c779a96d10bb9
AUX hip-test-5.7.0-rocm_agent_enumerator-location.patch 651 BLAKE2B 237ae5e71c9a6c565680c4fb07ece160f6bc635d25c77a20f3da54b92fcead95c0f6871f53a58a1e9b26b1d5fef3372ebc547638ba2fba43621c2867d276e75a SHA512 79d3cb277c41a84e6db70b28ad465067403f27d1f54adcbcd3e3501fc08c29f2aafc60fa2e6e78794eed95987352aa7ae844fbd55abc1abe0be8ff1879ed7d8f
@@ -63,6 +64,6 @@ EBUILD hip-5.1.3-r4.ebuild 6638 BLAKE2B 4ccc536736e737f0066ab4f200a5ea76a9f16ede
EBUILD hip-5.3.3-r3.ebuild 5346 BLAKE2B 4f5c0570e8a4ff65ac0b11bc555e2f81f7c6e56cc3ff86de894536b3b0597c049216a9d4184e25471999c4cf73b8f774daf1bb46d613c830bcc0d8c445f85b74 SHA512 9a54281155f14f467286d132ec405b90703b94760b8f4e268aed77b4a47d8a195febef3200068d0e5905cf7078fb92e2252b6ab7a3b86e40d330449315c0cf4d
EBUILD hip-5.4.3.ebuild 5239 BLAKE2B 74d5423c5f7c01f15c5583b2c53420b1780fa7fdb11581fef2f0570be11a2047a43881a13b41b333905faaafab7dee15e1fb4af96703829cdab7d547e2cb5796 SHA512 7b2f5abfbc2ded1751b3d32349eb81715468125e9a9cc64522b725ed9a92f0dbf6e575fd1b84ab5234532badbf3a6b0c4d3a5b375384665ab413b22c54a5ee3e
EBUILD hip-5.5.1.ebuild 5244 BLAKE2B aa1f937c5f2651ad3e79898ffc427696253c619583cd1450f1a3e7b9a7448e0d750f5df72a87458dfe6107f2f8846bc2b9b064d54b0b849fc3812a4f268c4af1 SHA512 94cad30f1f0e3e376a5902c83a151d3fe2a7b72b45747672e96b9d13dedadc7184c8f714789ff3e436133ffb8a7d58e8194471c843c694d3d39c348fd7d5a3ab
-EBUILD hip-5.7.1-r1.ebuild 4404 BLAKE2B 2ef6d7970468cf4414f96e04ca593ce1cb8eb2f2e33935da7d749822830e7d522a0fdd8c1ef3b19dab44be32652f71dc91ed02b6c7bd5c9639fc8baeadbd4140 SHA512 ea8b90b0d6dd65b493d19b0fedd6be09ec9c5404b44d168777731abec99de4dbcb3e7b8fa007a60acddde36a3a972cac9d107b4a88811142a882671affeee3ba
+EBUILD hip-5.7.1-r2.ebuild 5163 BLAKE2B 1a7c8addd6d1ef76dc164542893b7415f8a983c7c3372a1cb946028d685e769a6fdc3be7bd30bd307e48a5839d3e626b3f79712b4be1df717a8f06a6f037de9c SHA512 1ead757bb188f8159053b39bfe99c091945ad4171863cab00073f6e8487d6f4c7307b3dfd2dd32e8a39b103b012d09b199549f651c2e099778fe048d6fe70442
EBUILD hip-6.0.0.ebuild 4631 BLAKE2B 08c1e1c5d32c731bc0aff4b01ccdc304eaab8b071e48401fe241ee28673793e07f4949301628d5e86ce15f96bb0635fc87ee84383fad5819b50da81736396795 SHA512 3c8bfa4d7ed62d215edb16bad0fa83ab42414505163b593a780971ed73a982ceb39ef7ed347c7ed2360ac6b865d1b30138180fe0120fba08580a1f409c973463
MISC metadata.xml 729 BLAKE2B 92e36c42f6d8335e5a8e3a86b591ff9e6306e0d187644620fab7f8f7ddd00156ee91ff49184ffbe379e509f2096c51c421575a69de7abea3c0b372fdcec52ccb SHA512 84fc8234a5fdf54bf43228c2144d809a461862fb45fea24bf366ee5937df3882c3332429938792981e37dbb4cda6e5d7e05ac5deaded34d8bcce1eb53df8d0fd
diff --git a/dev-util/hip/files/hip-5.7.1-fix-mmap-oom-check.patch b/dev-util/hip/files/hip-5.7.1-fix-mmap-oom-check.patch
new file mode 100644
index 000000000000..dbafe4e11a74
--- /dev/null
+++ b/dev-util/hip/files/hip-5.7.1-fix-mmap-oom-check.patch
@@ -0,0 +1,41 @@
+Backport of SWDEV-417691 - Error handling for MemoryMap OS calls.
+The issue was fixed in rocclr 6.0.0.
+https://github.com/ROCm/clr/commit/7a10423a44b8b353f67539dc1ae14c0b99c209b8
+--- a/rocclr/os/os_posix.cpp
++++ b/rocclr/os/os_posix.cpp
+@@ -214,7 +214,7 @@ address Os::reserveMemory(address start, size_t size, size_t alignment, MemProt
+ MAP_PRIVATE | MAP_NORESERVE | MAP_ANONYMOUS, 0, 0);
+
+ // check for out of memory
+- if (mem == NULL) return NULL;
++ if (mem == MAP_FAILED) return NULL;
+
+ address aligned = alignUp(mem, alignment);
+
+@@ -842,7 +842,7 @@ bool Os::MemoryMapFileDesc(FileDesc fdesc, size_t fsize, size_t foffset, const v
+ }
+
+ *mmap_ptr = mmap(NULL, fsize, PROT_READ, MAP_SHARED, fdesc, foffset);
+- return true;
++ return (*mmap_ptr == MAP_FAILED) ? false : true;
+ }
+
+ bool Os::MemoryUnmapFile(const void* mmap_ptr, size_t mmap_size) {
+@@ -874,7 +874,7 @@ bool Os::MemoryMapFile(const char* fname, const void** mmap_ptr, size_t* mmap_si
+
+ close(fd);
+
+- if (*mmap_ptr == nullptr) {
++ if (*mmap_ptr == MAP_FAILED) {
+ return false;
+ }
+
+@@ -899,7 +899,7 @@ bool Os::MemoryMapFileTruncated(const char* fname, const void** mmap_ptr, size_t
+
+ close(fd);
+
+- if (*mmap_ptr == nullptr) {
++ if (*mmap_ptr == MAP_FAILED) {
+ return false;
+ }
+ \ No newline at end of file
diff --git a/dev-util/hip/hip-5.7.1-r1.ebuild b/dev-util/hip/hip-5.7.1-r2.ebuild
index 7b1a593f23e5..35d67cf0be55 100644
--- a/dev-util/hip/hip-5.7.1-r1.ebuild
+++ b/dev-util/hip/hip-5.7.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,7 +7,7 @@ DOCS_BUILDER="doxygen"
DOCS_DEPEND="media-gfx/graphviz"
ROCM_SKIP_GLOBALS=1
-inherit cmake docs llvm rocm
+inherit cmake docs llvm rocm flag-o-matic
LLVM_MAX_SLOT=17
@@ -47,6 +47,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.7.1-disable-stack-protector.patch"
"${FILESDIR}/${PN}-5.7.1-no_asan_doc.patch"
"${FILESDIR}/${PN}-5.7.1-extend-isa-compatibility-check.patch"
+ "${FILESDIR}/${PN}-5.7.1-fix-mmap-oom-check.patch"
)
S="${WORKDIR}/clr-rocm-${PV}/"
@@ -60,9 +61,10 @@ hip_test_wrapper() {
}
src_prepare() {
- # hipamd is itself built by cmake, and should never provide a
- # FindHIP.cmake module.
- rm -r "${WORKDIR}"/HIP-rocm-${PV}/cmake/FindHIP* || die
+ # Set HIP and HIP Clang paths directly, don't search using heuristics
+ sed -e "s:# Search for HIP installation:set(HIP_ROOT_DIR \"${EPREFIX}/usr\"):" \
+ -e "s:#Set HIP_CLANG_PATH:set(HIP_CLANG_PATH \"$(get_llvm_prefix -d ${LLVM_MAX_SLOT})/bin\"):" \
+ -i "${WORKDIR}"/HIP-rocm-${PV}/cmake/FindHIP.cmake || die
# https://github.com/ROCm-Developer-Tools/HIP/commit/405d029422ba8bb6be5a233d5eebedd2ad2e8bd3
# https://github.com/ROCm-Developer-Tools/clr/commit/ab6d34ae773f4d151e04170c0f4e46c1135ddf3e
@@ -79,6 +81,9 @@ src_prepare() {
}
src_configure() {
+ # Workaround for bug #923986
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
use debug && CMAKE_BUILD_TYPE="Debug"
local mycmakeargs=(
@@ -141,6 +146,17 @@ src_test() {
src_install() {
cmake_src_install
+ # add version file that is required by some libraries
+ mkdir "${ED}"/usr/include/rocm-core || die
+ cat <<EOF > "${ED}"/usr/include/rocm-core/rocm_version.h || die
+#pragma once
+#define ROCM_VERSION_MAJOR $(ver_cut 1)
+#define ROCM_VERSION_MINOR $(ver_cut 2)
+#define ROCM_VERSION_PATCH $(ver_cut 3)
+#define ROCM_BUILD_INFO "$(ver_cut 1-3).0-9999-unknown"
+EOF
+ dosym -r /usr/include/rocm-core/rocm_version.h /usr/include/rocm_version.h
+
rm "${ED}/usr/include/hip/hcc_detail" || die
# files already installed by hipcc, which is a build dep
diff --git a/dev-util/hipify-clang/Manifest b/dev-util/hipify-clang/Manifest
new file mode 100644
index 000000000000..f9489960373f
--- /dev/null
+++ b/dev-util/hipify-clang/Manifest
@@ -0,0 +1,4 @@
+AUX hipify-clang-5.7.1-fix-clang-libs.patch 1298 BLAKE2B 3f6d24300e50d4144c60635045ae0d6c84a1e153607e6779180065c4158afe33a8e8df642eda9c84d1eb189b9ec00eba0614060fc7b3f9136b92b163b932bae5 SHA512 8af2408124e5caca08ea7f72a95dfed816bae4dd07effdc04562f24f209ba5ce57b5e5875f0e03a5560c09d6d3718921bfbb56dc2b55db926aa618486d00032c
+DIST HIPIFY-5.7.1.tar.gz 673452 BLAKE2B e0293c1b7f9ea028efc8d712ddedae4ec933c5bcfba524e13816bd999e67bcf06097f9fe0e4d1f4fa6a38df133be694e92adeefd92f77301d8537b6880b1a1fe SHA512 0cc75fdbcb6278d319cfe8ee3c8547dc75ea494a007d2159c64312c3411627905e0d6c7d7f0032cbc4c727a90723325aa2705db2fd473dbeb41e60f276d1c9a7
+EBUILD hipify-clang-5.7.1.ebuild 1037 BLAKE2B c13330ff2f0ce915b37841abde52c70cf8907a674969ba5ed929702dbe180e1166b7c62b7dc0bd6f8df2af6e4689337d22cf1e247f27f7d0c72d0cf5c59c23a4 SHA512 24caa7e7007d9ae952e976b5b5d86912cc7780dec7e04a001707d24840d98369799f6766ca85eb242ad04b8e5c8faf7a72fae1d315f42ce1608d81d896ca2fc1
+MISC metadata.xml 469 BLAKE2B b62d4ab1829968943d48809f2059527b44d464e8b0e089214ec3fb8fcde1d5f380045a68978be63e3e149243f5d57e1cd4958943d0cff97a882711d688870800 SHA512 c8a00d04d7f41f47b636c367f6d7c41d2bd750650af98182c250bcd9d687af64d408b9031bcd1df480746c04ffa9f0ff07bc02250cf98a6f33bf21d1b714ea2d
diff --git a/dev-util/hipify-clang/files/hipify-clang-5.7.1-fix-clang-libs.patch b/dev-util/hipify-clang/files/hipify-clang-5.7.1-fix-clang-libs.patch
new file mode 100644
index 000000000000..c2a50c929ecb
--- /dev/null
+++ b/dev-util/hipify-clang/files/hipify-clang-5.7.1-fix-clang-libs.patch
@@ -0,0 +1,47 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ce188b7..19bd013 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -68,41 +68,7 @@ if (NOT HIPIFY_CLANG_TESTS_ONLY)
+ endif()
+
+ # Link against LLVM and CLANG libraries.
+- target_link_libraries(hipify-clang PRIVATE
+- clangASTMatchers
+- clangFrontend
+- clangTooling
+- clangParse
+- clangSerialization
+- clangSema
+- clangEdit
+- clangFormat
+- clangLex
+- clangAnalysis
+- clangDriver
+- clangAST
+- clangToolingCore
+- clangRewrite
+- clangBasic
+- LLVMProfileData
+- LLVMSupport
+- LLVMMCParser
+- LLVMMC
+- LLVMBitReader
+- LLVMOption
+- LLVMCore)
+-
+- if(LLVM_PACKAGE_VERSION VERSION_GREATER "6.0.1")
+- target_link_libraries(hipify-clang PRIVATE clangToolingInclusions)
+- endif()
+-
+- if(LLVM_PACKAGE_VERSION VERSION_GREATER "9.0.1")
+- target_link_libraries(hipify-clang PRIVATE LLVMFrontendOpenMP)
+- endif()
+-
+- if(LLVM_PACKAGE_VERSION VERSION_EQUAL "15.0.0" OR LLVM_PACKAGE_VERSION VERSION_GREATER "15.0.0")
+- target_link_libraries(hipify-clang PRIVATE LLVMWindowsDriver clangSupport)
+- endif()
++ target_link_libraries(hipify-clang PRIVATE clang clang-cpp)
+
+ if(LLVM_PACKAGE_VERSION VERSION_EQUAL "16.0.0" OR LLVM_PACKAGE_VERSION VERSION_GREATER "16.0.0")
+ if(MSVC)
diff --git a/dev-util/hipify-clang/hipify-clang-5.7.1.ebuild b/dev-util/hipify-clang/hipify-clang-5.7.1.ebuild
new file mode 100644
index 000000000000..24ffc5c8829d
--- /dev/null
+++ b/dev-util/hipify-clang/hipify-clang-5.7.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="A set of tools to translate CUDA source code into portable HIP C++"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/HIPIFY"
+SRC_URI="https://github.com/ROCm-Developer-Tools/HIPIFY/archive/rocm-${PV}.tar.gz -> HIPIFY-${PV}.tar.gz"
+
+LICENSE="MIT"
+KEYWORDS="~amd64"
+SLOT="0/$(ver_cut 1-2)"
+
+BDEPEND=">=dev-build/cmake-3.22"
+DEPEND="
+ sys-devel/clang:17
+ sys-devel/llvm:17"
+
+S="${WORKDIR}/HIPIFY-rocm-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.7.1-fix-clang-libs.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+ sed -i 's:/../libexec/hipify::' \
+ bin/hipconvertinplace.sh bin/hipconvertinplace-perl.sh \
+ bin/hipexamine-perl.sh bin/hipexamine.sh || die
+ # Workaround for bug https://github.com/ROCm/HIPIFY/issues/1396
+ sed -i 's/find_package(LLVM REQUIRED/find_package(LLVM 17 REQUIRED/' CMakeLists.txt || die
+}
+
+src_install() {
+ cmake_src_install
+
+ # rm unwanted copy
+ rm -rf "${ED}/usr/hip" || die
+}
diff --git a/dev-util/hipify-clang/metadata.xml b/dev-util/hipify-clang/metadata.xml
new file mode 100644
index 000000000000..82e35f93e198
--- /dev/null
+++ b/dev-util/hipify-clang/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>lockalsash@gmail.com</email>
+ <name>Sv. Lockal</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ROCm-Developer-Tools/HIPIFY</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-util/maturin/Manifest b/dev-util/maturin/Manifest
index c80d6a50b0aa..8f77641168a9 100644
--- a/dev-util/maturin/Manifest
+++ b/dev-util/maturin/Manifest
@@ -556,5 +556,5 @@ DIST zerocopy-derive-0.7.32.crate 37623 BLAKE2B 8b583d39d7bf9c3dbbba578120751c66
DIST zeroize-1.7.0.crate 19039 BLAKE2B 2f94a5025f409bd2b96a456d2f78a34c6b05b5554abe7ef3fad2a55a8fcff8a6a1b971be660aa4c2954ab7d6e89bebc431036e349edef74711292f9f64b1dbae SHA512 9d31e3e76e8c861309a3579c21f6da5fd6b056c7d7a350427445a1a832e8827204804783f7f9b808acaa2148efef883d9078bf84943b1db55526bba5bf5a2756
DIST zip-0.6.6.crate 65789 BLAKE2B acefc076297468d72cb20d8c6234fe5406875056fbf78fc0eac3ac430af78f320ed839f8683bd96fa1a03c457d6ac568d42bd703a902bc37bd126791d8b4c709 SHA512 affd46c17ceaa0545a155250dfd16756f8706dda43bae8a322ec0481dbfb41e4cf3166bf9662fc139ef9d0ab3b0f9f158535b21d2a61b21d38b8b2407813eeef
EBUILD maturin-1.4.0.ebuild 11605 BLAKE2B 555a0f6926ed589a92c7e363eb50a58329b59bc948e9eebe6afb7b671fd2d3c1f7fb96866f060b69cc14a9ed696834f4a4ee69fb38142d215fa8ef66fc2c94f3 SHA512 c62100a408d4dd398b4a7ae9ae0bee7f9baac01df8dcca1266b8549b6a868ac18e3650e0b2078ccde250fdf690534bf35e77fc2855c1946c17e44eeb66104504
-EBUILD maturin-1.5.0.ebuild 11178 BLAKE2B 701a08da80d775334e80373db6ca6d5f44a9e70d5f215ec078e842818d0ef7a7908f8d0e98c76a74f724f98771a62694dd560cbfc47cf7e2fd1585c0362d4f79 SHA512 4be5bd30b8b99dddda400226abdefd131a454213922332fc0d80d8163ba19fdbb9ab7255f9a4d08a18fff6c4d652cb3b1b77332b641e5a24fa5b26c8d7a77ea4
+EBUILD maturin-1.5.0.ebuild 11161 BLAKE2B b382bbd1c57b08c9c791dcef5ae2b245da7283b529a5df936bac3efad0be06e06b681f207de2ed3bb26ece1b2ddb17707f7fca6f7002a44da9c474f37bbc58b1 SHA512 36a912e753060858893ca2fcb0ab0b8f907e66a95d6dc9aba89cd39e56320637051e48f95059219bd10bff825c525831e82965099d080b60203005ce0cd72edc
MISC metadata.xml 431 BLAKE2B 15731479f56d8b819c60e8e5541d3c4720462c5a90b199b803097b208432b18cc0143f8cbee471ce81ffeb8b54846fdb61fad083e7507f4f6c3630ac628546ed SHA512 7431db948fd5ab520fb6cae76c7e7dbb2c7aef907d7cde21189d1bb17c686cca7f69a0b84470b1c5d90f672e80d30fbb56f37beec1da04ebfdf025015c099ae7
diff --git a/dev-util/maturin/maturin-1.5.0.ebuild b/dev-util/maturin/maturin-1.5.0.ebuild
index d18df31e0dcc..086b566074c4 100644
--- a/dev-util/maturin/maturin-1.5.0.ebuild
+++ b/dev-util/maturin/maturin-1.5.0.ebuild
@@ -418,7 +418,6 @@ CRATES_TEST="
windows_x86_64_msvc@0.36.1
windows_x86_64_msvc@0.48.0
"
-
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( pypy3 python3_{10..12} )
inherit cargo distutils-r1 shell-completion toolchain-funcs
@@ -496,11 +495,13 @@ src_configure() {
password-storage
$(usev ssl native-tls)
)
- cargo_src_configure "${cargoargs[@]}"
+
+ cargo_src_configure
}
python_compile_all() {
cargo_src_compile
+
use !doc || mdbook build -d html guide || die
if ! tc-is-cross-compiler; then
diff --git a/dev-util/rocm-smi/Manifest b/dev-util/rocm-smi/Manifest
index 61bc296d306f..2637b1b5e441 100644
--- a/dev-util/rocm-smi/Manifest
+++ b/dev-util/rocm-smi/Manifest
@@ -1,9 +1,14 @@
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.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 4614 BLAKE2B 0e7f520a2e01536c2e6248e78394857d3d513d93b8cc25a8236e2e04b4d3046ce4b5b0c51beee49eec2943cdb220983dbea223b2082c5e7df7ed086a076e49b1 SHA512 4ee5074617753c9ea0d7a4b6b89e1e6499df6a560e2b201a4c909ccf76000e5fa89d26ffbe7fb7e597ac208ff64fbd7ed1dc61a209fa2c57dcad8843c0282d0b
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
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.7.1.ebuild 1467 BLAKE2B 7812eaf57110f53ab96ace5656db11ad89599a90b0af6f8163c7eb3f17649cb3837eacf6475abbc117a1ea2b416d7426399dca3508a69e2fffc7e871c1e8ec5b SHA512 748a1722ce13c714837fb8b586a31e0b2ae4e36968829e027217100159fa5adf1c4fef0da0b0d1d30b50dfdaed24f09064159abf9175d2efb6b5b138e758c778
EBUILD rocm-smi-9999.ebuild 1454 BLAKE2B 1025768cbe75bb5d815631868c8d9f72ba6dd19a2a0483b0f6fa992a89af4b018731ab247df3679bb836e88e961d80cc94f6550dab70dc00ba25e3d642f5af74 SHA512 5e124efaa71e74ab5b5063244d757f8e9eddc22dbf10d1878c1a5d7ad04dbc88b366470596d4ee48bb489b26bb30e90f8fab51ca756fa0315e5a673971ae8d7e
MISC metadata.xml 661 BLAKE2B ed6ec563956132012b44907f348091135c7a463fc47a51ac0726e7749da9a4c33811df87442e576fb510799a50c14949cd20c8ca10a5850ee941a8794b70ef7d SHA512 c047963068b4ccefb73539ecd91b4c3310f0863a674acb15e9843dda7f0c917616dc8cbfe5f859e42d9ee25323bf1b66b1ce7fbe9a2e8292963ac38aa0bd72f3
diff --git a/dev-util/rocm-smi/files/rocm-smi-5.7.1-no-strip.patch b/dev-util/rocm-smi/files/rocm-smi-5.7.1-no-strip.patch
new file mode 100644
index 000000000000..07796295e71e
--- /dev/null
+++ b/dev-util/rocm-smi/files/rocm-smi-5.7.1-no-strip.patch
@@ -0,0 +1,36 @@
+--- a/oam/CMakeLists.txt
++++ b/oam/CMakeLists.txt
+@@ -82,15 +82,6 @@ set_property(TARGET ${OAM_TARGET} PROPERTY
+ set_property(TARGET ${OAM_TARGET} PROPERTY
+ VERSION "${SO_VERSION_STRING}")
+
+-## If the library is a release, strip the target library
+-if ("${CMAKE_BUILD_TYPE}" STREQUAL Release)
+- if(${BUILD_SHARED_LIBS}) #striping only for .so
+- add_custom_command(
+- TARGET ${OAM_TARGET}
+- POST_BUILD COMMAND ${CMAKE_STRIP} lib${OAM_TARGET}.so)
+- endif()
+-endif ()
+-
+ # use the target_include_directories() command to specify the include directories for the target
+ target_include_directories(${OAM_TARGET}
+ PUBLIC
+--- a/rocm_smi/CMakeLists.txt
++++ b/rocm_smi/CMakeLists.txt
+@@ -103,15 +103,6 @@ set_property(TARGET ${ROCM_SMI_TARGET} PROPERTY
+ set_property(TARGET ${ROCM_SMI_TARGET} PROPERTY
+ VERSION "${SO_VERSION_STRING}")
+
+-## If the library is a release, strip the target library
+-if ("${CMAKE_BUILD_TYPE}" STREQUAL Release)
+- if(${BUILD_SHARED_LIBS}) #stripping only for .so
+- add_custom_command(
+- TARGET ${ROCM_SMI_TARGET}
+- POST_BUILD COMMAND ${CMAKE_STRIP} lib${ROCM_SMI_TARGET}.so.${SO_VERSION_STRING})
+- endif()
+-endif ()
+-
+ #file reorganization changes
+ #rocm_smi.py moved to libexec/rocm_smi. so creating rocm-smi symlink
+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
diff --git a/dev-util/rocm-smi/files/rocm-smi-5.7.1-remove-example.patch b/dev-util/rocm-smi/files/rocm-smi-5.7.1-remove-example.patch
new file mode 100644
index 000000000000..18e1f4c78b5d
--- /dev/null
+++ b/dev-util/rocm-smi/files/rocm-smi-5.7.1-remove-example.patch
@@ -0,0 +1,14 @@
+Remove example; unused, only generates not important QA warnings
+--- a/rocm_smi/CMakeLists.txt
++++ b/rocm_smi/CMakeLists.txt
+@@ -76,8 +76,10 @@ set(SMI_INC_LIST "")
+
+ set(SMI_EXAMPLE_EXE "rocm_smi_ex")
+
++if (WITH_EXAMPLE)
+ add_executable(${SMI_EXAMPLE_EXE} "example/rocm_smi_example.cc")
+ target_link_libraries(${SMI_EXAMPLE_EXE} ${ROCM_SMI_TARGET})
++endif()
+ add_library(${ROCM_SMI_TARGET} ${CMN_SRC_LIST} ${SMI_SRC_LIST}
+ ${CMN_INC_LIST} ${SMI_INC_LIST})
+ target_link_libraries(${ROCM_SMI_TARGET} pthread rt)
diff --git a/dev-util/rocm-smi/files/rocm-smi-5.7.1-set-soversion.patch b/dev-util/rocm-smi/files/rocm-smi-5.7.1-set-soversion.patch
new file mode 100644
index 000000000000..203b179d3faa
--- /dev/null
+++ b/dev-util/rocm-smi/files/rocm-smi-5.7.1-set-soversion.patch
@@ -0,0 +1,112 @@
+Forcefully set rocm_smi64 soversion to 1.
+Before intoduction of git-based versioning, soversion was 1.0.
+
+This patch repeats approach of similar patch from Debian, additionally removing dependency from git.
+https://salsa.debian.org/rocm-team/rocm-smi-lib/-/blob/master/debian/patches/0007-rocm_smi64-soversion.patch
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -30,27 +30,6 @@ 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("5.0.0" ${PKG_VERSION_GIT_TAG_PREFIX} GIT)
+-message("Package version: ${PKG_VERSION_STR}")
+-set(${AMD_SMI_LIBS_TARGET}_VERSION_MAJOR "${VERSION_MAJOR}")
+-set(${AMD_SMI_LIBS_TARGET}_VERSION_MINOR "${VERSION_MINOR}")
+-set(${AMD_SMI_LIBS_TARGET}_VERSION_PATCH "0")
+-set(${AMD_SMI_LIBS_TARGET}_VERSION_BUILD "0")
+-
+-# The following default version values should be updated as appropriate for
+-# ABI breaks (update MAJOR and MINOR), and ABI/API additions (update MINOR).
+-# Until ABI stabilizes VERSION_MAJOR will be 0. This should be over-ridden
+-# by git tags (through "git describe") when they are present.
+-set(PKG_VERSION_MAJOR 1)
+-set(PKG_VERSION_MINOR 0)
+-set(PKG_VERSION_PATCH 0)
+-set(PKG_VERSION_NUM_COMMIT 0)
+-
+ ## Define default variable and variables for the optional build target
+ ## rocm_smi_lib-dev
+ set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE STRING "Default installation directory.")
+--- a/oam/CMakeLists.txt
++++ b/oam/CMakeLists.txt
+@@ -29,23 +29,10 @@ 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}")
+-else()
+- set(SO_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}")
+-endif ()
++set(VERSION_MAJOR "1")
++set(VERSION_MINOR "0")
++
++set(SO_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}")
+ set(${OAM_NAME}_VERSION_MAJOR "${VERSION_MAJOR}")
+ set(${OAM_NAME}_VERSION_MINOR "${VERSION_MINOR}")
+ set(${OAM_NAME}_VERSION_PATCH "0")
+--- a/python_smi_tools/rsmiBindings.py.in
++++ b/python_smi_tools/rsmiBindings.py.in
+@@ -9,19 +9,9 @@ from enum import Enum
+
+ import os
+
+-# Use ROCm installation path if running from standard installation
+-# With File Reorg rsmiBindings.py will be installed in /opt/rocm/libexec/rocm_smi.
+-# relative path changed accordingly
+-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('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('Using lib from %s' % path_librocm)
+- else:
+- print('Unable to find librocm_smi64.so.@VERSION_MAJOR@')
++path_librocm = ctypes.util.find_library("rocm_smi64")
++if not path_librocm:
++ print('Unable to find librocm_smi64.so')
+
+ # ----------> TODO: Support static libs as well as SO
+
+--- a/rocm_smi/CMakeLists.txt
++++ b/rocm_smi/CMakeLists.txt
+@@ -31,17 +31,8 @@ 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("5.0.0.0" ${SO_VERSION_GIT_TAG_PREFIX} GIT)
+-
+-# VERSION_* variables should be set by get_version_from_tag
++set(VERSION_MAJOR "1")
++set(VERSION_MINOR "0")
+ 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/rocm-smi-5.7.1.ebuild b/dev-util/rocm-smi/rocm-smi-5.7.1.ebuild
new file mode 100644
index 000000000000..5fd0811bd980
--- /dev/null
+++ b/dev-util/rocm-smi/rocm-smi-5.7.1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake python-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="MIT NCSA-AMD"
+SLOT="0/$(ver_cut 1-2)"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+
+S="${WORKDIR}/rocm_smi_lib-rocm-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.7.1-set-soversion.patch
+ "${FILESDIR}"/${PN}-5.7.1-no-strip.patch
+ "${FILESDIR}"/${PN}-5.7.1-remove-example.patch
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ sed "s/\${PKG_VERSION_STR}/${PV}/g" \
+ -i CMakeLists.txt -i oam/CMakeLists.txt -i rocm_smi/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
+}
diff --git a/dev-util/roctracer/Manifest b/dev-util/roctracer/Manifest
index a1eb0e4875de..09b1bca32d8a 100644
--- a/dev-util/roctracer/Manifest
+++ b/dev-util/roctracer/Manifest
@@ -7,10 +7,13 @@ AUX roctracer-5.3.3-Werror.patch 439 BLAKE2B 23c26aafd85d5f8a19c3e3001c091cef5f4
AUX roctracer-5.3.3-do-not-install-test-files.patch 1948 BLAKE2B 1eeb7443b4cb4c6947a61ee1b4f9f42bef996cd9623e6864d273de438af8f0d21bd2465e5ad1b62e266d9b0a86b5afdf5a267d79018cbfbc356ed8e2205a2136 SHA512 aa1e556ddd5f070bdc0ca8b47b243dbdbd965de8f98d02964a13897d3cb273fdef08373f12113c9f1645c3333be212092505fd7087f5ab292aedc1365372a021
AUX roctracer-5.3.3-flat-lib-layout.patch 1842 BLAKE2B dc7f2832e2bd4e04bad75ccd22e8e2e32353cec745521e8baf4d98772d0994efa08289e5563eb3191d78a2fa4deb1681551e582d08e9608b98fe72f599146a2f SHA512 967eab41a909a7369791bd0946ef4304473e2f763d2e4f497f5b7ddba3b81b9eb18ea72a815b2211bcb82ec87eebe817daf1788f7d44f8c4494a06c77be9d902
AUX roctracer-5.3.3-rocm-path.patch 788 BLAKE2B ef0c9025bfb126e437f73149962c04661a5a5c33ee0c36e18854fa93bac591905cdc23e17fc2faf07659c5828de9361139e618752de3818b3b134e3536cd0c4b SHA512 f639b040871a43e23e7bf57a2214bf255032e3a5f9a20e08eae160bb0d371fb26fa147aefce20577935e40274779dbb150d445e044a22c7aeedc4e10b9865350
+AUX roctracer-5.7.1-with-tests.patch 199 BLAKE2B 82061cd9966e59c10cb628173aca44cc869840fe8d1c9a0c6c2c9fb81a5b4fef04e2cd83e03188e77eeec305bd5ec598be04a71c6d558b8e3fb361c0a0aa976d SHA512 08b51740c7aee79cc7117e2c41b4dbf7ddf7c2b08326518785cec6687803e7b94f4dfcd70bc5b5e86e8788a2b18b220034262108bae5264e5e7c47c86c4eb9af
DIST hsa-class-f8b3870.tar.gz 37432 BLAKE2B c2a09e4a4c3708e8db432378874c63b9cefefb567ad19a9c17181ed2b60f38d0591a618f72b11f606eb44efc5e170adaf72f0ec1b93cde628ca2230a62e2d6de SHA512 f371a955bf59b7e0af07261981a6e68562fad0753d3f39d1e220034c17501abf839ed2fd88fbf376d659970395c8795a82c0560c7ed8d3b87c11c79864f5f612
DIST rocm-tracer-5.1.3.tar.gz 511617 BLAKE2B 4142979b3b7d649798a7ac0b2a04b42aa7fbcbf82f2cf51b0e5363ec0da538046d6e59283d0ce1bfd341317bf24ac2f694d5c8a7d1f132f9b21caea5caf7eda3 SHA512 e73b0c921ffbdcac571d8b0825de39bd8a4fd5f2720ecdd0c189951db85efb607a0b1cd7a9bb02b3dbf329b277cb5e197525216a8e8927eea4e6ce290b7e7c7b
DIST rocm-tracer-5.3.3.tar.gz 353041 BLAKE2B b7614707ae3af2f5a46d058dacadfb0ef3b980963ac49face66a80c8396e66cf13e0430ab41737ba15e163f5da03697376b13238ea1decfe7ee4a7f31c7664a5 SHA512 95a202f76f6b68a35942750233bd09d372a9be843150d7ec02824da13c6b9a7c8da7a752ac69f66776e7ccfb6176473745dc46a7baadfe77c99c0596fbc2ffeb
DIST rocprofiler-5.1.3.tar.gz 1402172 BLAKE2B 16e9b127ede94a3f96056e84a2942b6c9f3aec90579fb12796ab8ba385160aa020e3dc77f7a475dadbc0a813a823ae733ca9560f6a09e55c4c82b13dd792dfa4 SHA512 6e9932a425eaaa2a1e1741280d7525c6360700f85edb3bcf4967fe9be4fed662bae0d2ba609701f0d9733769c340e93e32076024b27bab3303449c1d68d9e1ce
+DIST roctracer-5.7.1.tar.gz 354686 BLAKE2B 2e72d8df5cf53a913102a715dab55f7c6d33b2d4a9cad7647a61824deba0363cf3dbf96d8de3469a78d6b5c8e517c163c303bf6aa12eeaf8e43f82ac8381ef97 SHA512 62cf62fc505955426596bd6d539c92f4d730d90d820d817343525f1b7be693290727c8c447ca98b1a0e46d1d188b62b3f4fafcf6bffbf2479fc5d937fb354e13
EBUILD roctracer-5.1.3-r1.ebuild 2414 BLAKE2B 177f01dc1079d29a764541b00b1df66763691cf42a6115c6c7f76a525605c928852d485271f5812efeb5b9aaa752c83213db6d874386e2a8e6796d32a01ea443 SHA512 2860674405c36b699c633737549a03382acd113be07371dbde78c25ec965208618218f85e940aba6280676918f34c7e6d3a8181c71f9b1f57ff976406e46f75a
EBUILD roctracer-5.3.3-r1.ebuild 1659 BLAKE2B d8b729531db35650b674f30e2c9aeb2c494d82705bd46c784365dbe7d6396dfdba9339af5e378a4eec35a40f93fded8b2df4c0d583b976bc689d51d087d6900f SHA512 7efbf7deaf110325d6df22f1180609f7ffa54bf3b34ca50a9c2fa2b4c4b0359ff2c4aa881e4c36d8a11db3946bf6cc8746f9c384811635beed945b35565cc1ae
+EBUILD roctracer-5.7.1-r1.ebuild 2230 BLAKE2B a2a1f033a011244d6039107c7f121b39965abfe12c362eedcb0d1e13c63e09dc7a8214b9115fd59ea5c4c5faced21f4e8ead45277ad9f5d49b1f3145f0abfca2 SHA512 ef63e786f59130b2b4bbe071d598b44d04aa66a932f17739908f41dfc4029debcbcc139cd4693a970ed7e7b2a2d70d497806c651fe634dec775991fdbe06e0c3
MISC metadata.xml 620 BLAKE2B 305256592e98101accc2200175ee94af58ac66f529fc01978972b9daeb33c1588751e242fc72a69860e5aada7a94f641c71d60d4b2ae48daca8f606f1336e8d9 SHA512 10b5b9a17a3696915eefc0602ff21b160ddd9c45390ae2bb35472c213f1b3d67b5f650c962218b6300d51284ca5086a439c8f5fea52272f81ef014025c48f4f7
diff --git a/dev-util/roctracer/files/roctracer-5.7.1-with-tests.patch b/dev-util/roctracer/files/roctracer-5.7.1-with-tests.patch
new file mode 100644
index 000000000000..eb728b8f7237
--- /dev/null
+++ b/dev-util/roctracer/files/roctracer-5.7.1-with-tests.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -56,7 +56,7 @@ endif()
+ add_subdirectory(src)
+
+ ## Build tests
+-if(${LIBRARY_TYPE} STREQUAL SHARED)
++if(WITH_TESTS)
+ add_subdirectory(test)
+ endif()
+
diff --git a/dev-util/roctracer/roctracer-5.7.1-r1.ebuild b/dev-util/roctracer/roctracer-5.7.1-r1.ebuild
new file mode 100644
index 000000000000..e16ea7d01a5a
--- /dev/null
+++ b/dev-util/roctracer/roctracer-5.7.1-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+LLVM_MAX_SLOT=17
+ROCM_VERSION=${PV}
+
+inherit cmake prefix python-any-r1 rocm llvm
+
+DESCRIPTION="Callback/Activity Library for Performance tracing AMD GPU's"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/roctracer"
+SRC_URI="https://github.com/ROCm-Developer-Tools/roctracer/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/roctracer-rocm-${PV}"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-libs/rocr-runtime
+ dev-util/hip"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ $(python_gen_any_dep '
+ dev-python/CppHeaderParser[${PYTHON_USEDEP}]
+ dev-python/ply[${PYTHON_USEDEP}]
+ ')
+"
+
+PATCHES=(
+ "${FILESDIR}"/roctracer-5.7.1-with-tests.patch
+)
+
+python_check_deps() {
+ python_has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]" \
+ "dev-python/ply[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ hprefixify script/*.py
+ eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.3.3-rocm-path.patch)
+
+ # Install libs directly into /usr/lib64
+ sed -e 's:${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}:${CMAKE_INSTALL_LIBDIR}:g' \
+ -i src/CMakeLists.txt plugin/file/CMakeLists.txt || die
+
+ # Remove all install commands for tests
+ sed -E '/^ *install\(.+/d' -i test/CMakeLists.txt || die
+
+ # Fix search path for HIP cmake
+ sed -e "s,\${ROCM_PATH}/lib/cmake,/usr/$(get_libdir)/cmake,g" -i test/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_MODULE_PATH="${EPREFIX}/usr/$(get_libdir)/cmake/hip"
+ -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
+ -DWITH_TESTS=$(usex test)
+ )
+ use test && mycmakeargs+=(
+ -DCMAKE_FIND_DEBUG_MODE=ON
+ -DHIP_ROOT_DIR="${EPREFIX}/usr"
+ -DHIP_CLANG_INSTALL_DIR="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin"
+ -DGPU_TARGETS="$(get_amdgpu_flags)"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ check_amdgpu
+ cd "${BUILD_DIR}" || die
+ # if LD_LIBRARY_PATH not set, dlopen cannot find correct lib
+ LD_LIBRARY_PATH="${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}" bash run.sh || die
+}
+
+src_install() {
+ cmake_src_install
+
+ # remove unneeded copy
+ rm -r "${ED}/usr/share/doc/${PF}-asan" || die
+}