How to properly set "variant-dependent" ACLOCAL_PATH (or better proposals)?

Mojca Miklavec mojca at macports.org
Sun May 3 22:44:01 PDT 2015


Hi,

We have five different wxWidgets ports. Usually it's enough if a port
that depends on wxWidgets sets something like
    --with-wxdir=${wxWidgets.wxdir}
in configure flags, but when a development version of a port has to
bootstrap first, autoconf has to find wxwin.m4 which lives in
     "${wxWidgets.prefix}/share/aclocal/wxwin.m4

($prefix/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/share/aclocal/wxwin.m4)

The ideal solution would probably be if any of the five wxWidgets
ports would install the latest version of wxwin.m4 into
$prefix/share/local/wxwin.m4. But I assume that probably means
creating a new port just for that single file which seems like a tiny
bit of an overkill (unless wxWidgets_select would exceptionally be
used to install also that file).

An alternative solution is to copy wxwin.m4 into "${worksrcpath}/m4/"
inside every variant:
    post-patch {
        file mkdir ${worksrcpath}/m4
        file copy  ${wxWidgets.prefix}/share/aclocal/wxwin.m4 ${worksrcpath}/m4
    }

Or to set ACLOCAL_PATH during the autoconf phase. But I don't know how
to do that (which variable has to be set). I tried cornfigure.env, but
it doesn't seem that those variables would be set when running
autoconf.cmd.

I also submitted a feature request to keep a copy of wxwin.m4 in the
sources (which is what many other projects do), but the developers
seem happier not to do it, judging from:
    https://sourceforge.net/p/codeblocks/tickets/163/

Here's the current version of the port for a reference:
    http://trac.macports.org/browser/trunk/dports/devel/codeblocks/Portfile?rev=135776

What would you suggest to do?

Thank you,
    Mojca


More information about the macports-dev mailing list