diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-11-05 10:24:37 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-11-05 10:24:37 +0000 |
commit | e77f8a363811ee4ce5adb93e4e2ebaa4bc3f9686 (patch) | |
tree | ce35b6cb82f4f27bbbfda9fb3558211f034ac547 | |
parent | Add a more flexible wrapper using stuff from automake-wrapper-3 and allow WAN... (diff) | |
download | autotools-wrappers-e77f8a363811ee4ce5adb93e4e2ebaa4bc3f9686.tar.gz autotools-wrappers-e77f8a363811ee4ce5adb93e4e2ebaa4bc3f9686.tar.bz2 autotools-wrappers-e77f8a363811ee4ce5adb93e4e2ebaa4bc3f9686.zip |
Fix up SLOT/VER collision as pointed out by Alexis Ballier.
Package-Manager: portage-2.1.2_rc1-r2
-rwxr-xr-x | ac-wrapper.sh | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/ac-wrapper.sh b/ac-wrapper.sh index 37b9493..993fbb5 100755 --- a/ac-wrapper.sh +++ b/ac-wrapper.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf-wrapper/files/ac-wrapper-4.sh,v 1.1 2006/11/05 08:44:41 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf-wrapper/files/ac-wrapper-4.sh,v 1.2 2006/11/05 10:24:37 vapier Exp $ # Based on the ac-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi @@ -35,10 +35,7 @@ vers="2.60:2.5 2.59:2.5 2.13:2.1" binary="" for v in ${vers} ; do - auto_ver=${v%:*} # aka 2.60 - want_ver=${v#*:} # aka 2.5 - eval binary_${want_ver/./_}="${0}-${auto_ver}" - + auto_ver=${v%:*} if [ -z "${binary}" ] && [ -x "${0}-${auto_ver}" ] ; then binary="${0}-${auto_ver}" fi @@ -62,14 +59,15 @@ if [ -n "${WANT_AUTOCONF}" ] ; then break fi + auto_ver=${v%:*} want_ver=${v#*:} for wx in ${WANT_AUTOCONF} ; do - if [ "${wx}" = "${want_ver}" ] ; then - binary="binary_${want_ver/./_}" - binary="${!binary}" - break + if [ "${wx}" = "${want_ver}" ] && [ -x "${0}-${auto_ver}" ] ; then + binary="${0}-${auto_ver}" + v="x" fi done + [ "${v}" = "x" ] && break done fi @@ -125,7 +123,7 @@ if [[ ${WANT_AUTOCONF} != "2.5" ]] && [[ -n ${WANT_AUTOMAKE} ]] ; then && confversion=$(generated_version configure) if [[ ${confversion} == "2.1" && ! -f "configure.ac" ]] ; then - binary="${binary_2_1}" + binary="${0}-2.13" fi esac fi @@ -141,9 +139,9 @@ fi # for further consistency # for v in ${vers} ; do + auto_ver=${v%:*} want_ver=${v#*:} - mybin="binary_${want_ver/./_}" - if [ "${binary}" = "${!mybin}" ] ; then + if [ "${binary}" = "${0}-${auto_ver}" ] ; then export WANT_AUTOMAKE="${want_ver}" fi done |