From owner-freebsd-doc@FreeBSD.ORG Tue Jun 8 08:20:30 2004 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 25D0616A4CE for ; Tue, 8 Jun 2004 08:20:30 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19C1F43D5E for ; Tue, 8 Jun 2004 08:20:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i588KO0m075895 for ; Tue, 8 Jun 2004 08:20:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i588KOU9075894; Tue, 8 Jun 2004 08:20:24 GMT (envelope-from gnats) Resent-Date: Tue, 8 Jun 2004 08:20:24 GMT Resent-Message-Id: <200406080820.i588KOU9075894@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, Mark Linimon Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C99F16A4CE; Tue, 8 Jun 2004 08:16:09 +0000 (GMT) Received: from mail.soaustin.net (mail.soaustin.net [207.200.4.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21FDD43D45; Tue, 8 Jun 2004 08:16:09 +0000 (GMT) (envelope-from linimon@lonesome.com) Received: from lonesome.lonesome.com (cs242743-143.austin.rr.com [24.27.43.143]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by mail.soaustin.net (Postfix) with ESMTP id B002A14311; Tue, 8 Jun 2004 03:15:50 -0500 (CDT) Received: from lonesome.lonesome.com (localhost.lonesome.com [127.0.0.1]) by lonesome.lonesome.com (8.12.9/8.12.9) with ESMTP id i588DpSQ020981; Tue, 8 Jun 2004 03:13:51 -0500 (CDT) (envelope-from linimon@lonesome.lonesome.com) Received: (from linimon@localhost) by lonesome.lonesome.com (8.12.9/8.12.9/Submit) id i588DpFD020980; Tue, 8 Jun 2004 03:13:51 -0500 (CDT) (envelope-from linimon) Message-Id: <200406080813.i588DpFD020980@lonesome.lonesome.com> Date: Tue, 8 Jun 2004 03:13:51 -0500 (CDT) From: Mark Linimon To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: portmgr@FreeBSD.org Subject: docs/67707: [patch] beginning of rework of Dependencies section of Porter's Handbook X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mark Linimon List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2004 08:20:30 -0000 >Number: 67707 >Category: docs >Synopsis: [patch] beginning of rework of Dependencies section of Porter's Handbook >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: Tue Jun 08 08:20:24 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Mark Linimon >Release: FreeBSD 4.9-PRERELEASE i386 >Organization: Lonesome Dove Computing Services >Environment: System: FreeBSD lonesome.lonesome.com 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #3: Thu Jan 22 20:41:05 CST 2004 root@lonesome.lonesome.com:/usr/src/sys/compile/MULTIMEDIA i386 >Description: The section on dependencies Makevars in the Porter's Handbook is out of date, especially with respect to the WITH_*/WITHOUT_* Makevars. Although this patch is incomplete, it is better than what is there, and provides us a start. Note: I've removed some of the GNOME text because AFAICT it is just completely wrong now. >How-To-Repeat: (n/a) >Fix: The following is my suggested patch. I am going to assign this PR to myself, pending portmgr@ approval of the content. (portmgr is Cc:ed). Index: book.sgml =================================================================== RCS file: /home/FreeBSD/dcvs/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml,v retrieving revision 1.422 diff -u -r1.422 book.sgml --- book.sgml 6 Jun 2004 16:23:23 -0000 1.422 +++ book.sgml 8 Jun 2004 07:59:07 -0000 @@ -3029,7 +3029,26 @@ <makevar>USE_<replaceable>*</replaceable></makevar> A number of variables exist in order to encapsulate common - dependencies that many ports have. + dependencies that many ports have. Although their use is + optional, they can help to reduce the verbosity of the port + Makefiles. Each of them is styled + as USE_*. The + usage of these variables is restricted to the port + Makefiles and + ports/Mk/bsd.*.mk and is not designed + to encapsulate user-settable options — use + WITH_* and + WITHOUT_* + for that purpose. + + + It is always incorrect to set + any USE_* + in /etc/make.conf. For instance, + setting USE_GCC=3.2 + would adds a dependency on gcc32 for every port, + including gcc32 itself! + The <makevar>USE_<replaceable>*</replaceable></makevar> @@ -3198,42 +3217,6 @@ intention will be clear.</para> </sect2> - <sect2> - <title>Optional dependencies - - Some large applications can be built in a number of - configurations, adding functionality if one of a number of - libraries or applications is available. Since not all users - want those libraries or applications, the ports system - provides hooks that the port author can use to decide which - configuration should be built. Supporting these properly will - make users happy, and effectively provide 2 or more ports for the - price of one. - - The easiest of these to use is - WITHOUT_X11. If the port can be built both - with and without X support, then it should normally be built - with X support. If WITHOUT_X11 is defined, - then the version that does not have X support should be - built. - - Various parts of GNOME have such knobs, though they are - slightly more difficult to use. The variables to use in the - Makefile are WANT_* - and HAVE_*. If the application can be - built both with or without one of the dependencies listed - below, then the Makefile should set - WANT_PKG, and should build the version that - uses PKG if HAVE_PKG - is defined. - - The WANT_* variables currently - supported this way are WANT_GLIB, - WANT_GTK, WANT_ESOUND, - WANT_IMLIB, and - WANT_GNOME. - - Circular dependencies are fatal @@ -3252,6 +3235,142 @@ can be quite slow on older machines, but you may be able to save a large number of people—including yourself— a lot of grief in the process. + + + + + + Makefile Options + + Some large applications can be built in a number of + configurations, adding functionality if one of a number of + libraries or applications is available. Examples include + choice of natural (human) language, GUI versus command-line, + or type of database to support. Since not all users + want those libraries or applications, the ports system + provides hooks that the port author can use to control which + configuration should be built. Supporting these properly will + make users happy, and effectively provide 2 or more ports for the + price of one. + + + <makevar>WITH_<replaceable>*</replaceable></makevar> and + <makevar>WITHOUT_<replaceable>*</replaceable></makevar> + + These variables are designed to be set by the system + administrator. There are many that are standardized in + ports/Mk/bsd.*.mk; others are not, + which can be confusing. If you need to add such a + configuration variable, please consider using one of the + ones from the following list. + + + You should not assume that a + WITH_* + necessarily has a corresponding + WITHOUT_* + variable and vice versa. In general, the default is + simply assumed. + + + + Unless otherwise specified, these variables are only + tested for being set or not set, rather than being set to + some kind of variable such as YES or + NO. + + +
+ The <makevar>WITH_<replaceable>*</replaceable></makevar> + and <makevar>WITHOUT_<replaceable>*</replaceable></makevar> + variables + + + + + Variable + + Means + + + + + + WITH_APACHE2 + + If set, use + www/apache2 + instead of the default of + www/apache. + + + + WITH_BERKELEY_DB + + Define this variable to specify the ability to + use a variant of the Berkeley database package such as + databases/db41. + An associated variable, + WITH_BDB_VER, may be + set to values such as 2, 3, 4, 41 or 42. + + + + WITHOUT_GETTEXT + + If set, says that internationalization is not + needed, which can save compile time. By default, + internalization is used. + + + + WITH_MYSQL + + Define this variable to specify the ability to + use a variant of the MySQL database package such as + databases/mysql40-server. + An associated variable, + WANT_MYSQL_VER, may be + set to values such as 323, 40, 41, or 50. + + + + WITH_OPENSSL_BASE + + Use the version of OpenSSL in the base system. + + + + WITH_OPENSSL_PORT + + Use the version of OpenSSL from + security/openssh, + overwriting the version that was originally installed + in the base system. + + + + WITH_POSTGRESQL + + Define this variable to specify the ability to + use a variant of the PostGreSQL database package such as + databases/postgresql72. + + + + + WITHOUT_X11 + + If the port can be built both with and without + X support, then it should normally be built with + with X support. If this variable is defined, then + then the version that does not have X support should + be built instead. + + + +
+ >Release-Note: >Audit-Trail: >Unformatted: