get_canonical_archflags and the default universal variant
Ryan Schmidt
ryandesign at macports.org
Sat Oct 29 18:18:38 PDT 2011
On Oct 29, 2011, at 08:31, Joshua Root wrote:
> On 2011-10-29 18:24 , Ryan Schmidt wrote:
>> Why does [get_canonical_archflags] not return universal archs if the port does not declare an explicit universal variant? Why is the implicit universal variant MacPorts declares not enough?
>
> Consider this code:
>
> build.args-append CFLAGS="[get_canonical_archflags]"
> ...
> universal_variant no
Consider this code:
use_configure no
build.args-append CFLAGS="[get_canonical_archflags]"
variant universal {}
This won't result in universal archflags in CFLAGS either. We know this. The declaration of the universal variant must occur before get_canonical_archflags is used, e.g.:
use_configure no
variant universal {}
build.args-append CFLAGS="[get_canonical_archflags]"
So why can't we also mandate that, if you want to disable the default universal variant, you must do that before accessing get_canonical_archflags too, e.g.:
universal_variant no
build.args-append CFLAGS="[get_canonical_archflags]"
I just think it's odd that we have to add "variant universal {}" (or perhaps "universal_variant yes" would work too) for ports that already have an existing MacPorts-base-provided universal variant.
Concrete example:
https://trac.macports.org/changeset/86596
More information about the macports-dev
mailing list