diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-12-06 04:29:22 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-12-06 04:29:22 +0000 |
commit | 03c995b478dd2979e0d889468a32f40770a098f7 (patch) | |
tree | a7c8c27c74f80b691f1a105b1f46aae903eb9ff5 /sys-devel/autoconf-wrapper | |
parent | fix metadata (Manifest recommit) (diff) | |
download | gentoo-2-03c995b478dd2979e0d889468a32f40770a098f7.tar.gz gentoo-2-03c995b478dd2979e0d889468a32f40770a098f7.tar.bz2 gentoo-2-03c995b478dd2979e0d889468a32f40770a098f7.zip |
When guessing which version to run, dont try to use autoconf-2.1x if we are running automake-1.7 or better.
Diffstat (limited to 'sys-devel/autoconf-wrapper')
-rw-r--r-- | sys-devel/autoconf-wrapper/ChangeLog | 9 | ||||
-rw-r--r-- | sys-devel/autoconf-wrapper/autoconf-wrapper-2.ebuild | 29 | ||||
-rw-r--r-- | sys-devel/autoconf-wrapper/files/ac-wrapper-2.sh | 95 | ||||
-rw-r--r-- | sys-devel/autoconf-wrapper/files/digest-autoconf-wrapper-2 | 0 |
4 files changed, 132 insertions, 1 deletions
diff --git a/sys-devel/autoconf-wrapper/ChangeLog b/sys-devel/autoconf-wrapper/ChangeLog index 260af0bd4c5d..7ca428b2f7db 100644 --- a/sys-devel/autoconf-wrapper/ChangeLog +++ b/sys-devel/autoconf-wrapper/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-devel/autoconf-wrapper # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf-wrapper/ChangeLog,v 1.3 2004/12/06 03:44:38 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf-wrapper/ChangeLog,v 1.4 2004/12/06 04:29:22 vapier Exp $ + +*autoconf-wrapper-2 (05 Dec 2004) + + 05 Dec 2004; Mike Frysinger <vapier@gentoo.org> +files/ac-wrapper-2.sh, + +autoconf-wrapper-2.ebuild: + When guessing which version to run, dont try to use autoconf-2.1x if we are + running automake-1.7 or better. *autoconf-wrapper-1-r1 (05 Dec 2004) diff --git a/sys-devel/autoconf-wrapper/autoconf-wrapper-2.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-2.ebuild new file mode 100644 index 000000000000..2929df7c3017 --- /dev/null +++ b/sys-devel/autoconf-wrapper/autoconf-wrapper-2.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf-wrapper/autoconf-wrapper-2.ebuild,v 1.1 2004/12/06 04:29:22 vapier Exp $ + +DESCRIPTION="wrapper for autoconf to manage multiple autoconf versions" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="" + +RDEPEND="" +PDEPEND=">=sys-devel/autoconf-2.59-r6 + ~sys-devel/autoconf-2.13" + +S=${WORKDIR} + +src_install() { + exeinto /usr/lib/misc + newexe ${FILESDIR}/ac-wrapper-${PV}.sh ac-wrapper.sh || die + + dodir /usr/bin + local x= + for x in auto{conf,header,m4te,reconf,scan,update} ifnames ; do + dosym ../lib/misc/ac-wrapper.sh /usr/bin/${x} || die + done +} diff --git a/sys-devel/autoconf-wrapper/files/ac-wrapper-2.sh b/sys-devel/autoconf-wrapper/files/ac-wrapper-2.sh new file mode 100644 index 000000000000..97f559dfc39b --- /dev/null +++ b/sys-devel/autoconf-wrapper/files/ac-wrapper-2.sh @@ -0,0 +1,95 @@ +#!/bin/bash +# Copyright 1999-2004 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-2.sh,v 1.1 2004/12/06 04:29:22 vapier Exp $ + +# Based on the ac-wrapper.pl script provided by MandrakeSoft +# Rewritten in bash by Gregorio Guidi +# +# Executes the correct autoconf version. +# +# - defaults to latest version (2.5x) +# - runs autoconf 2.13 only if: +# - envvar WANT_AUTOCONF is set to `2.1' +# -or- +# - `configure' is already present and was generated by autoconf 2.13 + +if [ "${0##*/}" = "ac-wrapper.sh" ] ; then + echo "Don't call this script directly" >&2 + exit 1 +fi + +if [ "${WANT_AUTOCONF}" = "2.1" -a "${0##*/}" = "autom4te" ] ; then + echo "ac-wrapper: Autoconf 2.13 doesn't contain autom4te." >&2 + echo " Either unset WANT_AUTOCONF or don't execute anything" >&2 + echo " that would use autom4te." >&2 + exit 1 +fi + +binary_new="${0}-2.59" +binary_old="${0}-2.13" +binary="${binary_new}" + +# +# autodetect routine +# +if [ "${WANT_AUTOCONF}" != "2.5" ] ; then + if [ "${WANT_AUTOCONF}" = "2.1" ] ; then + if [ ! -f "configure.ac" ] ; then + binary="${binary_old}" + else + echo "ac-wrapper: Since configure.ac is present, aclocal always use" >&2 + echo " autoconf 2.59, which conflicts with your choice and" >&2 + echo " causes error. You have two options:" >&2 + echo " 1. Try execute command again after removing configure.ac" >&2 + echo " 2. Don't set WANT_AUTOCONF" >&2 + exit 1 + fi + else + # Automake-1.7 and better requie autoconf-2.5x + case "${WANT_AUTOMAKE}" in + 1.[7-9]) ;; + *) + if [ -r "configure" ] ; then + confversion=$(awk \ + '{ + if (match($0, + "^# Generated (by (GNU )?Autoconf|automatically using autoconf version) ([0-9].[0-9])", + res)) + { print res[3]; exit } + }' configure) + fi + if [ "${confversion}" = "2.1" -a ! -f "configure.ac" ] ; then + binary="${binary_old}" + fi + esac + fi +fi + +if [ "${WANT_ACWRAPPER_DEBUG}" ] ; then + if [ -n "${WANT_AUTOCONF}" ] ; then + echo "ac-wrapper: DEBUG: WANT_AUTOCONF is set to ${WANT_AUTOCONF}" >&2 + fi + echo "ac-wrapper: DEBUG: will execute <$binary>" >&2 +fi + +# +# for further consistency +# +if [ "$binary" = "$binary_new" ] ; then + export WANT_AUTOCONF="2.5" +elif [ "$binary" = "$binary_old" ] ; then + export WANT_AUTOCONF="2.1" +fi + +if [ ! -x "$binary" ] ; then + # this shouldn't happen + echo "ac-wrapper: $binary is missing or not executable." >&2 + echo " Please try emerging the correct version of autoconf." >&2 + exit 1 +fi + +exec "$binary" "$@" + +echo "ac-wrapper: was unable to exec $binary !?" >&2 +exit 1 diff --git a/sys-devel/autoconf-wrapper/files/digest-autoconf-wrapper-2 b/sys-devel/autoconf-wrapper/files/digest-autoconf-wrapper-2 new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sys-devel/autoconf-wrapper/files/digest-autoconf-wrapper-2 |