On May 24, 2010, at 10:38 AM, Daniel J. Luke wrote:

On May 24, 2010, at 1:30 PM, Ryan Schmidt wrote:
GraphicsMagick uses:

if {![variant_isset q16] && ![variant_isset q32]} {
  default_variants +q8
}

This ensures that if the user does not specify +q8, +q16 or +q32, it selects +q8.

The one thing this does not handle is if the user specifically tries to install "GraphicsMagick -q8"; in this case no variant will be selected. I've never been entirely comfortable with that. Perhaps we should indeed be using variant_set instead:

if {![variant_isset q16] && ![variant_isset q32]} {
  variant_set q8
}

I'm not certain why we haven't been doing that.

I still don't understand why you set up some of your ports this way instead of the more straightforward method (have the +q8 configure args in the default configure args, and have the variants just remove the +q8 stuff and add their appropriate args).

To me, Portfiles are always clearer if they can avoid using variant_isset.

I my particular case there is no configure. The author has you edit .config so I am patching .config and use reinplace.



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

Reply via email to