Changes between Version 25 and Version 26 of PortfileRecipes


Ignore:
Timestamp:
Apr 29, 2011, 10:52:38 PM (13 years ago)
Author:
jmroot (Joshua Root)
Comment:

update default_variants section

Legend:

Unmodified
Added
Removed
Modified
  • PortfileRecipes

    v25 v26  
    7979
    8080== default_variants == #default_variants
    81 Currently negating a variant (through {{{-variant}}}) is not remembered which means a {{{port upgrade}}} will not keep that negation around.  This causes issues with default_variants which must be kept in mind (ticket #2377).
    82 
    83 The preferred technique is to only select a default variant when one of a set is actually needed; e.g. from [browser:trunk/dports/graphics/ImageMagick ImageMagick], when selecting the pixel quantum:
     81When some users may want to turn a feature off but most will want it on, you can use a variant that is on by default. Define the variant as usual, and then use the default_variants keyword like this (to make the `foo` variant on by default):
     82{{{
     83default_variants +foo
     84}}}
     85The port will then be installed with `+foo` unless the user specifies `-foo` on the command line or in variants.conf.
     86
     87You can also use default_variants when one of a set of mutually exclusive variants is needed; e.g. from [browser:trunk/dports/graphics/ImageMagick ImageMagick], when selecting the pixel quantum:
    8488{{{
    8589if {![variant_isset q8] && ![variant_isset q32]} {
     
    8892}}}
    8993
    90 This also leads to preferring negative-based variants (like {{{no_x11}}}) as using {{{+no_x11}}} is remembered, whereas if you had {{{x11}}} as a variant and set it in default_variants, {{{-x11}}} would not be remembered.
    91 
     94Formerly, use of negatively-named variants (like `no_x11`) was preferred to having a default positively-named variant (like `x11`), due to a deficiency in the port registry (ticket #2377). Now that this is fixed, use of negatively-named variants should be avoided.
    9295
    9396== cvs/svn/git tag for consistency == #checkout_tag