void-packages/srcpkgs/dmd/template

81 lines
2 KiB
Text
Raw Normal View History

# Template file for 'dmd'
pkgname=dmd
2013-07-09 14:34:31 +00:00
version=2.062
revision=1
wrksrc="dmd2"
short_desc="The Digital Mars D compiler"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.digitalmars.com/d/2.0/"
license="GPL-2"
distfiles="http://ftp.digitalmars.com/dmd.${version}.zip"
2013-07-09 14:34:31 +00:00
checksum="43249dd1f5ca111006b6a5b7125f8e9326badadb6d9db2105ba93569addc50af"
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
_archbits=64
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
_archbits=32
fi
disable_debug=yes
2013-01-03 15:38:12 +00:00
makedepends="unzip"
do_build() {
cd src
cd dmd
make ${makejobs} -f posix.mak MODEL=${_archbits}
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() {
vinstall src/dmd/dmd 755 usr/bin
vinstall ${FILESDIR}/dmd.conf 644 etc
vinstall man/man1/dmd.1 644 usr/share/man/man1
vinstall man/man1/rdmd.1 644 usr/share/man/man1
vinstall man/man1/dmd.conf.5 644 usr/share/man/man5
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
vinstall linux/bin${_archbits}/${f} 755 usr/bin
done
}
libphobos_package() {
short_desc="The phobos D standard library for DMD"
license="Boost License"
pkg_install() {
vinstall src/druntime/lib/libdruntime-linux${_archbits}.a 644 usr/lib libdruntime.a
vinstall src/phobos/generated/linux/release/$_archbits/libphobos2.a 644 usr/lib libphobos2.a
vmkdir usr/include/d
cp -r src/phobos/{*.d,etc,std} ${PKGDESTDIR}/usr/include/d
vmkdir usr/include/d/druntime
cp -r src/druntime/import ${PKGDESTDIR}/usr/include/d/druntime
vmkdir usr/share/doc/d/
cp -r html ${PKGDESTDIR}/usr/share/doc/d/
find ${PKGDESTDIR}/usr/share/doc/d -type f | xargs chmod 0644
vinstall src/druntime/LICENSE 644 usr/share/licenses/libphobos
}
}
dmd_package() {
depends="libphobos>=${version} gcc"
pkg_install() {
vmove etc
vmove usr
}
}