diff --git a/en_US.ISO8859-1/books/porters-handbook/book.sgml b/en_US.ISO8859-1/books/porters-handbook/book.sgml index 84f74f844f..5e4ead2b6e 100644 --- a/en_US.ISO8859-1/books/porters-handbook/book.sgml +++ b/en_US.ISO8859-1/books/porters-handbook/book.sgml @@ -3062,7 +3062,26 @@ PATCHFILES= patch1:test <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> @@ -3231,42 +3250,6 @@ PATCHFILES= patch1:test</programlisting> 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 @@ -3286,6 +3269,142 @@ PATCHFILES= patch1:test 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. + + + +
+ +