1 |
commit: 48abff6bc9df2febea7273ae76dbec627583e121 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 25 23:49:49 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 26 00:06:25 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48abff6b |
7 |
|
8 |
toolchain.eclass: drop PRERELEASE support |
9 |
|
10 |
gcc's mirrors don't have prerelrease directories anymore |
11 |
and only have weekly snapshots and release candidates. |
12 |
|
13 |
Those now are covered by the following version schema: |
14 |
1.0.0_pre9999: live ebuild |
15 |
1.2.3_alphaYYYYMMDD: weekly snapshots |
16 |
1.2.3_rcYYYYMMDD: release candidates |
17 |
|
18 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
19 |
|
20 |
eclass/toolchain.eclass | 54 ++++++++++++++++--------------------------------- |
21 |
1 file changed, 17 insertions(+), 37 deletions(-) |
22 |
|
23 |
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass |
24 |
index 5033708c7e5..aa70a11c410 100644 |
25 |
--- a/eclass/toolchain.eclass |
26 |
+++ b/eclass/toolchain.eclass |
27 |
@@ -77,22 +77,18 @@ GCCMICRO=$(ver_cut 3 ${GCC_PV}) |
28 |
# ([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)? |
29 |
GCC_CONFIG_VER=${GCC_CONFIG_VER:-$(ver_rs 3 '-' ${GCC_PV})} |
30 |
|
31 |
-# Pre-release support |
32 |
-if [[ ${GCC_PV} == *_pre* ]] ; then |
33 |
- PRERELEASE=${GCC_PV/_pre/-} |
34 |
-elif [[ ${GCC_PV} == *_alpha* ]] ; then |
35 |
- SNAPSHOT=${GCC_BRANCH_VER}-${GCC_PV##*_alpha} |
36 |
-elif [[ ${GCC_PV} == *_beta* ]] ; then |
37 |
- SNAPSHOT=${GCC_BRANCH_VER}-${GCC_PV##*_beta} |
38 |
+# Pre-release support. Versioning schema: |
39 |
+# 1.0.0_pre9999: live ebuild |
40 |
+# 1.2.3_alphaYYYYMMDD: weekly snapshots |
41 |
+# 1.2.3_rcYYYYMMDD: release candidates |
42 |
+if [[ ${GCC_PV} == *_alpha* ]] ; then |
43 |
+ # weekly snapshots |
44 |
+ SNAPSHOT=${GCCMAJOR}-${GCC_PV##*_alpha} |
45 |
elif [[ ${GCC_PV} == *_rc* ]] ; then |
46 |
+ # release candidates |
47 |
SNAPSHOT=${GCC_PV%_rc*}-RC-${GCC_PV##*_rc} |
48 |
fi |
49 |
|
50 |
-if [[ ${SNAPSHOT} == [56789].0-* ]] ; then |
51 |
- # The gcc-5+ releases have dropped the .0 for some reason. |
52 |
- SNAPSHOT=${SNAPSHOT/.0} |
53 |
-fi |
54 |
- |
55 |
PREFIX=${TOOLCHAIN_PREFIX:-${EPREFIX}/usr} |
56 |
|
57 |
if tc_version_is_at_least 3.4.0 ; then |
58 |
@@ -191,7 +187,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then |
59 |
fi |
60 |
|
61 |
if tc_version_is_at_least 10; then |
62 |
- # Note: currently we pull in prereleases, snapshots and |
63 |
+ # Note: currently we pull in releases, snapshots and |
64 |
# git versions into the same SLOT. |
65 |
SLOT="${GCCMAJOR}" |
66 |
else |
67 |
@@ -260,12 +256,10 @@ PDEPEND=">=sys-devel/gcc-config-1.7" |
68 |
#---->> S + SRC_URI essentials <<---- |
69 |
|
70 |
# Set the source directory depending on whether we're using |
71 |
-# a prerelease, snapshot, or release tarball. |
72 |
+# a live git tree, snapshot, or release tarball. |
73 |
S=$( |
74 |
if tc_is_live ; then |
75 |
echo ${EGIT_CHECKOUT_DIR} |
76 |
- elif [[ -n ${PRERELEASE} ]] ; then |
77 |
- echo ${WORKDIR}/gcc-${PRERELEASE} |
78 |
elif [[ -n ${SNAPSHOT} ]] ; then |
79 |
echo ${WORKDIR}/gcc-${SNAPSHOT} |
80 |
else |
81 |
@@ -347,18 +341,11 @@ get_gcc_src_uri() { |
82 |
export SPECS_GCC_VER=${SPECS_GCC_VER:-${GCC_RELEASE_VER}} |
83 |
|
84 |
# Set where to download gcc itself depending on whether we're using a |
85 |
- # prerelease, snapshot, or release tarball. |
86 |
+ # live git tree, snapshot, or release tarball. |
87 |
if tc_is_live ; then |
88 |
- # Nothing to do w/git snapshots. |
89 |
- : |
90 |
- elif [[ -n ${PRERELEASE} ]] ; then |
91 |
- GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/prerelease-${PRERELEASE}/gcc-${PRERELEASE}.tar.bz2" |
92 |
+ : # Nothing to do w/git snapshots. |
93 |
elif [[ -n ${SNAPSHOT} ]] ; then |
94 |
- if tc_version_is_between 5.5 6 || tc_version_is_between 6.4 7 || tc_version_is_at_least 7.2 ; then |
95 |
- GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz" |
96 |
- else |
97 |
- GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.bz2" |
98 |
- fi |
99 |
+ GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz" |
100 |
else |
101 |
if tc_version_is_between 5.5 6 || tc_version_is_between 6.4 7 || tc_version_is_at_least 7.2 ; then |
102 |
GCC_SRC_URI="mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.xz" |
103 |
@@ -414,7 +401,7 @@ SRC_URI=$(get_gcc_src_uri) |
104 |
#---->> pkg_pretend <<---- |
105 |
|
106 |
toolchain_is_unsupported() { |
107 |
- [[ -n ${PRERELEASE}${SNAPSHOT} ]] || tc_is_live |
108 |
+ [[ -n ${SNAPSHOT} ]] || tc_is_live |
109 |
} |
110 |
|
111 |
toolchain_pkg_pretend() { |
112 |
@@ -465,14 +452,8 @@ gcc_quick_unpack() { |
113 |
unpack ${GCC_A_FAKEIT} |
114 |
elif tc_is_live ; then |
115 |
: # sources comes from git, not tarball |
116 |
- elif [[ -n ${PRERELEASE} ]] ; then |
117 |
- unpack gcc-${PRERELEASE}.tar.bz2 |
118 |
elif [[ -n ${SNAPSHOT} ]] ; then |
119 |
- if tc_version_is_between 5.5 6 || tc_version_is_between 6.4 7 || tc_version_is_at_least 7.2 ; then |
120 |
- unpack gcc-${SNAPSHOT}.tar.xz |
121 |
- else |
122 |
- unpack gcc-${SNAPSHOT}.tar.bz2 |
123 |
- fi |
124 |
+ unpack gcc-${SNAPSHOT}.tar.xz |
125 |
else |
126 |
if tc_version_is_between 5.5 6 || tc_version_is_between 6.4 7 || tc_version_is_at_least 7.2 ; then |
127 |
unpack gcc-${GCC_RELEASE_VER}.tar.xz |
128 |
@@ -587,8 +568,7 @@ toolchain_src_prepare() { |
129 |
gcc_version_patch |
130 |
|
131 |
if tc_version_is_at_least 4.1 ; then |
132 |
- if [[ -n ${SNAPSHOT} || -n ${PRERELEASE} ]] ; then |
133 |
- # BASE-VER must be a three-digit version number |
134 |
+ if [[ -n ${SNAPSHOT} ]] || tc_is_live ; then |
135 |
# followed by an optional -pre string |
136 |
# eg. 4.5.1, 4.6.2-pre20120213, 4.7.0-pre9999 |
137 |
# If BASE-VER differs from ${PV/_/-} then libraries get installed in |
138 |
@@ -2263,7 +2243,7 @@ toolchain_pkg_postinst() { |
139 |
cp "${ROOT%/}${DATAPATH}"/c{89,99} "${EROOT%/}"/usr/bin/ 2>/dev/null |
140 |
fi |
141 |
|
142 |
- if [[ -n ${PRERELEASE}${SNAPSHOT} ]] ; then |
143 |
+ if toolchain_is_unsupported ; then |
144 |
einfo "This GCC ebuild is provided for your convenience, and the use" |
145 |
einfo "of this compiler is not supported by the Gentoo Developers." |
146 |
einfo "Please report bugs to upstream at http://gcc.gnu.org/bugzilla/" |