summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD22
-rw-r--r--install_vendor_file.patch20
3 files changed, 36 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1778e0c6b85..eb8e5a4ef9d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = rocm-opencl-runtime
pkgdesc = Radeon Open Compute - OpenCL runtime
pkgver = 3.3.0
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime
arch = x86_64
license = MIT
@@ -18,8 +18,10 @@ pkgbase = rocm-opencl-runtime
provides = opencl-driver
source = https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/roc-3.3.0.tar.gz
source = https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/978b4b3a29a3aebc86ce9315d5c5963e88722d03.tar.gz
+ source = install_vendor_file.patch
sha256sums = ac6999f1a491ab066286c2bd6adf50f08f831286f56e267879f9f7eced22f98e
sha256sums = 0c14bf890bd198ef5a814b5b7ed57b69e890b0c0a1bcfba8fdad996fa1a97fc7
+ sha256sums = b83de5ea8ae889664ce2725f90c5db8c1c9e98839d75c7743b355d16435dccee
pkgname = rocm-opencl-runtime
diff --git a/PKGBUILD b/PKGBUILD
index 7fcc63601cf..d6a67fdfe17 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@ _opencl_icd_loader_commit='978b4b3a29a3aebc86ce9315d5c5963e88722d03'
pkgname=rocm-opencl-runtime
pkgver=3.3.0
-pkgrel=2
+pkgrel=3
pkgdesc='Radeon Open Compute - OpenCL runtime'
arch=('x86_64')
url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime'
@@ -14,15 +14,20 @@ depends=('hsakmt-roct' 'hsa-rocr' 'opencl-icd-loader')
makedepends=('mesa' 'cmake' 'git' 'llvm-roc' 'rocm-cmake' 'rocm-comgr')
provides=("$pkgname" 'opencl-driver')
source=("$url/archive/roc-$pkgver.tar.gz"
- "$_opencl_icd_loader_repo/archive/$_opencl_icd_loader_commit.tar.gz")
+ "$_opencl_icd_loader_repo/archive/$_opencl_icd_loader_commit.tar.gz"
+ 'install_vendor_file.patch')
sha256sums=('ac6999f1a491ab066286c2bd6adf50f08f831286f56e267879f9f7eced22f98e'
- '0c14bf890bd198ef5a814b5b7ed57b69e890b0c0a1bcfba8fdad996fa1a97fc7')
+ '0c14bf890bd198ef5a814b5b7ed57b69e890b0c0a1bcfba8fdad996fa1a97fc7'
+ 'b83de5ea8ae889664ce2725f90c5db8c1c9e98839d75c7743b355d16435dccee')
_dirname="$(basename "$url")-$(basename "${source[0]}" .tar.gz)"
_opencl_dirname="$(basename "$_opencl_icd_loader_repo")-$(basename "${source[1]}" .tar.gz)"
prepare() {
- mkdir -p "$_dirname/api/opencl/khronos"
- mv "$_opencl_dirname" "$_dirname/api/opencl/khronos/icd"
+ cd "$_dirname"
+ patch -Np1 -i "$srcdir/install_vendor_file.patch"
+
+ mkdir -p api/opencl/khronos
+ mv "$srcdir/$_opencl_dirname" api/opencl/khronos/icd
}
build() {
@@ -37,9 +42,8 @@ build() {
package() {
DESTDIR="$pkgdir" make install
-
- mkdir -p "$pkgdir/etc/ld.so.conf.d"
- echo /opt/rocm/lib > "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
-
install -Dm644 "$_dirname/License" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 /dev/stdin "$pkgdir/etc/ld.so.conf.d/$pkgname.conf" <<-EOF
+ /opt/rocm/lib/x86_64
+EOF
}
diff --git a/install_vendor_file.patch b/install_vendor_file.patch
new file mode 100644
index 00000000000..1a67f0f7d7b
--- /dev/null
+++ b/install_vendor_file.patch
@@ -0,0 +1,20 @@
+From 7c6726d975d54185d1318a112059f3e9ca5edf36 Mon Sep 17 00:00:00 2001
+From: Ranieri Althoff <1993083+ranisalt@users.noreply.github.com>
+Date: Sat, 18 Apr 2020 18:02:58 +0000
+Subject: [PATCH] Install amdocl64.icd where ICD loader expects it
+
+---
+ api/opencl/amdocl/CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/api/opencl/amdocl/CMakeLists.txt b/api/opencl/amdocl/CMakeLists.txt
+index e217110..2731a6a 100644
+--- rocm-opencl-runtime/api/opencl/amdocl/CMakeLists.txt
++++ rocm-opencl-runtime/api/opencl/amdocl/CMakeLists.txt
+@@ -83,3 +83,6 @@ if(${USE_COMGR_LIBRARY} MATCHES "yes")
+ else()
+ target_link_libraries(amdocl64 opencl_driver oclelf pthread dl ${ROCT_LIBRARIES} ${ROCR_LIBRARIES})
+ endif()
++
++file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/amdocl64.icd" CONTENT "$<TARGET_FILE_NAME:amdocl64>")
++install(FILES "${CMAKE_BINARY_DIR}/amdocl64.icd" DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/OpenCL/vendors/")