new package: dmd2.081

The last dmd version that can be bootstrapped by the pure C++ version
of dmd. We need this version as a separate package so we can bootstrap
newer versions of dmd.
This commit is contained in:
Yuxuan Shui 2019-03-14 15:08:19 +00:00 committed by maxice8
parent b94dc71e3f
commit 3d4bc2e90f
5 changed files with 123 additions and 0 deletions

1
srcpkgs/dmd2.081-doc Symbolic link
View File

@ -0,0 +1 @@
dmd2.081

View File

@ -0,0 +1,2 @@
[Environment]
DFLAGS=-I/usr/include/d -I/usr/include/d/druntime/import -L-L/usr/lib -L-L/usr/lib -L--no-warn-search-mismatch -L--export-dynamic -fPIC

View File

@ -0,0 +1,11 @@
--- dmd/src/dmd/mars.d
+++ dmd/src/dmd/mars.d
@@ -1374,7 +1374,7 @@ void addDefaultVersionIdentifiers()
}
else static if (TARGET.Linux)
{
- VersionCondition.addPredefinedGlobalIdent("CRuntime_Glibc");
+ VersionCondition.addPredefinedGlobalIdent("CRuntime_Musl");
}
if (global.params.isLP64)

108
srcpkgs/dmd2.081/template Normal file
View File

@ -0,0 +1,108 @@
# Template file for 'dmd2.081'
pkgname=dmd2.081
version=2.081.1
revision=1
create_wrksrc=yes
makedepends="dmd-bootstrap"
depends="libphobos2.081>=${version} gcc"
short_desc="Digital Mars D compiler, 2.081"
maintainer="Juan RP <xtraeme@voidlinux.org>"
license="BSL-1.0"
homepage="http://www.digitalmars.com/d/2.0/"
distfiles="
https://github.com/dlang/dmd/archive/v${version}.tar.gz>dmd-${version}.tar.gz
https://github.com/dlang/druntime/archive/v${version}.tar.gz>druntime-${version}.tar.gz
https://github.com/dlang/phobos/archive/v${version}.tar.gz>phobos-${version}.tar.gz
http://downloads.dlang.org/releases/2.x/${version}/dmd.${version}.linux.tar.xz"
checksum="14f3aafe1c93c86646aaeb3ed7361a5fc5a24374cf25c8848c81942bfd9fae1a
8313af32dce71f767fb0072cae699cbfe7196cf01b0ce1c5dd416a71d94f5fee
d945c6fd1be14dff5fcbf45c1e11302e12bebac56d55e4e97e48e150f2899e04
a93f15fba1786322310492118785de759d8badf8b5a1583256fcb8486e4f74f8"
conf_files="/etc/dmd.conf"
provides="d-compiler-${version}_${revision}"
conflicts="dmd-bootstrap"
nopie=yes
LDFLAGS="-lpthread"
case "$XBPS_TARGET_MACHINE" in
x86_64*) _archbits=64;;
i686) _archbits=32;;
*) broken="unsupported arch upstream";;
esac
post_extract() {
rm -rf dmd druntime phobos
mv dmd-${version} dmd
mv druntime-${version} druntime
mv phobos-${version} phobos
}
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl) patch -p0 < ${FILESDIR}/musl.patch
if [ "$XBPS_TARGET_MACHINE" = "i686-musl" ]; then
patch -p0 < ${FILESDIR}/i686-musl.patch
fi
esac
}
do_build() {
local dmd
cd dmd
make ${makejobs} -f posix.mak MODEL=${_archbits} TARGET_CPU=X86 BUILD=release PIC=1
dmd=${wrksrc}/dmd/generated/linux/release/$_archbits/dmd
make ${makejobs} -C docs
cd ../druntime
make ${makejobs} -f posix.mak MODEL=${_archbits} DMD=$dmd BUILD=release PIC=1
cd ../phobos
make ${makejobs} -f posix.mak MODEL=${_archbits} DMD=$dmd BUILD=release PIC=1
}
do_install() {
cd dmd
vbin generated/linux/release/$_archbits/dmd
vinstall ${FILESDIR}/dmd.conf 644 etc
vman generated/docs/man/man1/dmd.1
vman generated/docs/man/man5/dmd.conf.5
}
dmd2.081-doc_package() {
short_desc="Documentation and sample code for D programming language"
replaces="dmd-docs>=0"
license="Boost License"
pkg_install() {
cd dmd2
vmkdir usr/share/doc/d
vcopy samples usr/share/doc/d
vcopy html usr/share/doc/d
find ${PKGDESTDIR}/usr/share/doc/d -type f | xargs chmod 0644
vlicense license.txt
}
}
libphobos2.081_package() {
short_desc+=" - standard library"
license="Boost License"
conflicts="dmd-bootstrap"
pkg_install() {
vinstall ${wrksrc}/druntime/generated/linux/release/$_archbits/libdruntime.a 644 usr/lib libdruntime.a
vinstall ${wrksrc}/phobos/generated/linux/release/$_archbits/libphobos2.a 644 usr/lib libphobos2.a
vmkdir usr/include/d
cp -r ${wrksrc}/phobos/{*.d,etc,std} ${PKGDESTDIR}/usr/include/d
vmkdir usr/include/d/druntime
cp -r ${wrksrc}/druntime/import ${PKGDESTDIR}/usr/include/d/druntime
vlicense ${wrksrc}/druntime/LICENSE.txt
}
}

1
srcpkgs/libphobos2.081 Symbolic link
View File

@ -0,0 +1 @@
dmd2.081