commit:     940dd501903b08b8dfb5a186207b04e49d2b0bd2
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  1 11:09:02 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Feb  1 11:28:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=940dd501

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 <AT> gentoo.org>

 eclass/toolchain.eclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 8796ff10e8e..9538fd20a39 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

Reply via email to