1 # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
2 # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
3 # Contributor: Evangelos Foutras <foutrelis@gmail.com>
4 # Contributor: Sebastian Nowicki <sebnow@gmail.com>
5 # Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us>
6 # Contributor: Tobias Kieslich <tobias@justdreams.de>
7 # Contributor: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org>
8 # Contributor: Tomas Lindquist Olsen <tomas@famolsen.dk>
9 # Contributor: Roberto Alsina <ralsina@kde.org>
10 # Contributor: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
16 pkgdesc="Low Level Virtual Machine with Clang from SVN"
17 arch=('i686' 'x86_64')
18 url="http://llvm.org/"
19 license=('custom:University of Illinois/NCSA Open Source License')
20 depends=('gcc-libs' 'libffi' 'python2' "gcc=$_gcc_ver")
21 makedepends=('svn' 'cmake')
22 conflicts=(llvm llvm-svn llvm-ocaml clang clang-analyzer)
24 md5sums=('02c23b4aaca3445b8bf39fddb2f9906e'
25 '87a7162dbe99e9ffce6c40bd09f5f4f0'
26 '225ee6b531f8327f34f344a18cb4ec81'
27 '8f7582d7440e4a8342c3aea9ec714fb4'
28 '9d153103dda0c088562f1feb1129b67e')
30 _svntrunk="http://llvm.org/svn/llvm-project"
39 msg2 "Connecting to LLVM.org SVN server...."
41 if [ -d $_svnmod/.svn ]; then
42 (cd $_svnmod && svn update -r $pkgver) || warning "Update failed!"
44 svn co $_svntrunk/$_svnmod/trunk $_svnmod --config-dir ./ -r $pkgver
47 if [ -d $_cfemod/.svn ]; then
48 (cd $_cfemod && svn update -r $pkgver) || warning "Update failed!"
50 svn co $_svntrunk/$_cfemod/trunk $_cfemod --config-dir ./ -r $pkgver
53 if [ -d $_crtmod/.svn ]; then
54 (cd $_crtmod && svn update -r $pkgver) || warning "Update failed!"
56 svn co $_svntrunk/$_crtmod/trunk $_crtmod --config-dir ./ -r $pkgver
59 #if [ -d $_cxxmod/.svn ]; then
60 # (cd $_cxxmod && svn update -r $pkgver) || warning "Update failed!"
62 # svn co $_svntrunk/$_cxxmod/trunk $_cxxmod --config-dir ./ -r $pkgver
65 msg2 "SVN checkout done or server timeout"
68 svn export $_svnmod $_svnmod-build
69 svn export $_cfemod $_svnmod-build/tools/clang
70 svn export $_crtmod $_svnmod-build/projects/compiler-rt
71 #svn export $_cxxmod $_svnmod-build/projects/libcxx
75 sed -i "s|/usr/local/include|/usr/include/c++/$_gcc_ver|g" tools/clang/lib/Frontend/InitHeaderSearch.cpp
77 msg2 "Starting build..."
79 [[ -d build ]] && rm -r build
80 mkdir build && cd build
83 -DCMAKE_INSTALL_PREFIX=/usr \
84 -DCMAKE_BUILD_TYPE=Release \
85 -LLVM_ENABLE_ASSERTIONS=OFF \
87 -DPYTHON_EXECUTABLE=/usr/bin/python2 \
92 cd "$srcdir/$_svnmod-build"
96 make DESTDIR=$pkgdir install
100 install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
103 # vim:set ts=2 sw=2 et: