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: |
| 81 | When 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 | {{{ |
| 83 | default_variants +foo |
| 84 | }}} |
| 85 | The port will then be installed with `+foo` unless the user specifies `-foo` on the command line or in variants.conf. |
| 86 | |
| 87 | You 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: |