updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / ldc-hg / PKGBUILD
blobd3335569f5a7dfdd08a2865aaafa5f7f10d3a5fc
1 # Contributor: BeholdMyGlory <larvid@gmail.com>
2 pkgname=ldc-hg
3 pkgver=1629
4 pkgrel=1
5 pkgdesc="A D Compiler based on the LLVM Compiler Infrastructure"
6 arch=('i686' 'x86_64')
7 url="http://www.dsource.org/projects/ldc"
8 license=('BSD')
9 depends=('llvm')
10 makedepends=('libconfig' 'cmake' 'mercurial')
11 provides=('ldc')
12 optdepends=('libtango-ldc-svn: Runtime library')
13 source=('CMakeLists.patch')
14 md5sums=('61be322267025571bd9261eb122af2d1')
16 _hgroot="http://hg.dsource.org/projects"
17 _hgrepo="ldc"
19 build() {
20   unset LDFLAGS
22   cd "$srcdir"
23   msg "Connecting to Mercurial server...."
25   if [ -d $_hgrepo ] ; then
26     cd $_hgrepo && hg pull -u
27     msg "The local files are updated."
28   else
29     hg clone $_hgroot/$_hgrepo
30   fi
32   msg "Mercurial checkout done or server timeout"
33   msg "Starting make..."
35   cd "$srcdir/$_hgrepo"
37   patch CMakeLists.txt $srcdir/CMakeLists.patch
39   cmake -DCMAKE_CXX_FLAGS:string=-DLLVM_REV=84989 -DCMAKE_INSTALL_PREFIX=/usr ./ || return 1
40   make || return 1
41   make DESTDIR="$pkgdir/" install || return 1
43