On May 15, 2007, at 1:31 PM, Yves de Champlain wrote:
Le 07-05-15 à 12:09, James Berry a écrit :
I checked into base last night (http://trac.macosforge.org/ projects/macports/changeset/25147), some code to support variant descriptions.
The syntax I chose was the following:
variant myvariant description "This variant does this and that" { configure.args-append --do-this --do-that }
I'd love to get feedback both on the syntax. The syntax is a little bit different because it requires quoting of the description string -- something we don't often use in portfiles.
Please give feedback on whether you like this, or whether we should use a syntax like this:
variant myvariant { configure.args-append --do-this --do-that } variant_description myvariant This variant does this and that
(which doesn't need quoting of the description).
Secondly, in order to emit the description in port info, I expanded the variant section to show a single variant per line, which makes info a bit longer. Please let me know if you like this, or if we should limit ourselves to showing variant descriptions in "port variants" instead.
I don't know about the code works, but I would like the third untold solution :
variant myvariant { configure.args-append --do-this --do-that description This variant does this and that }
Yves, Yes, good idea. As Kevin also pointed out, it's a bit complicated by the fact that to evaluate this we'd have to execute the variant, which probably isn't good. James.