1 # Template file for 'dmd'
6 makedepends="dmd-bootstrap"
7 depends="libphobos>=${version} gcc"
8 short_desc="The Digital Mars D compiler"
9 maintainer="Juan RP <xtraeme@voidlinux.eu>"
11 homepage="http://www.digitalmars.com/d/2.0/"
13 https://github.com/dlang/dmd/archive/v${version}.tar.gz>dmd-${version}.tar.gz
14 https://github.com/dlang/druntime/archive/v${version}.tar.gz>druntime-${version}.tar.gz
15 https://github.com/dlang/phobos/archive/v${version}.tar.gz>phobos-${version}.tar.gz
16 http://downloads.dlang.org/releases/2.x/${version}/dmd.${version}.linux.tar.xz"
17 checksum="50f38e3bd1ac2ce05442e2ab061c6544e0c346eb6d03eb95204238b963ee25a0
18 ca075552c3358682937ea8e3412877bfc7c9eddb928575916eabbe9abff58671
19 57b7c7ab18879acffe50dfff0a7f988d6e4d0ba9341a4ee1ab6eeecca180d6c0
20 4e79c92abc3823cfae58a953f2cef4cc4574fa9a9c7a2d8de36d4faa4b3ccef1"
21 conf_files="/etc/dmd.conf"
22 provides="d-compiler-${version}_${revision}"
23 conflicts="dmd-bootstrap"
26 case "$XBPS_TARGET_MACHINE" in
27 x86_64*) _archbits=64;;
29 *) broken="unsupported arch upstream";;
33 rm -rf dmd druntime phobos
35 mv druntime-${version} druntime
36 mv phobos-${version} phobos
40 case "$XBPS_TARGET_MACHINE" in
41 *-musl) patch -p0 < ${FILESDIR}/musl.patch
49 make ${makejobs} -f posix.mak MODEL=${_archbits} TARGET_CPU=X86 BUILD=release PIC=1
50 dmd=${wrksrc}/dmd/generated/linux/release/$_archbits/dmd
52 make ${makejobs} -C docs
55 make ${makejobs} -f posix.mak MODEL=${_archbits} DMD=$dmd BUILD=release PIC=1
58 make ${makejobs} -f posix.mak MODEL=${_archbits} DMD=$dmd BUILD=release PIC=1
63 vbin generated/linux/release/$_archbits/dmd
64 vinstall ${FILESDIR}/dmd.conf 644 etc
66 vman generated/docs/man/man1/dmd.1
67 vman generated/docs/man/man5/dmd.conf.5
71 short_desc="Documentation and sample code for D programming language"
72 replaces="dmd-docs>=0"
73 license="Boost License"
78 vmkdir usr/share/doc/d
79 vcopy samples usr/share/doc/d
80 vcopy html usr/share/doc/d
82 find ${PKGDESTDIR}/usr/share/doc/d -type f | xargs chmod 0644
89 short_desc+=" - standard library"
90 license="Boost License"
91 conflicts="dmd-bootstrap"
93 vinstall ${wrksrc}/druntime/generated/linux/release/$_archbits/libdruntime.a 644 usr/lib libdruntime.a
94 vinstall ${wrksrc}/phobos/generated/linux/release/$_archbits/libphobos2.a 644 usr/lib libphobos2.a
97 cp -r ${wrksrc}/phobos/{*.d,etc,std} ${PKGDESTDIR}/usr/include/d
99 vmkdir usr/include/d/druntime
100 cp -r ${wrksrc}/druntime/import ${PKGDESTDIR}/usr/include/d/druntime
102 vlicense ${wrksrc}/druntime/LICENSE.txt