summaryrefslogtreecommitdiff
path: root/community/dmd
diff options
context:
space:
mode:
Diffstat (limited to 'community/dmd')
-rw-r--r--community/dmd/PKGBUILD44
-rw-r--r--community/dmd/dmd.install21
2 files changed, 65 insertions, 0 deletions
diff --git a/community/dmd/PKGBUILD b/community/dmd/PKGBUILD
new file mode 100644
index 000000000..43ecb19f7
--- /dev/null
+++ b/community/dmd/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 61677 2012-01-06 12:49:05Z cbrannon $
+# Maintainer: 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
+pkgver=1.072
+pkgrel=1
+pkgdesc="The Digital Mars D compiler."
+arch=('i686' x86_64)
+url="http://www.digitalmars.com/d/1.0/"
+source=(http://ftp.digitalmars.com/$pkgname.$pkgver.zip)
+install='dmd.install'
+provides=('d-compiler')
+license=('custom')
+options=('!strip')
+depends=(gcc-libs)
+optdepends=('libphobos: D standard runtime library'
+ 'libtango: Alternative runtime library')
+
+[[ $CARCH == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc')
+
+build() {
+ # Copy the license.
+ install -Dm644 "$srcdir/dmd/license.txt" "$pkgdir/usr/share/licenses/dmd/LICENSE" || return 1
+
+ if [ $CARCH == x86_64 ]; then
+ cd "$srcdir/dmd/linux/bin64"
+ else
+ cd "$srcdir/dmd/linux/bin32"
+ fi
+ install -dm755 "$pkgdir/usr/bin"
+ install -m755 dmd rdmd dumpobj obj2asm "$pkgdir/usr/bin"
+
+ for x in "$srcdir"/dmd/man/man1/*.1; do
+ install -Dm644 "$x" "$pkgdir/usr/share/man/man1/$(basename "$x")" || return 1
+ done
+
+ for x in "$srcdir"/dmd/man/man1/*.5; do
+ install -Dm644 "$x" "$pkgdir/usr/share/man/man5/$(basename "$x")" || return 1
+ done
+}
+md5sums=('d5489b94f06c7ca2f4b5de62f7e6815a')
diff --git a/community/dmd/dmd.install b/community/dmd/dmd.install
new file mode 100644
index 000000000..62f98d07d
--- /dev/null
+++ b/community/dmd/dmd.install
@@ -0,0 +1,21 @@
+pre_install() {
+ /bin/true
+}
+post_install() {
+ echo '==> Note: dmd does not come with a runtime library!'
+ echo '==> The D language has two competing, incompatible standard libraries.'
+ echo '==> In order for dmd to be useful, you must'
+ echo '==> install either libphobos or libtango, whichever you prefer.'
+}
+pre_upgrade() {
+ /bin/true
+}
+post_upgrade() {
+ /bin/true
+}
+pre_remove() {
+ /bin/true
+}
+post_remove() {
+ /bin/true
+}