1 |
commit: 185e2e318d5050eb21e6b9d3c84722f56e4505c0 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 30 08:04:09 2022 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 30 08:04:09 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=185e2e31 |
7 |
|
8 |
autoconf-wrapper: slightly rework handling of 2.1 version alias |
9 |
|
10 |
The 2.1 alias only ever expanded into the 2.13 version. Every other |
11 |
version uses the 2.5 alias, and at this point, seems extremely unlikely |
12 |
that this will ever change (or that we'd add a new alias set). Rework |
13 |
the WANT_AUTOCONF checking logic to rewrite 2.1 to 2.13, and then accept |
14 |
any non-2.13 version when 2.5 is used. This will allow us to burn down |
15 |
the alias logic entirely which will simplify the code nicely. |
16 |
|
17 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
18 |
|
19 |
ac-wrapper.sh | 15 +++++++++++---- |
20 |
1 file changed, 11 insertions(+), 4 deletions(-) |
21 |
|
22 |
diff --git a/ac-wrapper.sh b/ac-wrapper.sh |
23 |
index 6cb436b..4682082 100755 |
24 |
--- a/ac-wrapper.sh |
25 |
+++ b/ac-wrapper.sh |
26 |
@@ -108,17 +108,24 @@ if [ -n "${WANT_AUTOCONF}" ] ; then |
27 |
fi |
28 |
|
29 |
auto_ver=${v%:*} |
30 |
- want_ver=${v#*:} |
31 |
for wx in ${WANT_AUTOCONF} ; do |
32 |
if [ "${wx}" = "latest" ] ; then |
33 |
wx="2.5" |
34 |
+ elif [ "${wx}" = "2.1" ] ; then |
35 |
+ wx="2.13" |
36 |
fi |
37 |
if [ -x "${full_argv0}-${wx}" ] ; then |
38 |
binary="${full_argv0}-${wx}" |
39 |
v="x" |
40 |
- elif [ "${wx}" = "${want_ver}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then |
41 |
- binary="${full_argv0}-${auto_ver}" |
42 |
- v="x" |
43 |
+ elif [ "${wx}" = "2.5" ] ; then |
44 |
+ if [ "${auto_ver}" = "2.13" ] ; then |
45 |
+ # The "2.5" alias accepts every version except 2.13. |
46 |
+ continue |
47 |
+ fi |
48 |
+ if [ -x "${full_argv0}-${auto_ver}" ] ; then |
49 |
+ binary="${full_argv0}-${auto_ver}" |
50 |
+ v="x" |
51 |
+ fi |
52 |
fi |
53 |
done |
54 |
[ "${v}" = "x" ] && break |