# Maintainer: Mihails Strasuns # Contributor: Moritz Maxeiner # Contributor: Jerome Berger # Contributor: Jesus Alvarez pkgname=('gdc' 'libgphobos-devel') pkgver=4.8.1 pkgrel=1 arch=('i686' 'x86_64') url="https://github.com/D-Programming-GDC/GDC" license=('GPL') makedepends=('binutils>=2.23' 'git' 'gcc' 'make' 'perl' 'cloog' 'automake') options=('!libtool' '!emptydirs' '!buildflags') _snapshot=4.8-20130725 source=(ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2 gdc::git://github.com/D-Programming-GDC/GDC.git#branch=gdc-4.8 folders.diff) sha256sums=('e4e2202b15f8ba323f88c65de0e4190b0630a4b2e70b0653526b31e946877ead' 'SKIP' 'cd9df3c4129092f9a3ce6f608baa83e12935d7185d0ad3e273799264a21b031e') groups=('dlang' 'dlang-gdc') conflicts=('gdc1-bin' 'gdc1-hg' 'gdc-git') prepare() { cd $srcdir/gcc-$_snapshot # Do not run fixincludes sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in echo $pkgver > gcc/BASE-VER # hack! - some configure tests for header files using "$CPP $CPPFLAGS" sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure cd $srcdir/gdc git apply $srcdir/folders.diff # fix gdc_include_path ./setup-gcc.sh ../gcc-$_snapshot mkdir $srcdir/gcc-build } build() { cd ${srcdir}/gcc-build ${srcdir}/gcc-$_snapshot/configure --prefix=/usr \ --libdir=/usr/lib --libexecdir=/usr/lib \ --mandir=/usr/share/man --infodir=/usr/share/info \ --with-bugurl=https://bugs.archlinux.org/ \ --enable-languages=d \ --enable-shared --enable-threads=posix \ --with-system-zlib --enable-__cxa_atexit \ --disable-libunwind-exceptions --enable-clocale=gnu \ --disable-libstdcxx-pch \ --enable-gnu-unique-object --enable-linker-build-id \ --enable-cloog-backend=isl --disable-cloog-version-check \ --enable-lto --enable-gold --enable-ld=default \ --enable-plugin --with-plugin-ld=ld.gold \ --with-linker-hash-style=gnu --disable-install-libiberty \ --disable-multilib --disable-libssp --disable-werror \ --disable-nls --disable-bootstrap \ --disable-libgomp --disable-libmudflap --disable-libquadmath make } package_gdc() { depends=('libmpc' 'zlib') optdepends=('libgphobos-devel: D standard library, GDC version') install -D -m755 $srcdir/gcc-build/gcc/gdc $pkgdir/usr/bin/gdc install -D -m755 $srcdir/gcc-build/gcc/cc1d $pkgdir/usr/lib/gcc/$CHOST/4.8.1/cc1d } package_libgphobos-devel() { # druntime install -D $srcdir/gdc/libphobos/libdruntime/object.di $pkgdir/usr/include/dlang/gdc/$pkgver/object.di cp -r $srcdir/gdc/libphobos/libdruntime/core $pkgdir/usr/include/dlang/gdc/$pkgver/core cp -r $srcdir/gdc/libphobos/libdruntime/gcc $pkgdir/usr/include/dlang/gdc/$pkgver/gcc # phobos cp $srcdir/gdc/libphobos/crc32.d ${pkgdir}/usr/include/dlang/gdc/$pkgver/crc32.d cp -r $srcdir/gdc/libphobos/std ${pkgdir}/usr/include/dlang/gdc/$pkgver/std cp -r $srcdir/gdc/libphobos/etc ${pkgdir}/usr/include/dlang/gdc/$pkgver/etc install -D -m644 $srcdir/gcc-build/$CHOST/libphobos/libgphobos2.a $pkgdir/usr/lib/libgphobos2.a install -D -m644 $srcdir/gcc-build/$CHOST/libatomic/.libs/libatomic.a $pkgdir/usr/lib/libatomic.a }