port callback example

Ryan Schmidt ryandesign at macports.org
Tue Feb 8 14:49:44 PST 2011

On Feb 8, 2011, at 16:38, James Gregurich wrote:

> muniversal overrides configure. In that function, there is a loop over universal_archs_to_use. I want the portfile to be able intercept each iteration of that loop and take an action based on the current configure.XXX variables.

I don't believe the muniversal portgroup (or MacPorts) provides the ability to intercept in that manner.

However, the muniversal portgroup does make available a number of hash variables where you can set different options for different architectures -- for example merger_configure_env, merger_configure_args, merger_configure_cflags, etc. For example, consider the memcached port, which has these lines:

    set merger_configure_args(x86_64) --enable-64bit
    set merger_configure_args(ppc64)  --enable-64bit

More information about the macports-users mailing list