Github messages for voidlinux
 help / color / mirror / Atom feed
From: aurieh <aurieh@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] dmd: update to 2.094.1
Date: Sun, 25 Oct 2020 20:36:12 +0100	[thread overview]
Message-ID: <20201025193612.z9OpRcFlIW-BmwBzie5bmsxq5Ooem8NiPfUAZofKUS8@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-25878@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

There is an updated pull request by aurieh against master on the void-packages repository

https://github.com/aurieh/void-packages update-dmd
https://github.com/void-linux/void-packages/pull/25878

dmd: update to 2.094.1
Also adds a new package, `dmd2.091`, which is required to bootstrap `2.094.1`, else the build fails with

```
Error: pointer cast from dmd.mtype.TypeTuple to immutable(void*)** is not supported at compile time
```
in `dmd/mtype.d`.

A patch file from https://github.com/void-linux/void-packages/pull/25878.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update-dmd-25878.patch --]
[-- Type: text/x-diff, Size: 8892 bytes --]

From d2ca7237b6d9cd41eca2637e7330439251948ecc Mon Sep 17 00:00:00 2001
From: Auri <me@aurieh.me>
Date: Sun, 25 Oct 2020 17:13:56 +0200
Subject: [PATCH 1/4] new package: dmd2.091

---
 srcpkgs/dmd2.091-doc            |   1 +
 srcpkgs/dmd2.091/files/dmd.conf |   2 +
 srcpkgs/dmd2.091/template       | 100 ++++++++++++++++++++++++++++++++
 srcpkgs/libphobos2.091          |   1 +
 4 files changed, 104 insertions(+)
 create mode 120000 srcpkgs/dmd2.091-doc
 create mode 100644 srcpkgs/dmd2.091/files/dmd.conf
 create mode 100644 srcpkgs/dmd2.091/template
 create mode 120000 srcpkgs/libphobos2.091

diff --git a/srcpkgs/dmd2.091-doc b/srcpkgs/dmd2.091-doc
new file mode 120000
index 00000000000..2758bf3a5bf
--- /dev/null
+++ b/srcpkgs/dmd2.091-doc
@@ -0,0 +1 @@
+dmd2.091
\ No newline at end of file
diff --git a/srcpkgs/dmd2.091/files/dmd.conf b/srcpkgs/dmd2.091/files/dmd.conf
new file mode 100644
index 00000000000..e8d42d10620
--- /dev/null
+++ b/srcpkgs/dmd2.091/files/dmd.conf
@@ -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
diff --git a/srcpkgs/dmd2.091/template b/srcpkgs/dmd2.091/template
new file mode 100644
index 00000000000..589f60e416f
--- /dev/null
+++ b/srcpkgs/dmd2.091/template
@@ -0,0 +1,100 @@
+# Template file for 'dmd2.091'
+pkgname=dmd2.091
+version=2.091.0
+revision=1
+create_wrksrc=yes
+hostmakedepends="which"
+makedepends="dmd2.081 git"
+depends="libphobos2.091>=${version} gcc"
+short_desc="Digital Mars D compiler, 2.091"
+maintainer="Auri <me@aurieh.me>"
+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="bcca38f4b80b51ae0a1955dc29e6cbfaa4d01d94869ddfcacf9292898c34343a
+ cc8ba196b08cca04488d97d0e35c878f7351b7d8128aec90eaa312d2bd9a6af2
+ df9f81eecda4366adc5ca9ed31a0b4474c248544b120ff6fa3f6cb45917d8769
+ 6e4bd4ee73a553921cdca7e3e21768b842b18186d07c0b4898fbd13a359875c0"
+conf_files="/etc/dmd.conf"
+provides="d-compiler-${version}_${revision}"
+conflicts="dmd-bootstrap dmd2.081"
+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
+}
+
+do_build() {
+	local dmd
+
+	cd dmd
+	make ${makejobs} -f posix.mak MODEL=${_archbits} TARGET_CPU=X86 ENABLE_RELEASE=1 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 ENABLE_RELEASE=1 PIC=1
+
+	cd ../phobos
+	make ${makejobs} -f posix.mak MODEL=${_archbits} DMD=$dmd ENABLE_RELEASE=1 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.091-doc_package() {
+	short_desc="Documentation and sample code for D programming language"
+	replaces="dmd-docs>=0"
+	license="BSL-1.0"
+
+	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.091_package() {
+	short_desc+=" - standard library"
+	license="BSL-1.0"
+	conflicts="dmd-bootstrap libphobos"
+	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
+	}
+}
diff --git a/srcpkgs/libphobos2.091 b/srcpkgs/libphobos2.091
new file mode 120000
index 00000000000..2758bf3a5bf
--- /dev/null
+++ b/srcpkgs/libphobos2.091
@@ -0,0 +1 @@
+dmd2.091
\ No newline at end of file

From 05e23d07dda14e97aca78767a25908e1dcf3cf5d Mon Sep 17 00:00:00 2001
From: Auri <me@aurieh.me>
Date: Sun, 25 Oct 2020 17:14:54 +0200
Subject: [PATCH 2/4] dmd: update to 2.094.1

---
 srcpkgs/dmd/template | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/dmd/template b/srcpkgs/dmd/template
index 6167a347f49..60a0c05ce92 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.094.1
 revision=1
 create_wrksrc=yes
 hostmakedepends="which"
-makedepends="dmd2.081 git"
+makedepends="dmd2.091 git"
 depends="libphobos>=${version} gcc"
 short_desc="Digital Mars D compiler"
 maintainer="streaks <assemblyislaw@gmail.com>"
@@ -15,13 +15,13 @@ 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="63271e939dbe5c39e866074b97f53c515c2b9161fcae9bae1df3b38924b0098d
+ 4bd91e438996363ec62f0b72392fa88f9d53ee73c51bea1c3be1ae97bd28d30c
+ e84536c538f47247d4803a9d2163f32e4b1e03acac090fa195a77083147c556f
+ 5208ef1babdb17bf63324d3fd439af774e4bb90d242d55c2471775deba3a399b"
 conf_files="/etc/dmd.conf"
 provides="d-compiler-${version}_${revision}"
-conflicts="dmd-bootstrap dmd2.081"
+conflicts="dmd-bootstrap dmd2.081 dmd2.091"
 nopie=yes
 LDFLAGS="-lpthread"
 

From 96c0efb5f42d470e09819b55f5035499873fbe92 Mon Sep 17 00:00:00 2001
From: Auri <me@aurieh.me>
Date: Sun, 25 Oct 2020 20:28:18 +0200
Subject: [PATCH 3/4] dmd2.091: libphobos2.091 conflicts with libphobos2.081

---
 srcpkgs/dmd2.091/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/dmd2.091/template b/srcpkgs/dmd2.091/template
index 589f60e416f..cc915caaa8c 100644
--- a/srcpkgs/dmd2.091/template
+++ b/srcpkgs/dmd2.091/template
@@ -84,7 +84,7 @@ dmd2.091-doc_package() {
 libphobos2.091_package() {
 	short_desc+=" - standard library"
 	license="BSL-1.0"
-	conflicts="dmd-bootstrap libphobos"
+	conflicts="dmd-bootstrap libphobos2.081 libphobos"
 	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

From 54d81a0b31122a6471960214866f0f5f25a217b5 Mon Sep 17 00:00:00 2001
From: Auri <me@aurieh.me>
Date: Sun, 25 Oct 2020 21:35:36 +0200
Subject: [PATCH 4/4] dmd: fix build for x86_64-musl

Reverts https://github.com/dlang/dmd/commit/bab39b625f875ac14dd6668c2b442e76898ac342
on musl systems.
---
 srcpkgs/dmd/files/musl.patch | 21 +++++++++++++++++++++
 srcpkgs/dmd/template         |  6 ++++++
 2 files changed, 27 insertions(+)
 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..5b65f917b27
--- /dev/null
+++ b/srcpkgs/dmd/files/musl.patch
@@ -0,0 +1,21 @@
+--- 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]
+@@ -768,7 +767,7 @@
+             close(fds[0]);
+             execvp(argv[0], argv.tdata());
+             perror(argv[0]); // failed to execute
+-            _exit(-1);
++            return -1;
+         }
+         else if (childpid == -1)
+         {
diff --git a/srcpkgs/dmd/template b/srcpkgs/dmd/template
index 60a0c05ce92..a2b90b67779 100644
--- a/srcpkgs/dmd/template
+++ b/srcpkgs/dmd/template
@@ -38,6 +38,12 @@ post_extract() {
 	mv phobos-${version} phobos
 }
 
+pre_configure() {
+	case "$XBPS_TARGET_MACHINE" in
+		*-musl) patch -p0 < ${FILESDIR}/musl.patch
+	esac
+}
+
 do_build() {
 	local dmd
 

  parent reply	other threads:[~2020-10-25 19:36 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-25 15:22 [PR PATCH] " aurieh
2020-10-25 16:45 ` aurieh
2020-10-25 18:40 ` aurieh
2020-10-25 19:36 ` aurieh [this message]
2020-10-26  0:41 ` [PR REVIEW] " sgn
2020-10-26  0:41 ` sgn
2020-10-26  0:41 ` sgn
2020-10-26  0:41 ` sgn
2020-10-26  0:42 ` ericonr
2020-10-26  0:42 ` ericonr
2020-10-26  0:42 ` ericonr
2020-10-26  0:47 ` aurieh
2020-10-26  0:48 ` aurieh
2020-10-26  0:51 ` aurieh
2020-10-26  0:52 ` aurieh
2020-10-26  0:56 ` aurieh
2020-10-26  1:00 ` ericonr
2020-10-26  1:01 ` ericonr
2020-10-26  1:06 ` aurieh
2020-10-26  1:38 ` ericonr
2020-10-26 10:30 ` aurieh
2020-10-26 10:50 ` aurieh
2020-10-26 12:32 ` ericonr
2020-10-26 14:59 ` aurieh
2020-10-27 12:49 ` [PR PATCH] [Updated] " aurieh
2020-10-27 14:26 ` [PR REVIEW] " ericonr
2020-10-27 14:26 ` ericonr
2020-10-27 14:26 ` ericonr
2020-10-27 14:44 ` sgn
2020-10-27 15:06 ` aurieh
2020-10-27 15:34 ` aurieh
2020-10-27 15:38 ` ericonr
2020-10-27 15:38 ` ericonr
2020-10-27 16:18 ` aurieh
2020-10-27 16:35 ` [PR PATCH] [Updated] " aurieh
2020-10-27 23:53 ` [PR REVIEW] " aurieh
2020-10-27 23:55 ` aurieh
2020-10-28  2:00 ` [PR REVIEW] " ericonr
2020-10-28  3:16 ` ericonr
2020-10-28 21:10 ` [PR PATCH] [Updated] " aurieh
2020-10-28 21:11 ` aurieh
2020-10-28 22:40 ` ericonr
2020-10-28 23:39 ` aurieh
2020-10-28 23:41 ` ericonr
2020-10-28 23:46 ` ericonr
2020-10-28 23:59 ` ericonr
2020-10-29  0:34 ` ericonr
2020-10-29  8:13 ` aurieh
2020-10-29  8:53 ` aurieh
2020-10-29  9:49 ` [PR PATCH] [Updated] " aurieh
2020-10-29  9:51 ` aurieh
2020-10-30  1:08 ` ericonr
2020-11-12  4:00 ` ericonr
2020-11-14 17:58 ` aurieh
2020-11-14 23:08 ` ericonr
2020-11-22  4:39 ` ericonr
2020-11-22 19:46 ` ericonr
2020-11-23 11:23 ` [PR PATCH] [Updated] " aurieh
2020-11-23 11:39 ` aurieh
2021-02-01 21:30 ` ericonr
2021-02-10  2:18 ` [PR PATCH] [Updated] " aurieh
2021-02-10  2:18 ` aurieh
2021-02-12  3:51 ` [PR PATCH] [Closed]: " ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201025193612.z9OpRcFlIW-BmwBzie5bmsxq5Ooem8NiPfUAZofKUS8@z \
    --to=aurieh@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).