On Mon, 11 Jun 2012, Baptiste Daroussin wrote:

On Sun, Jun 10, 2012 at 06:05:49PM -0600, Warren Block wrote:
On Sun, 10 Jun 2012, Jason Helfman wrote:

So references to NOPORTDOCS should be replaced with references to
PORT_OPTIONS:MDOCS now?  Why that but not NOPORTEXAMPLES?

You can use PORT_OPTIONS:MEXAMPLES for this case.

I believe I did this recently in www/flot

But only after bsd.port.options.mk is included.  Here's what I was
trying to do:

.if ${PORT_OPTIONS:MDOCS}
OPTIONS_DEFINE+=        REFDOCS
REFDOCS_DESC=           Install the reference documents
OPTIONS_DEFAULT+=       REFDOCS
.endif

.if ${PORT_OPTIONS:MEXAMPLES}
OPTIONS_DEFINE+=        EXAMPLES
EXAMPLES_DESC=          Install the example code
OPTIONS_DEFAULT+=       EXAMPLES
.endif

.include <bsd.port.options.mk>


Why not simply that way:

OPTIONS_DEFINE= ... DOCS EXAMPLES

DOCS_DESC=      Install the reference documents

And done.

Condtion an EXAMPLES on EXAMPLES options doesn't make sense to me.

by default DOCS and EXAMPLES are on expect if the user set NOPORTDOCS,
NOPORTEXAMPLES or OPTIONS_UNSET= DOCS EXAMPLES

The logic has probably gotten twisted around, and it's been long enough since I did this that I don't recall the situation. I think it was just to prevent the options screen from appearing if NOPORTDOCS and NOPORTEXAMPLES were set.

I don't see a way to do that without using the old versions of those variables. The new ones have not been set until after bsd.port.options.mk is included, and by then the dialog has been shown.
_______________________________________________
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"

Reply via email to