summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-02-01 11:09:02 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-02-01 11:28:24 +0000
commit940dd501903b08b8dfb5a186207b04e49d2b0bd2 (patch)
tree40d7a391f0a093e62b82d24d59caf57c59faa3b9 /eclass
parentsys-kernel/gentoo-sources: Linux patch 5.4.17 and removal of redundant patch (diff)
downloadgentoo-940dd501903b08b8dfb5a186207b04e49d2b0bd2.tar.gz
gentoo-940dd501903b08b8dfb5a186207b04e49d2b0bd2.tar.bz2
gentoo-940dd501903b08b8dfb5a186207b04e49d2b0bd2.zip
toolchain.eclass: provide a way to override gcc tarball path
To ease gnal-gpl packaging allow external user to override SRC_URI for main gcc tarball. gnal-gpl uses gcc small fork, but otherwise looks like a gcc tarball. Bug: https://bugs.gentoo.org/706588 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 8796ff10e8ee..9538fd20a39b 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -286,6 +286,10 @@ gentoo_urls() {
# Other than the variables normally set by portage, this function's behavior
# can be altered by setting the following:
#
+# GCC_TARBALL_SRC_URI
+# Override link to main tarball into SRC_URI. Used by dev-lang/gnat-gpl
+# to provide gcc tarball snapshots. Patches are usually reused as-is.
+#
# SNAPSHOT
# If set, this variable signals that we should be using a snapshot of
# gcc. It is expected to be in the format "YYYY-MM-DD". Note that if
@@ -347,6 +351,9 @@ get_gcc_src_uri() {
# live git tree, snapshot, or release tarball.
if tc_is_live ; then
: # Nothing to do w/git snapshots.
+ elif [[ -n ${GCC_TARBALL_SRC_URI} ]] ; then
+ # pull gcc tarball from another location. Frequently used by gnat-gpl.
+ GCC_SRC_URI="${GCC_TARBALL_SRC_URI}"
elif [[ -n ${SNAPSHOT} ]] ; then
GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz"
else