From owner-freebsd-doc@FreeBSD.ORG Wed Jan 19 21:10:25 2005 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C2D716A4CE for ; Wed, 19 Jan 2005 21:10:25 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DBD943D2F for ; Wed, 19 Jan 2005 21:10:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0JLAP19068553 for ; Wed, 19 Jan 2005 21:10:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0JLAPiK068551; Wed, 19 Jan 2005 21:10:25 GMT (envelope-from gnats) Resent-Date: Wed, 19 Jan 2005 21:10:25 GMT Resent-Message-Id: <200501192110.j0JLAPiK068551@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Edwin Groothuis Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E02D16A4CE for ; Wed, 19 Jan 2005 21:01:58 +0000 (GMT) Received: from mail2out.barnet.com.au (mail2out.barnet.com.au [202.83.176.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0336043D53 for ; Wed, 19 Jan 2005 21:01:57 +0000 (GMT) (envelope-from edwin@mavetju.org) Received: by mail2out.barnet.com.au (Postfix, from userid 27) id 8FD48707443; Thu, 20 Jan 2005 08:01:55 +1100 (EST) Received: from mail2-auth.barnet.com.au (mail2.barnet.com.au [202.83.176.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) Authority" (verified OK)) by mail2.barnet.com.au (Postfix) with ESMTP id 344ED70743C for ; Thu, 20 Jan 2005 08:01:55 +1100 (EST) Received: from k7.mavetju (edwin-3.int.barnet.com.au [10.10.12.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) Certificate Authority" (verified OK)) by mail2-auth.barnet.com.au (Postfix) with ESMTP id 77CCF707428 for ; Thu, 20 Jan 2005 08:01:54 +1100 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id 27DE76131; Thu, 20 Jan 2005 08:01:53 +1100 (EST) Message-Id: <20050119210153.27DE76131@k7.mavetju> Date: Thu, 20 Jan 2005 08:01:53 +1100 (EST) From: Edwin Groothuis To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/76472: [patch] tell porters handbook about OPTIONS X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Edwin Groothuis List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2005 21:10:25 -0000 >Number: 76472 >Category: docs >Synopsis: [patch] tell porters handbook about OPTIONS >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jan 19 21:10:24 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Edwin Groothuis >Release: FreeBSD 5.2.1-RELEASE i386 >Organization: - >Environment: System: FreeBSD k7.mavetju 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #8: Wed Dec 15 16:58:01 EST 2004 edwin@k7.mavetju:/usr/src-5.2.1/sys/i386/compile/k7 i386 >Description: Despite being there as a feature for nearly a year now, there is no mentioning of the OPTIONS features in the Porters Handbook. Thanks to Florent Thoumie for docbookifying it. >How-To-Repeat: >Fix: --- book.sgml.old Wed Jan 19 13:30:08 2005 +++ book.sgml Wed Jan 19 14:21:38 2005 @@ -3538,6 +3538,84 @@ + + + <makevar>OPTIONS</makevar> + + + Background + The OPTIONS variable gives the user who + installs the port a dialog with the available options and saves + them to /var/db/ports/portname/options. Next + time when the port has to be rebuild, the options are reused. Never + again you have to remember all the twenty + WITH_* and + WITHOUT_* options you + used to build this port! + + + + Syntax + The syntax for the OPTIONS variable is: + +OPTIONS= option "descriptive text" default ... + + + The value for default is either ON or + OFF. Multiple repetitions of these three fields + is allowed. + + When the user runs the make config (or runs + make build for the first time), the framework will + check for + /var/db/ports/portname/options. + If it doesn't exist, it will use the values of + OPTIONS to create a dialogbox where the options + can be enabled or disabled. Then the options file is saved and the + selected variables are set. + + Use make showconfig to see the saved + configuration. Use make rmconfig to remove the saved + configuration. + + + Example + + Simple use of <makevar>OPTIONS</makevar> + OPTIONS= foo "Enable option foo" On \ + bar "Support feature bar" Off + +.include <bsd.port.pre.mk> + +.if defined(WITH_FOO) +CONFIGURE_ARGS+= --with-foo +.else +CONFIGURE_ARGS+= --without-foo +.endif + +.if defined(WITH_BAR) +RUN_DEPENDS+= bar:${PORTSDIR}/bar/bar +.endif + +.include <bsd.port.post.mk> + + + + Brokeness + + + make index doesn't follow + OPTIONS yet (ports/75727) + + + PACKAGE_BUILDING is ignoring + OPTIONS (ports/75727?) + + + + + + >Release-Note: >Audit-Trail: >Unformatted: