[101231] trunk/dports/lang/apple-gcc42/Portfile
Ryan Schmidt
ryandesign at macports.org
Sun Jan 6 10:06:25 PST 2013
On Jan 6, 2013, at 12:04, Bradley Giesbrecht <pixilla at macports.org> wrote:
> On Jan 6, 2013, at 9:55 AM, ryandesign at macports.org wrote:
>
>> variant gpl3 description {Merge in changes from gcc-4.2.4} {
>>
>> license GPL-3
>>
>> - set gcc_version 4.2.4
>>
>> maintainers googlemail.com:tobias.netzel openmaintainer
>>
>>
>>
>> patchfiles-append gcc-4.2.1-4.2.4.patch
>>
>> }
>>
>> +if {[variant_isset gpl3]} {
>> + set gcc_version 4.2.4
>> +}
>
>
> Why does setting vars inside variant blocks not always work?
> Is the variant block NOT parsed in each phase?
The main part of the portfile is parsed, and then afterward, the variants are parsed. So the variable was not being set to its new value until after master_sites had already been set using the variable's old value.
Platform blocks used to behave this way too, but that was changed a few versions of MacPorts ago. Now platform blocks are equivalent to "if" statements.
More information about the macports-dev
mailing list