Getting the entire configure.cflags variable

Ryan Schmidt ryandesign at
Fri Oct 3 18:09:05 PDT 2014

On Oct 3, 2014, at 4:47 PM, Joshua Root wrote:
> On 2014-10-4 07:04 , Ryan Schmidt wrote:
>> "-arch" flags may or may not be doable. Joshua previously thought this was not fixable. 
> Depends what you mean by "this" and "fixable". Certainly it's impossible
> for any variable that can be read at any point to always reflect the
> existence of a variant that may not have been defined yet.

Right, precisely that is the difficult bit. But what about this: we already have the variable "universal_variant". Ports can set "universal_variant no" to disable the standard universal variant, or set "universal_variant yes" to have it added. We could trace that variable to change the -arch flags in the various *flags variables.

For manually-defined universal variants ("variant universal {...}") perhaps we could add a special case to the variant creation code in base, so that if the variant being created is called "universal", then set "universal_variant yes" as well, which would activate the trace.

> Issues of this type could be mitigated if we parsed portfiles in two
> passes, but that would no doubt bring its own surprises.

Yeah I'm not sure how that would work yet. I feel like it's taken me so long to really understand how MacPorts parses portfiles today, I would hate to change it now because I'd have to learn something new all over again :)

More information about the macports-dev mailing list