updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / gdc / PKGBUILD
blob53ad3524025fb92dfabb229e85d5d6422da00d9f
1 # Contributor: Selman Ulug <selman.ulug@gmail.com>
2 # Contributor: Andrew O'Neil <ajoneil@gmail.com>
3 pkgname=gdc
4 pkgver=0.24
5 _gccver=4.1.2
6 pkgrel=1
7 pkgdesc="GDC, Digital Mars D Programing Language (DMD) frontend for GCC"
8 arch=(i686 x86_64)
9 url="http://dgcc.sourceforge.net"
10 license="GPL"
11 provides=('gdc')
12 depends=('gcc>=4.1.2')
13 conflicts=('gdc-svn')
14 source=(http://optusnet.dl.sourceforge.net/sourceforge/dgcc/$pkgname-$pkgver-src.tar.bz2
15         ftp://gcc.gnu.org/pub/gcc/releases/gcc-${_gccver}/gcc-core-${_gccver}.tar.bz2
16         gcc_pure64.patch)
17 md5sums=('aa4433729015d8b6e7183ab9528ba77c' '2af3fb599635219171c6ae1f3034888a' '1ceaa49e3a1d9f984ecc2893c43f7425')
19 build() {
20   cd $startdir/src
21   cp -r $startdir/src/d $startdir/src/gcc-${_gccver}/gcc
22   cd $startdir/src/gcc-${_gccver}
23   # make patches in dgcc-build if necessary
24   # apply gdc patches
25   ./gcc/d/setup-gcc.sh
26   export MAKEFLAGS="-j1"
27   # Don't install libiberty 
28   sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
29   if [ "${CARCH}" = "x86_64" ]; then
30       patch -Np1 -i ../gcc_pure64.patch || return 1
31   fi
32   # Don't run fixincludes
33   sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
34   mkdir ../gcc-build
35   cd ../gcc-build
36   ../gcc-${_gccver}/configure --prefix=/usr --enable-shared \
37        --enable-languages=d --enable-threads=posix --enable-__cxa_atexit \
38        --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib \
39        --enable-clocale=gnu
40   make all-target-libphobos || return 1
41   make DESTDIR=$startdir/pkg install-target-libphobos || return 1
42   cd gcc
43   make DESTDIR=${startdir}/pkg lang.install-normal lang.install-common lang.install-man
44   install -Dm 755 cc1d $startdir/pkg/usr/lib/gcc/${CHOST}/${_gccver}/