summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-03-21 17:12:01 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-03-21 17:12:01 +0000
commit8c478b4f1f1bc933793439c8920271ca52770224 (patch)
treeaf2f7e02ede81fe32aec21d56c0a7502e245ac04 /eclass
parentold (diff)
downloadgentoo-2-8c478b4f1f1bc933793439c8920271ca52770224.tar.gz
gentoo-2-8c478b4f1f1bc933793439c8920271ca52770224.tar.bz2
gentoo-2-8c478b4f1f1bc933793439c8920271ca52770224.zip
Go back to use a variable rather than an array for _LATEST_AUTOMAKE, use versionator eclass to go back to the full version instead, so that it's clear what's going on and other developers don't misread the code. It's only perfect for EAPI >= 0 but it's not broken on EAPI=0 anyway.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog8
-rw-r--r--eclass/autotools.eclass33
2 files changed, 25 insertions, 16 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 1ff6deab15a5..e2e3c2a6cf16 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.176 2012/03/20 20:37:21 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.177 2012/03/21 17:12:01 flameeyes Exp $
+
+ 21 Mar 2012; Diego E. Pettenò <flameeyes@gentoo.org> autotools.eclass:
+ Go back to use a variable rather than an array for _LATEST_AUTOMAKE, use
+ versionator eclass to go back to the full version instead, so that it's clear
+ what's going on and other developers don't misread the code. It's only
+ perfect for EAPI >= 0 but it's not broken on EAPI=0 anyway.
20 Mar 2012; Mike Gilbert <floppym@gentoo.org> python.eclass:
Define _python_implementation() earlier.
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index e84474c07f28..7f417ee5321e 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.126 2012/03/21 08:19:22 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.127 2012/03/21 17:12:01 flameeyes Exp $
# @ECLASS: autotools.eclass
# @MAINTAINER:
@@ -16,7 +16,7 @@
if [[ ${___ECLASS_ONCE_AUTOTOOLS} != "recur -_+^+_- spank" ]] ; then
___ECLASS_ONCE_AUTOTOOLS="recur -_+^+_- spank"
-inherit eutils libtool
+inherit eutils libtool versionator
# @ECLASS-VARIABLE: WANT_AUTOCONF
# @DESCRIPTION:
@@ -37,13 +37,11 @@ inherit eutils libtool
# @INTERNAL
# @DESCRIPTION:
# CONSTANT!
-# The latest major version/slot of automake available on each arch. #312315
-# If a newer version is stable on any arch, and is NOT reflected in this list,
+# The latest major-minor version/slot of automake available on each arch. #312315
+# If a newer slot is stable on any arch, and is NOT reflected in this list,
# then circular dependencies may arise during emerge @system bootstraps.
-# If you want to force a newer minor version, you can specify the correct
-# WANT value by using a colon: <PV>[:<WANT_AUTOMAKE>]
# Do NOT change this variable in your ebuilds!
-_LATEST_AUTOMAKE=( 1.11.1:1.11 )
+_LATEST_AUTOMAKE=1.11.1
_automake_atom="sys-devel/automake"
_autoconf_atom="sys-devel/autoconf"
@@ -52,8 +50,15 @@ if [[ -n ${WANT_AUTOMAKE} ]]; then
none) _automake_atom="" ;; # some packages don't require automake at all
# if you change the "latest" version here, change also autotools_run_tool
# this MUST reflect the latest stable major version for each arch!
- latest) _automake_atom="|| ( `printf '>=sys-devel/automake-%s ' ${_LATEST_AUTOMAKE[@]/%:*}` )" ;;
- *) _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*" ;;
+ latest)
+ if [[ ${EAPI:-0} != 0 ]]; then
+ _automake_atom=">=sys-devel/automake-${_LATEST_AUTOMAKE}:$(get_version_component_range 1-2 ${_LATEST_AUTOMAKE})"
+ else
+ _automake_atom=">=sys-devel/automake-${_LATEST_AUTOMAKE} =sys-devel/automake-$(get_version_component_range 1-2 ${_LATEST_AUTOMAKE})*"
+ fi
+ ;;
+ *)
+ _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*" ;;
esac
export WANT_AUTOMAKE
fi
@@ -346,12 +351,10 @@ autotools_env_setup() {
# We do the "latest" → version switch here because it solves
# possible order problems, see bug #270010 as an example.
if [[ ${WANT_AUTOMAKE} == "latest" ]]; then
- local pv
- for pv in ${_LATEST_AUTOMAKE[@]/#*:} ; do
- # has_version respects ROOT, but in this case, we don't want it to,
- # thus "ROOT=/" prefix:
- ROOT=/ has_version "=sys-devel/automake-${pv}*" && export WANT_AUTOMAKE="${pv}"
- done
+ # has_version respects ROOT, but in this case, we don't want it to,
+ # thus "ROOT=/" prefix:
+ ROOT=/ has_version "=sys-devel/automake-$(get_version_component_range 1-2 ${_LATEST_AUTOMAKE})*" && export WANT_AUTOMAKE="$(get_version_component_range 1-2 ${_LATEST_AUTOMAKE})"
+
[[ ${WANT_AUTOMAKE} == "latest" ]] && \
die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE}"
fi