summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-02-01 12:31:21 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-02-01 12:35:46 +0000
commit1488b03bb6af0289f69ef4244ef79ed3225a10db (patch)
tree90a7c0cc5697b7d06710cc70a8bbaf926b9282be /eclass/toolchain.eclass
parentdev-python/pytest-xprocess: move keywords forward (diff)
downloadgentoo-1488b03bb6af0289f69ef4244ef79ed3225a10db.tar.gz
gentoo-1488b03bb6af0289f69ef4244ef79ed3225a10db.tar.bz2
gentoo-1488b03bb6af0289f69ef4244ef79ed3225a10db.zip
toolchain.eclass: make toolchain_src_unpack() a default_src_unpack()
Before tha change toolchain_src_unpack() did not unpack every SRC_URI entry and instead relied on toolchain_src_unpack() to unpack only needed tarballs. Any special handling was only needed for old USE=d versions of gcc. This change moves all source code mangling to src_prepare() and makes toolchain_src_unpack() a default_src_unpack(). The only exception is ebuild users of 'GCC_A_FAKEIT' (dev-lang/gnat-gpl) who have to use it to workaround non-standard behaviour of toolchain_src_unpack() The change will allow dev-lang/gnat-gpl to migrate to default_src_unpack(). Bug: https://bugs.gentoo.org/706588 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass35
1 files changed, 19 insertions, 16 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 9538fd20a39b..03e335dac5c5 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -445,7 +445,13 @@ toolchain_src_unpack() {
git-r3_src_unpack
fi
- gcc_quick_unpack
+ if [[ -n ${GCC_A_FAKEIT} ]] ; then
+ eerror "Please migrate from 'GCC_A_FAKEIT' to 'default_src_unpack()'"
+ gcc_quick_unpack
+ else
+ # Just unpack every tarball from SRC_URI
+ default_src_unpack
+ fi
}
gcc_quick_unpack() {
@@ -472,21 +478,6 @@ gcc_quick_unpack() {
fi
fi
- if [[ -n ${D_VER} ]] && use d ; then
- pushd "${S}"/gcc > /dev/null
- unpack gdc-${D_VER}-src.tar.bz2
- cd ..
- ebegin "Adding support for the D language"
- ./gcc/d/setup-gcc.sh >& "${T}"/dgcc.log
- if ! eend $? ; then
- eerror "The D GCC package failed to apply"
- eerror "Please include this log file when posting a bug report:"
- eerror " ${T}/dgcc.log"
- die "failed to include the D language"
- fi
- popd > /dev/null
- fi
-
[[ -n ${PATCH_VER} ]] && \
unpack gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.bz2
@@ -532,6 +523,18 @@ toolchain_src_prepare() {
export BRANDING_GCC_PKGVERSION="Gentoo ${GCC_PVR}"
cd "${S}"
+ if [[ -n ${D_VER} ]] && use d ; then
+ mv "${WORKDIR}"/d gcc/d || die
+ ebegin "Adding support for the D language"
+ ./gcc/d/setup-gcc.sh >& "${T}"/dgcc.log
+ if ! eend $? ; then
+ eerror "The D GCC package failed to apply"
+ eerror "Please include this log file when posting a bug report:"
+ eerror " ${T}/dgcc.log"
+ die "failed to include the D language"
+ fi
+ fi
+
do_gcc_gentoo_patches
do_gcc_HTB_patches
do_gcc_PIE_patches