void-packages/srcpkgs/dmd/template

76 lines
2 KiB
Bash
Raw Normal View History

# Template file for 'dmd'
pkgname=dmd
2016-11-03 22:24:48 +00:00
version=2.072.0
revision=1
wrksrc="dmd2"
short_desc="The Digital Mars D compiler"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.digitalmars.com/d/2.0/"
license="GPL-2"
2016-05-26 05:33:13 +00:00
distfiles="http://downloads.dlang.org/releases/2.x/${version}/dmd.${version}.linux.tar.xz"
2016-11-03 22:24:48 +00:00
checksum=70341c2e8a90c46224d60f3bef200d5b2ddd6946b176ac2321e47d8ada2ad512
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
_archbits=64
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
_archbits=32
fi
2014-06-21 08:54:27 +00:00
only_for_archs="i686 x86_64"
conf_files="/etc/dmd.conf"
2016-05-26 05:33:13 +00:00
nopie=yes
hostmakedepends="curl"
depends="libphobos>=${version} gcc"
do_build() {
cd src
cd dmd
2016-05-26 05:33:13 +00:00
make ${makejobs} -f posix.mak MODEL=${_archbits} AUTO_BOOTSTRAP=1
cd ../druntime
make ${makejobs} -f posix.mak MODEL=${_archbits} DMD=../dmd/dmd
cd ../phobos
make ${makejobs} -f posix.mak MODEL=${_archbits} DMD=../dmd/dmd
}
do_install() {
2016-05-26 05:33:13 +00:00
vbin src/dmd/dmd
vinstall ${FILESDIR}/dmd.conf 644 etc
2016-05-26 05:33:13 +00:00
vman man/man1/dmd.1
vman man/man1/rdmd.1
vman man/man5/dmd.conf.5
vmkdir usr/share/d/samples
cp -r samples/d/* ${DESTDIR}/usr/share/d/samples/
2013-01-03 15:47:20 +00:00
find ${DESTDIR}/usr/share/d/samples -type f | xargs chmod 0644
for f in ddemangle dman dumpobj obj2asm rdmd; do
2016-05-26 05:33:13 +00:00
vbin linux/bin${_archbits}/${f}
done
}
libphobos_package() {
short_desc="The phobos D standard library for DMD"
license="Boost License"
pkg_install() {
2016-05-26 05:33:13 +00:00
vinstall ${wrksrc}/src/druntime/generated/linux/release/$_archbits/libdruntime.a 644 usr/lib libdruntime.a
2013-07-09 14:53:54 +00:00
vinstall ${wrksrc}/src/phobos/generated/linux/release/$_archbits/libphobos2.a 644 usr/lib libphobos2.a
vmkdir usr/include/d
2013-07-09 14:53:54 +00:00
cp -r ${wrksrc}/src/phobos/{*.d,etc,std} ${PKGDESTDIR}/usr/include/d
vmkdir usr/include/d/druntime
2013-07-09 14:53:54 +00:00
cp -r ${wrksrc}/src/druntime/import ${PKGDESTDIR}/usr/include/d/druntime
vmkdir usr/share/doc/d/
2013-07-09 14:53:54 +00:00
cp -r ${wrksrc}/html ${PKGDESTDIR}/usr/share/doc/d/
find ${PKGDESTDIR}/usr/share/doc/d -type f | xargs chmod 0644
2016-05-26 05:33:13 +00:00
vlicense ${wrksrc}/src/druntime/LICENSE
}
}