2013-01-03 15:33:21 +00:00
|
|
|
# Template file for 'dmd'
|
|
|
|
pkgname=dmd
|
2014-08-18 22:59:02 +00:00
|
|
|
version=2.066.0
|
2014-11-11 17:14:18 +00:00
|
|
|
revision=2
|
2013-01-03 15:33:21 +00:00
|
|
|
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"
|
2014-08-18 22:59:02 +00:00
|
|
|
checksum=f13db9ed3bdc8740deb5903991e9e499fac708c8a1759050f1bfae624528df20
|
2013-01-03 15:33:21 +00:00
|
|
|
|
2013-04-12 07:46:44 +00:00
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
2013-01-03 15:33:21 +00:00
|
|
|
_archbits=64
|
2013-04-12 07:46:44 +00:00
|
|
|
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
|
2013-01-03 15:33:21 +00:00
|
|
|
_archbits=32
|
|
|
|
fi
|
|
|
|
|
2014-06-21 08:54:27 +00:00
|
|
|
only_for_archs="i686 x86_64"
|
|
|
|
conf_files="/etc/dmd.conf"
|
|
|
|
|
2013-07-09 14:53:54 +00:00
|
|
|
hostmakedepends="unzip"
|
2014-01-01 15:10:11 +00:00
|
|
|
depends="libphobos>=${version} gcc"
|
2013-01-03 15:33:21 +00:00
|
|
|
|
|
|
|
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
|
2014-06-21 08:54:27 +00:00
|
|
|
vinstall man/man5/dmd.conf.5 644 usr/share/man/man5
|
2013-01-03 15:33:21 +00:00
|
|
|
|
|
|
|
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
|
2013-01-03 15:33:21 +00:00
|
|
|
|
|
|
|
for f in ddemangle dman dumpobj obj2asm rdmd; do
|
|
|
|
vinstall linux/bin${_archbits}/${f} 755 usr/bin
|
|
|
|
done
|
|
|
|
}
|
2013-04-12 07:46:44 +00:00
|
|
|
|
|
|
|
libphobos_package() {
|
2014-11-11 17:14:18 +00:00
|
|
|
conflicts="ldc>=0"
|
2013-04-12 07:46:44 +00:00
|
|
|
short_desc="The phobos D standard library for DMD"
|
|
|
|
license="Boost License"
|
|
|
|
pkg_install() {
|
2013-07-09 14:53:54 +00:00
|
|
|
vinstall ${wrksrc}/src/druntime/lib/libdruntime-linux${_archbits}.a 644 usr/lib libdruntime.a
|
|
|
|
vinstall ${wrksrc}/src/phobos/generated/linux/release/$_archbits/libphobos2.a 644 usr/lib libphobos2.a
|
2013-04-12 07:46:44 +00:00
|
|
|
|
|
|
|
vmkdir usr/include/d
|
2013-07-09 14:53:54 +00:00
|
|
|
cp -r ${wrksrc}/src/phobos/{*.d,etc,std} ${PKGDESTDIR}/usr/include/d
|
2013-04-12 07:46:44 +00:00
|
|
|
|
|
|
|
vmkdir usr/include/d/druntime
|
2013-07-09 14:53:54 +00:00
|
|
|
cp -r ${wrksrc}/src/druntime/import ${PKGDESTDIR}/usr/include/d/druntime
|
2013-04-12 07:46:44 +00:00
|
|
|
|
|
|
|
vmkdir usr/share/doc/d/
|
2013-07-09 14:53:54 +00:00
|
|
|
cp -r ${wrksrc}/html ${PKGDESTDIR}/usr/share/doc/d/
|
2013-04-12 07:46:44 +00:00
|
|
|
find ${PKGDESTDIR}/usr/share/doc/d -type f | xargs chmod 0644
|
|
|
|
|
2013-07-09 14:53:54 +00:00
|
|
|
vinstall ${wrksrc}/src/druntime/LICENSE 644 usr/share/licenses/libphobos
|
2013-04-12 07:46:44 +00:00
|
|
|
}
|
|
|
|
}
|