[121260] trunk/dports/gis/gctpc/Portfile

Jeremy Huddleston Sequoia jeremyhu at macports.org
Sat Jun 21 23:43:21 PDT 2014


I just copy/pasted from the wgrib2 port.  You should make the changes there as well.

--Jeremy
 
On Jun 21, 2014, at 15:56, Ryan Schmidt <ryandesign at macports.org> wrote:

> 
> On Jun 21, 2014, at 2:26 PM, jeremyhu at macports.org wrote:
> 
>> Revision
>> 121260
>> Author
>> jeremyhu at macports.org
>> Date
>> 2014-06-21 12:26:57 -0700 (Sat, 21 Jun 2014)
>> Log Message
>> 
>> gctpc: Support +universal as required by wgrib2
>> Modified Paths
>> 
>> 	• trunk/dports/gis/gctpc/Portfile
>> Diff
>> 
>> Modified: trunk/dports/gis/gctpc/Portfile (121259 => 121260)
> 
>> -build.env           CC=${configure.cc} \
>> -                    CPPFLAGS=${configure.cppflags} \
>> -                    CFLAGS=${configure.cflags}
>> +variant universal {}
>> +if {[variant_isset universal]} {
>> +    set cflags "${configure.cflags} ${configure.universal_cflags}"
>> +    set ldflags "${configure.ldflags} ${configure.universal_ldflags}"
>> +} else {
>> +    set cflags "${configure.cflags} ${configure.cc_archflags}"
>> +    set ldflags "${configure.ldflags} ${configure.cc_archflags}"
>> +}
>> +
>> +build.env-append    LDFLAGS=\"${ldflags}\" \
>> +                    CC=\"${configure.cc}\" \
>> +                    CPPFLAGS=\"${configure.cppflags}\" \
>> +                    CFLAGS=\"${cflags}\"
> 
> No need to do this dance manually; you should use the [get_canonical_archflags] procedure to get the correct -arch flags regardless whether the universal variant is selected or not. Also no need to escape the quotes. All you need is:
> 
> 
> variant universal {}
> 
> build.env-append    CC="${configure.cc}" \
>                    CPPFLAGS="${configure.cppflags}" \
>                    CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
>                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
> 
> 



More information about the macports-dev mailing list