summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSimon Reiser2019-02-27 13:36:14 +0100
committerSimon Reiser2019-02-27 13:36:14 +0100
commit500cd87fea2aa4a1f4825060d5c768ae9944553a (patch)
treef686577c956d57161a41229c8933fedeea758b46 /PKGBUILD
downloadaur-pocl-cuda-git.tar.gz
Genesis
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..44b603bbc52
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Simon Reiser <simonfxr AT gmail DOT com>
+
+pkgname=pocl-cuda-git
+_pkgname=pocl
+pkgver=v1.2.r156.ga0b083a1
+pkgrel=1
+pkgdesc="Portable OpenCL is an open-source implementation of OpenCL which can be easily adapted for new targets (git version)"
+arch=('i686' 'x86_64')
+url="http://portablecl.org/"
+license=('GPL')
+depends=('clang' 'opencl-icd-loader' 'hwloc' 'libltdl' 'opencl-headers' 'cuda')
+makedepends=('git' 'cmake' 'llvm' 'ocl-icd')
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+source=("$_pkgname::git+https://github.com/pocl/pocl.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$_pkgname"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ mkdir -p build
+ cd build
+
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DPOCL_INSTALL_ICD_VENDORDIR='/etc/OpenCL/vendors' \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DENABLE_CUDA=True \
+ "$srcdir/$_pkgname"
+ make
+}
+
+package() {
+ cd "$srcdir/build"
+ make DESTDIR="$pkgdir"/ install
+}