Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 01 Feb 2020 11:28:36
Message-Id: 1580556504.940dd501903b08b8dfb5a186207b04e49d2b0bd2.slyfox@gentoo
1 commit: 940dd501903b08b8dfb5a186207b04e49d2b0bd2
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 1 11:09:02 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 1 11:28:24 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=940dd501
7
8 toolchain.eclass: provide a way to override gcc tarball path
9
10 To ease gnal-gpl packaging allow external user to override SRC_URI
11 for main gcc tarball. gnal-gpl uses gcc small fork, but otherwise
12 looks like a gcc tarball.
13
14 Bug: https://bugs.gentoo.org/706588
15 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
16
17 eclass/toolchain.eclass | 7 +++++++
18 1 file changed, 7 insertions(+)
19
20 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
21 index 8796ff10e8e..9538fd20a39 100644
22 --- a/eclass/toolchain.eclass
23 +++ b/eclass/toolchain.eclass
24 @@ -286,6 +286,10 @@ gentoo_urls() {
25 # Other than the variables normally set by portage, this function's behavior
26 # can be altered by setting the following:
27 #
28 +# GCC_TARBALL_SRC_URI
29 +# Override link to main tarball into SRC_URI. Used by dev-lang/gnat-gpl
30 +# to provide gcc tarball snapshots. Patches are usually reused as-is.
31 +#
32 # SNAPSHOT
33 # If set, this variable signals that we should be using a snapshot of
34 # gcc. It is expected to be in the format "YYYY-MM-DD". Note that if
35 @@ -347,6 +351,9 @@ get_gcc_src_uri() {
36 # live git tree, snapshot, or release tarball.
37 if tc_is_live ; then
38 : # Nothing to do w/git snapshots.
39 + elif [[ -n ${GCC_TARBALL_SRC_URI} ]] ; then
40 + # pull gcc tarball from another location. Frequently used by gnat-gpl.
41 + GCC_SRC_URI="${GCC_TARBALL_SRC_URI}"
42 elif [[ -n ${SNAPSHOT} ]] ; then
43 GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz"
44 else