OPTIONSng and OPTIONS_SINGLE, OPTIONS_MULTI

Mel Flynn rflynn at acsalaska.net
Mon Jun 11 13:00:00 UTC 2012


On 11-6-2012 7:49, Matthew Seaman wrote:

> Surely it is more sensible to say that OPTIONS_SINGLE is strictly
> 'choose one from these options.'  Then you can implement 'zero or one of
> these options' by:
> 
> OPTIONS_SINGLE= EXAMPLE
> OPTIONS_SINGLE_EXAMPLE=	FOO BAR BAZ BLURFL NONE_OF_THE_ABOVE

I like this approach and it would be nice if you can have a standard
"none" option, rendered in the dialog consistently "none" with text
"none of the above", but translated to ${GROUPNAME}_NONE for the port
and optionsfile. The group should be indented so one sees what "of the
above" applies to.
So the definition would look like:
OPTIONS_NONEORONE= EXAMPLE
OPTIONS_NONEORONE_EXAMPLE= BLONDE BRUNETTE

And the port's test would be:
.if ${OPTIONS:MEXAMPLE_NONE}
# yay, no work for me
.else
# crap which one he pick
.endif
-- 
Mel


More information about the freebsd-ports mailing list