updated on Fri Jan 6 08:01:17 UTC 2012
[aur-mirror.git] / gdc2-hg / PKGBUILD
blobb252c2db31d6d48d6f5b67bb01b0227117e5e6d1
1 # Contributor: Jerome Berger <jeberger@free.fr>
2 pkgname=gdc2-hg
3 pkgver=566
4 _gccver=4.5.1
5 pkgrel=1
6 pkgdesc="GDC, Digital Mars D Programing Language (DMD) frontend for GCC (D2 version)"
7 arch=(i686 x86_64)
8 url="http://bitbucket.org/goshawk/gdc/wiki/Home"
9 license="GPL"
10 provides=('gdc')
11 depends=("gcc>=$_gccver")
12 makedepends=('mercurial')
13 conflicts=('gdc' 'gdc-svn' 'gdc1-hg')
14 options=('!libtool' '!emptydirs')
15 source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${_gccver}/gcc-core-${_gccver}.tar.bz2)
16 md5sums=('dc8959e31b01a65ce10d269614815054')
18 _hgroot=http://bitbucket.org/goshawk
19 _hgrepo=gdc
21 build() {
22    cd $srcdir
24    rm -rf $srcdir/gcc-$_gccver-build $srcdir/gcc-build
25    mv $srcdir/gcc-$_gccver $srcdir/gcc-$_gccver-build
26    ln -s $srcdir/gdc/d $srcdir/gcc-$_gccver-build/gcc
28    cd gcc-$_gccver-build
29    ./gcc/d/setup-gcc.sh -v2
31    export MAKEFLAGS="-j1"
33    # Don't install libiberty 
34    sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
36    # Don't run fixincludes
37    sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
39    mkdir ../gcc-build
40    cd ../gcc-build
41    ../gcc-$_gccver-build/configure --prefix=/usr \
42        --enable-languages=d --enable-threads  --enable-__cxa_atexit \
43        --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib \
44        --disable-shared --disable-bootstrap
45    make
48 package() {
49    cd $srcdir/gcc-build
51    DESTDIR=$pkgdir make install-target-libgcc install-target-libphobos
52    DESTDIR=$pkgdir make -C gcc d.install-common d.install-man d.install-normal
53    install -Dm 755 gcc/cc1d $pkgdir/usr/bin/cc1d