[76455] trunk/dports/science/xmedcon/Portfile

Ryan Schmidt ryandesign at macports.org
Sun Feb 27 05:44:23 PST 2011


On Feb 23, 2011, at 17:46, jameskyle at macports.org wrote:

> Revision: 76455
>          http://trac.macports.org/changeset/76455
> Author:   jameskyle at macports.org
> Date:     2011-02-23 15:46:09 -0800 (Wed, 23 Feb 2011)
> Log Message:
> -----------
> Added system gcc variant. #28422
> 
> Modified Paths:
> --------------
>    trunk/dports/science/xmedcon/Portfile


> -if {![variant_isset gcc43]} {
> +if {![variant_isset gcc43] && ![variant_isset sysgcc]} {
>     default_variants    +gcc44
> }
> 
> @@ -47,14 +49,17 @@
>   configure.args-append --enable-gtk1
> }
> 
> -variant gcc43 conflicts gcc44 description {Enable gcc43 compiler support} {
> +variant gcc43 conflicts gcc44 sysgcc universal description {Enable gcc43 compiler support} {
>   depends_lib-append port:gcc43
> -
>   configure.compiler macports-gcc-4.3
> +  universal_variant no
> }
> 
> -variant gcc44 conflicts gcc43 description {Enable gcc44 compiler support} {
> +variant gcc44 conflicts gcc43 sysgcc universal description {Enable gcc44 compiler support} {
>   depends_lib-append port:gcc44
> -
>   configure.compiler macports-gcc-4.4
> +  universal_variant no
> }
> +
> +variant sysgcc conflicts gcc44 gcc43 description {Use system gcc compiler} {
> +}

"sysgcc" is not a variant name we've ever used before... Most ports build with the Xcode compiler, so users don't expect to have to learn another variant name to do that for this port. How about just letting users specify -gcc44 if they don't want to use gcc44?


Also, now that the gcc variants conflict with universal, I can't even get info on the port anymore, since +universal is in my variants.conf:

$ port info xmedcon
Error: xmedcon: Variant gcc44 conflicts with universal
Error: Unable to open port: Error evaluating variants

You should probably not mark the gcc variants as conflicting with the universal variant. This would make the default build still use gcc44, and it would be non-universal (since you put "universal_variant no" in those variants) even if the user requested +universal.

If you think universal is more important than using gcc44, then you might not auto-select gcc44 if the universal variant is set. This would make the default build use gcc44 if the user did not request universal, and would use Xcode gcc if the user did request universal.








More information about the macports-dev mailing list