summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRanieri Althoff2020-04-20 16:43:38 -0300
committerRanieri Althoff2020-04-20 16:43:38 -0300
commit5b1ab2889a55f93c97c5655f19b7f59ca673ffe0 (patch)
tree0e3a26aaf0a4a2f91e3e71a57afbcd872baba668 /PKGBUILD
parent85ceff1810023be1e50ad0288b0d2eb19ea81a27 (diff)
downloadaur-5b1ab2889a55f93c97c5655f19b7f59ca673ffe0.tar.gz
upgpkg: rocm-opencl-runtime 3.3.0-2
Build opencl-runtime from tarball, use rocm-cmake, remove patches
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD57
1 files changed, 16 insertions, 41 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b47836f7f58..7fcc63601cf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,6 @@
# Maintainer: Ranieri Althoff <ranisalt+aur at gmail dot com>
+_opencl_icd_loader_repo='https://github.com/KhronosGroup/OpenCL-ICD-Loader'
_opencl_icd_loader_commit='978b4b3a29a3aebc86ce9315d5c5963e88722d03'
pkgname=rocm-opencl-runtime
@@ -7,64 +8,38 @@ pkgver=3.3.0
pkgrel=2
pkgdesc='Radeon Open Compute - OpenCL runtime'
arch=('x86_64')
-url='https://github.com/RadeonOpenCompute'
+url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime'
license=('MIT')
depends=('hsakmt-roct' 'hsa-rocr' 'opencl-icd-loader')
-makedepends=(mesa cmake git llvm-roc rocm-comgr)
+makedepends=('mesa' 'cmake' 'git' 'llvm-roc' 'rocm-cmake' 'rocm-comgr')
provides=("$pkgname" 'opencl-driver')
-source=(
- "rocm-opencl-runtime::git+https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime#tag=roc-$pkgver"
- "rocm-cmake::git+https://github.com/RadeonOpenCompute/rocm-cmake#tag=rocm-3.3.0"
- "opencl-icd-loader::git+https://github.com/KhronosGroup/OpenCL-ICD-Loader#commit=$_opencl_icd_loader_commit"
- # "rocm-opencl-runtime-2.8.0-change-AMDCompilerh.patch"
- # "rocm-opencl-runtime-2.8.0-change-opencl.patch"
- # "rocm-opencl-runtime-2.8.0-amdocl64icd.patch"
- # "rocm-opencl-runtime-3.0.0-change-install-location.patch"
-)
-
-sha256sums=('SKIP'
- 'SKIP'
- 'SKIP')
- # '3af5c9c3b8b88b78a2fd574f339e88a5cd62c365d94e9289c2a2cb4afef3d435'
- # '2cfd11bda9a485d6de2231c56742ad553329cab9b6dcc009dbddbcde1436f485'
- # '941a29f8704a2839c32bcf3cf374dde30bc8a839c1136d4faa65c60a7500cf98')
+source=("$url/archive/roc-$pkgver.tar.gz"
+ "$_opencl_icd_loader_repo/archive/$_opencl_icd_loader_commit.tar.gz")
+sha256sums=('ac6999f1a491ab066286c2bd6adf50f08f831286f56e267879f9f7eced22f98e'
+ '0c14bf890bd198ef5a814b5b7ed57b69e890b0c0a1bcfba8fdad996fa1a97fc7')
+_dirname="$(basename "$url")-$(basename "${source[0]}" .tar.gz)"
+_opencl_dirname="$(basename "$_opencl_icd_loader_repo")-$(basename "${source[1]}" .tar.gz)"
prepare() {
- cd "$srcdir/rocm-opencl-runtime"
-
- # [ -d tools/clinfo ] && rm -rf tools/clinfo
-
- mkdir -p api/opencl/khronos
- mv "$srcdir/opencl-icd-loader" api/opencl/khronos/icd
-
- # local src
- # for src in "${source[@]}"; do
- # src="${src%%::*}"
- # src="${src##*/}"
- # [[ $src = *.patch ]] || continue
- # msg2 "Applying patch $src..."
- # patch -Np1 -i "$srcdir/$src"
- # done
+ mkdir -p "$_dirname/api/opencl/khronos"
+ mv "$_opencl_dirname" "$_dirname/api/opencl/khronos/icd"
}
build() {
- cd "$srcdir/rocm-opencl-runtime"
- mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
- -DCMAKE_MODULE_PATH="$srcdir/rocm-cmake/share/rocm/cmake" \
+ -DCMAKE_MODULE_PATH=/opt/rocm/share/rocm/cmake \
-DCMAKE_PREFIX_PATH=/opt/rocm/lib/cmake \
- -DLLVM_DIR=/opt/rocm/lib/cmake/llvm \
-DUSE_COMGR_LIBRARY=yes \
- ..
+ "$_dirname"
make
}
package() {
- DESTDIR="$pkgdir/" make -C "$srcdir/rocm-opencl-runtime/build" install
+ DESTDIR="$pkgdir" make install
mkdir -p "$pkgdir/etc/ld.so.conf.d"
- echo '/opt/rocm/lib' > "$pkgdir/etc/ld.so.conf.d/rocm-opencl.conf"
+ echo /opt/rocm/lib > "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
- install -Dm644 "$srcdir/rocm-opencl-runtime/License" "$pkgdir/usr/share/licenses/rocm-opencl-runtime/LICENSE"
+ install -Dm644 "$_dirname/License" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}