updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / klee-svn / PKGBUILD
blob639e81b89dff1b58d958347fdfe2781257bea9dd
1 # Contributor: Tavian Barnes <tavianator@gmail.com>
2 pkgname=klee-svn
3 pkgver=115542
4 pkgrel=1
5 pkgdesc="A symbolic virtual machine on top of LLVM"
6 arch=('i686' 'x86_64')
7 url="http://klee.llvm.org/"
8 license=('custom')
9 groups=()
10 depends=()
11 makedepends=('subversion' 'llvm-gcc')
12 provides=()
13 conflicts=()
14 replaces=()
15 backup=()
16 options=('!strip')
17 install=
18 _uclibc="http://t1.minormatter.com/~ddunbar/klee-uclibc-0.01.tgz"
19 [ "$CARCH" = "x86_64" ] && _uclibc="http://www.doc.ic.ac.uk/~cristic/klee-uclibc-0.01-x64.tgz"
20 source=($_uclibc
21         "http://llvm.org/releases/2.7/llvm-2.7.tgz")
22 md5sums=('44a86323142ada27f7666b2c3d2c40ea'
23          'ac322661f20e7d6c810b1869f886ad9b')
25 _svntrunk="http://llvm.org/svn/llvm-project/klee/trunk"
26 _svnmod=klee
28 build() {
29   cd "$srcdir"
31   if [ -d $_svnmod/.svn ]; then
32     (cd $_svnmod && svn up -r $pkgver)
33   else
34     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
35   fi
37   msg "SVN checkout done or server timeout"
38   msg "Starting make..."
40   cd "$srcdir/llvm-2.7"
41   ./configure --enable-optimized
42   make
44   cd "$srcdir/klee-uclibc"
45   ./configure --with-llvm=../llvm-2.7
46   make
48   rm -rf "$srcdir/$_svnmod-build"
49   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
50   cd "$srcdir/$_svnmod-build"
52   #
53   # BUILD
54   #
55   ./configure --prefix=/usr \
56               --with-llvm=../llvm-2.7 \
57               --with-uclibc=../klee-uclibc \
58               --enable-posix-runtime
59   make ENABLE_OPTIMIZED=1
60   make check
61   make unittests
62   sed -i 's|PROJ_INSTALL_ROOT := \(.*\)|PROJ_INSTALL_ROOT := '"$pkgdir/"'\1|g' Makefile.config
65 package() {
66   cd "$srcdir/$_svnmod-build"
67   make -k install || true