Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2012 19:22:03 +0000 (UTC)
From:      Warren Block <wblock@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r39167 - head/en_US.ISO8859-1/books/porters-handbook
Message-ID:  <201207021922.q62JM3GJ089546@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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">



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207021922.q62JM3GJ089546>