Re: New OPTIONS structure - deselect all

2012-10-05 Thread Jason Helfman
On Fri, Oct 5, 2012 at 8:52 PM, Paul Schmehl 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@freebsd.org mailing list
> http://lists.freebsd.org/**mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to 
> "freebsd-ports-unsubscribe@**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
j...@freebsd.org | http://people.freebsd.org/~jgh  | The Power to Serve
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: New OPTIONS structure - deselect all

2012-10-05 Thread Jason E. Hale
On Friday, October 05, 2012 22:52:05 Paul Schmehl 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.
> 
If you want all options deselected by defaut, either use
OPTIONS_DEFAULT= #empty
or don't define it at all.

NLS, DOCS, and EXAMPLES are on by default even if they are not in 
OPTIONS_DEFAULT.  If you are getting something other than this in your tests, 
make sure you don't have anything in /etc/make.conf to set the unwanted 
options.  Also run #make rmconfig to make sure you are starting clean.

Otherwise, it would be helpful to see what you have so far in the 
Makefile...pastebin it or attach it.

- Jason
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: New OPTIONS structure - deselect all

2012-10-05 Thread Paul Schmehl
--On October 5, 2012 10:52:05 PM -0500 Paul Schmehl 
 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.



Never mind.  I ran make rmconfig and now none are selected.




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@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"





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@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: New OPTIONS structure - deselect all

2012-10-05 Thread Jason E. Hale
On Friday, October 05, 2012 22:07:40 Jason Helfman wrote:
> OPTIONS_SET=  OPTION1 OPTION2
>
That should be OPTIONS_DEFINE= OPTION1 OPTION2
OPTIONS_SET should only be used in /etc/make.conf to set global options.

- Jason

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: New OPTIONS structure - deselect all

2012-10-05 Thread Jason Helfman
On Fri, Oct 5, 2012 at 10:19 PM, Jason E. Hale  wrote:

> On Friday, October 05, 2012 22:07:40 Jason Helfman wrote:
> > OPTIONS_SET=  OPTION1 OPTION2
> >
> That should be OPTIONS_DEFINE= OPTION1 OPTION2
> OPTIONS_SET should only be used in /etc/make.conf to set global options.
>
> - Jason
>
>
Ah, yes. Mixed them up. Thanks.

-jgh
--
Jason Helfman  | FreeBSD Committer
j...@freebsd.org | http://people.freebsd.org/~jgh  | The Power to Serve
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"