summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dfe17826bc5225ea38e23028106522d20ebb0b8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: satcom886 <rostik.medved@gmail.com>
# Contributor: bronze <jlbakker@gmail.com>
# Contributor: telsch <telsch@gmx.de>

pkgname=vc4cl-git
pkgver=r175.76edc68
pkgrel=3
pkgdesc="VC4CL is an implementation of the OpenCL 1.2 standard for the VideoCore IV GPU."
arch=('any')
url="https://github.com/doe300/VC4CL"
license=('MIT')
groups=()
depends=('vc4c-git')
makedepends=('make' 'git' 'gcc' 'cmake' 'llvm' 'opencl-headers' 'pkg-config')
optdepends=()
provides=('opencl-pi' 'opencl-vc4' 'opencl-driver' 'vc4-opencl' 'vc4cl')
source=("VC4CL::git+https://github.com/doe300/VC4CL" "VC4CL.icd")
md5sums=('SKIP' 'SKIP')

pkgver() {
	cd "$srcdir/VC4CL"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    mkdir -p "$srcdir/VC4CL/build"
	cd "$srcdir/VC4CL/build"
	cmake "$srcdir/VC4CL" -DCMAKE_BUILD_TYPE=Release -DMULTI_THREADED=true -DCLANG_FOUND=/usr/bin/clang -DVC4CL_STDLIB_DIR=/usr/local/include/vc4cl-stdlib
	make
}

package() {
    mkdir -m 755 -p "$pkgdir/etc/OpenCL/vendors/"
    install -m 644 "$srcdir/VC4CL.icd" "$pkgdir/etc/OpenCL/vendors/"
    cd "$srcdir/VC4CL/build"
    make DESTDIR="$pkgdir"/ install
}