[arch-commits] Commit in (4 files)

Daniel Bermond dbermond at archlinux.org
Sat Mar 30 20:35:57 UTC 2019


    Date: Saturday, March 30, 2019 @ 20:35:56
  Author: dbermond
Revision: 446403

Initial commit

Added:
  intel-opencl-clang/
  intel-opencl-clang/repos/
  intel-opencl-clang/trunk/
  intel-opencl-clang/trunk/PKGBUILD

----------+
 PKGBUILD |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

Added: intel-opencl-clang/trunk/PKGBUILD
===================================================================
--- intel-opencl-clang/trunk/PKGBUILD	                        (rev 0)
+++ intel-opencl-clang/trunk/PKGBUILD	2019-03-30 20:35:56 UTC (rev 446403)
@@ -0,0 +1,43 @@
+# Maintainer: Daniel Bermond < gmail-com: danielbermond >
+
+_srcname=opencl-clang
+pkgname=intel-${_srcname}
+pkgver=8.0.0
+pkgrel=1
+pkgdesc="A wrapper library around clang that can compile OpenCL C kernels to SPIR-V modules"
+arch=(x86_64)
+url="https://github.com/intel/opencl-clang/"
+license=(custom)
+depends=(clang)
+makedepends=(cmake llvm spirv-llvm-translator git)
+source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha256sums=(da042ff8c7e2db5bf58b01dcb620b37abe155980521d97c41698e62fa31b9547)
+
+prepare() {
+    mkdir -p build
+}
+
+build() {
+    cd build
+    cmake ../${_srcname}-${pkgver} \
+        -DCMAKE_INSTALL_PREFIX=/usr \
+        -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \
+        -DSPIRV_TRANSLATOR_DIR=/usr \
+        -DLLVM_NO_DEAD_STRIP=ON \
+        -Wno-dev
+    make
+}
+
+package() {
+    cd build
+    make DESTDIR="$pkgdir" install
+    
+    # Provide libopencl_clang.so
+    local _sover
+    _sover="$(find -L "${pkgdir}" -type f -name 'libcommon_clang.so.*' | head -n1)"
+    _sover="${_sover##*.}"
+    ln -s libcommon_clang.so "${pkgdir}"/usr/lib/libopencl_clang.so
+    ln -s libcommon_clang.so.${_sover} "${pkgdir}"/usr/lib/libopencl_clang.so.${_sover}
+    
+    install -Dm644 ../${_srcname}-${pkgver}/LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
+}


More information about the arch-commits mailing list