summaryrefslogtreecommitdiff
path: root/community/dmd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-26 01:41:32 -0700
committerroot <root@rshg054.dnsready.net>2013-08-26 01:41:32 -0700
commit1d0d7aa1e250616385bce94b4d23f53b3d7b29e2 (patch)
tree1fe52c044982f2f66ae5b0045b7c5c5fae1f2f29 /community/dmd
parenteed3b2a218be9aa9d9d8256f6b8ccd06d04b8804 (diff)
Mon Aug 26 01:39:20 PDT 2013
Diffstat (limited to 'community/dmd')
-rw-r--r--community/dmd/PKGBUILD84
-rw-r--r--community/dmd/soname.diff15
2 files changed, 68 insertions, 31 deletions
diff --git a/community/dmd/PKGBUILD b/community/dmd/PKGBUILD
index ab5be235b..f8c5d7b76 100644
--- a/community/dmd/PKGBUILD
+++ b/community/dmd/PKGBUILD
@@ -1,25 +1,29 @@
-# $Id: PKGBUILD 92844 2013-06-17 00:23:34Z svenstaro $
-# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# $Id: PKGBUILD 96324 2013-08-25 17:11:08Z dicebot $
+# Maintainer: Mihails Strasunse <public@dicebot.lv>
+# Contributor: 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')
+pkgname=('dmd' 'libphobos-devel' 'libphobos' 'dtools')
+groups=('dlang' 'dlang-dmd')
pkgbase=dmd
pkgver=2.063.2
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url="http://www.dlang.org"
-makedepends=('git')
+makedepends=('git' 'gcc' 'make')
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")
+ "git+http://github.com/D-Programming-Language/tools#tag=v$pkgver"
+ "soname.diff")
sha1sums=('SKIP'
'SKIP'
'SKIP'
- 'SKIP')
+ 'SKIP'
+ '5a2198e8a024e1e6494034da569f0df18fabcf9d')
[[ $CARCH == "x86_64" ]] && _archbits="64"
[[ $CARCH == "i686" ]] && _archbits="32"
@@ -32,11 +36,17 @@ build() {
make -f posix.mak MODEL=$_archbits DMD=$srcdir/dmd/src/dmd RELEASE=1
cd $srcdir/phobos
+ # will be in upstream in next release but making naming change as early as possible
+ git apply $srcdir/soname.diff
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
+
+ # rdmd is used to buil others
+ $srcdir/dmd/src/dmd -I../druntime/import -I../phobos -L-L../phobos/generated/linux/release/$_archbits/ -od. -ofdtools-rdmd rdmd.d
+
+ for tool in DustMite/dustmite ddemangle catdoc detab tolf dget; do
+ ./dtools-rdmd --compiler=$srcdir/dmd/src/dmd --build-only -I../druntime/import -I../phobos -L-L../phobos/generated/linux/release/$_archbits/ -od. -ofdtools-`basename $tool` $tool.d
done
}
@@ -44,13 +54,15 @@ package_dmd() {
pkgdesc="The D programming language reference compiler"
backup=('etc/dmd.conf')
depends=('gcc')
+ optdepends=('dtools: collection of useful utilities for development in D' 'libphobos-devel: standard library, development package')
provides=("d-compiler=$pkgver")
license=('custom')
+ backup=('etc/dmd.conf')
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
+ echo -e "[Environment]\nDFLAGS=-I/usr/include/dlang/dmd -I/usr/include/dlang/dmd/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
@@ -58,36 +70,27 @@ package_dmd() {
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
+ install -Dm644 $srcdir/phobos/LICENSE_1_0.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE-phobos
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
+package_libphobos-devel() {
+ pkgdesc="The Phobos standard library for D programming language. Modules and static library."
+ depends=("dmd")
+ license=("custom")
- mkdir -p $pkgdir/usr/include/d
- cp -r $srcdir/phobos/{*.d,etc,std} $pkgdir/usr/include/d
+ install -Dm644 $srcdir/phobos/generated/linux/release/$_archbits/libphobos2.a $pkgdir/usr/lib/libphobos2.a
- mkdir -p $pkgdir/usr/include/d/druntime
- cp -r $srcdir/druntime/import $pkgdir/usr/include/d/druntime
+ mkdir -p $pkgdir/usr/include/dlang/dmd
+ cp -r $srcdir/phobos/{*.d,etc,std} $pkgdir/usr/include/dlang/dmd
- mkdir -p $pkgdir/usr/share/doc/d/
+ mkdir -p $pkgdir/usr/include/dlang/dmd/druntime
+ cp -r $srcdir/druntime/import $pkgdir/usr/include/dlang/dmd/druntime
find $pkgdir/usr -type f | xargs chmod 0644
@@ -95,12 +98,31 @@ package_libphobos() {
install -Dm644 $srcdir/phobos/LICENSE_1_0.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE-phobos
}
+package_libphobos() {
+ pkgdesc="The Phobos standard library for D programming language."
+ depends=("curl")
+ license=("custom")
+
+ install -Dm644 $srcdir/phobos/generated/linux/release/$_archbits/libphobos2.so $pkgdir/usr/lib/libphobos2.so
+ install -Dm644 $srcdir/phobos/LICENSE_1_0.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
+
package_dtools() {
pkgdesc="Ancilliary tools for the D programming language compiler"
- license=("boost")
depends=("curl")
+ license=("custom")
cd $srcdir/tools
+
mkdir -p $pkgdir/usr/bin
- install -m755 -t $pkgdir/usr/bin rdmd ddemangle catdoc detab tolf dget
+ for tool in rdmd ddemangle catdoc detab tolf dget dustmite; do
+ install -m755 -t $pkgdir/usr/bin $pkgname-$tool
+ done
+
+ cd $pkgdir
+ ln -s dtools-rdmd usr/bin/rdmd
+ ln -s dtools-dustmite usr/bin/dustmite
+
+ # same Boost license as Phobos
+ install -Dm644 $srcdir/phobos/LICENSE_1_0.txt usr/share/licenses/$pkgname/LICENSE-phobos
}
diff --git a/community/dmd/soname.diff b/community/dmd/soname.diff
new file mode 100644
index 000000000..7d155a52a
--- /dev/null
+++ b/community/dmd/soname.diff
@@ -0,0 +1,15 @@
+diff --git a/posix.mak b/posix.mak
+index 8fd953e..3776bb4 100644
+--- a/posix.mak
++++ b/posix.mak
+@@ -153,8 +153,8 @@ DDOC=$(DMD)
+ VERSION=../dmd/VERSION
+
+ # Set SONAME, the name of the shared library.
+-# The awk script will produce the last 2 digits of the version string, i.e. 2.063 produces 63
+-SONAME = libphobos2.so.0.$(shell awk -F. '{ print $$NF + 0 }' $(VERSION))
++# The awk script will return the second group without leading zeros of the version string, i.e. 2.063.2 produces 63
++SONAME = libphobos2.so.0.$(shell awk -F. '{ print $$2 + 0 }' $(VERSION))
+
+ # Set LIB, the ultimate target
+ ifeq (,$(findstring win,$(OS)))