Oh yeah, one more:

5. get_canonical_archflags

This:

variant universal {}
if {[variant_isset universal]} {
    set archflags ${configure.universal_cflags}
} else {
    set archflags ${configure.cc_archflags}
}
post-patch {
    reinplace "s|__ARCHFLAGS__|${archflags}|" ${worksrcpath}/Makefile
}

Can be replaced with:

variant universal {}
post-patch {
    reinplace "s|__ARCHFLAGS__|[get_canonical_archflags]|" \
        ${worksrcpath}/Makefile
}

Bear in mind that it won't return the universal flags if it's called
before a universal variant has been declared. A good rule of thumb to
avoid problems is to only call it inside a phase.

- Josh
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to