New OPTIONS structure - deselect all
Jason Helfman
jgh at FreeBSD.org
Sat Oct 6 05:07:48 UTC 2012
On Fri, Oct 5, 2012 at 8:52 PM, Paul Schmehl <pschmehl_lists at tx.rr.com>wrote:
> I'm working on updating the barnyard2 port, and I'm changing the port to
> use the new OPTIONS structure. It seems no matter what I do, the first
> port OPTION is automatically selected.
>
> I've tried OPTIONS_DEFAULT=, OPTIONS_DEFAULT= none, and not using
> OPTIONS_DEFAULT at all. I do not want the first OPTION selected. I want
> them all deselected so the person installing can choose the appropriate
> ones for their situation.
>
> What's the secret sauce for this? I've looked through bsd.options.mk,
> but I can't see it.
>
> Paul Schmehl, Senior Infosec Analyst
> As if it wasn't already obvious, my opinions
> are my own and not those of my employer.
> *********************************************
> "It is as useless to argue with those who have
> renounced the use of reason as to administer
> medication to the dead." Thomas Jefferson
> "There are some ideas so wrong that only a very
> intelligent person could believe in them." George Orwell
>
> ______________________________**_________________
> freebsd-ports at freebsd.org mailing list
> http://lists.freebsd.org/**mailman/listinfo/freebsd-ports<http://lists.freebsd.org/mailman/listinfo/freebsd-ports>
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@**freebsd.org<freebsd-ports-unsubscribe at freebsd.org>
> "
>
If you want no option selected, you would define them all, and set nothing
for OPTIONS_DEFAULT
Here is an example.
OPTIONS_SET= OPTION1 OPTION2
OPTIONS1_DESC= My first option
OPTIONS2_DESC= My second option
.if ${PORT_OPTIONS:MOPTION1}
do something
.endif
Additionally, the documentation on Options in the Handbook has been updated
and should be helpful, as well. If it isn't we can clean it up.
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#AEN2666
HTH
-jgh
--
Jason Helfman | FreeBSD Committer
jgh at FreeBSD.org | http://people.freebsd.org/~jgh | The Power to Serve
More information about the freebsd-ports
mailing list