From 2a2e87ea6cd9307f9af472cb05377af64afc5bfe Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Sat, 16 Jul 2005 20:28:42 +0000 Subject: Update to work with MacOS X. Do not parse comments in acfiles. Package-Manager: portage-2.0.51.22-r1 --- sys-devel/autoconf-wrapper/ChangeLog | 8 +- sys-devel/autoconf-wrapper/Manifest | 19 +-- .../autoconf-wrapper/autoconf-wrapper-3.1.ebuild | 28 ++++ sys-devel/autoconf-wrapper/files/ac-wrapper-3.1.sh | 158 +++++++++++++++++++++ .../files/digest-autoconf-wrapper-3.1 | 0 5 files changed, 204 insertions(+), 9 deletions(-) create mode 100644 sys-devel/autoconf-wrapper/autoconf-wrapper-3.1.ebuild create mode 100755 sys-devel/autoconf-wrapper/files/ac-wrapper-3.1.sh create mode 100644 sys-devel/autoconf-wrapper/files/digest-autoconf-wrapper-3.1 (limited to 'sys-devel/autoconf-wrapper') diff --git a/sys-devel/autoconf-wrapper/ChangeLog b/sys-devel/autoconf-wrapper/ChangeLog index 976f5bbc1dcb..99a9c317f077 100644 --- a/sys-devel/autoconf-wrapper/ChangeLog +++ b/sys-devel/autoconf-wrapper/ChangeLog @@ -1,6 +1,12 @@ # 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.15 2005/07/12 14:53:20 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf-wrapper/ChangeLog,v 1.16 2005/07/16 20:28:42 azarah Exp $ + +*autoconf-wrapper-3.1 (16 Jul 2005) + + 16 Jul 2005; Martin Schlemmer + +files/ac-wrapper-3.1.sh, +autoconf-wrapper-3.1.ebuild: + Update to work with MacOS X. Do not parse comments in acfiles. 12 Jul 2005; Gustavo Zacarias autoconf-wrapper-3-r1.ebuild: diff --git a/sys-devel/autoconf-wrapper/Manifest b/sys-devel/autoconf-wrapper/Manifest index d768396b8c72..e6c4539482d6 100644 --- a/sys-devel/autoconf-wrapper/Manifest +++ b/sys-devel/autoconf-wrapper/Manifest @@ -1,20 +1,23 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 275990dd37ef5c98bf72cd4b71f12728 ChangeLog 1961 -MD5 11cd3afbb5db4c813bae3db769cdc20d autoconf-wrapper-3-r1.ebuild 822 -MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 MD5 84d41809a827ec0c2e3b3e0804c14886 autoconf-wrapper-2-r1.ebuild 811 MD5 5893addbc67d6e0d2fff9560a7e5198f autoconf-wrapper-3.ebuild 821 -MD5 baa08513b5000a1ecf58715b8d654eae files/ac-wrapper-3.sh 3077 -MD5 d4c9467b972dd2b40aa7a1b89d2226b6 files/ac-wrapper-2.sh 2717 +MD5 11cd3afbb5db4c813bae3db769cdc20d autoconf-wrapper-3-r1.ebuild 822 +MD5 6cffdaaee17700d402cd442e09187e03 ChangeLog 2173 +MD5 bf98ad6fc272da50d05501e9a0813bfd autoconf-wrapper-3.1.ebuild 823 +MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-autoconf-wrapper-2-r1 0 +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-autoconf-wrapper-3.1 0 +MD5 d4c9467b972dd2b40aa7a1b89d2226b6 files/ac-wrapper-2.sh 2717 +MD5 baa08513b5000a1ecf58715b8d654eae files/ac-wrapper-3.sh 3077 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-autoconf-wrapper-3 0 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-autoconf-wrapper-3-r1 0 +MD5 7576678a2b7756d3dced603574adcbbc files/ac-wrapper-3.1.sh 4538 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) -iD8DBQFC2OiM5mJXAu5GbtIRAsjtAJ4oLaeCT66YVgHNzg/P4UjJKvFL/gCfQ/tW -95DVG1N6yCBedVAbaVx25EM= -=o0JI +iD8DBQFC2W6b1ZcsMnZjRyIRAr4jAJ9W0A+68Q1GYV4NIffwm8cbeDaBKgCeLXji +dtS2w8M5Zch3p6yQeHia6mU= +=8z7D -----END PGP SIGNATURE----- diff --git a/sys-devel/autoconf-wrapper/autoconf-wrapper-3.1.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-3.1.ebuild new file mode 100644 index 000000000000..088b7830390b --- /dev/null +++ b/sys-devel/autoconf-wrapper/autoconf-wrapper-3.1.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.1.ebuild,v 1.1 2005/07/16 20:28: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.1.sh b/sys-devel/autoconf-wrapper/files/ac-wrapper-3.1.sh new file mode 100755 index 000000000000..fe6f398bf867 --- /dev/null +++ b/sys-devel/autoconf-wrapper/files/ac-wrapper-3.1.sh @@ -0,0 +1,158 @@ +#!/bin/bash +# 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/files/ac-wrapper-3.1.sh,v 1.1 2005/07/16 20:28: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} + +acprereq_version() { + # Add --posix to below awk to make sure it will run on macosx, etc + awk \ + '($0 !~ /^[[:space:]]*(#|dnl)/) { + # The following is replaced by below, as we cannot use match() + # with a third argument with non-gawk (posix) versions of awk: + # + #if (match($0, "AC_PREREQ\\(\\[?([0-9]\\.[0-9])", res)) + # VERSIONS[COUNT++] = res[1] + # + sindex = match($0, /AC_PREREQ\(\[?([0-9]\.[0-9])/) + if (sindex > 0) { + sindex += length("AC_PREREQ(") + if (substr($0, sindex, 1) == "[") + sindex++ + VERSIONS[COUNT++] = substr($0, sindex, 3) + } + } + + END { + # The following is replaced by below, as we cannot use asort() + # with non-gawk (posix) versions of awk: + # + #asort(VERSIONS) + # + VERSION = VERSIONS[0] + for (x = 0; x <= COUNT;x++) + if (VERSIONS[x] > VERSION) + VERSION=VERSIONS[x] + + print VERSION + }' "$@" +} + +generated_version() { + # Add --posix to below awk to make sure it will run on macosx, etc + awk \ + '{ + # The following is replaced by below, as we cannot use match() + # with a third argument with non-gawk (posix) versions of awk: + # + #if (match($0, + # "^# Generated (by (GNU )?Autoconf|automatically using autoconf version) ([0-9].[0-9])", + # res)) + # { print res[3]; exit } + # + # First try for newer versions of autoconf + sindex = match($0, /Generated by GNU Autoconf ([0-9]\.[0-9])/) + if (sindex > 0) + # Now chop the first part before the version + sindex += length("Generated by GNU Autoconf ") + # No version, so try older versions of autoconf + if (sindex <= 0) { + sindex = match($0, /Generated automatically using autoconf version ([0-9]\.[0-9])/) + if (sindex > 0) + sindex += length("Generated automatically using autoconf version ") + } + + # Ok, we got a version + if (sindex > 0) { + print substr($0, sindex, 3) + exit + } + }' "$@" +} + +# +# 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 configure.{in,ac} 2>/dev/null) + [[ -n ${acfiles} ]] && confversion=$(acprereq_version ${acfiles}) + + [[ -z ${confversion} && -r "configure" ]] && \ + confversion=$(generated_version configure) + + 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.1 b/sys-devel/autoconf-wrapper/files/digest-autoconf-wrapper-3.1 new file mode 100644 index 000000000000..e69de29bb2d1 -- cgit v1.2.3-65-gdbad