New package: dmd-bootstrap-2.069.20180305

Closes: #12125
This commit is contained in:
Jürgen Buchmüller 2018-03-06 17:19:32 +01:00
parent 76c0d42450
commit ba7645e0c4
3 changed files with 124 additions and 0 deletions

View file

@ -0,0 +1,22 @@
--- druntime/src/core/sys/linux/execinfo.d
+++ druntime/src/core/sys/linux/execinfo.d
@@ -7,7 +7,7 @@
*/
module core.sys.linux.execinfo;
-version (linux):
+version (none):
extern (C):
nothrow:
--- druntime/src/rt/backtrace/dwarf.d
+++ druntime/src/rt/backtrace/dwarf.d
@@ -15,7 +15,7 @@ module rt.backtrace.dwarf;
version(CRuntime_Glibc) version = linux_or_freebsd;
else version(FreeBSD) version = linux_or_freebsd;
-version(linux_or_freebsd):
+version(none):
import rt.util.container.array;
import rt.backtrace.elf;

View file

@ -0,0 +1,10 @@
--- dmd/src/mars.c
+++ dmd/src/mars.c
@@ -267,6 +267,7 @@ int tryMain(size_t argc, const char *argv[])
// Set default values
global.params.argv0 = arguments[0];
+ global.params.pic = 1;
global.params.color = isConsoleColorSupported();
global.params.link = true;
global.params.useAssert = true;

View file

@ -0,0 +1,92 @@
# Template file for 'dmd-bootstrap'
pkgname=dmd-bootstrap
version=2.069.20180305
revision=1
_gitrev_dmd=75266348c8a2368945a339ab86d7c8960a9bfc08
_gitrev_druntime=33ae38cef41564b12864470afaf8430eb7334d3b
_gitrev_phobos=30ac23a0889dd183221ce531a057171dd45296c4
create_wrksrc=yes
build_wrksrc="dmd/src"
build_style=gnu-makefile
provides="d-compiler-${version}_${revision}"
only_for_archs="x86_64 x86_64-musl i686 i686-musl"
short_desc="DMD Compiler (last C++ version for bootstrap)"
maintainer="Yuxuan Shui <yshuiv7@gmail.com>"
license="custom"
homepage="https://dlang.org/"
distfiles="
https://github.com/dlang/dmd/archive/${_gitrev_dmd}.tar.gz>dmd-${version}.tar.gz
https://github.com/dlang/druntime/archive/${_gitrev_druntime}.tar.gz>druntime-${version}.tar.gz
https://github.com/dlang/phobos/archive/${_gitrev_phobos}.tar.gz>phobos-${version}.tar.gz"
checksum="
015ad5ce9d60bc183b9b40ae649eafeced93cb2a211400d9280464b22acdb129
7f4d84f2b5252c0cc33bffbb4de8aab9321df844b8512e27e90267cbb9bc7422
57306f80a63b83b755043d05e85e83cf3178701c92d295c97d1a5a8be8ffce19"
post_extract() {
rm -rf dmd druntime phobos
mv dmd-${_gitrev_dmd} dmd
mv druntime-${_gitrev_druntime} druntime
mv phobos-${_gitrev_phobos} phobos
}
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl) patch -p0 < ${FILESDIR}/musl.patch
esac
}
do_build() {
local bits dmd
case "$XBPS_TARGET_MACHINE" in
x86_64*) bits=64;;
i686*) bits=32;;
esac
make ${makejobs} -f posix.mak HOST_CXX=$CXX MODEL=$bits TARGET_CPU=X86 RELEASE=1 all
dmd=${wrksrc}/dmd/src/dmd
cd ../../druntime
make ${makejobs} -f posix.mak MODEL=$bits DMD=$dmd RELEASE=1
cd ../phobos
make ${makejobs} -f posix.mak MODEL=$bits DMD=$dmd RELEASE=1
}
do_install() {
local bits
case "$XBPS_TARGET_MACHINE" in
x86_64*) bits=64;;
i686*) bits=32;;
esac
vbin dmd
vmkdir etc
cat > $DESTDIR/etc/dmd.conf <<EOF
[Environment]
DFLAGS=-I/usr/include/dlang/dmd -L-L/usr/lib -L-L/usr/lib32 -L--export-dynamic
EOF
vlicense backendlicense.txt
vlicense boostlicense.txt
vmkdir usr/share/man/man1
vmkdir usr/share/man/man5
cd ..
vcopy docs/man/man1/* usr/share/man/man1/
vcopy docs/man/man5/* usr/share/man/man5/
cd ..
vinstall phobos/generated/linux/release/$bits/libphobos2.a 0644 usr/lib
vmkdir usr/include/dlang/dmd
vcopy phobos/*.d usr/include/dlang/dmd
vcopy phobos/etc usr/include/dlang/dmd
vcopy phobos/std usr/include/dlang/dmd
vcopy druntime/import/* usr/include/dlang/dmd/
vlicense druntime/LICENSE
vlicense phobos/LICENSE_1_0.txt
}