diff options
author | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
commit | 7a65a910b77ad191d69881098c47f9b0c852d92e (patch) | |
tree | 9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/dmd/PKGBUILD | |
parent | 60da6abff6c9577a783d72865f11de7a585e912e (diff) |
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/dmd/PKGBUILD')
-rw-r--r-- | community/dmd/PKGBUILD | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/community/dmd/PKGBUILD b/community/dmd/PKGBUILD new file mode 100644 index 000000000..ab5be235b --- /dev/null +++ b/community/dmd/PKGBUILD @@ -0,0 +1,106 @@ +# $Id: PKGBUILD 92844 2013-06-17 00:23:34Z svenstaro $ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +# Contributor: Chris Brannon <cmbrannon79@gmail.com> +# Contributor: Andrea Scarpino <andrea@archlinux.org> +# Contributor: Anders Bergh <anders1@gmail.com> +# Contributor: Alexander Fehr <pizzapunk gmail com> + +pkgname=('dmd' 'libphobos' 'dtools') +pkgbase=dmd +pkgver=2.063.2 +pkgrel=1 +arch=('i686' 'x86_64') +url="http://www.dlang.org" +makedepends=('git') +source=("git+http://github.com/D-Programming-Language/dmd.git#tag=v$pkgver" + "git+http://github.com/D-Programming-Language/druntime.git#tag=v$pkgver" + "git+http://github.com/D-Programming-Language/phobos.git#tag=v$pkgver" + "git+http://github.com/D-Programming-Language/tools#tag=v$pkgver") +sha1sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP') + +[[ $CARCH == "x86_64" ]] && _archbits="64" +[[ $CARCH == "i686" ]] && _archbits="32" + +build() { + cd $srcdir/dmd/src + make -f posix.mak MODEL=$_archbits RELEASE=1 + + cd $srcdir/druntime + make -f posix.mak MODEL=$_archbits DMD=$srcdir/dmd/src/dmd RELEASE=1 + + cd $srcdir/phobos + make -f posix.mak MODEL=$_archbits DMD=$srcdir/dmd/src/dmd RELEASE=1 + + cd $srcdir/tools + for tool in rdmd.d ddemangle.d catdoc.d detab.d tolf.d dget.d; do + $srcdir/dmd/src/dmd -I../druntime/import -I../phobos -L-L../phobos/generated/linux/release/$_archbits/ $tool + done +} + +package_dmd() { + pkgdesc="The D programming language reference compiler" + backup=('etc/dmd.conf') + depends=('gcc') + provides=("d-compiler=$pkgver") + license=('custom') + + install -Dm755 $srcdir/dmd/src/dmd $pkgdir/usr/bin/dmd + + mkdir -p $pkgdir/etc + echo -e "[Environment]\nDFLAGS=-I/usr/include/d -I/usr/include/d/druntime/import -L-L/usr/lib -L-L/usr/lib32 -L--no-warn-search-mismatch -L--export-dynamic" > $pkgdir/etc/dmd.conf + + install -Dm644 $srcdir/dmd/docs/man/man1/dmd.1 $pkgdir/usr/share/man/man1/dmd.1 + install -Dm644 $srcdir/dmd/docs/man/man1/dmd.conf.5 $pkgdir/usr/share/man/man5/dmd.conf.5 + + install -Dm644 $srcdir/dmd/src/backendlicense.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE-backend + install -Dm644 $srcdir/dmd/src/gpl.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE-frontend.1 + install -Dm644 $srcdir/dmd/src/artistic.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE-frontend.2 + + mkdir -p $pkgdir/usr/share/d/samples/ + cp -r $srcdir/dmd/samples/* $pkgdir/usr/share/d/samples/ + + find $pkgdir/usr -type f | xargs chmod 0644 + chmod 755 $pkgdir/usr/bin/* + + # No longer available, because not source code is provided and those are not mandatory. + # Please get those from http://dlang.org if absolutely needed. + + # install -Dm755 $srcdir/dmd/linux/bin${_archbits}/dumpobj $pkgdir/usr/bin/dumpobj + # install -Dm755 $srcdir/dmd/linux/bin${_archbits}/obj2asm $pkgdir/usr/bin/obj2asm +} + +# Will be packaged separately once GDC/LDC will be able to compile phobos and pass test suite. +# For now only dependency is relaxed +package_libphobos() { + depends=("d-compiler>=$pkgver" "curl") + pkgdesc="The Phobos standard library for D programming language" + license=("boost") + install -Dm644 $srcdir/phobos/generated/linux/release/$_archbits/libphobos2.a $pkgdir/usr/lib/libphobos2.a + install -Dm644 $srcdir/phobos/generated/linux/release/$_archbits/libphobos2.so $pkgdir/usr/lib/libphobos2.so + + mkdir -p $pkgdir/usr/include/d + cp -r $srcdir/phobos/{*.d,etc,std} $pkgdir/usr/include/d + + mkdir -p $pkgdir/usr/include/d/druntime + cp -r $srcdir/druntime/import $pkgdir/usr/include/d/druntime + + mkdir -p $pkgdir/usr/share/doc/d/ + + find $pkgdir/usr -type f | xargs chmod 0644 + + install -Dm644 $srcdir/druntime/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE-druntime + install -Dm644 $srcdir/phobos/LICENSE_1_0.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE-phobos +} + +package_dtools() { + pkgdesc="Ancilliary tools for the D programming language compiler" + license=("boost") + depends=("curl") + + cd $srcdir/tools + mkdir -p $pkgdir/usr/bin + install -m755 -t $pkgdir/usr/bin rdmd ddemangle catdoc detab tolf dget +} |