On 14/03/2022 22:15, Adam Dinwoodie wrote:
The latest version of Autoconf is 2.71, but the version detection
incorrectly considers 2.70 and higher as being the same as 2.59 and
lower for the purposes of specifying documentation directories.  Correct
that, and make the version detection a bit more future-proof by parsing
out the actual version parts and performing numeric comparison.

While we're at it, add a bit more commentary explaining the intent of
the different behaviour over the different Autoconf versions.

I applied this.

But it seems no good deed goes unpunished...

        configure="${confdir}/configure"
-       confver=$(grep -m 1 'GNU Autoconf' ${configure} | cut -d ' ' -f 6)
+       confver="$("$configure" --version | sed -rn 's/.*GNU Autoconf 
([0-9\.]+)/\1/p')"
+       confver_maj=${confver%%.*}
+       confver_min=${confver##*.}
+       if [ $confver_maj -ne 2 ]
+       then
+               error "unexpected autoconf version";
+       fi

When rebuilding 'dialog' to update the SRC_URI, I get:

/usr/share/cygport/cygclass/autotools.cygclass: line 658: [: -ne: unary 
operator expected
/usr/share/cygport/cygclass/autotools.cygclass: line 689: [: -ge: unary 
operator expected
/usr/share/cygport/cygclass/autotools.cygclass: line 703: [: -ge: unary 
operator expected

It seems that the configure script for that it customized somehow and doesn't output anything matching that regex:

$ ./configure --version

Copyright 2003-2020,2021        Thomas E. Dickey
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.

I think that if $confver is empty, that should be an error, and then perhaps there needs to be a variable which can be set to override autodection of the ./configure script version (e.g. something like 'CONF_VERSION=2.60')

Reply via email to