diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-03-07 15:45:40 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-07 15:45:40 +0000 |
commit | 13acb77856921f571ff6b75220c3dd32295e2d1e (patch) | |
tree | 8cd9c07c6646b1eb7f0dc4b59089a79ef53889b7 /sys-devel | |
parent | Depend on Python 2. (diff) | |
download | gentoo-2-13acb77856921f571ff6b75220c3dd32295e2d1e.tar.gz gentoo-2-13acb77856921f571ff6b75220c3dd32295e2d1e.tar.bz2 gentoo-2-13acb77856921f571ff6b75220c3dd32295e2d1e.zip |
Merge updates from autoconf-wrapper to get POSIX-only code.
(Portage version: 2.2_rc65/cvs/Linux x86_64)
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/automake-wrapper/ChangeLog | 8 | ||||
-rw-r--r-- | sys-devel/automake-wrapper/automake-wrapper-5.ebuild | 29 | ||||
-rwxr-xr-x | sys-devel/automake-wrapper/files/am-wrapper-5.sh | 154 |
3 files changed, 190 insertions, 1 deletions
diff --git a/sys-devel/automake-wrapper/ChangeLog b/sys-devel/automake-wrapper/ChangeLog index d6ff1213b528..76fee76cbe96 100644 --- a/sys-devel/automake-wrapper/ChangeLog +++ b/sys-devel/automake-wrapper/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-devel/automake-wrapper # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/ChangeLog,v 1.38 2010/02/24 08:08:27 mduft Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/ChangeLog,v 1.39 2010/03/07 15:45:39 vapier Exp $ + +*automake-wrapper-5 (07 Mar 2010) + + 07 Mar 2010; Mike Frysinger <vapier@gentoo.org> + +automake-wrapper-5.ebuild, +files/am-wrapper-5.sh: + Merge updates from autoconf-wrapper to get POSIX-only code. 24 Feb 2010; Markus Duft <mduft@gentoo.org> files/am-wrapper-4.sh: use /usr/bin/env bash instead of /bin/bash to support prefix diff --git a/sys-devel/automake-wrapper/automake-wrapper-5.ebuild b/sys-devel/automake-wrapper/automake-wrapper-5.ebuild new file mode 100644 index 000000000000..ac1221fd2c98 --- /dev/null +++ b/sys-devel/automake-wrapper/automake-wrapper-5.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/automake-wrapper-5.ebuild,v 1.1 2010/03/07 15:45:39 vapier Exp $ + +inherit multilib + +DESCRIPTION="wrapper for automake to manage multiple automake versions" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +S=${WORKDIR} + +src_install() { + exeinto /usr/$(get_libdir)/misc + newexe "${FILESDIR}"/am-wrapper-${PV}.sh am-wrapper.sh || die + + keepdir /usr/share/aclocal + + dodir /usr/bin + local x= + for x in aclocal automake ; do + dosym ../$(get_libdir)/misc/am-wrapper.sh /usr/bin/${x} + done +} diff --git a/sys-devel/automake-wrapper/files/am-wrapper-5.sh b/sys-devel/automake-wrapper/files/am-wrapper-5.sh new file mode 100755 index 000000000000..dbf6df6b9e26 --- /dev/null +++ b/sys-devel/automake-wrapper/files/am-wrapper-5.sh @@ -0,0 +1,154 @@ +#!/bin/sh +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-5.sh,v 1.1 2010/03/07 15:45:40 vapier Exp $ + +# Based on the am-wrapper.pl script provided by MandrakeSoft +# Rewritten in bash by Gregorio Guidi +# +# Executes the correct automake version. +# +# - defaults to newest version available (hopefully automake-1.10) +# - runs automake-1.9 if: +# - envvar WANT_AUTOMAKE is set to `1.9' +# -or- +# - `Makefile.in' was generated by automake-1.9 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.9 +# - runs automake-1.8 if: +# - envvar WANT_AUTOMAKE is set to `1.8' +# -or- +# - `Makefile.in' was generated by automake-1.8 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.8 +# - runs automake-1.7 if: +# - envvar WANT_AUTOMAKE is set to `1.7' +# -or- +# - `Makefile.in' was generated by automake-1.7 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.7 +# - runs automake-1.6 if: +# - envvar WANT_AUTOMAKE is set to `1.6' +# -or- +# - `Makefile.in' +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.6 +# - runs automake-1.5 if: +# - envvar WANT_AUTOMAKE is set to `1.5' +# -or- +# - `Makefile.in' was generated by automake-1.5 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.5 +# - runs automake-1.4 if: +# - envvar WANT_AUTOMAKE is set to `1.4' +# -or- +# - `Makefile.in' was generated by automake-1.4 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.4 + +warn() { printf "am-wrapper: $*\n" 1>&2; } +err() { warn "$@"; exit 1; } + +if [ "${0##*/}" = "am-wrapper.sh" ] ; then + err "Don't call this script directly" +fi + +vers="1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4" + +# +# Export the proper variable/versions and try to locate a usuable +# default (newer versions are preferred) +# +binary="" +for v in ${vers} ; do + if [ -z "${binary}" ] && [ -x "${0}-${v}" ] ; then + binary="${0}-${v}" + fi +done +if [ -z "${binary}" ] ; then + err "Unable to locate any usuable version of automake.\n" \ + "\tI tried these versions: ${vers}\n" \ + "\tWith a base name of '${0}'." +fi + +# +# Check the WANT_AUTOMAKE setting. We accept a whitespace delimited +# list of automake versions. +# +if [ -n "${WANT_AUTOMAKE}" ] ; then + for v in ${vers} x ; do + if [ "${v}" = "x" ] ; then + warn "warning: invalid WANT_AUTOMAKE '${WANT_AUTOMAKE}'; ignoring." + unset WANT_AUTOMAKE + break + fi + + for wx in ${WANT_AUTOMAKE} ; do + if [ "${wx}" = "${v}" ] ; then + binary="${0}-${v}" + v="x" + fi + done + [ "${v}" = "x" ] && break + done +fi + +# +# autodetect helpers +# +do_awk() { + local file=$1 ; shift + local arg=$1 ; shift + echo $(gawk "{ if (match(\$0, \"$*\", res)) { print res[${arg}]; exit } }" ${file}) +} + +# +# autodetect routine +# +if [ -z "${WANT_AUTOMAKE}" ] ; then + if [ -r "Makefile.in" ] ; then + confversion_mf=$(do_awk Makefile.in 2 "^# Makefile.in generated (automatically )?by automake ([0-9].[0-9]+)") + fi + if [ -r "aclocal.m4" ] ; then + confversion_ac=$(do_awk aclocal.m4 1 'generated automatically by aclocal ([0-9].[0-9]+)') + confversion_am=$(do_awk aclocal.m4 1 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?([0-9].[0-9]+)[^)]*\\]?\\)') + fi + + for v in ${vers} ; do + if [ "${confversion_mf}" = "${v}" ] || \ + [ "${confversion_ac}" = "${v}" ] || \ + [ "${confversion_am}" = "${v}" ] + then + binary="${0}-${v}" + break + fi + done +fi + +if [ "${WANT_AMWRAPPER_DEBUG}" ] ; then + if [ "${WANT_AUTOMAKE}" ] ; then + warn "DEBUG: WANT_AUTOMAKE is set to ${WANT_AUTOMAKE}" + fi + warn "DEBUG: will execute <$binary>" +fi + +# +# for further consistency +# +for v in ${vers} ; do + if [ "${binary}" = "${0}-${v}" ] ; then + export WANT_AUTOMAKE="${v}" + fi +done + +# +# Now try to run the binary +# +if [ ! -x "${binary}" ] ; then + err "$binary is missing or not executable.\n" \ + "\tPlease try emerging the correct version of automake." +fi + +exec "$binary" "$@" + +err "was unable to exec $binary !?" |