Somebody should probably go ahead and replace the "overrided" in "These can be overrided for specific ports." with "overridden".

Regards,

Elias Pipping


On Feb 26, 2007, at 5:45 AM, Paul Guyot wrote:

Dear all,

I've just implemented and committed a default +universal variant for configure-based ports. There's been some heat about +universal recently and I did not want every port to define the same code over and over.

This variant is more or less equivalent to:
variant universal {
        configure.args-append "--disable-dependency-tracking"
configure.env-append CFLAGS="-isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc"
}

However, there is some additional magic:
* selecting the variant will fail if the port doesn't invoke configure (because user may think they can build the port universal while it would be effectless) * selecting the variant will print a warning message if the port already overrides LDFLAGS or CFLAGS in the environment for the configure command
* you can add -O -g if the port requires it with just:
configure.universal_cflags-append       -O -g
* you can simply redefine the variant to override the default code and provide port-specific handler for the universal variant.

etc.

The variant is documented in portfile(7). I tested it with several ports and it seems to just work®™.

I'm considering some future enhancements, but let's see what it gives if we start building ports with +universal. Of course, the build will probably fail if dependencies were not built universal.

Enjoy!

Paul

_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macports-dev

_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to