From owner-freebsd-ports@FreeBSD.ORG Mon Jun 11 14:00:56 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A93641065672; Mon, 11 Jun 2012 14:00:56 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 495AF8FC15; Mon, 11 Jun 2012 14:00:56 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q5BE0rcH082843; Mon, 11 Jun 2012 08:00:53 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q5BE0rmt082840; Mon, 11 Jun 2012 08:00:53 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 11 Jun 2012 08:00:53 -0600 (MDT) From: Warren Block To: Baptiste Daroussin In-Reply-To: <20120611051759.GQ60433@ithaqua.etoilebsd.net> Message-ID: References: <20120611051759.GQ60433@ithaqua.etoilebsd.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Mon, 11 Jun 2012 08:00:54 -0600 (MDT) Cc: ports@freebsd.org, Jason Helfman Subject: Re: NOPORTDOCS and NOPORTEXAMPLES X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2012 14:00:56 -0000 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 >> > > 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.