From 490980b0cc892e383a26ace200b37b156b5cbe20 Mon Sep 17 00:00:00 2001 From: Auri Date: Sun, 25 Oct 2020 17:14:54 +0200 Subject: [PATCH] dmd: update to 2.095.0 - reverts https://github.com/dlang/dmd/commit/bab39b625f875ac14dd6668c2b442e76898ac342 on musl systems. - disable parallel build Closes: #25878 [via git-merge-pr] --- srcpkgs/dmd/files/musl.patch | 12 ++++++++++++ srcpkgs/dmd/template | 24 +++++++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 srcpkgs/dmd/files/musl.patch diff --git a/srcpkgs/dmd/files/musl.patch b/srcpkgs/dmd/files/musl.patch new file mode 100644 index 00000000000..bf41a3e4961 --- /dev/null +++ b/srcpkgs/dmd/files/musl.patch @@ -0,0 +1,12 @@ +--- dmd/src/dmd/link.d ++++ dmd/src/dmd/link.d +@@ -759,8 +759,7 @@ + perror("unable to create pipe to linker"); + return -1; + } +- // vfork instead of fork to avoid https://issues.dlang.org/show_bug.cgi?id=21089 +- childpid = vfork(); ++ childpid = fork(); + if (childpid == 0) + { + // pipe linker stderr to fds[0] diff --git a/srcpkgs/dmd/template b/srcpkgs/dmd/template index 6167a347f49..36f7fce5178 100644 --- a/srcpkgs/dmd/template +++ b/srcpkgs/dmd/template @@ -1,10 +1,10 @@ # Template file for 'dmd' pkgname=dmd -version=2.091.0 +version=2.095.0 revision=1 create_wrksrc=yes -hostmakedepends="which" -makedepends="dmd2.081 git" +hostmakedepends="dmd2.091 which" +makedepends="git" depends="libphobos>=${version} gcc" short_desc="Digital Mars D compiler" maintainer="streaks " @@ -15,14 +15,15 @@ distfiles=" 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="bcca38f4b80b51ae0a1955dc29e6cbfaa4d01d94869ddfcacf9292898c34343a - cc8ba196b08cca04488d97d0e35c878f7351b7d8128aec90eaa312d2bd9a6af2 - df9f81eecda4366adc5ca9ed31a0b4474c248544b120ff6fa3f6cb45917d8769 - 6e4bd4ee73a553921cdca7e3e21768b842b18186d07c0b4898fbd13a359875c0" +checksum="d8b54cdd885b86e2cc30ccb4ccc6923940b3bd79183b499889b86d34dd22621b + f8d6346aa13bdc6ff893eb9d9e5aa5e8ff5efe97dbfd92f7ecd8db8172d0c04a + f5c9606a988917a38b3b9a495c6da0d4e36b60beac8e805f6dea719d042d50d4 + 02853f8a4988f55dab5daa1e0e9910ea91905b85bcaa7a5ffd83079147dc7d93" conf_files="/etc/dmd.conf" provides="d-compiler-${version}_${revision}" -conflicts="dmd-bootstrap dmd2.081" +conflicts="dmd-bootstrap dmd2.081 dmd2.091" nopie=yes +disable_parallel_build=yes LDFLAGS="-lpthread" case "$XBPS_TARGET_MACHINE" in @@ -32,12 +33,17 @@ case "$XBPS_TARGET_MACHINE" in esac post_extract() { - rm -rf dmd druntime phobos mv dmd-${version} dmd mv druntime-${version} druntime mv phobos-${version} phobos } +post_patch() { + if [ "$XBPS_TARGET_LIBC" = musl ]; then + patch -p0 < ${FILESDIR}/musl.patch + fi +} + do_build() { local dmd