1 # Contributor: Jerome Berger <jeberger@free.fr>
6 pkgdesc="GDC, Digital Mars D Programing Language (DMD) frontend for GCC (D1 version)"
8 url="http://bitbucket.org/goshawk/gdc/wiki/Home"
11 depends=("gcc>=$_gccver")
12 makedepends=('mercurial')
13 conflicts=('gdc' 'gdc-svn' 'gdc2-hg')
14 options=('!libtool' '!emptydirs')
15 source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${_gccver}/gcc-core-${_gccver}.tar.bz2
17 md5sums=('dc8959e31b01a65ce10d269614815054'
18 '53aa15db4c14ed98ee8bda2707537a2e')
20 _hgroot=http://bitbucket.org/goshawk
26 rm -rf $srcdir/gcc-$_gccver-build $srcdir/gcc-build
27 mv $srcdir/gcc-$_gccver $srcdir/gcc-$_gccver-build
28 ln -s $srcdir/gdc/d $srcdir/gcc-$_gccver-build/gcc
33 export MAKEFLAGS="-j1"
35 # Don't install libiberty
36 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
38 # Don't run fixincludes
39 sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
43 # Note: the "CC=$(which gcc)" is necessary to work around a gcc bug that
44 # causes the build to fail if "." is in the path.
45 CC=$(which gcc) ../gcc-$_gccver-build/configure --prefix=/usr \
46 --enable-languages=d --enable-threads=posix --enable-__cxa_atexit \
47 --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib \
48 --disable-shared --disable-bootstrap
55 DESTDIR=$pkgdir make install-target-libgcc install-target-libphobos
56 DESTDIR=$pkgdir make -C gcc d.install-common d.install-man d.install-normal
57 install -Dm 755 gcc/cc1d $pkgdir/usr/bin/cc1d
60 if [[ $CARCH == "x86_64" ]]; then
61 mv lib64/libgphobos.a lib/libgphobos.a
65 cd $pkgdir/usr/include/d/${_gccver}
66 mv object.d object.d.phobos
67 ln -s object.d.phobos object.d
71 install -Dm 755 $startdir/gdc-stdlib $pkgdir/usr/bin