summaryrefslogtreecommitdiff
path: root/libre-multilib/lib32-libclc/PKGBUILD
blob: 949034f8c4e998cdfbf122c356a16e3446251b96 (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
# Maintainer: Márcio Silva <coadde@parabola.nu>
# Contributor: André Silva <emulatorman@parabola.nu>

pkgname=lib32-libclc
pkgver=0.2.0+274+4346c30
pkgrel=1
pkgdesc="Library requirements of the OpenCL C programming language (32-bit)"
arch=('x86_64')
url="http://libclc.llvm.org/"
license=('MIT')
makedepends=('lib32-clang' 'lib32-llvm' 'python2' 'git' 'libclc')
options=('staticlibs')
replaces=(lib32-libclc-svn)
provides=(lib32-libclc-svn)
conflicts=(lib32-libclc-svn)
source=('git+http://llvm.org/git/libclc#commit=4346c30')
md5sums=(SKIP)

pkgver() {
  cd libclc

  echo 0.2.0+$(git rev-list --count HEAD)+$(git describe --always)
  #git describe --long | sed 's/-/+/g'
}

build() {
  cd libclc
  
  sed -i 's/"python < $in >/sys.executable + " < $in >/g' configure.py
#  sed -i 's/python < $in >/python2 < $in >/g' configure.py
  
  python2 ./configure.py --prefix=/usr \
   --libexecdir=/usr/lib32/clc \
   --pkgconfigdir=/usr/lib32/pkgconfig \
   --with-llvm-config=/usr/bin/llvm-config32 \
   --with-cxx-compiler="/usr/bin/g++ -m32"
  make
}

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