From owner-freebsd-ports@FreeBSD.ORG Sat Apr 26 09:39:42 2008 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 755B91065674 for ; Sat, 26 Apr 2008 09:39:42 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by mx1.freebsd.org (Postfix) with ESMTP id 4F0A68FC15 for ; Sat, 26 Apr 2008 09:39:42 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so2600187rvf.43 for ; Sat, 26 Apr 2008 02:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=hEMcRVI1WXqRPRgig5TSJmZEagA8f1fjp9QLxxuV/R4=; b=rPHfhYJLlYt2eIrpUkJC5sKvYohQIVKwImv34CstY4edCEdNjIMXruHlB30lqdREM+jqQbaS6PYGGIcTuydrFG4pwvxWdVjwWMZCnlm/7q5Nlm/cXp72R5RB+0/84MqFr95/srTjppdvPzZ1hklkK4cbmTWhsueU6oXUwiuXVHk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Vu14JieX+khjFbECF3Rs5SFBw/pk16eg3gVWhFvZdPCv0qSnQRw/+V1j2bD0T+RYqYjt+VRmuUVZQAL7WHLXaD6+3DJo58gfxchZ8/CaG2r0vM18UNcHCTaTReRg+Uc/DtubvQsM+17jazSoZTcnkD/DOlNToq6xv8E4YLVYUFg= Received: by 10.140.135.19 with SMTP id i19mr1263491rvd.15.1209201066910; Sat, 26 Apr 2008 02:11:06 -0700 (PDT) Received: by 10.140.191.11 with HTTP; Sat, 26 Apr 2008 02:11:06 -0700 (PDT) Message-ID: <790a9fff0804260211v514de80cq3379dee0aa97f0aa@mail.gmail.com> Date: Sat, 26 Apr 2008 04:11:06 -0500 From: "Scot Hetzel" To: "Wesley Shields" In-Reply-To: <20080426020216.GM23691@atarininja.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20080426020216.GM23691@atarininja.org> Cc: ports@freebsd.org Subject: Re: long descriptions in 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: Sat, 26 Apr 2008 09:39:42 -0000 On 4/25/08, Wesley Shields wrote: > Based upon an idea in an earlier thread on this list[1] I came up with > two ways of adding an extended description to our existing OPTIONS > framework. > > 1: Extend the OPTIONS to be 4 fields instead of the current 3 fields. > The 4th field would be the long description - providing more detailed > information about what this option does or supports. In order to > distinguish between a port with 4 OPTIONS without the long description > (12 fields) and a port with 3 OPTIONS with the long description (also 12 > fields) the patch requires the port to turn on a knob (OPTIONS_DESC) > when using the long field. The idea is that over time this will become > the default and can eventually be removed. > > 2: Leave OPTIONS as is but support a DESC_FOO variable for each OPTION. > This variable would be the long description field, and if it doesn't > exist a default message indicating such would be displayed. > > Both of these methods are displayed to the user when '?' or F1 is > pressed during the dialog screen. In the case of (1) the extra dialog > is only shown if the port supports it. In the case of (2) the extra > dialog is always available since we have a default message to display. > I suppose a third way would be to use a default message when the knob is > not set for (1), which would probably simplify things slightly. > Couple of suggestions: - OPTION_DESC (choice 1) or DESC_FOO (choice 2) not defined, then use field 2 as the long description along with "[NO EXTENDED DESCRIPTION DEFINED]" appended. - Remove "Contact the maintainer to fix this" from choice 2, as some maintainers may resent being contacted by users to add extended descriptions to their ports. - Use OPTION_DESC_FOO instead of DESC_FOO (choice 2). - add support for ${PORTSDIR}/MK/bsd.optiondescription.mk, This file holds a list of standard extended option descriptions, for example: _STD_DESC_A4SIZE=3D "Sets the default paper size used by ${PORTNAME} - A4 (210 mm =D7 297 mm) or Letter (8=BD in =D7 11 in, 215.9 mm =D7 279.4 mm)= " The following code, should accomplish the above for choice 2: LONGDESC=3D$$(cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} -V OPTION_DESC_$$= 1); \ if [ "x$${LONGDESC}" =3D "x" ] ; then \ LONGDESC=3D$$(cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} -V _STD_DESC_$${1}); \ if [ "x$${LONGDESC}" =3D "x" ]; then \ LONGDESC=3D"$$2 [NO EXTENDED DESCRIPTION DEFINED]" ; \ fi ; \ fi ; \ ${ECHO_CMD} $$1: $${LONGDESC} | fmt >> $${TMPOPTIONDESCFILE}; \ ${ECHO_CMD} >> $${TMPOPTIONDESCFILE}; \ Scot