public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Horodniceanu Andrei" <a.horodniceanu@proton.me>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/user/dlang:master commit in: eclass/
Date: Sun,  1 Oct 2023 14:01:08 +0000 (UTC)	[thread overview]
Message-ID: <1696152253.0ab16629adb5c8c8e4c19ebabcbb6368c78b985a.a.horodniceanu@gentoo> (raw)

commit:     0ab16629adb5c8c8e4c19ebabcbb6368c78b985a
Author:     Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Sat Sep 30 06:42:31 2023 +0000
Commit:     Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
CommitDate: Sun Oct  1 09:24:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=0ab16629

dmd.eclass: Support >=dmd-2.101

Since dmd-2.101 the dmd and druntime upstream repositories have merged
and paths need to be adjusted.

The download link needs to be changed as well as new releases are no
longer uploaded to aws.

Signed-off-by: Horodniceanu Andrei <a.horodniceanu <AT> proton.me>

 eclass/dmd.eclass | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/eclass/dmd.eclass b/eclass/dmd.eclass
index 0333a2b..0555f47 100644
--- a/eclass/dmd.eclass
+++ b/eclass/dmd.eclass
@@ -53,7 +53,9 @@ dmd_ge() {
 # Returns the relative directory that the compiler executable will be found in. This directory is used both for
 # installing the binary as well as setting the compiler during compilation of druntime and Phobos.
 dmd_gen_exe_dir() {
-	if dmd_ge 2.074; then
+	if dmd_ge 2.101; then
+		echo generated/linux/release/$(dmd_arch_to_model)
+	elif dmd_ge 2.074; then
 		echo dmd/generated/linux/release/$(dmd_arch_to_model)
 	else
 		echo dmd/src
@@ -95,7 +97,12 @@ if [[ -n "${BETA}" ]]; then
 	# We want to convert a Gentoo version string to an upstream one: 2.097.0_rc1 -> 2.097.0-rc.1
 	SRC_URI="http://downloads.dlang.org/pre-releases/${MAJOR}.x/${VERSION}/${PN}.$(ver_rs 3 "-" 4 ".").${ARCHIVE}"
 else
-	SRC_URI="mirror://aws/${YEAR}/${PN}.${PV}.${ARCHIVE}"
+	# the aws mirrors work for <=dmd-2.100.2
+	if dmd_ge 2.101; then
+		SRC_URI="https://downloads.dlang.org/releases/${YEAR}/${PN}.${PV}.${ARCHIVE}"
+	else
+		SRC_URI="mirror://aws/${YEAR}/${PN}.${PV}.${ARCHIVE}"
+	fi
 fi
 
 COMMON_DEPEND="
@@ -121,6 +128,9 @@ dmd_src_prepare() {
 	mkdir dmd || die "Failed to create directories 'dmd', 'druntime' and 'phobos'"
 	mv src/dmd      dmd/src     || die "Failed to move 'src/dmd' to 'dmd/src'"
 	mv src/VERSION  dmd/VERSION || die "Failed to move 'src/VERSION' to 'dmd/VERSION'"
+	# >=dmd-2.101 expects the version file to be in the same directory as the dmd
+	# folder. i.e. VERSION should be in ${S} not in ${S}/dmd
+	ln -s dmd/VERSION VERSION   || die "Failed to symlink 'src/VERSION' to 'VERSION'"
 	mv src/druntime druntime    || die "Failed to move 'src/druntime' to 'druntime'"
 	mv src/phobos   phobos      || die "Failed to move 'src/phobos' to 'phobos'"
 	# Symlinks used by dmd in the selfhosting case
@@ -203,13 +213,14 @@ dmd_src_compile() {
 			MODEL="${MODEL}"
 			PIC=1
 			CC="$(tc-getCC)"
+			DMD_DIR=../dmd
 		)
 
 		einfo 'Building druntime...'
 		emake -C druntime -f posix.mak "${mymakeargs[@]}" MANIFEST=
 
 		einfo 'Building Phobos 2...'
-		emake -C phobos -f posix.mak "${mymakeargs[@]}" CUSTOM_DRUNTIME=1
+		emake -C phobos -f posix.mak "${mymakeargs[@]}" CUSTOM_DRUNTIME=1 DRUNTIME_PATH=../druntime
 	}
 
 	dmd_foreach_abi compile_libraries


             reply	other threads:[~2023-10-01 14:01 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-01 14:01 Horodniceanu Andrei [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-08 14:56 [gentoo-commits] repo/user/dlang:master commit in: eclass/ Horodniceanu Andrei
2024-08-30  7:58 Horodniceanu Andrei
2024-07-14 19:44 Horodniceanu Andrei
2024-07-12 18:59 Horodniceanu Andrei
2024-07-12 18:59 Horodniceanu Andrei
2024-07-12 18:59 Horodniceanu Andrei
2024-04-26 20:25 Horodniceanu Andrei
2024-04-22 20:03 Horodniceanu Andrei
2024-04-13 23:04 Horodniceanu Andrei
2024-04-13 23:04 Horodniceanu Andrei
2024-04-13 23:04 Horodniceanu Andrei
2024-04-13 23:04 Horodniceanu Andrei
2024-02-20 17:54 Horodniceanu Andrei
2024-02-18 22:49 Horodniceanu Andrei
2024-02-18 22:49 Horodniceanu Andrei
2023-12-17 11:58 Marco Leise
2023-12-17 11:58 Marco Leise
2023-12-17 11:58 Marco Leise
2023-11-17 21:44 Horodniceanu Andrei
2023-11-17 21:44 Horodniceanu Andrei
2023-09-28  4:56 Marco Leise
2023-09-28  4:56 Marco Leise
2023-09-28  4:56 Marco Leise
2023-09-04 19:18 Marco Leise
2023-08-15  2:32 Marco Leise
2023-07-22 14:13 Marco Leise
2023-07-22 14:13 Marco Leise
2023-07-22 11:46 Marco Leise
2022-07-23 12:24 Marco Leise
2020-08-15  1:50 Marco Leise

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=1696152253.0ab16629adb5c8c8e4c19ebabcbb6368c78b985a.a.horodniceanu@gentoo \
    --to=a.horodniceanu@proton.me \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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