Date: Mon, 11 Jun 2012 07:51:40 +0200 From: Baptiste Daroussin <bapt@freebsd.org> To: Vitaly Magerya <vmagerya@gmail.com> Cc: Dave Hayes <dave@jetcafe.org>, Doug Barton <dougb@freebsd.org>, FreeBSD ports list <freebsd-ports@freebsd.org> Subject: Re: Documenting 'make config' options Message-ID: <20120611055140.GR60433@ithaqua.etoilebsd.net> In-Reply-To: <CAL409KzF9Rn_R7-b6EPeYvb4nkWsPsbEQbZb5Sd7t8Pt-jLqfA@mail.gmail.com> 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> <CAL409KzF9Rn_R7-b6EPeYvb4nkWsPsbEQbZb5Sd7t8Pt-jLqfA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <bapt@freebsd.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120611055140.GR60433>