diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-devel/automake-wrapper | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-devel/automake-wrapper')
-rw-r--r-- | sys-devel/automake-wrapper/automake-wrapper-10.ebuild | 35 | ||||
-rw-r--r-- | sys-devel/automake-wrapper/automake-wrapper-9.ebuild | 29 | ||||
-rw-r--r-- | sys-devel/automake-wrapper/files/am-wrapper-10.sh | 187 | ||||
-rwxr-xr-x | sys-devel/automake-wrapper/files/am-wrapper-9.sh | 187 | ||||
-rw-r--r-- | sys-devel/automake-wrapper/metadata.xml | 5 |
5 files changed, 443 insertions, 0 deletions
diff --git a/sys-devel/automake-wrapper/automake-wrapper-10.ebuild b/sys-devel/automake-wrapper/automake-wrapper-10.ebuild new file mode 100644 index 000000000000..e8c37d3b8a3b --- /dev/null +++ b/sys-devel/automake-wrapper/automake-wrapper-10.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +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 arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-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_unpack() { + cp "${FILESDIR}"/am-wrapper-${PV}.sh "${S}"/ || die +} + +src_prepare() { + # usr/bin/aclocal: bad substitution -> /bin/sh != POSIX shell + if use prefix ; then + sed -i -e '1c\#!'"${EPREFIX}"'/bin/sh' \ + "${S}"/am-wrapper-${PV}.sh || die + fi +} + +src_install() { + newbin "${S}"/am-wrapper-${PV}.sh automake + dosym automake /usr/bin/aclocal + + keepdir /usr/share/aclocal +} diff --git a/sys-devel/automake-wrapper/automake-wrapper-9.ebuild b/sys-devel/automake-wrapper/automake-wrapper-9.ebuild new file mode 100644 index 000000000000..bd107fa332fb --- /dev/null +++ b/sys-devel/automake-wrapper/automake-wrapper-9.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-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_unpack() { + cp "${FILESDIR}"/am-wrapper-${PV}.sh "${S}"/ + # usr/bin/aclocal: bad substitution -> /bin/sh != POSIX shell + if use prefix ; then + sed -i -e '1c\#!'"${EPREFIX}"'/bin/sh' "${S}"/am-wrapper-${PV}.sh || die + fi +} + +src_install() { + newbin "${S}"/am-wrapper-${PV}.sh automake || die + dosym automake /usr/bin/aclocal + + keepdir /usr/share/aclocal +} diff --git a/sys-devel/automake-wrapper/files/am-wrapper-10.sh b/sys-devel/automake-wrapper/files/am-wrapper-10.sh new file mode 100644 index 000000000000..4302a7a4d250 --- /dev/null +++ b/sys-devel/automake-wrapper/files/am-wrapper-10.sh @@ -0,0 +1,187 @@ +#!/bin/sh +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Executes the correct automake version. +# +# If WANT_AUTOMAKE is set (can be a whitespace delimited list of versions): +# - attempt to find an installed version using those +# - if magic keyword 'latest' is found, pick the latest version that exists +# - if nothing found, warn, and proceed as if WANT_AUTOMAKE was not set (below) +# If WANT_AUTOMAKE is not set: +# - Try to detect the version of automake used to generate things (look at +# Makefile.in and aclocal.m4 and any other useful file) +# - If detected version is not found, warn and proceed as if blank slate +# - Try to locate the latest version of automake that exists and run it + +(set -o posix) 2>/dev/null && set -o posix + +_stderr() { printf 'am-wrapper: %s: %b\n' "${argv0}" "$*" 1>&2; } +warn() { _stderr "warning: $*"; } +err() { _stderr "error: $*"; exit 1; } +unset IFS +which() { + local p + IFS=: # we don't use IFS anywhere, so don't bother saving/restoring + for p in ${PATH} ; do + p="${p}/$1" + [ -e "${p}" ] && echo "${p}" && return 0 + done + unset IFS + return 1 +} + +# +# Sanitize argv[0] since it isn't always a full path #385201 +# +argv0=${0##*/} +case $0 in + ${argv0}) + # find it in PATH + if ! full_argv0=$(which "${argv0}") ; then + err "could not locate ${argv0}; file a bug" + fi + ;; + *) + # re-use full/relative paths + full_argv0=$0 + ;; +esac + +if ! seq 0 0 2>/dev/null 1>&2 ; then #338518 + seq() { + local f l i + case $# in + 1) f=1 i=1 l=$1;; + 2) f=$1 i=1 l=$2;; + 3) f=$1 i=$2 l=$3;; + esac + while :; do + [ $l -lt $f -a $i -gt 0 ] && break + [ $f -lt $l -a $i -lt 0 ] && break + echo $f + : $(( f += i )) + done + return 0 + } +fi + +# +# Set up bindings between actual version and WANT_AUTOMAKE; +# Start with last known versions to speed up lookup process. +# +LAST_KNOWN_AUTOMAKE_VER="15" +vers=$(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`) + +# +# Helper to scan for a usable program based on version. +# +binary= +all_vers= +find_binary() { + local v + all_vers="${all_vers} $*" # For error messages. + for v ; do + if [ -x "${full_argv0}-${v}" ] ; then + binary="${full_argv0}-${v}" + binary_ver=${v} + return 0 + fi + done + return 1 +} + +# +# Try and find a usable automake version. First check the WANT_AUTOMAKE +# setting (whitespace delimited list), then fallback to the latest. +# +find_latest() { + if ! find_binary ${vers} ; then + # Brute force it. + find_binary $(printf '1.%s ' `seq 99 -1 ${LAST_KNOWN_AUTOMAKE_VER}`) + fi +} +for wx in ${WANT_AUTOMAKE:-latest} ; do + if [ "${wx}" = "latest" ] ; then + find_latest && break + else + find_binary ${wx} && break + fi +done + +if [ -z "${binary}" ] && [ -n "${WANT_AUTOMAKE}" ] ; then + warn "could not locate installed version for WANT_AUTOMAKE='${WANT_AUTOMAKE}'; ignoring" + unset WANT_AUTOMAKE + find_latest +fi + +if [ -z "${binary}" ] ; then + err "Unable to locate any usuable version of automake.\n" \ + "\tI tried these versions:${all_vers}\n" \ + "\tWith a base name of '${full_argv0}'." +fi + +# +# autodetect helpers +# +do_awk() { + local file=$1 ; shift + local v=$(awk -v regex="$*" '{ + if (ret = match($0, regex)) { + s = substr($0, ret, RLENGTH) + ret = match(s, "[0-9]\\.[0-9]+") + print substr(s, ret, RLENGTH) + exit + } + }' "${file}") + case " ${auto_vers} " in + *" ${v} "*) ;; + *) auto_vers="${auto_vers:+${auto_vers} }${v}" ;; + esac +} + +# +# autodetect routine +# +if [ -z "${WANT_AUTOMAKE}" ] ; then + auto_vers= + if [ -r "Makefile.in" ] ; then + do_awk Makefile.in '^# Makefile.in generated (automatically )?by automake [0-9]\\.[0-9]+' + fi + if [ -r "aclocal.m4" ] ; then + do_awk aclocal.m4 'generated automatically by aclocal [0-9]\\.[0-9]+' + do_awk aclocal.m4 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?[0-9]\\.[0-9]+[^)]*\\]?\\)' + fi + # We don't need to set $binary here as it has already been setup for us + # earlier to the latest available version. + if [ -n "${auto_vers}" ] ; then + if ! find_binary ${auto_vers} ; then + warn "auto-detected versions not found (${auto_vers}); falling back to latest available" + fi + fi +fi + +if [ -n "${WANT_AMWRAPPER_DEBUG}" ] ; then + if [ -n "${WANT_AUTOMAKE}" ] ; then + warn "DEBUG: WANT_AUTOMAKE is set to ${WANT_AUTOMAKE}" + fi + warn "DEBUG: will execute <${binary}>" +fi + +# +# for further consistency +# +export WANT_AUTOMAKE="${binary_ver}" + +# +# Now try to run the binary +# +if [ ! -x "${binary}" ] ; then + # this shouldn't happen + err "${binary} is missing or not executable.\n" \ + "\tPlease try installing the correct version of automake." +fi + +exec "${binary}" "$@" +# The shell will error out if `exec` failed. diff --git a/sys-devel/automake-wrapper/files/am-wrapper-9.sh b/sys-devel/automake-wrapper/files/am-wrapper-9.sh new file mode 100755 index 000000000000..6342625ba65d --- /dev/null +++ b/sys-devel/automake-wrapper/files/am-wrapper-9.sh @@ -0,0 +1,187 @@ +#!/bin/sh +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Executes the correct automake version. +# +# If WANT_AUTOMAKE is set (can be a whitespace delimited list of versions): +# - attempt to find an installed version using those +# - if magic keyword 'latest' is found, pick the latest version that exists +# - if nothing found, warn, and proceed as if WANT_AUTOMAKE was not set (below) +# If WANT_AUTOMAKE is not set: +# - Try to detect the version of automake used to generate things (look at +# Makefile.in and aclocal.m4 and any other useful file) +# - If detected version is not found, warn and proceed as if blank slate +# - Try to locate the latest version of automake that exists and run it + +(set -o posix) 2>/dev/null && set -o posix + +_stderr() { printf 'am-wrapper: %s: %b\n' "${argv0}" "$*" 1>&2; } +warn() { _stderr "warning: $*"; } +err() { _stderr "error: $*"; exit 1; } +unset IFS +which() { + local p + IFS=: # we don't use IFS anywhere, so don't bother saving/restoring + for p in ${PATH} ; do + p="${p}/$1" + [ -e "${p}" ] && echo "${p}" && return 0 + done + unset IFS + return 1 +} + +# +# Sanitize argv[0] since it isn't always a full path #385201 +# +argv0=${0##*/} +case $0 in + ${argv0}) + # find it in PATH + if ! full_argv0=$(which "${argv0}") ; then + err "could not locate ${argv0}; file a bug" + fi + ;; + *) + # re-use full/relative paths + full_argv0=$0 + ;; +esac + +if ! seq 0 0 2>/dev/null 1>&2 ; then #338518 + seq() { + local f l i + case $# in + 1) f=1 i=1 l=$1;; + 2) f=$1 i=1 l=$2;; + 3) f=$1 i=$2 l=$3;; + esac + while :; do + [ $l -lt $f -a $i -gt 0 ] && break + [ $f -lt $l -a $i -lt 0 ] && break + echo $f + : $(( f += i )) + done + return 0 + } +fi + +# +# Set up bindings between actual version and WANT_AUTOMAKE; +# Start with last known versions to speed up lookup process. +# +LAST_KNOWN_AUTOMAKE_VER="14" +vers=$(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`) + +# +# Helper to scan for a usable program based on version. +# +binary= +all_vers= +find_binary() { + local v + all_vers="${all_vers} $*" # For error messages. + for v ; do + if [ -x "${full_argv0}-${v}" ] ; then + binary="${full_argv0}-${v}" + binary_ver=${v} + return 0 + fi + done + return 1 +} + +# +# Try and find a usable automake version. First check the WANT_AUTOMAKE +# setting (whitespace delimited list), then fallback to the latest. +# +find_latest() { + if ! find_binary ${vers} ; then + # Brute force it. + find_binary $(printf '1.%s ' `seq 99 -1 ${LAST_KNOWN_AUTOMAKE_VER}`) + fi +} +for wx in ${WANT_AUTOMAKE:-latest} ; do + if [ "${wx}" = "latest" ] ; then + find_latest && break + else + find_binary ${wx} && break + fi +done + +if [ -z "${binary}" ] && [ -n "${WANT_AUTOMAKE}" ] ; then + warn "could not locate installed version for WANT_AUTOMAKE='${WANT_AUTOMAKE}'; ignoring" + unset WANT_AUTOMAKE + find_latest +fi + +if [ -z "${binary}" ] ; then + err "Unable to locate any usuable version of automake.\n" \ + "\tI tried these versions:${all_vers}\n" \ + "\tWith a base name of '${full_argv0}'." +fi + +# +# autodetect helpers +# +do_awk() { + local file=$1 ; shift + local v=$(awk -v regex="$*" '{ + if (ret = match($0, regex)) { + s = substr($0, ret, RLENGTH) + ret = match(s, "[0-9]\\.[0-9]+") + print substr(s, ret, RLENGTH) + exit + } + }' "${file}") + case " ${auto_vers} " in + *" ${v} "*) ;; + *) auto_vers="${auto_vers:+${auto_vers} }${v}" ;; + esac +} + +# +# autodetect routine +# +if [ -z "${WANT_AUTOMAKE}" ] ; then + auto_vers= + if [ -r "Makefile.in" ] ; then + do_awk Makefile.in '^# Makefile.in generated (automatically )?by automake [0-9]\\.[0-9]+' + fi + if [ -r "aclocal.m4" ] ; then + do_awk aclocal.m4 'generated automatically by aclocal [0-9]\\.[0-9]+' + do_awk aclocal.m4 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?[0-9]\\.[0-9]+[^)]*\\]?\\)' + fi + # We don't need to set $binary here as it has already been setup for us + # earlier to the latest available version. + if [ -n "${auto_vers}" ] ; then + if ! find_binary ${auto_vers} ; then + warn "auto-detected versions not found (${auto_vers}); falling back to latest available" + fi + fi +fi + +if [ -n "${WANT_AMWRAPPER_DEBUG}" ] ; then + if [ -n "${WANT_AUTOMAKE}" ] ; then + warn "DEBUG: WANT_AUTOMAKE is set to ${WANT_AUTOMAKE}" + fi + warn "DEBUG: will execute <${binary}>" +fi + +# +# for further consistency +# +export WANT_AUTOMAKE="${binary_ver}" + +# +# Now try to run the binary +# +if [ ! -x "${binary}" ] ; then + # this shouldn't happen + err "${binary} is missing or not executable.\n" \ + "\tPlease try installing the correct version of automake." +fi + +exec "${binary}" "$@" +# The shell will error out if `exec` failed. diff --git a/sys-devel/automake-wrapper/metadata.xml b/sys-devel/automake-wrapper/metadata.xml new file mode 100644 index 000000000000..96a2d586367d --- /dev/null +++ b/sys-devel/automake-wrapper/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>base-system</herd> +</pkgmetadata> |