summaryrefslogtreecommitdiff
path: root/libre-multilib/lib32-libclc-svn/PKGBUILD
blob: c1c7e021c1ab8210d123d716b7236b8814f0d1e4 (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
# Maintainer: Márcio Silva <coadde@lavabit.com>

_pkgname=libclc
pkgname=lib32-$_pkgname-svn
pkgver=$(LC_ALL=C date -u +%Y%m%d)
pkgrel=2
arch=x86_64
pkgdesc='Library requirements of the OpenCL C programming language (32-bit)'
url=http://libclc.llvm.org/
license=MIT
depends=(lib32-llvm-libs libclc-svn)
makedepends=(clang lib32-llvm python2 svn)
provides=(lib32-$_pkgname)
conflicts=lib32-$_pkgname
source=$_pkgname::svn+http://llvm.org/svn/llvm-project/libclc/trunk
sha512sums=SKIP

prepare() {
  sed -i 's|/usr/bin/python|/usr/bin/python2|g;
         ' $srcdir/$_pkgname/{configure,build/ninja_syntax}.py
}

build() {
  export CC="gcc -m32"
  export CXX="g++ -m32"

  cd $srcdir/$_pkgname
  ./configure.py --prefix=/usr\
    --libexecdir=/usr/lib32/clc\
    --pkgconfigdir=/usr/lib32/pkgconfig\
    --with-llvm-config=/usr/bin/llvm-config32
  make
}

package() {
  cd $srcdir/$_pkgname
  make DESTDIR=$pkgdir install
  install -vDm644 LICENSE.TXT $pkgdir/usr/share/licenses/$pkgname/LICENSE
  msg 'remove useless include dir'
  rm -vrf $pkgdir/usr/include
}