From owner-freebsd-ports@FreeBSD.ORG Mon Jun 11 05:51:43 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86FA1106564A; Mon, 11 Jun 2012 05:51:43 +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 632838FC0A; Mon, 11 Jun 2012 05:51:43 +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 q5B5phKN019470; Mon, 11 Jun 2012 05:51:43 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q5B5ph61019447; Mon, 11 Jun 2012 05:51:43 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 07:51:40 +0200 From: Baptiste Daroussin To: Vitaly Magerya Message-ID: <20120611055140.GR60433@ithaqua.etoilebsd.net> References: <201206041841.q54IfUow001060@hugeraid.jetcafe.org> <20120604191343.GF10783@isuckatdomains.isuckatdomains.net> <201206041932.q54JWONA001600@hugeraid.jetcafe.org> <4FCDA15C.2000700@digsys.bg> <201206061859.q56IxvLx045828@hugeraid.jetcafe.org> <4FCFC846.5050508@FreeBSD.org> <201206070527.q575R1sX052893@hugeraid.jetcafe.org> <4FD37B40.2030500@FreeBSD.org> <20120609172649.GJ60433@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ep5m4srWGXPl6O+g" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Dave Hayes , Doug Barton , FreeBSD ports list Subject: Re: Documenting 'make config' options 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 05:51:44 -0000 --Ep5m4srWGXPl6O+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 10, 2012 at 01:00:05PM +0300, Vitaly Magerya wrote: > Baptiste Daroussin wrote: > > There was a PR[1] to use some dialog(1) feature to expose it to > > the user, would be nice if that extended description could > > implemented that way (using help button from dialog(1)) I do not > > plan to work on this now if someone want to do it that will be > > great > > > > 1: http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/123185 >=20 > I'm attaching a simple patch that allows you to hit F1 and view > pkg-options-descr file in the options dialog ("pkg-" prefix > should probably be removed, as that file has nothing to do with > packages). > --- bsd.port.mk.orig 2012-06-10 11:11:40.000000000 +0300 > +++ bsd.port.mk 2012-06-10 12:15:44.000000000 +0300 > @@ -2374,6 +2374,7 @@ > .endif > =20 > DESCR?=3D ${PKGDIR}/pkg-descr > +OPTIONS_DESCR?=3D ${PKGDIR}/pkg-options-descr > PLIST?=3D ${PKGDIR}/pkg-plist > PKGINSTALL?=3D ${PKGDIR}/pkg-install > PKGDEINSTALL?=3D ${PKGDIR}/pkg-deinstall > @@ -6068,8 +6069,15 @@ > (${ECHO_MSG} "=3D=3D=3D> Cannot create $${optionsdir}, check permission= s"; exit 1) > .endif > @TMPOPTIONSFILE=3D$$(mktemp -t portoptions); \ > + if [ -e "${OPTIONS_DESCR}" ]; then \ > + helpopt=3D"--hfile ${OPTIONS_DESCR}"; \ > + helptitle=3D" (F1 for details)"; \ > + else \ > + helpopt=3D""; \ > + helptitle=3D""; \ > + fi; \ > trap "${RM} -f $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ > - ${DIALOG} --checklist "Options for ${PKGNAME:C/-([^-]+)$/ \1/}" 21 70 1= 5 ${DEFOPTIONS} 2> $${TMPOPTIONSFILE} || { \ > + ${DIALOG} $${helpopt} --checklist "Options for ${PKGNAME:C/-([^-]+)$/ \= 1/}$${helptitle}" 21 70 15 ${DEFOPTIONS} 2> $${TMPOPTIONSFILE} || { \ > ${RM} -f $${TMPOPTIONSFILE}; \ > ${ECHO_MSG} "=3D=3D=3D> Options unchanged"; \ > exit 0; \ Besides I might change some naming here, (not much) this looks a really cle= ver way of bringing the features much more clever than what I could have been thinking of. Thank you very much, I do some testing on it soon. what I like is having a complete text to describe options, and not being li= mited to per option description. On the change I'll just change OPTIONS_DESCR to OPTIONS_HELP and pkg-options-descr to options-help Thank you very much for the patch! regards, Bapt --Ep5m4srWGXPl6O+g Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/Vh2wACgkQ8kTtMUmk6EzMXACgr7PpQ4WuqDaeVp9VOO51RyIb TBUAoKaYQDw2irdHXgjR+Z8AFNxOZAGM =Lmxk -----END PGP SIGNATURE----- --Ep5m4srWGXPl6O+g--