Package Details: dmd-git 20140602-1

Package Base: dmd-git
Description: Ancilliary tools for the D programming language compiler
Upstream URL: http://www.dlang.org
Category: devel
Licenses: custom
Submitter: jpike
Maintainer: jpike
Last Packager: None
Votes: 1
First Submitted: 2013-10-18 01:18
Last Updated: 2014-02-06 09:15

Latest Comments

Comment by rcorre

2015-04-25 18:24

DMD's frontend license was switched from GPL/Artistic to Boost:
http://forum.dlang.org/thread/lndgp4$hiq$1@digitalmars.com
The files gpl.txt and artistic.txt no longer exist.
Instead there is now boostlicense.txt

Comment by jpike

2014-02-06 09:16

Thanks for the notification Kelet, I fixed it now! Isn't D a wonderful language :)

Comment by Kelet

2014-02-06 04:13

Hi, this works great but it is slightly outdated.

install -Dm644 $srcdir/dmd/docs/man/man1/dmd.conf.5 $pkgdir/usr/share/man/man5/dmd.conf.5

Should be changed to

install -Dm644 $srcdir/dmd/docs/man/man5/dmd.conf.5 $pkgdir/usr/share/man/man5/dmd.conf.5

In the GitHub repository, dmd.conf.5 was moved from the man1 folder to a new man5 folder (a correction). This package fails to build because of it.

Thanks for the package, works great otherwise!

Comment by skeksis268

2014-02-02 21:31

could not read dmd-git PKGBUILD: badly packaged tarball

Comment by jpike

2013-10-18 01:19

Okay released "dmd-git" now to replace this. Please remove this package and install dmd-git. Thanks!

Comment by jpike

2013-10-17 23:07

Sorry for the delay in removing the invalid patch. I've produced a simpler package now but currently druntime isn't building so won't be able to test it until the git is fixed.

Anonymous comment

2013-01-03 11:00

It looks like stacktrace.d compiles fine on 64-bit now, so that whole patch section can be removed from the PKGBUILD. Simply remove lines 58-63 and the PKGBUILD seems to work again.

Comment by roysc

2012-10-31 03:05

Fails to build:

==> Making druntime
Cloning into '/home/roy/build/aur/src/druntime-build'...
done.
patching file posix.mak
Hunk #1 succeeded at 175 (offset 30 lines).
Hunk #2 FAILED at 479.
1 out of 2 hunks FAILED -- saving rejects to file posix.mak.rej
==> ERROR: A failure occurred in build().
Aborting...

The file posix.mak.rej:

*** /dev/null
--- /dev/null
***************
*** 479
- $(IMPDIR)/core/sys/windows/stacktrace.di \
--- 0 -----

Comment by Svenstaro

2012-03-31 22:39

This package should be called dmd-git instead. Can you make a new package? I'll then delete this one.

Comment by jpike

2012-01-07 21:50

izenja: yep I know. Split packages gave me a bunch of hassle when I was writing pacmoon.

Anonymous comment

2012-01-07 19:21

I don't know if it helps (you probably already know this), but note that this PKGBUILD actually provides dmd, druntime, and libphobos as separate packages within it. So it will build them all and output 3 package archives.

Comment by jpike

2012-01-07 17:09

Bellum: It's supposed to be that way, you install libphobos separately with this package (some prefer tango etc.).

You can emerge libphobos-git to go with this, or just stick to the dmd2-complete package (although the complete package no longer works for me).

Comment by aaronp

2012-01-04 17:53

Hmm, for whatever reason libphobos isn't being installed for me. I'd had (and removed) dmd2-complete before this. Here's the output of -Ql.

dmd2-git /etc/
dmd2-git /etc/dmd.conf
dmd2-git /usr/
dmd2-git /usr/bin/
dmd2-git /usr/bin/dmd
dmd2-git /usr/share/
dmd2-git /usr/share/man/
dmd2-git /usr/share/man/man1/
dmd2-git /usr/share/man/man1/dmd.1.gz
dmd2-git /usr/share/man/man1/dumpobj.1.gz
dmd2-git /usr/share/man/man1/obj2asm.1.gz
dmd2-git /usr/share/man/man1/rdmd.1.gz
dmd2-git /usr/share/man/man5/
dmd2-git /usr/share/man/man5/dmd.conf.5.gz

Comment by jpike

2011-12-17 20:23

Thanks izenja for making the package in the first place :) I've adopted it now I'll look after it!

Anonymous comment

2011-12-16 18:05

Thank you, jpike. I've updated the package with the required changes and would be happy if you took over as maintainer. I've disowned it - hopefully that's the right way to transfer it.

Comment by jpike

2011-12-16 10:17

I'm happy to take over maintenance of this package, I am exploring cutting edge D stuff daily for at least the next few years as part of a large research project.

Comment by jpike

2011-12-16 10:14

Okay will this destroyed my formatting, but essentially there are two instances of your PATH override which must be changed.

Comment by jpike

2011-12-16 10:13

There is a problem with this PKGBUILD.

If you have dmd already on the system it will use your (old) dmd instead of the git dmd it just built which will often fail. This is why stqn below had problems.

See:

PATH="$PATH:$srcdir/${_gitname[0]}-build/src" make -f posix.mak MODEL=$archstr

Should be:

PATH="$srcdir/${_gitname[0]}-build/src:$PATH" make -f posix.mak MODEL=$archstr

You want your new PATH before the system path. Here is the entire PKGBUILD with my change:

# Maintainer: Zenja Ivkovic <izenja@gmail.com> aka izenja
pkgname=dmd2-git
true && pkgname=('dmd2-git' 'druntime-git' 'libphobos2-git')
pkgver=20111216
pkgrel=1
arch=('i686' 'x86_64')
url="http://www.digitalmars.com/d/2.0/"
license=('GPL')
makedepends=('git')
options=('!strip' 'docs')

_gitroot=("git://github.com/D-Programming-Language/dmd.git" "git://github.com/D-Programming-Language/druntime.git" "git://github.com/D-Programming-Language/phobos.git")
_gitname=('dmd' 'druntime' 'phobos')

if [ $CARCH = 'x86_64' ] ; then
archstr="64"
fi
if [ $CARCH = 'i686' ] ; then
archstr="32"
fi

build() {
cd "$srcdir"
msg "Retrieving from repository: dmd"
if [ -d ${_gitname[0]} ] ; then
cd ${_gitname[0]} && git pull origin
else
git clone ${_gitroot[0]} ${_gitname[0]}
fi

cd "$srcdir"
msg "Retrieving from repository: druntime"
if [ -d ${_gitname[1]} ] ; then
cd ${_gitname[1]} && git pull origin
else
git clone ${_gitroot[1]} ${_gitname[1]}
fi

cd "$srcdir"
msg "Retrieving from repository: phobos"
if [ -d ${_gitname[2]} ] ; then
cd ${_gitname[2]} && git pull origin
else
git clone ${_gitroot[2]} ${_gitname[2]}
fi

msg "Making dmd"
rm -rf "$srcdir/${_gitname[0]}-build"
git clone "$srcdir/${_gitname[0]}" "$srcdir/${_gitname[0]}-build"
cd "$srcdir/${_gitname[0]}-build/src"
make -f posix.mak MODEL=$archstr

msg "Making druntime"
rm -rf "$srcdir/${_gitname[1]}-build"
git clone "$srcdir/${_gitname[1]}" "$srcdir/${_gitname[1]}-build"
cd "$srcdir/${_gitname[1]}-build"
# stacktrace.d fails to compile on 64 bit, at least for me, and probably pointless to have on linux anyway
patch posix.mak <<-'ENDPATCH'
145d144
< src/core/sys/windows/stacktrace.d \
480d478
< $(IMPDIR)/core/sys/windows/stacktrace.di \
ENDPATCH
PATH="$srcdir/${_gitname[0]}-build/src:$PATH" make -f posix.mak MODEL=$archstr

msg "Making phobos"
rm -rf "$srcdir/${_gitname[2]}-build"
git clone "$srcdir/${_gitname[2]}" "$srcdir/${_gitname[2]}-build"
cd "$srcdir/${_gitname[2]}-build"
# phobos' makefile tries to make ../druntime - make that the build directory we use
patch posix.mak <<-ENDPATCH
48c48
< DRUNTIME_PATH = ../druntime
---
> DRUNTIME_PATH = ../${_gitname[1]}-build
ENDPATCH

PATH="$srcdir/${_gitname[0]}-build/src:$PATH" make -f posix.mak MODEL=$archstr
}

package_dmd2-git() {
provides=("dmd2" "d-compiler")
conflicts=("dmd2")
cd "$srcdir/${_gitname[0]}-build/src"
msg "Packaging dmd"

install -Dm755 ./dmd $pkgdir/usr/bin/dmd
echo -e "[Environment]\nDFLAGS=-m$archstr -I/usr/include/d -I/usr/include/d/druntime/import -L-L/usr/lib -L-lrt" > $srcdir/dmd.conf
install -Dm644 $srcdir/dmd.conf $pkgdir/etc/dmd.conf

msg "Packaging dmd man files"
cd "$srcdir/${_gitname[0]}-build/docs/man/man1"
for x in ./*.1 ; do
install -Dm644 $x "$pkgdir/usr/share/man/man1/$(basename $x)"
done
for x in ./*.5 ; do
install -Dm644 $x "$pkgdir/usr/share/man/man5/$(basename $x)"
done
}

package_druntime-git() {
provides=("druntime")
conflicts=("druntime")
msg "Packaging druntime"

install -Dm644 $srcdir/${_gitname[1]}-build/lib/libdruntime.a $pkgdir/usr/lib/libdruntime.a
mkdir -p $pkgdir/usr/include/d/druntime
cp -Rf $srcdir/${_gitname[1]}-build/import $pkgdir/usr/include/d/druntime
}

package_libphobos2-git() {
provides=("libphobos2")
conflicts=("libphobos2" "libtango")
msg "Packaging phobos"

cd "$srcdir/${_gitname[2]}-build"
install -Dm644 ./generated/linux/release/$archstr/libphobos2.a $pkgdir/usr/lib/libphobos2.a
mkdir -p $pkgdir/usr/include/d
cp -Rf std $pkgdir/usr/include/d
cp -Rf etc $pkgdir/usr/include/d
cp -f {crc32,index,unittest}.d $pkgdir/usr/include/d
}

pkgdesc="Digital Mars D compiler, runtime and standard library (git master branch)"

Comment by stqn

2011-10-21 12:18

Thanks for this package!

I had to run makepkg twice, though, to obtain a working environment: I had dmd 2.055 installed; ran makepkg, which worked without any error; installed dmd2-git, druntime2-git and libphobos2-git, but then my program wouldn't build, the linker complaining about undefined functions.

I figured maybe I needed the latest dmd2 installed to build everything correctly (quite a paradox...) so I ran makepkg again, and this time my program builds and works.

Anonymous comment

2011-10-15 08:21

You're welcome. I'm glad to hear that it still works; I haven't been keeping up with it.

Comment by debio264

2011-10-15 06:12

Just wanted to thank you for this. Just built it and I'm enjoying the inout goodness!