From dc93b83ed245cbf6ac2b88585b3a6da5c5ed2519 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 14 Nov 2004 03:40:51 +0000 Subject: [PATCH] Punt the perl version and use the bash version by Gregorio Guidi #66478. --- sys-devel/autoconf-wrapper/ChangeLog | 6 +- sys-devel/autoconf-wrapper/Manifest | 13 +-- .../autoconf-wrapper-1.ebuild | 8 +- .../autoconf-wrapper/files/ac-wrapper-1.sh | 93 +++++++++++++++++++ 4 files changed, 109 insertions(+), 11 deletions(-) create mode 100644 sys-devel/autoconf-wrapper/files/ac-wrapper-1.sh diff --git a/sys-devel/autoconf-wrapper/ChangeLog b/sys-devel/autoconf-wrapper/ChangeLog index 4e3b9b6a30fb..1b8c6f223743 100644 --- a/sys-devel/autoconf-wrapper/ChangeLog +++ b/sys-devel/autoconf-wrapper/ChangeLog @@ -1,6 +1,10 @@ # 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 +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) diff --git a/sys-devel/autoconf-wrapper/Manifest b/sys-devel/autoconf-wrapper/Manifest index 6b9942852724..b347f436807a 100644 --- a/sys-devel/autoconf-wrapper/Manifest +++ b/sys-devel/autoconf-wrapper/Manifest @@ -1,15 +1,16 @@ -----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----- diff --git a/sys-devel/autoconf-wrapper/autoconf-wrapper-1.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-1.ebuild index 1895a0bcc762..18821903767c 100644 --- a/sys-devel/autoconf-wrapper/autoconf-wrapper-1.ebuild +++ b/sys-devel/autoconf-wrapper/autoconf-wrapper-1.ebuild @@ -1,6 +1,6 @@ # 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/" @@ -8,7 +8,7 @@ SRC_URI="" 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" @@ -17,11 +17,11 @@ S=${WORKDIR} 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 } diff --git a/sys-devel/autoconf-wrapper/files/ac-wrapper-1.sh b/sys-devel/autoconf-wrapper/files/ac-wrapper-1.sh new file mode 100644 index 000000000000..1f1810d2cbc7 --- /dev/null +++ b/sys-devel/autoconf-wrapper/files/ac-wrapper-1.sh @@ -0,0 +1,93 @@ +#!/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 -- 2.26.2