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 12:36:07
Message-Id: 1580560546.1488b03bb6af0289f69ef4244ef79ed3225a10db.slyfox@gentoo
1 commit: 1488b03bb6af0289f69ef4244ef79ed3225a10db
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 1 12:31:21 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 1 12:35:46 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1488b03b
7
8 toolchain.eclass: make toolchain_src_unpack() a default_src_unpack()
9
10 Before tha change toolchain_src_unpack() did not unpack every SRC_URI
11 entry and instead relied on toolchain_src_unpack() to unpack only
12 needed tarballs. Any special handling was only needed for old USE=d
13 versions of gcc.
14
15 This change moves all source code mangling to src_prepare() and makes
16 toolchain_src_unpack() a default_src_unpack().
17
18 The only exception is ebuild users of 'GCC_A_FAKEIT' (dev-lang/gnat-gpl)
19 who have to use it to workaround non-standard behaviour of toolchain_src_unpack()
20
21 The change will allow dev-lang/gnat-gpl to migrate to default_src_unpack().
22
23 Bug: https://bugs.gentoo.org/706588
24 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
25
26 eclass/toolchain.eclass | 35 +++++++++++++++++++----------------
27 1 file changed, 19 insertions(+), 16 deletions(-)
28
29 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
30 index 9538fd20a39..03e335dac5c 100644
31 --- a/eclass/toolchain.eclass
32 +++ b/eclass/toolchain.eclass
33 @@ -445,7 +445,13 @@ toolchain_src_unpack() {
34 git-r3_src_unpack
35 fi
36
37 - gcc_quick_unpack
38 + if [[ -n ${GCC_A_FAKEIT} ]] ; then
39 + eerror "Please migrate from 'GCC_A_FAKEIT' to 'default_src_unpack()'"
40 + gcc_quick_unpack
41 + else
42 + # Just unpack every tarball from SRC_URI
43 + default_src_unpack
44 + fi
45 }
46
47 gcc_quick_unpack() {
48 @@ -472,21 +478,6 @@ gcc_quick_unpack() {
49 fi
50 fi
51
52 - if [[ -n ${D_VER} ]] && use d ; then
53 - pushd "${S}"/gcc > /dev/null
54 - unpack gdc-${D_VER}-src.tar.bz2
55 - cd ..
56 - ebegin "Adding support for the D language"
57 - ./gcc/d/setup-gcc.sh >& "${T}"/dgcc.log
58 - if ! eend $? ; then
59 - eerror "The D GCC package failed to apply"
60 - eerror "Please include this log file when posting a bug report:"
61 - eerror " ${T}/dgcc.log"
62 - die "failed to include the D language"
63 - fi
64 - popd > /dev/null
65 - fi
66 -
67 [[ -n ${PATCH_VER} ]] && \
68 unpack gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.bz2
69
70 @@ -532,6 +523,18 @@ toolchain_src_prepare() {
71 export BRANDING_GCC_PKGVERSION="Gentoo ${GCC_PVR}"
72 cd "${S}"
73
74 + if [[ -n ${D_VER} ]] && use d ; then
75 + mv "${WORKDIR}"/d gcc/d || die
76 + ebegin "Adding support for the D language"
77 + ./gcc/d/setup-gcc.sh >& "${T}"/dgcc.log
78 + if ! eend $? ; then
79 + eerror "The D GCC package failed to apply"
80 + eerror "Please include this log file when posting a bug report:"
81 + eerror " ${T}/dgcc.log"
82 + die "failed to include the D language"
83 + fi
84 + fi
85 +
86 do_gcc_gentoo_patches
87 do_gcc_HTB_patches
88 do_gcc_PIE_patches