summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2005-06-28 21:17:42 +0000
committerMartin Schlemmer <azarah@gentoo.org>2005-06-28 21:17:42 +0000
commit431270f64411f707f89177122c6bd8e820219639 (patch)
tree7cfc50b0d6a090778caf0c7b52ccc8f04a3ee066 /sys-devel/autoconf-wrapper
parentVersion bump. (diff)
downloadhistorical-431270f64411f707f89177122c6bd8e820219639.tar.gz
historical-431270f64411f707f89177122c6bd8e820219639.tar.bz2
historical-431270f64411f707f89177122c6bd8e820219639.zip
Add logic to check automake aux files for AC_PREREQ and run required
autoconf version according to that. Some syntax cleanups. Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'sys-devel/autoconf-wrapper')
-rw-r--r--sys-devel/autoconf-wrapper/ChangeLog9
-rw-r--r--sys-devel/autoconf-wrapper/Manifest19
-rw-r--r--sys-devel/autoconf-wrapper/autoconf-wrapper-3.ebuild28
-rw-r--r--sys-devel/autoconf-wrapper/files/ac-wrapper-3.sh107
-rw-r--r--sys-devel/autoconf-wrapper/files/digest-autoconf-wrapper-30
5 files changed, 159 insertions, 4 deletions
diff --git a/sys-devel/autoconf-wrapper/ChangeLog b/sys-devel/autoconf-wrapper/ChangeLog
index 793119939310..9ee5da68511f 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-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf-wrapper/ChangeLog,v 1.10 2005/02/09 14:19:49 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf-wrapper/ChangeLog,v 1.11 2005/06/28 21:17:42 azarah Exp $
+
+*autoconf-wrapper-3 (28 Jun 2005)
+
+ 28 Jun 2005; Martin Schlemmer <azarah@gentoo.org> +files/ac-wrapper-3.sh,
+ +autoconf-wrapper-3.ebuild:
+ Add logic to check automake aux files for AC_PREREQ and run required
+ autoconf version according to that. Some syntax cleanups.
*autoconf-wrapper-2-r1 (08 Feb 2004)
diff --git a/sys-devel/autoconf-wrapper/Manifest b/sys-devel/autoconf-wrapper/Manifest
index 086dc802775f..60cb5ef382c4 100644
--- a/sys-devel/autoconf-wrapper/Manifest
+++ b/sys-devel/autoconf-wrapper/Manifest
@@ -1,5 +1,18 @@
-MD5 dcf33eeee0bea07aabedecc940e44a7c ChangeLog 1165
-MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
MD5 84d41809a827ec0c2e3b3e0804c14886 autoconf-wrapper-2-r1.ebuild 811
-MD5 d4c9467b972dd2b40aa7a1b89d2226b6 files/ac-wrapper-2.sh 2717
+MD5 5893addbc67d6e0d2fff9560a7e5198f autoconf-wrapper-3.ebuild 821
+MD5 fda666499d1dda5124c69a63fcc72ecb ChangeLog 1438
+MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-autoconf-wrapper-2-r1 0
+MD5 d4c9467b972dd2b40aa7a1b89d2226b6 files/ac-wrapper-2.sh 2717
+MD5 05bfd519bb0f3ff73296069a59c86514 files/ac-wrapper-3.sh 3059
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-autoconf-wrapper-3 0
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.1 (GNU/Linux)
+
+iD8DBQFCwb7R1ZcsMnZjRyIRAnYUAJ9wdLIq+uJEDZhekSnmnBNeNizaFACfcK03
+ZRLE2qt57w8B7GKjapgyjQs=
+=KiQ8
+-----END PGP SIGNATURE-----
diff --git a/sys-devel/autoconf-wrapper/autoconf-wrapper-3.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-3.ebuild
new file mode 100644
index 000000000000..14579082d7a1
--- /dev/null
+++ b/sys-devel/autoconf-wrapper/autoconf-wrapper-3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf-wrapper/autoconf-wrapper-3.ebuild,v 1.1 2005/06/28 21:17:42 azarah 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 ~m68k ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+RDEPEND=">=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-3.sh b/sys-devel/autoconf-wrapper/files/ac-wrapper-3.sh
new file mode 100644
index 000000000000..55250ae0c9fe
--- /dev/null
+++ b/sys-devel/autoconf-wrapper/files/ac-wrapper-3.sh
@@ -0,0 +1,107 @@
+#!/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-3.sh,v 1.1 2005/06/28 21:17:42 azarah 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" && ${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]) ;;
+ *)
+ acfiles=$(ls ac{local,include}.m4 2>/dev/null)
+ if [[ -n ${acfiles} ]] ; then
+ confversion=$(gawk \
+ '{
+ if (match($0, "AC_PREREQ\\(\\[?([0-9]\\.[0-9])", res))
+ VERSIONS[COUNT++] = res[1]
+ }
+ END {
+ asort(VERSIONS)
+ print VERSIONS[COUNT]
+ }' ${acfiles})
+ fi
+ if [[ -z ${confversion} && -r "configure" ]] ; then
+ confversion=$(gawk \
+ '{
+ 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" && ! -f "configure.ac" ]] ; then
+ binary="${binary_old}"
+ fi
+ esac
+ fi
+fi
+
+if [[ -n ${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-3 b/sys-devel/autoconf-wrapper/files/digest-autoconf-wrapper-3
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sys-devel/autoconf-wrapper/files/digest-autoconf-wrapper-3