summaryrefslogtreecommitdiff
path: root/libs/rocm-rocr-runtime/MAKEPKG
diff options
context:
space:
mode:
authorrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
committerrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
commitc82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch)
tree56d864b5a5c6c145edd96178ae219a8f90e191a6 /libs/rocm-rocr-runtime/MAKEPKG
downloadports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'libs/rocm-rocr-runtime/MAKEPKG')
-rw-r--r--libs/rocm-rocr-runtime/MAKEPKG69
1 files changed, 69 insertions, 0 deletions
diff --git a/libs/rocm-rocr-runtime/MAKEPKG b/libs/rocm-rocr-runtime/MAKEPKG
new file mode 100644
index 0000000..7615891
--- /dev/null
+++ b/libs/rocm-rocr-runtime/MAKEPKG
@@ -0,0 +1,69 @@
+#!/bin/mkpkg
+# description: AMD ROCm HSA Runtime (ROCr)
+# url: https://github.com/ROCm/ROCR-Runtime
+
+name=rocm-rocr-runtime
+_name=therock
+version=10.0
+release=1
+depends=(libdrm libelf numactl)
+makedeps=(cmake ninja rocm-llvm)
+source=(
+ https://github.com/ROCm/rocm-systems/releases/download/$_name-$version/rocr-runtime.tar.gz
+ fix-hsa-signal-less.awk
+ fix-executable-null.awk
+)
+renames=($name-$version.tar.gz
+ ""
+ ""
+)
+
+sha256sums=(
+ "007bba7a393abf5bb41fd191033e015eba2fffa6fdb605e1ed4e488742752ca5"
+ "b6f63254560b1cfcbeced1764bb522767fc5eefa88bb4e7938d1b894736bbddb"
+ "d4e2fe154741800dbf0a1b65e7ddbd7c6f9a6787bd53892e0f34d7d1ab0080f1"
+)
+
+patch() {
+ cd rocr-runtime
+
+ # Add operator< to hsa_signal_t for libc++ 22 std::map compatibility
+ awk -f "$SRC/fix-hsa-signal-less.awk" \
+ runtime/hsa-runtime/inc/hsa.h > hsa.h.tmp
+ mv hsa.h.tmp runtime/hsa-runtime/inc/hsa.h
+
+ # Fix NULL return where uint64_t expected (musl defines NULL as nullptr)
+ awk -f "$SRC/fix-executable-null.awk" \
+ runtime/hsa-runtime/loader/executable.cpp > executable.cpp.tmp
+ mv executable.cpp.tmp runtime/hsa-runtime/loader/executable.cpp
+
+}
+
+build() {
+ cd rocr-runtime
+
+ cmake -B build -G Ninja -Wno-dev \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DCMAKE_C_COMPILER=/usr/lib/rocm/llvm/bin/clang \
+ -DCMAKE_CXX_COMPILER=/usr/lib/rocm/llvm/bin/clang++ \
+ -DCMAKE_PREFIX_PATH="/usr;/usr/lib/rocm/llvm" \
+ -DClang_DIR=/usr/lib/rocm/llvm/lib/cmake/clang \
+ -DBUILD_SHARED_LIBS=ON \
+ -DIMAGE_SUPPORT=ON \
+ -DBUILD_ROCR=ON \
+ -DBUILD_TESTS=OFF \
+ -DROCM_PATCH_VERSION=0
+
+ ninja -C build
+ DESTDIR=$PKG ninja -C build install
+}
+
+signify() {
+ untrusted comment: public key
+ RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
+}
+
+# vim: filetype=sh
+