summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-02 09:08:12 +0100
committerSam James <sam@gentoo.org>2022-06-02 09:09:40 +0100
commit4c40c60b01e775e5555c9a5807615d28a932063d (patch)
tree9d6581cc0b59485b532bb19cd9a09f106a03c73a /eclass/toolchain.eclass
parentdev-util/strace: Stabilize 5.17 hppa, #849146 (diff)
downloadgentoo-4c40c60b01e775e5555c9a5807615d28a932063d.tar.gz
gentoo-4c40c60b01e775e5555c9a5807615d28a932063d.tar.bz2
gentoo-4c40c60b01e775e5555c9a5807615d28a932063d.zip
toolchain.eclass: introduce TOOLCHAIN_PATCH_DEV
The PMS-legality of trying every entry in SRC_URI is questionable, so let's follow the model we use in some other places like the binutils + glibc ebuilds, and just add a variable for the developer hosting the patchset for an ebuild. We use an array in toolchain.eclass because it's easier. We also fall back to the old behaviour if TOOLCHAIN_PATCH_DEV is not set. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass34
1 files changed, 31 insertions, 3 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 4db0acd592a5..d91544797fe8 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -90,6 +90,11 @@ tc_version_is_between() {
# for 13.0, we don't want to create new patchsets for every single 13.0 snapshot,
# so just grab patches from git each time if this variable is set).
+# @ECLASS_VARIABLE: TOOLCHAIN_PATCH_DEV
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Indicate the developer who hosts the patchset for an ebuild.
+
# @ECLASS_VARIABLE: GCC_PV
# @INTERNAL
# @DESCRIPTION:
@@ -286,6 +291,9 @@ DEPEND="${RDEPEND}"
if tc_has_feature gcj ; then
DEPEND+="
gcj? (
+ app-arch/zip
+ app-arch/unzip
+ >=media-libs/libart_lgpl-2.1
awt? (
x11-base/xorg-proto
x11-libs/libXt
@@ -295,9 +303,6 @@ if tc_has_feature gcj ; then
x11-libs/pango
virtual/pkgconfig
)
- >=media-libs/libart_lgpl-2.1
- app-arch/zip
- app-arch/unzip
)
"
fi
@@ -359,6 +364,29 @@ if [[ ${TOOLCHAIN_SET_S} == yes ]] ; then
fi
gentoo_urls() {
+ # slyfox's distfiles are mirrored to sam's devspace
+ declare -A devspace_urls=(
+ [soap]=HTTP~soap/distfiles/URI
+ [sam]=HTTP~sam/distfiles/sys-devel/gcc/URI
+ [slyfox]=HTTP~sam/distfiles/URI
+ [tamiko]=HTTP~tamiko/distfiles/URI
+ [zorry]=HTTP~zorry/patches/gcc/URI
+ [vapier]=HTTP~vapier/dist/URI
+ [blueness]=HTTP~blueness/dist/URI
+ )
+
+ # Newer ebuilds should set TOOLCHAIN_PATCH_DEV and we'll just
+ # return the full URL from the array.
+ local devspace_url=${devspace_urls[${TOOLCHAIN_PATCH_DEV}]}
+ if [[ -n ${TOOLCHAIN_PATCH_DEV} && -n ${devspace_url} ]] ; then
+ local devspace_url_exp=${devspace_url//HTTP/https:\/\/dev.gentoo.org\/}
+ devspace_url_exp=${devspace_url_exp//URI/$1}
+ echo ${devspace_url_exp}
+ return
+ fi
+
+ # But we keep the old fallback list for compatibility with
+ # older ebuilds (overlays etc).
local devspace="
HTTP~soap/distfiles/URI
HTTP~sam/distfiles/URI