summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 56f0c4fe9402624c89b90e71b2cf333ab207d76a (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
38
39
40
41
42
43
44
45
46
47
48
49
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=ispc-git
pkgver=1.19.0.r23.gd43e322c
pkgrel=1
pkgdesc="Intel SPMD program compiler"
arch=('i686' 'x86_64')
url="https://ispc.github.io/"
license=('BSD')
depends=('clang' 'llvm-libs' 'zlib')
makedepends=('git' 'cmake' 'lib32-glibc' 'llvm' 'python')
provides=("ispc=$pkgver")
conflicts=('ispc')
source=("git+https://github.com/ispc/ispc.git")
sha256sums=('SKIP')


pkgver() {
  cd "ispc"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "ispc"

  cmake \
    -B "_build" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DISPC_INCLUDE_EXAMPLES=OFF \
    -DISPC_NO_DUMPS=ON \
    ./
  make -C "_build"
}

check() {
  cd "ispc"

  #make -C "_build" check-all
}

package() {
  cd "ispc"

  make -C "_build" DESTDIR="$pkgdir" install
  install -Dm644 "contrib/ispc.vim" -t "$pkgdir/usr/share/vim/vimfiles/syntax"
  install -Dm644 "LICENSE.txt" -t "$pkgdir/usr/share/licenses/ispc"
}