Patch ./configure, or use instead?

Jim DeLaHunt list+macports-dev at
Tue Feb 15 08:28:24 UTC 2022

Hi, folks:
[resend, sent to old domain name at first, sorry]

I am working on a port[1], where I want to patch a couple of autoconf 
macros[2] and . The unpatched macros give 
-Wimplicit-function-declaration errors, but they are easy to fix via 
patches.  However, I discovered that the ./configure script incorporates 
the unpatched behaviour of the macros, so `port configure` still causes 
the -Wimplicit-function-declaration errors.

The codebase supplies a script, ./ . It runs autoconf, 
libtool, etc. etc. and regenerates the ./configure script, incorporating 
the fixes from the patched macros. It accepts the same options as 
./configure, and passes them on when it calls ./configure .

I see two ways to solve this:
a) tell the Portfile to use ./ as the configure command. Let 
every user rebuild the ./configure script
b) patch the ./configure script with the same fixes as the autoconf macros.

Doing a) means the port will have build dependencies on autoconf, 
automake, etc. etc., and will take longer to run. But will it fail?

Doing b) means I have to patch something which I think perhaps I should 
not be patching. I don't see guidance about this, but it feels like a 
bad approach.

I think that telling the Portfile to use ./ is simply a matter 
of these directives:

configure.cmd        ./

depends_build       port:pkgconfig \
                     port:autoconf \
                     port:automake \
             port:libtool \

Comments? Advice?
     --Jim DeLaHunt

[1] Major rewrite of freeciv port,

.    --Jim DeLaHunt, Vancouver, Canada

More information about the macports-dev mailing list