When guessing which version to run, dont try to use autoconf-2.1x if we are running...
authorMike Frysinger <vapier@gentoo.org>
Mon, 6 Dec 2004 04:29:22 +0000 (04:29 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 6 Dec 2004 04:29:22 +0000 (04:29 +0000)
sys-devel/autoconf-wrapper/ChangeLog
sys-devel/autoconf-wrapper/Manifest
sys-devel/autoconf-wrapper/autoconf-wrapper-2.ebuild [new file with mode: 0644]
sys-devel/autoconf-wrapper/files/ac-wrapper-2.sh [new file with mode: 0644]
sys-devel/autoconf-wrapper/files/digest-autoconf-wrapper-2 [new file with mode: 0644]

index 260af0bd4c5dea11d3e77d1f54d96c24c22fd610..7ca428b2f7db4bdfdb5155826ec53b29ed9979ad 100644 (file)
@@ -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)
 
index 8fb7385e102a46f41d434a3b4ce14a3b1efa7dd2..b0e19ee2b7eb95aeec5b10591f65059b0c63102b 100644 (file)
@@ -1,15 +1,18 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 6df9b0477d398aba28d04ce7e5ecec6c ChangeLog 792
+MD5 822c73d08963e13e27f0b4a7ad9c2fef autoconf-wrapper-2.ebuild 815
+MD5 9ac554fd3dc784ca5533f01a8ad09f89 ChangeLog 1044
 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
 MD5 efa2adb1f34b1b73841a4ce04f1e67c6 autoconf-wrapper-1-r1.ebuild 818
+MD5 070d7714b2e14aa7d8af8018b1397da3 files/ac-wrapper-2.sh 2716
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-autoconf-wrapper-2 0
 MD5 f620449fab0370d6ee016684fbf6b671 files/ac-wrapper-1.sh 2600
 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-autoconf-wrapper-1-r1 0
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.9.10 (GNU/Linux)
 
-iD8DBQFBs9X4roRuSHgZdywRAijmAJ0bnQ59Qee7sDPe4B5xbqZFydGjPACeMlp/
-tYlLGx4aDDNmdZa+t0Ws2PQ=
-=ucUm
+iD8DBQFBs+A7roRuSHgZdywRAnveAJ4zRNPFQjd0hfSeLx3nlBZvyeYNEgCfaX9p
+SdPzHKUBXulYDvCYnuAeF3M=
+=Gdlz
 -----END PGP SIGNATURE-----
diff --git a/sys-devel/autoconf-wrapper/autoconf-wrapper-2.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-2.ebuild
new file mode 100644 (file)
index 0000000..2929df7
--- /dev/null
@@ -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 (file)
index 0000000..97f559d
--- /dev/null
@@ -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 (file)
index 0000000..e69de29