public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     b4019f43ca1dce3ebe043926bb4ef3f831df3071
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:33:39 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:33:39 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=b4019f43

autoconf-wrapper: try to enable shell POSIX mode if available

This sync the logic that's been in the automake wrapper for a long time.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index d522576..f9b0857 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -15,6 +15,8 @@
 #     -or-
 #   - `configure' is already present and was generated by autoconf 2.13
 
+(set -o posix) 2>/dev/null && set -o posix
+
 warn() { printf "ac-wrapper: $*\n" 1>&2; }
 err() { warn "$@"; exit 1; }
 unset IFS


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2024-06-07 13:27 Sam James
  0 siblings, 0 replies; 23+ messages in thread
From: Sam James @ 2024-06-07 13:27 UTC (permalink / raw
  To: gentoo-commits

commit:     dd5a4c881bfdcd39862e64dab90a26e2b7098a9c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  7 13:26:40 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun  7 13:26:40 2024 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=dd5a4c88

am-wrapper.sh: recognise automake-1.17

Crank LAST_KNOWN_AUTOMAKE_VER.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 am-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/am-wrapper.sh b/am-wrapper.sh
index 6a54025..b13b4d4 100755
--- a/am-wrapper.sh
+++ b/am-wrapper.sh
@@ -72,7 +72,7 @@ fi
 # Set up bindings between actual version and WANT_AUTOMAKE;
 # Start with last known versions to speed up lookup process.
 #
-LAST_KNOWN_AUTOMAKE_VER="16"
+LAST_KNOWN_AUTOMAKE_VER="17"
 vers="9999"
 vers="${vers} $(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`)"
 


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2023-12-24  0:55 Sam James
  0 siblings, 0 replies; 23+ messages in thread
From: Sam James @ 2023-12-24  0:55 UTC (permalink / raw
  To: gentoo-commits

commit:     864388608956c07ddfc765f6c4f1ab72234631f7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 24 00:54:53 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 24 00:55:00 2023 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=86438860

ac-wrapper.sh: adapt to autoconf-2.72

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ac-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 9499ace..ae08ff9 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -79,7 +79,7 @@ fi
 # Set up bindings between actual version and WANT_AUTOCONF;
 # Start with last known versions to speed up lookup process.
 #
-LAST_KNOWN_VER="71"
+LAST_KNOWN_VER="72"
 vers="9999"
 vers="${vers} $(printf '2.%s ' `seq ${LAST_KNOWN_VER} -1 50`)"
 


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-12-07 20:46 Sam James
  0 siblings, 0 replies; 23+ messages in thread
From: Sam James @ 2022-12-07 20:46 UTC (permalink / raw
  To: gentoo-commits

commit:     afe80def609c91d72df73837ce2c51fed8b69f28
Author:     Arsen Arsenović <arsen <AT> aarsen <DOT> me>
AuthorDate: Wed Dec  7 20:43:47 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec  7 20:46:03 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=afe80def

ac-wrapper.sh: fix autoconf regex

We need to optionally match the ., not require digits following period in version group.

Bug: https://bugs.gentoo.org/870169
Fixes: 6f9e65b68174b938714100f34f399844f8d2cb93
Signed-off-by: Arsen Arsenović <arsen <AT> aarsen.me>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ac-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index fb10d1c..9499ace 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -147,7 +147,7 @@ acprereq_version() {
 }
 
 generated_version() {
-	local re='^# Generated (by (GNU )?Autoconf|automatically using autoconf version) ([0-9.]+)\..*'
+	local re='^# Generated (by (GNU )?Autoconf|automatically using autoconf version) (([0-9]+.)+[0-9]+).*$'
 	sed -n -E "/${re}/{s:${re}:\3:;p;q}" "$@"
 }
 


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-11-22 21:20 Sam James
  0 siblings, 0 replies; 23+ messages in thread
From: Sam James @ 2022-11-22 21:20 UTC (permalink / raw
  To: gentoo-commits

commit:     6553d00e27c58cd28449e05521db3e9bf66fc400
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 21:08:08 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 21:08:08 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=6553d00e

am-wrapper.sh: handle 9999 too

Signed-off-by: Sam James <sam <AT> gentoo.org>

 am-wrapper.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/am-wrapper.sh b/am-wrapper.sh
index 492292c..6a54025 100755
--- a/am-wrapper.sh
+++ b/am-wrapper.sh
@@ -73,7 +73,8 @@ fi
 # Start with last known versions to speed up lookup process.
 #
 LAST_KNOWN_AUTOMAKE_VER="16"
-vers=$(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`)
+vers="9999"
+vers="${vers} $(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`)"
 
 #
 # Helper to scan for a usable program based on version.


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-11-22 21:20 Sam James
  0 siblings, 0 replies; 23+ messages in thread
From: Sam James @ 2022-11-22 21:20 UTC (permalink / raw
  To: gentoo-commits

commit:     3200de842d5141b4c6c816797b11b59858793f25
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 21:08:01 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 21:08:01 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=3200de84

ac-wrapper.sh: handle 9999 too

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ac-wrapper.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 5a489a2..fb10d1c 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -80,7 +80,8 @@ fi
 # Start with last known versions to speed up lookup process.
 #
 LAST_KNOWN_VER="71"
-vers=$(printf '2.%s ' `seq ${LAST_KNOWN_VER} -1 50`)
+vers="9999"
+vers="${vers} $(printf '2.%s ' `seq ${LAST_KNOWN_VER} -1 50`)"
 
 #
 # Helper to scan for a usable program based on version.


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-02-08  2:58 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-02-08  2:58 UTC (permalink / raw
  To: gentoo-commits

commit:     6f9e65b68174b938714100f34f399844f8d2cb93
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  8 02:57:21 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Feb  8 02:57:21 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=6f9e65b6

autoconf-wrapper: fix version detection

Make sure we chop the trailing period from the version string to fix
comparing to installed versions.  Otherwise, "2.69." will never match
"2.69".

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index ce576c6..5a489a2 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -146,7 +146,7 @@ acprereq_version() {
 }
 
 generated_version() {
-	local re='^# Generated (by (GNU )?Autoconf|automatically using autoconf version) ([0-9.]+).*'
+	local re='^# Generated (by (GNU )?Autoconf|automatically using autoconf version) ([0-9.]+)\..*'
 	sed -n -E "/${re}/{s:${re}:\3:;p;q}" "$@"
 }
 


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     b053e6168eb5eb344472ce4e3d1dad994693c992
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:32:04 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:32:04 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=b053e616

autoconf-wrapper: fix minor variable styling

We don't use braces on single-character shell builtins.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index a16c86a..d522576 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -33,7 +33,7 @@ which() {
 # Sanitize argv[0] since it isn't always a full path #385201
 #
 argv0=${0##*/}
-case ${0} in
+case $0 in
 	${argv0})
 		# find it in PATH
 		if ! full_argv0=$(which "${argv0}") ; then


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     cf6567f03d2f43df987d2c5950ee27132d6bb7aa
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:35:59 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:35:59 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=cf6567f0

autoconf-wrapper: drop unnecessary argv0 check

This doesn't add much value, and would never fire in an installed
setup.  It was meant to catch `./ac-wrapper.sh` usage in the source
tree, but the code largely executes fine otherwise, so might as well
punt it.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 4e0a765..37eb7b7 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -49,10 +49,6 @@ case $0 in
 		;;
 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" \


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     e7f61c009a39e1698e6a6b568647decb6ad17830
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:50:33 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:50:33 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=e7f61c00

harmonize wrappers a little

Try to use variables to hold the tool name to reduce the differences
between the scripts.  Hopefully this will make it a little easier to
keep the two in sync.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 8 +++++---
 am-wrapper.sh | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 4471f30..ce576c6 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -1,7 +1,9 @@
 #!/bin/sh
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+NAME="autoconf"
+
 # Based on the ac-wrapper.pl script provided by MandrakeSoft
 # Rewritten in bash by Gregorio Guidi
 #
@@ -126,7 +128,7 @@ if [ -z "${binary}" ] && [ -n "${WANT_AUTOCONF}" ] ; then
 fi
 
 if [ -z "${binary}" ] ; then
-	err "Unable to locate any usuable version of autoconf.\n" \
+	err "Unable to locate any usuable version of ${NAME}.\n" \
 	    "\tI tried these versions:${all_vers}\n" \
 	    "\tWith a base name of '${full_argv0}'."
 fi
@@ -216,7 +218,7 @@ export WANT_AUTOCONF="${binary_ver}"
 if [ ! -x "${binary}" ] ; then
 	# this shouldn't happen
 	err "${binary} is missing or not executable.\n" \
-	    "\tPlease try installing the correct version of autoconf."
+	    "\tPlease try installing the correct version of ${NAME}."
 fi
 
 exec "${binary}" "$@"

diff --git a/am-wrapper.sh b/am-wrapper.sh
index 2907626..492292c 100755
--- a/am-wrapper.sh
+++ b/am-wrapper.sh
@@ -1,7 +1,9 @@
 #!/bin/sh
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+NAME="automake"
+
 # Executes the correct automake version.
 #
 # If WANT_AUTOMAKE is set (can be a whitespace delimited list of versions):
@@ -116,7 +118,7 @@ if [ -z "${binary}" ] && [ -n "${WANT_AUTOMAKE}" ] ; then
 fi
 
 if [ -z "${binary}" ] ; then
-	err "Unable to locate any usuable version of automake.\n" \
+	err "Unable to locate any usuable version of ${NAME}.\n" \
 	    "\tI tried these versions:${all_vers}\n" \
 	    "\tWith a base name of '${full_argv0}'."
 fi
@@ -179,7 +181,7 @@ export WANT_AUTOMAKE="${binary_ver}"
 if [ ! -x "${binary}" ] ; then
 	# this shouldn't happen
 	err "${binary} is missing or not executable.\n" \
-	    "\tPlease try installing the correct version of automake."
+	    "\tPlease try installing the correct version of ${NAME}."
 fi
 
 exec "${binary}" "$@"


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     069eed65ee769ef2b2cde032d837418af5f96111
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:29:16 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:29:16 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=069eed65

autoconf-wrapper: drop mention of emerge

Generalize the "install autoconf" message to not refer to emerge
specifically since this script isn't specific to emerge, or even
Gentoo for that matter.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index d85b71b..a16c86a 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -214,7 +214,7 @@ export WANT_AUTOCONF="${binary_ver}"
 if [ ! -x "${binary}" ] ; then
 	# this shouldn't happen
 	err "${binary} is missing or not executable.\n" \
-	    "\tPlease try emerging the correct version of autoconf."
+	    "\tPlease try installing the correct version of autoconf."
 fi
 
 exec "${binary}" "$@"


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     8a78fdb3fb5592f997a96118611eb6f55846d434
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:35:02 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:35:02 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=8a78fdb3

autoconf-wrapper: use clearer warning/error messages

Copy the style used in the automake wrapper over.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index f9b0857..4e0a765 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -17,8 +17,9 @@
 
 (set -o posix) 2>/dev/null && set -o posix
 
-warn() { printf "ac-wrapper: $*\n" 1>&2; }
-err() { warn "$@"; exit 1; }
+_stderr() { printf 'ac-wrapper: %s: %b\n' "${argv0}" "$*" 1>&2; }
+warn() { _stderr "warning: $*"; }
+err() { _stderr "error: $*"; exit 1; }
 unset IFS
 which() {
 	local p


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     04fb5b54e8dea2aa16a53032f55f672dc7d547be
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:45:59 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:45:59 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=04fb5b54

autoconf-wrapper: expand full version range only on demand

Sync the automake behavior to autoconf where we expand all possible
versions only if the current ones not found.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 37eb7b7..4471f30 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -75,10 +75,10 @@ fi
 
 #
 # Set up bindings between actual version and WANT_AUTOCONF;
-# Start at last known unstable/stable versions to speed up lookup process.
+# Start with last known versions to speed up lookup process.
 #
-KNOWN_AUTOCONF="2.71 2.70 2.69"
-vers="${KNOWN_AUTOCONF} 9999 $(printf '2.%s ' `seq 99 -1 59`) 2.13"
+LAST_KNOWN_VER="71"
+vers=$(printf '2.%s ' `seq ${LAST_KNOWN_VER} -1 50`)
 
 #
 # Helper to scan for a usable program based on version.
@@ -106,7 +106,10 @@ find_binary() {
 # list of autoconf versions.
 #
 find_latest() {
-	find_binary ${vers}
+	if ! find_binary ${vers} ; then
+		# Brute force it.
+		find_binary $(printf '2.%s ' `seq 99 -1 ${LAST_KNOWN_VER}`) 9999
+	fi
 }
 for wx in ${WANT_AUTOCONF:-latest} ; do
 	if [ "${wx}" = "latest" ] || [ "${wx}" = "2.5" ] ; then


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     733d554fe2d1774f56dcf16f0b90e7f985e3abc2
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 07:41:49 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 07:41:49 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=733d554f

autoconf-wrapper: clean up old error message

Unwrap it a bit to take up fewer lines while still fitting within a
reasonable line length, and fix the grammar in a number of places.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index acc6fe9..ca23928 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -146,11 +146,11 @@ generated_version() {
 # 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"
+	err \
+		"Since configure.ac is present, aclocal will always use autoconf 2.59+\n" \
+		"\twhich conflicts with your choice and causes errors. You have two options:\n" \
+		"\t1. Try executing the command again after removing configure.ac\n" \
+		"\t2. Don't set WANT_AUTOCONF (currently set to '${WANT_AUTOCONF}')"
 fi
 
 if [ "${WANT_AUTOCONF:-2.1}" = "2.1" ] && [ -n "${WANT_AUTOMAKE}" ] ; then


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     b5ac3795546836195f926d62270f4b1d0dca5766
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 07:26:19 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 07:26:19 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=b5ac3795

autoconf-wrapper: use -E with sed

The -E option to enable POSIX ERE is more portable.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index d225eca..29a5d87 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -131,7 +131,7 @@ fi
 # autodetect helpers
 #
 acprereq_version() {
-	sed -n -r \
+	sed -n -E \
 		-e '/^\s*(#|dnl)/d' \
 		-e '/AC_PREREQ/s:.*AC_PREREQ\s*\(\[?\s*([0-9.]+)\s*\]?\):\1:p' \
 		"$@" |
@@ -141,7 +141,7 @@ acprereq_version() {
 
 generated_version() {
 	local re='^# Generated (by (GNU )?Autoconf|automatically using autoconf version) ([0-9.]+).*'
-	sed -n -r "/${re}/{s:${re}:\3:;p;q}" "$@"
+	sed -n -E "/${re}/{s:${re}:\3:;p;q}" "$@"
 }
 
 #


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     26310da15dd46776faf1c8e892896f443aa9c419
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:25:54 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:25:54 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=26310da1

autoconf-wrapper: handle autodetection better

If WANT_AUTOCONF isn't set, don't just default to the latest version.
If the current directory has configure or aclocal.m4 files previously
generated with a specific autoconf version, then use that if available.
This matches how the automake wrapper behaves.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index e37f5f3..d85b71b 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -146,10 +146,32 @@ generated_version() {
 	sed -n -E "/${re}/{s:${re}:\3:;p;q}" "$@"
 }
 
+recorded_aclocal_version() {
+	local re='.*m4_warning.*this file was generated for autoconf ([0-9].+)\..*'
+	sed -n -E "/${re}/{s:${re}:\1:;p;q}" "$@"
+}
+
 #
 # autodetect routine
 #
-if [ "${WANT_AUTOCONF}" = "2.1" ] && [ -f "configure.ac" ] ; then
+if [ -z "${WANT_AUTOCONF}" ] ; then
+	auto_vers=
+	if [ -r "configure" ] ; then
+		auto_vers="${auto_vers} $(generated_version configure)"
+	fi
+	if [ -r "aclocal.m4" ] ; then
+		auto_vers="${auto_vers} $(recorded_aclocal_version aclocal.m4)"
+	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 [ "${WANT_AUTOCONF}" = "2.1" -o "${WANT_AUTOCONF}" = "2.13" ] && [ -f "configure.ac" ] ; then
 	err \
 		"Since configure.ac is present, aclocal will always use autoconf 2.59+\n" \
 		"\twhich conflicts with your choice and causes errors. You have two options:\n" \


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     128dff66839fcc5d02bd2b61592eec486919e404
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 07:52:37 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 07:52:37 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=128dff66

autoconf-wrapper: export WANT_AUTOCONF to the full version

When exporting the WANT_AUTOCONF version based on what we picked, use
the full version instead of the short 2.1 or 2.5 values since they may
expand into an unrelated version (since we accept many versions as an
alias to 2.5).  Practically speaking, there shouldn't be a difference,
but this will make things a bit more clear.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index ca23928..6cb436b 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -183,9 +183,8 @@ fi
 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}"
+			export WANT_AUTOCONF="${auto_ver}"
 			break
 		fi
 	done


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     185e2e318d5050eb21e6b9d3c84722f56e4505c0
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:04:09 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:04:09 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=185e2e31

autoconf-wrapper: slightly rework handling of 2.1 version alias

The 2.1 alias only ever expanded into the 2.13 version.  Every other
version uses the 2.5 alias, and at this point, seems extremely unlikely
that this will ever change (or that we'd add a new alias set).  Rework
the WANT_AUTOCONF checking logic to rewrite 2.1 to 2.13, and then accept
any non-2.13 version when 2.5 is used.  This will allow us to burn down
the alias logic entirely which will simplify the code nicely.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 6cb436b..4682082 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -108,17 +108,24 @@ if [ -n "${WANT_AUTOCONF}" ] ; then
 		fi
 
 		auto_ver=${v%:*}
-		want_ver=${v#*:}
 		for wx in ${WANT_AUTOCONF} ; do
 			if [ "${wx}" = "latest" ] ; then
 				wx="2.5"
+			elif [ "${wx}" = "2.1" ] ; then
+				wx="2.13"
 			fi
 			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"
+			elif [ "${wx}" = "2.5" ] ; then
+				if [ "${auto_ver}" = "2.13" ] ; then
+					# The "2.5" alias accepts every version except 2.13.
+					continue
+				fi
+				if [ -x "${full_argv0}-${auto_ver}" ] ; then
+					binary="${full_argv0}-${auto_ver}"
+					v="x"
+				fi
 			fi
 		done
 		[ "${v}" = "x" ] && break


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     00cd31a1d41d0580b2f9ac765badb234e0643ea2
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:12:47 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:12:47 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=00cd31a1

autoconf-wrapper: simplify known version list

Since the 2.1/2.5 version aliases are inlined in the WANT_AUTOCONF
parse logic now, there's no need to keep annotating every specific
version with it.  Drop it to simplify the logic a bit.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 57324bb..bd9a8d9 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -78,14 +78,13 @@ fi
 # Set up bindings between actual version and WANT_AUTOCONF;
 # Start at last known unstable/stable versions to speed up lookup process.
 #
-KNOWN_AUTOCONF="2.71:2.5 2.70:2.5 2.69:2.5"
-vers="${KNOWN_AUTOCONF} 9999:2.5 $(printf '2.%s:2.5 ' `seq 99 -1 59`) 2.13:2.1"
+KNOWN_AUTOCONF="2.71 2.70 2.69"
+vers="${KNOWN_AUTOCONF} 9999 $(printf '2.%s ' `seq 99 -1 59`) 2.13"
 
 binary=""
 for v in ${vers} ; do
-	auto_ver=${v%:*}
-	if [ -z "${binary}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then
-		binary="${full_argv0}-${auto_ver}"
+	if [ -z "${binary}" ] && [ -x "${full_argv0}-${v}" ] ; then
+		binary="${full_argv0}-${v}"
 		break
 	fi
 done
@@ -107,7 +106,6 @@ if [ -n "${WANT_AUTOCONF}" ] ; then
 			break
 		fi
 
-		auto_ver=${v%:*}
 		for wx in ${WANT_AUTOCONF} ; do
 			if [ "${wx}" = "latest" ] ; then
 				wx="2.5"
@@ -119,12 +117,12 @@ if [ -n "${WANT_AUTOCONF}" ] ; then
 				v="x"
 				break
 			elif [ "${wx}" = "2.5" ] ; then
-				if [ "${auto_ver}" = "2.13" ] ; then
+				if [ "${v}" = "2.13" ] ; then
 					# The "2.5" alias accepts every version except 2.13.
 					continue
 				fi
-				if [ -x "${full_argv0}-${auto_ver}" ] ; then
-					binary="${full_argv0}-${auto_ver}"
+				if [ -x "${full_argv0}-${v}" ] ; then
+					binary="${full_argv0}-${v}"
 					v="x"
 					break
 				fi
@@ -191,9 +189,8 @@ fi
 #
 if [ -z "${WANT_AUTOCONF}" ] ; then
 	for v in ${vers} ; do
-		auto_ver=${v%:*}
-		if [ "${binary}" = "${full_argv0}-${auto_ver}" ] ; then
-			export WANT_AUTOCONF="${auto_ver}"
+		if [ "${binary}" = "${full_argv0}-${v}" ] ; then
+			export WANT_AUTOCONF="${v}"
 			break
 		fi
 	done


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     90d1d2dc10b0ebe6d9d43dc616722ed07f3935df
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 07:33:22 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 07:33:22 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=90d1d2dc

autoconf-wrapper: ignore $KNOWN_AUTOCONF in env

It's not clear why this was made into an env var as nothing ever
sets it in ebuilds/eclasses, and we don't have a desire to allow
them to either.  It's also not how the automake-wrapper works.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 29a5d87..acc6fe9 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -78,9 +78,7 @@ 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
+KNOWN_AUTOCONF="2.71:2.5 2.70:2.5 2.69:2.5"
 vers="${KNOWN_AUTOCONF} 9999:2.5 $(printf '2.%s:2.5 ' `seq 99 -1 59`) 2.13:2.1"
 
 binary=""


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     a6595b6dee7e193cb008162880abcddc77e3ec5d
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:20:42 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:20:42 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=a6595b6d

autoconf-wrapper: rework WANT_AUTOCONF parsing to match WANT_AUTOMAKE

Take the WANT_AUTOMAKE approach to parsing to find a matching version.
This simplifies the code a bit, and will allow us to do better dynamic
detection in a follow up.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 92 ++++++++++++++++++++++++++---------------------------------
 1 file changed, 41 insertions(+), 51 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index bd9a8d9..e37f5f3 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -81,55 +81,52 @@ fi
 KNOWN_AUTOCONF="2.71 2.70 2.69"
 vers="${KNOWN_AUTOCONF} 9999 $(printf '2.%s ' `seq 99 -1 59`) 2.13"
 
-binary=""
-for v in ${vers} ; do
-	if [ -z "${binary}" ] && [ -x "${full_argv0}-${v}" ] ; then
-		binary="${full_argv0}-${v}"
-		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
+#
+# 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 [ "${v}" = "2.1" ] ; then
+			v="2.13"
+		fi
+		if [ -x "${full_argv0}-${v}" ] ; then
+			binary="${full_argv0}-${v}"
+			binary_ver=${v}
+			return 0
+		fi
+	done
+	return 1
+}
 
 #
 # 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
+find_latest() {
+	find_binary ${vers}
+}
+for wx in ${WANT_AUTOCONF:-latest} ; do
+	if [ "${wx}" = "latest" ] || [ "${wx}" = "2.5" ] ; then
+		find_latest && break
+	else
+		find_binary ${wx} && break
+	fi
+done
 
-		for wx in ${WANT_AUTOCONF} ; do
-			if [ "${wx}" = "latest" ] ; then
-				wx="2.5"
-			elif [ "${wx}" = "2.1" ] ; then
-				wx="2.13"
-			fi
-			if [ -x "${full_argv0}-${wx}" ] ; then
-				binary="${full_argv0}-${wx}"
-				v="x"
-				break
-			elif [ "${wx}" = "2.5" ] ; then
-				if [ "${v}" = "2.13" ] ; then
-					# The "2.5" alias accepts every version except 2.13.
-					continue
-				fi
-				if [ -x "${full_argv0}-${v}" ] ; then
-					binary="${full_argv0}-${v}"
-					v="x"
-					break
-				fi
-			fi
-		done
-		[ "${v}" = "x" ] && break
-	done
+if [ -z "${binary}" ] && [ -n "${WANT_AUTOCONF}" ] ; then
+	warn "could not locate installed version for WANT_AUTOCONF='${WANT_AUTOCONF}'; ignoring"
+	unset WANT_AUTOCONF
+	find_latest
+fi
+
+if [ -z "${binary}" ] ; then
+	err "Unable to locate any usuable version of autoconf.\n" \
+	    "\tI tried these versions:${all_vers}\n" \
+	    "\tWith a base name of '${full_argv0}'."
 fi
 
 #
@@ -187,14 +184,7 @@ fi
 #
 # for further consistency
 #
-if [ -z "${WANT_AUTOCONF}" ] ; then
-	for v in ${vers} ; do
-		if [ "${binary}" = "${full_argv0}-${v}" ] ; then
-			export WANT_AUTOCONF="${v}"
-			break
-		fi
-	done
-fi
+export WANT_AUTOCONF="${binary_ver}"
 
 #
 # Now try to run the binary


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-30  9:24 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-30  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     96ba24a7da70f7149a071c98be37461df50b83e7
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:07:45 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:07:45 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=96ba24a7

autoconf-wrapper: make sure we break on first match, not last

The intention was that we break on the first match in WANT_AUTOCONF,
so add that missing break statement.  In practice, people only ever
set one value in WANT_AUTOCONF, so that's probably why no one has
ever noticed this bug before.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 4682082..57324bb 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -117,6 +117,7 @@ if [ -n "${WANT_AUTOCONF}" ] ; then
 			if [ -x "${full_argv0}-${wx}" ] ; then
 				binary="${full_argv0}-${wx}"
 				v="x"
+				break
 			elif [ "${wx}" = "2.5" ] ; then
 				if [ "${auto_ver}" = "2.13" ] ; then
 					# The "2.5" alias accepts every version except 2.13.
@@ -125,6 +126,7 @@ if [ -n "${WANT_AUTOCONF}" ] ; then
 				if [ -x "${full_argv0}-${auto_ver}" ] ; then
 					binary="${full_argv0}-${auto_ver}"
 					v="x"
+					break
 				fi
 			fi
 		done


^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [gentoo-commits] proj/autotools-wrappers:main commit in: /
@ 2022-01-29 20:35 Mike Frysinger
  0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2022-01-29 20:35 UTC (permalink / raw
  To: gentoo-commits

commit:     61261bea8c72ce837a274b7e722ac28b5d1d00f1
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 29 20:35:04 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Jan 29 20:35:04 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=61261bea

autoconf-wrapper: support WANT_AUTOCONF=latest

Match existing automake-wrapper behavior.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index e5eda0e..d225eca 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -112,6 +112,9 @@ if [ -n "${WANT_AUTOCONF}" ] ; then
 		auto_ver=${v%:*}
 		want_ver=${v#*:}
 		for wx in ${WANT_AUTOCONF} ; do
+			if [ "${wx}" = "latest" ] ; then
+				wx="2.5"
+			fi
 			if [ -x "${full_argv0}-${wx}" ] ; then
 				binary="${full_argv0}-${wx}"
 				v="x"


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2024-06-07 13:27 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-30  9:24 [gentoo-commits] proj/autotools-wrappers:main commit in: / Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2024-06-07 13:27 Sam James
2023-12-24  0:55 Sam James
2022-12-07 20:46 Sam James
2022-11-22 21:20 Sam James
2022-11-22 21:20 Sam James
2022-02-08  2:58 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-29 20:35 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox