# 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.1 2004/10/21 01:06:11 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf-wrapper/ChangeLog,v 1.2 2004/11/14 03:40:51 vapier Exp $
+
+ 13 Nov 2004; Mike Frysinger <vapier@gentoo.org> +files/ac-wrapper-1.sh,
+ autoconf-wrapper-1.ebuild:
+ Punt the perl version and use the bash version by Gregorio Guidi #66478.
*autoconf-wrapper-1 (20 Oct 2004)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 7144b0bee0a53a2f4e379ec45c3b5612 autoconf-wrapper-1.ebuild 759
-MD5 076d1b4bb28d498a1565e59abd92e5ca ChangeLog 433
+MD5 7b8db28aec7cca84de7f72f8d9c162b9 autoconf-wrapper-1.ebuild 763
+MD5 bc4a1aae0dcd75aa901f9215c00ad0ed ChangeLog 612
MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
-MD5 8561478423a4ec9456804063003735d5 files/ac-wrapper-1.pl 3844
MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-autoconf-wrapper-1 0
+MD5 8561478423a4ec9456804063003735d5 files/ac-wrapper-1.pl 3844
+MD5 f16270e7ef6d6bc0dfb066f06601965b files/ac-wrapper-1.sh 2684
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.9.10 (GNU/Linux)
-iD8DBQFBeTC9HTu7gpaalycRAgUNAJ0dG5vJkafBhXWO+UAhCUU0NNF4kACfcTmP
-y4UmHf4L+xB1TlqVpdzXgfs=
-=e0lS
+iD8DBQFBltPyHTu7gpaalycRAhOWAKDUUu4qOl4cbb1b6R5v51VrIFz4iQCfQffI
+bSvPeQpRfImRUnI17m/ffWQ=
+=Wx20
-----END PGP SIGNATURE-----
# 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-1.ebuild,v 1.2 2004/10/22 16:08:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf-wrapper/autoconf-wrapper-1.ebuild,v 1.3 2004/11/14 03:40:51 vapier Exp $
DESCRIPTION="wrapper for autoconf to manage multiple autoconf versions"
HOMEPAGE="http://www.gentoo.org/"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE=""
RDEPEND="dev-lang/perl"
src_install() {
exeinto /usr/lib/misc
- newexe ${FILESDIR}/ac-wrapper-${PV}.pl ac-wrapper.pl || die
+ 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.pl /usr/bin/${x} || die
+ dosym ../lib/misc/ac-wrapper.sh /usr/bin/${x} || die
done
}
--- /dev/null
+#!/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-1.sh,v 1.1 2004/11/14 03:40:51 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 [ -f "configure.ac" -o -f "configure.in" ] ; then
+ 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
+ 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
+ fi
+ 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