commit: 5a7ea1cef34c3c3026a999d566bc4badc1dccc9c Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Apr 19 17:19:51 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Apr 19 18:20:05 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a7ea1ce
toolchain.eclass: allow overriding S in ebuilds Useful for RCs-but-we-pretend-they're-not-RCs. Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/toolchain.eclass | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 9f6293910145..38e4ccd55688 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -244,7 +244,7 @@ fi if tc_has_feature sanitize ; then # libsanitizer relies on 'crypt.h' to be present # on target. glibc user to provide it unconditionally. - # Nowadays it's a standalone library: #802648 + # Nowadays it's a standalone library: bug #802648 DEPEND+=" sanitize? ( virtual/libcrypt )" fi @@ -268,15 +268,17 @@ PDEPEND=">=sys-devel/gcc-config-2.3" # Set the source directory depending on whether we're using # a live git tree, snapshot, or release tarball. -S=$( - if tc_is_live ; then - echo ${EGIT_CHECKOUT_DIR} - elif [[ -n ${SNAPSHOT} ]] ; then - echo ${WORKDIR}/gcc-${SNAPSHOT} - else - echo ${WORKDIR}/gcc-${GCC_RELEASE_VER} - fi -) +if [[ -z ${S} ]] ; then + S=$( + if tc_is_live ; then + echo ${EGIT_CHECKOUT_DIR} + elif [[ -n ${SNAPSHOT} ]] ; then + echo ${WORKDIR}/gcc-${SNAPSHOT} + else + echo ${WORKDIR}/gcc-${GCC_RELEASE_VER} + fi + ) +fi gentoo_urls() { local devspace="