diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-01-29 18:03:51 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-01-29 18:03:51 +0000 |
commit | d7ed2b01311f15ba54fe8ea872aab7d59ab2b193 (patch) | |
tree | 1814dd2b5bbf2e7639fdafbeef48d228cfaf5e9b /sys-devel/autoconf-wrapper | |
parent | abaa75b10f899ada8dd05b23cc03205064394bc6 (diff) |
gentoo resync : 29.01.2021
Diffstat (limited to 'sys-devel/autoconf-wrapper')
-rw-r--r-- | sys-devel/autoconf-wrapper/Manifest | 2 | ||||
-rw-r--r-- | sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild | 29 | ||||
-rw-r--r-- | sys-devel/autoconf-wrapper/files/ac-wrapper-15.sh | 203 |
3 files changed, 234 insertions, 0 deletions
diff --git a/sys-devel/autoconf-wrapper/Manifest b/sys-devel/autoconf-wrapper/Manifest index 11cacb6845de..b101f07acd2c 100644 --- a/sys-devel/autoconf-wrapper/Manifest +++ b/sys-devel/autoconf-wrapper/Manifest @@ -1,5 +1,7 @@ AUX ac-wrapper-13.sh 5055 BLAKE2B 66fd728f347cdb873007e51113225608b3dae87c5979ba512a5e65a3185d8278502cdbaa60675b33643e0f9f459cf3956967f8e07b198d442139abb06a75f597 SHA512 0bbe9a992cff140bd60161404f1d1f6a9da6c79b1e9909000092f5e1159e457edee3fcefcb8fcaf47cedd9a7074505c4a61bc25107277d248150cdde5f11c5b7 AUX ac-wrapper-14.sh 5093 BLAKE2B 4ce76b0eae9b7be9bbf4fbb12dacf10e9c2731c13f2e708feebf583c9a7c88a9985cc992c617c5e2a30772daa61bc05391196c1d7ddebd4f1269b60c4038db60 SHA512 868751a8e73e6994fef500df37d5a002445ea3da6d68affa8aaaa5b00a8a913b08c4576ca030d578686d97e1b237defa735a46c03b9655e65e38c625488fc9ec +AUX ac-wrapper-15.sh 5102 BLAKE2B a5575fc72c9b83801dd38104fc90c6df71bd4e387f882f515e26e22d7b24fec7958dbdba0d484dca3ae779ef0a9eca80c479e1ea5243c29e2b6f37edad795c89 SHA512 4ca9c2fd016862ff17776c1df320b72af40f8c2babf1fe49be823d5bdc4dd52d720faf0e7ff7b1859c0185db2afeb2181d0d0cb5c404e96c0f64211e9cb67db3 EBUILD autoconf-wrapper-13-r1.ebuild 785 BLAKE2B 5b55a828dcc7260f82d8af38f4237a8ab05749bd71dfb66e1fadec59e989ea66aa49aafcd55dde54d9e34ff2096cb573d077dfd32c3cd204de6c0391d66bb4e9 SHA512 8a0c74419cac7cf8803dae5faa09cdcb5f69cc700490f7a11b05125bc0682a49bbe6346f7edd6f5676f7f85046f5a1ddc4bf2c8f879b9164797b3f74f1b5a248 EBUILD autoconf-wrapper-14.ebuild 823 BLAKE2B 2dddfe1c7e55ec4ab70a7c556061a3b6b385a43a95e45a444038b06ca23e70c620f3b268928ebc3fe710fdf385b34f5484ca1bfd69b28771a857bbe3988c94bf SHA512 bc08692c0eb0baf560038537abad44fcab12b59c6199c383cca6d6a7331f5ed2dda9b2155cc1ec8b89041d186779684c14cd61854d99748c23b04db895cad03c +EBUILD autoconf-wrapper-15.ebuild 823 BLAKE2B 2dddfe1c7e55ec4ab70a7c556061a3b6b385a43a95e45a444038b06ca23e70c620f3b268928ebc3fe710fdf385b34f5484ca1bfd69b28771a857bbe3988c94bf SHA512 bc08692c0eb0baf560038537abad44fcab12b59c6199c383cca6d6a7331f5ed2dda9b2155cc1ec8b89041d186779684c14cd61854d99748c23b04db895cad03c MISC metadata.xml 253 BLAKE2B 295e9d6d93aaa12af413972e1590c67087801cc09c9aa6b59d4606c0f4106d1dacf2baa9858559083b4c6d91beeef218d0729e8593a33788958da6d2897e8ce2 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 diff --git a/sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild new file mode 100644 index 000000000000..68d956726bb0 --- /dev/null +++ b/sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib + +DESCRIPTION="wrapper for autoconf to manage multiple autoconf versions" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +[[ "${PV}" == *_pre* ]] || \ +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +S="${WORKDIR}" + +src_install() { + exeinto /usr/$(get_libdir)/misc + newexe "${FILESDIR}"/ac-wrapper-${PV}.sh ac-wrapper.sh + + dodir /usr/bin + local x= + for x in auto{conf,header,m4te,reconf,scan,update} ifnames ; do + dosym ../$(get_libdir)/misc/ac-wrapper.sh /usr/bin/${x} + done +} diff --git a/sys-devel/autoconf-wrapper/files/ac-wrapper-15.sh b/sys-devel/autoconf-wrapper/files/ac-wrapper-15.sh new file mode 100644 index 000000000000..e5eda0e53f18 --- /dev/null +++ b/sys-devel/autoconf-wrapper/files/ac-wrapper-15.sh @@ -0,0 +1,203 @@ +#!/bin/sh +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Based on the ac-wrapper.pl script provided by MandrakeSoft +# Rewritten in bash by Gregorio Guidi +# +# Executes the correct autoconf version. +# +# - defaults to newest version available (hopefully autoconf-2.60) +# - runs autoconf 2.13 if: +# - envvar WANT_AUTOCONF is set to `2.1' +# -or- +# - `ac{local,include}.m4' or `configure.{in,ac}' have AC_PREREQ(2.1) (not higher) +# -or- +# - `configure' is already present and was generated by autoconf 2.13 + +warn() { printf "ac-wrapper: $*\n" 1>&2; } +err() { warn "$@"; 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 [ "${argv0}" = "ac-wrapper.sh" ] ; then + err "Don't call this script directly" +fi + +if [ "${WANT_AUTOCONF}" = "2.1" ] && [ "${argv0}" = "autom4te" ] ; then + err "Autoconf 2.13 doesn't contain autom4te.\n" \ + " Either unset WANT_AUTOCONF or don't execute anything\n" \ + " that would use autom4te." +fi + +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_AUTOCONF; +# Start at last known unstable/stable versions to speed up lookup process. +# +if [ -z "${KNOWN_AUTOCONF}" ] ; then + KNOWN_AUTOCONF="2.71:2.5 2.70:2.5 2.69:2.5" +fi +vers="${KNOWN_AUTOCONF} 9999:2.5 $(printf '2.%s:2.5 ' `seq 99 -1 59`) 2.13:2.1" + +binary="" +for v in ${vers} ; do + auto_ver=${v%:*} + if [ -z "${binary}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then + binary="${full_argv0}-${auto_ver}" + break + fi +done +if [ -z "${binary}" ] ; then + err "Unable to locate any usuable version of autoconf.\n" \ + "\tI tried these versions: ${vers}\n" \ + "\tWith a base name of '${full_argv0}'." +fi + +# +# Check the WANT_AUTOCONF setting. We accept a whitespace delimited +# list of autoconf versions. +# +if [ -n "${WANT_AUTOCONF}" ] ; then + for v in ${vers} x ; do + if [ "${v}" = "x" ] ; then + warn "warning: invalid WANT_AUTOCONF '${WANT_AUTOCONF}'; ignoring." + unset WANT_AUTOCONF + break + fi + + auto_ver=${v%:*} + want_ver=${v#*:} + for wx in ${WANT_AUTOCONF} ; do + if [ -x "${full_argv0}-${wx}" ] ; then + binary="${full_argv0}-${wx}" + v="x" + elif [ "${wx}" = "${want_ver}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then + binary="${full_argv0}-${auto_ver}" + v="x" + fi + done + [ "${v}" = "x" ] && break + done +fi + +# +# autodetect helpers +# +acprereq_version() { + sed -n -r \ + -e '/^\s*(#|dnl)/d' \ + -e '/AC_PREREQ/s:.*AC_PREREQ\s*\(\[?\s*([0-9.]+)\s*\]?\):\1:p' \ + "$@" | + LC_ALL=C sort -n -t . | + tail -1 +} + +generated_version() { + local re='^# Generated (by (GNU )?Autoconf|automatically using autoconf version) ([0-9.]+).*' + sed -n -r "/${re}/{s:${re}:\3:;p;q}" "$@" +} + +# +# autodetect routine +# +if [ "${WANT_AUTOCONF}" = "2.1" ] && [ -f "configure.ac" ] ; then + err "Since configure.ac is present, aclocal always use\n" \ + "\tautoconf 2.59+, which conflicts with your choice and\n" \ + "\tcauses error. You have two options:\n" \ + "\t1. Try execute command again after removing configure.ac\n" \ + "\t2. Don't set WANT_AUTOCONF" +fi + +if [ "${WANT_AUTOCONF:-2.1}" = "2.1" ] && [ -n "${WANT_AUTOMAKE}" ] ; then + # Automake-1.7 and better require autoconf-2.5x so if WANT_AUTOMAKE + # is set to an older version, let's do some sanity checks. + case "${WANT_AUTOMAKE}" in + 1.[456]) + acfiles=$(ls aclocal.m4 acinclude.m4 configure.in configure.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="${full_argv0}-2.13" + fi + esac +fi + +if [ -n "${WANT_ACWRAPPER_DEBUG}" ] ; then + if [ -n "${WANT_AUTOCONF}" ] ; then + warn "DEBUG: WANT_AUTOCONF is set to ${WANT_AUTOCONF}" + fi + warn "DEBUG: will execute <${binary}>" +fi + +# +# for further consistency +# +if [ -z "${WANT_AUTOCONF}" ] ; then + for v in ${vers} ; do + auto_ver=${v%:*} + want_ver=${v#*:} + if [ "${binary}" = "${full_argv0}-${auto_ver}" ] ; then + export WANT_AUTOCONF="${want_ver}" + break + fi + done +fi + +# +# Now try to run the binary +# +if [ ! -x "${binary}" ] ; then + # this shouldn't happen + err "${binary} is missing or not executable.\n" \ + "\tPlease try emerging the correct version of autoconf." +fi + +exec "${binary}" "$@" +# The shell will error out if `exec` failed. |