On Jan 13, 2014, at 13:43, [email protected] wrote:
> Revision
> 115893
> Author
> [email protected]
> Date
> 2014-01-13 11:43:03 -0800 (Mon, 13 Jan 2014)
> Log Message
>
> py2[67]-exiv2: replace with new unified port py-exiv2, use active_variants
> port group (#33153).
> Modified Paths
>
> • trunk/dports/python/py-exiv2/Portfile
> +if {$subport != $name} {
Remember to use eq/ne for string comparisons instead of ==/!=.
> + pre-build {
> + if {[variant_isset universal]} {
> + build.env-append \
>
> CXXFLAGS="${configure.universal_cxxflags}
> -I${prefix}/include" \
>
> LDFLAGS="${configure.universal_ldflags} -L${prefix}/lib"
>
> -} else {
> - build.env-append \
>
> + } else {
> + build.env-append \
>
> CXXFLAGS="-I${prefix}/include" \
>
> LDFLAGS="-L${prefix}/lib”
>
> + if {[variant_isset universal]} {
> + destroot.env-append \
> + CXXFLAGS="${configure.universal_cxxflags} -I${prefix}/include" \
> + LDFLAGS="${configure.universal_ldflags} -L${prefix}/lib"
> + } else {
> + destroot.env-append \
> + CXXFLAGS="-I${prefix}/include" \
> + LDFLAGS="-L${prefix}/lib"
> + }
-arch flags should always be used, not just when building universal. You don’t
need a conditional; you can just use the [get_canonical_archflags] procedure
and it will give you the correct -arch flags, depending on whether the
universal variant was selected or not.
There’s no need for this to occur in a pre-build block, however there is a need
for you to declare beforehand if a universal variant exists, e.g. by adding the
line:
variant universal {}
at some point before get_canonical_archflags is invoked.
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev