svn commit: r39167 - head/en_US.ISO8859-1/books/porters-handbook

Warren Block wblock at FreeBSD.org
Mon Jul 2 19:22:04 UTC 2012


Author: wblock
Date: Mon Jul  2 19:22:03 2012
New Revision: 39167
URL: http://svn.freebsd.org/changeset/doc/39167

Log:
  Add section describing USE_ and WANT_ variables.
  
  Reviewed by:	ports@

Modified:
  head/en_US.ISO8859-1/books/porters-handbook/book.sgml

Modified: head/en_US.ISO8859-1/books/porters-handbook/book.sgml
==============================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/book.sgml	Sun Jul  1 19:29:19 2012	(r39166)
+++ head/en_US.ISO8859-1/books/porters-handbook/book.sgml	Mon Jul  2 19:22:03 2012	(r39167)
@@ -3895,6 +3895,42 @@ LIB_DEPENDS=	bar:${PORTSDIR}/foo/bar
 	  installation, and updating of these ports and their
 	  packages.</para>
       </sect2>
+
+      <sect2 id="use-want">
+	<title><makevar>USE_</makevar> and
+	  <makevar>WANT_</makevar></title>
+
+	<para><makevar>USE_</makevar> variables are set by the port
+	  maintainer to define software on which this port depends.  A
+	  port that needs Firefox would set</para>
+
+	<programlisting>USE_FIREFOX=	yes</programlisting>
+
+	<para>Some <makevar>USE_</makevar> variables can accept
+	  version numbers or other parameters.  For example, a port
+	  that requires Apache 2.2 would set</para>
+
+	<programlisting>USE_APACHE=	22</programlisting>
+
+	<para>For more control over dependencies in some cases,
+	  <makevar>WANT_</makevar> variables are available to more
+	  precisely specify what is needed.  For example, consider the
+	  <filename role="package">mail/squirrelmail</filename> port.
+	  This port needs some PHP modules, which are listed in the
+	  <makevar>USE_PHP</makevar> variable:</para>
+
+	<programlisting>USE_PHP=	session mhash gettext mbstring pcre openssl xml</programlisting>
+
+	<para>Those modules may be available in CLI or web versions,
+	  so the web version is selected with a
+	  <makevar>WANT_</makevar> variable:</para>
+
+	<programlisting>WANT_PHP_WEB=	yes</programlisting>
+
+	<para>Available <makevar>USE_</makevar> and
+	  <makevar>WANT_</makevar> variables are defined in the files
+	  in <filename>/usr/ports/Mk</filename>.</para>
+      </sect2>
     </sect1>
 
     <sect1 id="makefile-masterdir">


More information about the svn-doc-all mailing list