2014-02-23 17:50:30 +00:00
|
|
|
# Maintainer: Mihails Strasuns <public@dicebot.lv>
|
|
|
|
# Contributor: Moritz Maxeiner <moritz@ucworks.org>
|
|
|
|
# Contributor: Jerome Berger <jeberger@free.fr>
|
|
|
|
# Contributor: Jesus Alvarez <jeezusjr@gmail.com>
|
|
|
|
|
|
|
|
# ALARM: Johannes Pfau <johannespfau@gmail.com>
|
|
|
|
# - specifid build host
|
|
|
|
# - replaced bugurl with our GitHub issue page
|
|
|
|
|
2015-05-29 00:09:53 +00:00
|
|
|
noautobuild=1
|
2014-05-02 21:37:20 +00:00
|
|
|
|
2014-02-23 17:50:30 +00:00
|
|
|
pkgname=('gdc' 'libgphobos-devel')
|
2015-05-29 00:09:53 +00:00
|
|
|
pkgver=5.1.0
|
2015-06-04 15:23:50 +00:00
|
|
|
pkgrel=2
|
2014-02-23 17:50:30 +00:00
|
|
|
arch=('i686' 'x86_64')
|
|
|
|
url="https://github.com/D-Programming-GDC/GDC"
|
|
|
|
license=('GPL')
|
2015-04-25 00:45:00 +00:00
|
|
|
makedepends=('binutils>=2.23' 'git' 'gcc' 'make' 'perl' 'automake')
|
2014-02-23 17:50:30 +00:00
|
|
|
options=('!emptydirs' '!buildflags')
|
|
|
|
_snapshot=4.8-20130725
|
2014-03-03 02:02:35 +00:00
|
|
|
source=(
|
2014-05-02 21:37:20 +00:00
|
|
|
"ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2"
|
2015-06-04 15:23:50 +00:00
|
|
|
"gdc::git://github.com/D-Programming-GDC/GDC.git#tag=v2.066.1_gcc"
|
2014-03-03 02:02:35 +00:00
|
|
|
"git+https://github.com/D-Programming-GDC/GDMD.git"
|
|
|
|
"folders.diff"
|
2015-06-04 15:23:50 +00:00
|
|
|
"system_zlib.diff"
|
2014-03-03 02:02:35 +00:00
|
|
|
)
|
|
|
|
sha256sums=(
|
2015-05-29 00:09:53 +00:00
|
|
|
'b7dafdf89cbb0e20333dbf5b5349319ae06e3d1a30bf3515b5488f7e89dca5ad'
|
2014-03-03 02:02:35 +00:00
|
|
|
'SKIP'
|
|
|
|
'SKIP'
|
2015-04-25 00:45:00 +00:00
|
|
|
'ea5c80a28026393bd4627485602660a4a01d9fbc65299e95e768013e197bad20'
|
2015-06-04 15:23:50 +00:00
|
|
|
'1bf81cde6a7bad096f76db2f20ad8ab2801cd0ab2dd2fa0219503073e8dae480'
|
2014-03-03 02:02:35 +00:00
|
|
|
)
|
2014-02-23 17:50:30 +00:00
|
|
|
|
|
|
|
groups=('dlang' 'dlang-gdc')
|
|
|
|
conflicts=('gdc1-bin' 'gdc1-hg' 'gdc-git')
|
|
|
|
|
|
|
|
prepare()
|
|
|
|
{
|
2014-05-02 21:37:20 +00:00
|
|
|
cd $srcdir/gcc-$pkgver
|
2014-02-23 17:50:30 +00:00
|
|
|
|
2014-05-02 21:37:20 +00:00
|
|
|
echo ${pkgver} > gcc/BASE-VER
|
2014-02-23 17:50:30 +00:00
|
|
|
|
|
|
|
# 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
|
2015-06-04 15:23:50 +00:00
|
|
|
git apply $srcdir/system_zlib.diff # use correct system zlib
|
2014-05-02 21:37:20 +00:00
|
|
|
./setup-gcc.sh ../gcc-$pkgver
|
2014-02-23 17:50:30 +00:00
|
|
|
|
|
|
|
mkdir $srcdir/gcc-build
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
build()
|
|
|
|
{
|
|
|
|
# ALARM: Specify build host types
|
|
|
|
[[ $CARCH == "arm" ]] && CONFIGFLAG="--host=armv5tel-unknown-linux-gnueabi --build=armv5tel-unknown-linux-gnueabi"
|
|
|
|
[[ $CARCH == "armv6h" ]] && CONFIGFLAG="--host=armv6l-unknown-linux-gnueabihf --build=armv6l-unknown-linux-gnueabihf --with-arch=armv6 --with-float=hard --with-fpu=vfp"
|
|
|
|
[[ $CARCH == "armv7h" ]] && CONFIGFLAG="--host=armv7l-unknown-linux-gnueabihf --build=armv7l-unknown-linux-gnueabihf --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16"
|
|
|
|
|
|
|
|
cd ${srcdir}/gcc-build
|
|
|
|
|
2014-05-02 21:37:20 +00:00
|
|
|
${srcdir}/gcc-$pkgver/configure --prefix=/usr \
|
2014-02-23 17:50:30 +00:00
|
|
|
--libdir=/usr/lib --libexecdir=/usr/lib \
|
|
|
|
--mandir=/usr/share/man --infodir=/usr/share/info \
|
|
|
|
--with-bugurl=https://github.com/archlinuxarm/PKGBUILDs/issues \
|
|
|
|
--enable-languages=d \
|
|
|
|
--enable-shared --enable-threads=posix \
|
|
|
|
--with-system-zlib --enable-__cxa_atexit \
|
|
|
|
--disable-libunwind-exceptions --enable-clocale=gnu \
|
2014-03-03 02:02:35 +00:00
|
|
|
--disable-libstdcxx-pch --disable-libssp \
|
2014-02-23 17:50:30 +00:00
|
|
|
--enable-gnu-unique-object --enable-linker-build-id \
|
|
|
|
--enable-cloog-backend=isl --disable-cloog-version-check \
|
2014-05-02 21:37:20 +00:00
|
|
|
--enable-gold --enable-plugin --enable-ld=default \
|
2014-03-03 02:02:35 +00:00
|
|
|
--enable-install-libiberty --with-plugin-ld=ld.gold \
|
|
|
|
--with-linker-hash-style=gnu \
|
|
|
|
--disable-multilib --disable-werror \
|
2014-02-23 17:50:30 +00:00
|
|
|
--disable-nls --disable-bootstrap \
|
2014-03-03 02:02:35 +00:00
|
|
|
--disable-libgomp --disable-libmudflap --disable-libquadmath \
|
|
|
|
--enable-checking=release $CONFIGFLAG
|
2014-02-23 17:50:30 +00:00
|
|
|
|
2015-05-29 00:09:53 +00:00
|
|
|
make -j 4
|
2014-02-23 17:50:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_gdc()
|
|
|
|
{
|
2014-03-03 02:02:35 +00:00
|
|
|
depends=('gcc' 'perl' 'binutils' 'libgphobos-devel')
|
2014-02-23 17:50:30 +00:00
|
|
|
optdepends=('libgphobos-devel: D standard library, GDC version')
|
|
|
|
provides=("d-compiler")
|
2014-09-14 15:54:53 +00:00
|
|
|
pkgdesc="Compiler for D programming language which uses gcc backend (2.065 frontend version)"
|
2014-02-23 17:50:30 +00:00
|
|
|
|
|
|
|
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/$pkgver/cc1d
|
2014-03-03 02:02:35 +00:00
|
|
|
|
|
|
|
# tools
|
|
|
|
install -D -m755 $srcdir/GDMD/dmd-script $pkgdir/usr/bin/gdmd
|
|
|
|
install -D -m644 $srcdir/GDMD/dmd-script.1 $pkgdir/usr/share/man/man1/gdmd.1
|
2014-02-23 17:50:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_libgphobos-devel()
|
|
|
|
{
|
|
|
|
pkgdesc="Standard library for D programming language, GDC port"
|
|
|
|
provides=("d-runtime" "d-stdlib")
|
|
|
|
options=("staticlibs")
|
|
|
|
|
|
|
|
# druntime
|
|
|
|
install -D $srcdir/gdc/libphobos/libdruntime/object.di $pkgdir/usr/include/dlang/gdc/object.di
|
|
|
|
install -D $srcdir/gdc/libphobos/libdruntime/__entrypoint.di ${pkgdir}/usr/include/dlang/gdc/__entrypoint.di
|
|
|
|
cp -r $srcdir/gdc/libphobos/libdruntime/core $pkgdir/usr/include/dlang/gdc/core
|
|
|
|
cp -r $srcdir/gdc/libphobos/libdruntime/gcc $pkgdir/usr/include/dlang/gdc/gcc
|
|
|
|
|
|
|
|
# workaround for auto-generated libbacktrace issue
|
|
|
|
# script needs to be re-written to first call normal gcc instalaltion targets to
|
|
|
|
# avoid such problems in future
|
|
|
|
cp $srcdir/gcc-build/$CHOST/libphobos/libdruntime/gcc/libbacktrace.d $pkgdir/usr/include/dlang/gdc/gcc/
|
|
|
|
rm $pkgdir/usr/include/dlang/gdc/gcc/libbacktrace.d.in
|
|
|
|
|
|
|
|
# phobos
|
2014-07-24 00:19:58 +00:00
|
|
|
# cp $srcdir/gdc/libphobos/src/crc32.d ${pkgdir}/usr/include/dlang/gdc/
|
2014-02-23 17:50:30 +00:00
|
|
|
cp -r $srcdir/gdc/libphobos/src/std ${pkgdir}/usr/include/dlang/gdc/std
|
|
|
|
cp -r $srcdir/gdc/libphobos/src/etc ${pkgdir}/usr/include/dlang/gdc/etc
|
|
|
|
|
|
|
|
install -D -m644 $srcdir/gcc-build/$CHOST/libphobos/src/libgphobos2.a $pkgdir/usr/lib/libgphobos2.a
|
|
|
|
}
|