archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / intel-opencl-clang / trunk / PKGBUILD
blob3ac319e5031c62f85193c0b0b206b9ec581ef5b2
1 # Maintainer: Daniel Bermond <dbermond@archlinux.org>
2 # Maintainer: Bruno Pagani <archange@archlinux.org>
4 _srcname=opencl-clang
5 pkgname=intel-${_srcname}
6 pkgver=15.0.0
7 pkgrel=1
8 pkgdesc="Wrapper library around clang that can compile OpenCL C kernels to SPIR-V modules"
9 arch=(x86_64)
10 url="https://github.com/intel/opencl-clang"
11 license=(custom)
12 depends=(clang llvm-libs spirv-llvm-translator)
13 makedepends=(cmake llvm git)
14 # Current point in the used LLVM branch
15 _commit=c78c1f884ffe8b40e1681a90ebde1a919c08ddb1
16 source=(git+${url}.git#commit=$_commit)
17 sha256sums=(SKIP)
19 pkgver() {
20   cd ${_srcname}
21   git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./;s/-/+/'
24 build() {
25   cmake -B build -S ${_srcname} \
26     -DCMAKE_INSTALL_PREFIX=/usr \
27     -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \
28     -DSPIRV_TRANSLATOR_DIR=/usr \
29     -DLLVM_NO_DEAD_STRIP=ON \
30     -DPREFERRED_LLVM_VERSION=15.0.6 \
31     -Wno-dev
32   make -C build
35 package() {
36   make -C build DESTDIR="${pkgdir}" install
37   install -Dm644 ${_srcname}/LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}