From owner-freebsd-ports@FreeBSD.ORG Mon Jun 11 14:07:28 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C17E7106566B for ; Mon, 11 Jun 2012 14:07:28 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 88AA28FC15; Mon, 11 Jun 2012 14:07:28 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5BE7SAt029682; Mon, 11 Jun 2012 14:07:28 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q5BE7SJK029680; Mon, 11 Jun 2012 14:07:28 GMT (envelope-from bapt@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@freebsd.org using -f Date: Mon, 11 Jun 2012 16:07:26 +0200 From: Baptiste Daroussin To: Warren Block Message-ID: <20120611140725.GY60433@ithaqua.etoilebsd.net> References: <20120611051759.GQ60433@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XiX5sJQOWZsNRXst" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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:07:28 -0000 --XiX5sJQOWZsNRXst Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 11, 2012 at 08:00:53AM -0600, Warren Block wrote: > On Mon, 11 Jun 2012, Baptiste Daroussin wrote: >=20 > > 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+=3D REFDOCS > >> REFDOCS_DESC=3D Install the reference documents > >> OPTIONS_DEFAULT+=3D REFDOCS > >> .endif > >> > >> .if ${PORT_OPTIONS:MEXAMPLES} > >> OPTIONS_DEFINE+=3D EXAMPLES > >> EXAMPLES_DESC=3D Install the example code > >> OPTIONS_DEFAULT+=3D EXAMPLES > >> .endif > >> > >> .include > >> > > > > Why not simply that way: > > > > OPTIONS_DEFINE=3D ... DOCS EXAMPLES > > > > DOCS_DESC=3D 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=3D DOCS EXAMPLES >=20 > The logic has probably gotten twisted around, and it's been long enough= =20 > since I did this that I don't recall the situation. I think it was just= =20 > to prevent the options screen from appearing if NOPORTDOCS and=20 > NOPORTEXAMPLES were set. >=20 > I don't see a way to do that without using the old versions of those=20 > variables. The new ones have not been set until after=20 > bsd.port.options.mk is included, and by then the dialog has been shown. Do not put OPTIONS_DEFINE and you won't get a dialog UI but still can test PORT_OPTIONS:MEXAMPLES and PORT_OPTIONS:MDOCS regards, Bapt --XiX5sJQOWZsNRXst Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEUEARECAAYFAk/V+50ACgkQ8kTtMUmk6ExXjQCeKRPoVKOZgreOY6oxkfpgMDux xggAkQHuq0bQA1VWt3xLYycvDsW3UZg= =vJcS -----END PGP SIGNATURE----- --XiX5sJQOWZsNRXst--