mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 11:37:20 -08:00
toolchain.eclass: drop PRERELEASE support
gcc's mirrors don't have prerelrease directories anymore and only have weekly snapshots and release candidates. Those now are covered by the following version schema: 1.0.0_pre9999: live ebuild 1.2.3_alphaYYYYMMDD: weekly snapshots 1.2.3_rcYYYYMMDD: release candidates Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This commit is contained in:
+17
-37
@@ -77,22 +77,18 @@ GCCMICRO=$(ver_cut 3 ${GCC_PV})
|
||||
# ([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)?
|
||||
GCC_CONFIG_VER=${GCC_CONFIG_VER:-$(ver_rs 3 '-' ${GCC_PV})}
|
||||
|
||||
# Pre-release support
|
||||
if [[ ${GCC_PV} == *_pre* ]] ; then
|
||||
PRERELEASE=${GCC_PV/_pre/-}
|
||||
elif [[ ${GCC_PV} == *_alpha* ]] ; then
|
||||
SNAPSHOT=${GCC_BRANCH_VER}-${GCC_PV##*_alpha}
|
||||
elif [[ ${GCC_PV} == *_beta* ]] ; then
|
||||
SNAPSHOT=${GCC_BRANCH_VER}-${GCC_PV##*_beta}
|
||||
# Pre-release support. Versioning schema:
|
||||
# 1.0.0_pre9999: live ebuild
|
||||
# 1.2.3_alphaYYYYMMDD: weekly snapshots
|
||||
# 1.2.3_rcYYYYMMDD: release candidates
|
||||
if [[ ${GCC_PV} == *_alpha* ]] ; then
|
||||
# weekly snapshots
|
||||
SNAPSHOT=${GCCMAJOR}-${GCC_PV##*_alpha}
|
||||
elif [[ ${GCC_PV} == *_rc* ]] ; then
|
||||
# release candidates
|
||||
SNAPSHOT=${GCC_PV%_rc*}-RC-${GCC_PV##*_rc}
|
||||
fi
|
||||
|
||||
if [[ ${SNAPSHOT} == [56789].0-* ]] ; then
|
||||
# The gcc-5+ releases have dropped the .0 for some reason.
|
||||
SNAPSHOT=${SNAPSHOT/.0}
|
||||
fi
|
||||
|
||||
PREFIX=${TOOLCHAIN_PREFIX:-${EPREFIX}/usr}
|
||||
|
||||
if tc_version_is_at_least 3.4.0 ; then
|
||||
@@ -191,7 +187,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
|
||||
fi
|
||||
|
||||
if tc_version_is_at_least 10; then
|
||||
# Note: currently we pull in prereleases, snapshots and
|
||||
# Note: currently we pull in releases, snapshots and
|
||||
# git versions into the same SLOT.
|
||||
SLOT="${GCCMAJOR}"
|
||||
else
|
||||
@@ -260,12 +256,10 @@ PDEPEND=">=sys-devel/gcc-config-1.7"
|
||||
#---->> S + SRC_URI essentials <<----
|
||||
|
||||
# Set the source directory depending on whether we're using
|
||||
# a prerelease, snapshot, or release tarball.
|
||||
# a live git tree, snapshot, or release tarball.
|
||||
S=$(
|
||||
if tc_is_live ; then
|
||||
echo ${EGIT_CHECKOUT_DIR}
|
||||
elif [[ -n ${PRERELEASE} ]] ; then
|
||||
echo ${WORKDIR}/gcc-${PRERELEASE}
|
||||
elif [[ -n ${SNAPSHOT} ]] ; then
|
||||
echo ${WORKDIR}/gcc-${SNAPSHOT}
|
||||
else
|
||||
@@ -347,18 +341,11 @@ get_gcc_src_uri() {
|
||||
export SPECS_GCC_VER=${SPECS_GCC_VER:-${GCC_RELEASE_VER}}
|
||||
|
||||
# Set where to download gcc itself depending on whether we're using a
|
||||
# prerelease, snapshot, or release tarball.
|
||||
# live git tree, snapshot, or release tarball.
|
||||
if tc_is_live ; then
|
||||
# Nothing to do w/git snapshots.
|
||||
:
|
||||
elif [[ -n ${PRERELEASE} ]] ; then
|
||||
GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/prerelease-${PRERELEASE}/gcc-${PRERELEASE}.tar.bz2"
|
||||
: # Nothing to do w/git snapshots.
|
||||
elif [[ -n ${SNAPSHOT} ]] ; then
|
||||
if tc_version_is_between 5.5 6 || tc_version_is_between 6.4 7 || tc_version_is_at_least 7.2 ; then
|
||||
GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz"
|
||||
else
|
||||
GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.bz2"
|
||||
fi
|
||||
GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz"
|
||||
else
|
||||
if tc_version_is_between 5.5 6 || tc_version_is_between 6.4 7 || tc_version_is_at_least 7.2 ; then
|
||||
GCC_SRC_URI="mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.xz"
|
||||
@@ -414,7 +401,7 @@ SRC_URI=$(get_gcc_src_uri)
|
||||
#---->> pkg_pretend <<----
|
||||
|
||||
toolchain_is_unsupported() {
|
||||
[[ -n ${PRERELEASE}${SNAPSHOT} ]] || tc_is_live
|
||||
[[ -n ${SNAPSHOT} ]] || tc_is_live
|
||||
}
|
||||
|
||||
toolchain_pkg_pretend() {
|
||||
@@ -465,14 +452,8 @@ gcc_quick_unpack() {
|
||||
unpack ${GCC_A_FAKEIT}
|
||||
elif tc_is_live ; then
|
||||
: # sources comes from git, not tarball
|
||||
elif [[ -n ${PRERELEASE} ]] ; then
|
||||
unpack gcc-${PRERELEASE}.tar.bz2
|
||||
elif [[ -n ${SNAPSHOT} ]] ; then
|
||||
if tc_version_is_between 5.5 6 || tc_version_is_between 6.4 7 || tc_version_is_at_least 7.2 ; then
|
||||
unpack gcc-${SNAPSHOT}.tar.xz
|
||||
else
|
||||
unpack gcc-${SNAPSHOT}.tar.bz2
|
||||
fi
|
||||
unpack gcc-${SNAPSHOT}.tar.xz
|
||||
else
|
||||
if tc_version_is_between 5.5 6 || tc_version_is_between 6.4 7 || tc_version_is_at_least 7.2 ; then
|
||||
unpack gcc-${GCC_RELEASE_VER}.tar.xz
|
||||
@@ -587,8 +568,7 @@ toolchain_src_prepare() {
|
||||
gcc_version_patch
|
||||
|
||||
if tc_version_is_at_least 4.1 ; then
|
||||
if [[ -n ${SNAPSHOT} || -n ${PRERELEASE} ]] ; then
|
||||
# BASE-VER must be a three-digit version number
|
||||
if [[ -n ${SNAPSHOT} ]] || tc_is_live ; then
|
||||
# followed by an optional -pre string
|
||||
# eg. 4.5.1, 4.6.2-pre20120213, 4.7.0-pre9999
|
||||
# If BASE-VER differs from ${PV/_/-} then libraries get installed in
|
||||
@@ -2263,7 +2243,7 @@ toolchain_pkg_postinst() {
|
||||
cp "${ROOT%/}${DATAPATH}"/c{89,99} "${EROOT%/}"/usr/bin/ 2>/dev/null
|
||||
fi
|
||||
|
||||
if [[ -n ${PRERELEASE}${SNAPSHOT} ]] ; then
|
||||
if toolchain_is_unsupported ; then
|
||||
einfo "This GCC ebuild is provided for your convenience, and the use"
|
||||
einfo "of this compiler is not supported by the Gentoo Developers."
|
||||
einfo "Please report bugs to upstream at http://gcc.gnu.org/bugzilla/"
|
||||
|
||||
Reference in New Issue
Block a user