summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAndrew Sun2018-04-13 19:20:34 -0400
committerAndrew Sun2018-04-13 19:20:34 -0400
commit8f2f1cada8e1b10c2b4bc0181ad7e288f162ba73 (patch)
treecc86b3de6aabea8649d774c2815c05d30266174e /PKGBUILD
downloadaur-8f2f1cada8e1b10c2b4bc0181ad7e288f162ba73.tar.gz
add lib32-libclc
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d828597a3f0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Andrew Sun <adsun701@gmail.com>
+
+pkgname=lib32-libclc
+pkgver=0.2.0+506+96d10f2
+pkgrel=1
+pkgdesc="Library requirements of the OpenCL C programming language"
+arch=('any')
+url="http://libclc.llvm.org/"
+license=('MIT')
+makedepends=('clang' 'llvm' 'python2' 'git')
+depends=('lib32-clang' 'lib32-llvm' 'lib32-python2' 'libclc')
+options=('staticlibs')
+source=('git+http://llvm.org/git/libclc.git#commit=96d10f2')
+md5sums=('SKIP')
+
+pkgver() {
+ cd ${srcdir}/libclc
+
+ echo 0.2.0+$(git rev-list --count HEAD)+$(git describe --always)
+}
+
+build() {
+ cd ${srcdir}/libclc
+
+ export CC='gcc -m32'
+ export CXX='g++ -m32'
+ export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
+ export LDFLAGS+=' -m32'
+
+ sed -i 's/"python < $in >/sys.executable + " < $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 ${srcdir}/libclc
+
+ make install DESTDIR="$pkgdir"
+ rm -rf "${pkgdir}"/usr/{bin,include,share}
+}
+