Explain how to deal with optional dependencies.

Submitted by:	Mike Meyer <mwm@mired.org>
This commit is contained in:
Dima Dorfman 2001-06-02 03:00:07 +00:00
parent 4840559558
commit df4c942868
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=9524
2 changed files with 74 additions and 2 deletions

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO_8859-1/books/porters-handbook/book.sgml,v 1.144 2001/04/17 15:56:53 nik Exp $
$FreeBSD: doc/en_US.ISO_8859-1/books/porters-handbook/book.sgml,v 1.145 2001/04/22 16:50:31 asami Exp $
-->
<!DOCTYPE BOOK PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
@ -1265,6 +1265,42 @@ MASTER_SITE_SUBDIR= applications</programlisting>
</sect2>
</sect1>
<sect1>
<title>Optional dependencies</title>
<para>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 uses happy, and effectively provide 2 or more ports for the
price of one.</para>
<para>The easiest of these to use is
<makevar>WITHOUT_X</makevar>. If the port can be built both
with and without X support, then it should normally be built
with X support. If <makevar>WITHOUT_X</makevar> is defined,
then the version that does not have X support should be
built.</para>
<para>Various parts of GNOME have such knobs, though they are
slightly more difficult to use. The variables to use in the
<filename>Makefile</filename> are <makevar>WANT_*</makevar>
and <makevar>HAVE_*</makevar>. If the application can be
built both with or without one of the dependencies listed
below, then the <filename>Makefile</filename> should set
<makevar>WANT_PKG</makevar>, and should build the version that
uses <makevar>PKG</makevar> if <makevar>HAVE_PKG</makevar>
is defined.</para>
<para>The <makevar>WANT_*</makevar> variables currently
supported this way are <makevar>WANT_GLIB</makevar>,
<makevar>WANT_GTK</makevar>, <makevar>WANT_ESOUND</makevar>,
<makevar>WANT_IMLIB</makevar>, and
<makevar>WANT_GNOME</makevar>.</para>
</sect1>
<sect1>
<title>Building mechanisms</title>

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO_8859-1/books/porters-handbook/book.sgml,v 1.144 2001/04/17 15:56:53 nik Exp $
$FreeBSD: doc/en_US.ISO_8859-1/books/porters-handbook/book.sgml,v 1.145 2001/04/22 16:50:31 asami Exp $
-->
<!DOCTYPE BOOK PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
@ -1265,6 +1265,42 @@ MASTER_SITE_SUBDIR= applications</programlisting>
</sect2>
</sect1>
<sect1>
<title>Optional dependencies</title>
<para>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 uses happy, and effectively provide 2 or more ports for the
price of one.</para>
<para>The easiest of these to use is
<makevar>WITHOUT_X</makevar>. If the port can be built both
with and without X support, then it should normally be built
with X support. If <makevar>WITHOUT_X</makevar> is defined,
then the version that does not have X support should be
built.</para>
<para>Various parts of GNOME have such knobs, though they are
slightly more difficult to use. The variables to use in the
<filename>Makefile</filename> are <makevar>WANT_*</makevar>
and <makevar>HAVE_*</makevar>. If the application can be
built both with or without one of the dependencies listed
below, then the <filename>Makefile</filename> should set
<makevar>WANT_PKG</makevar>, and should build the version that
uses <makevar>PKG</makevar> if <makevar>HAVE_PKG</makevar>
is defined.</para>
<para>The <makevar>WANT_*</makevar> variables currently
supported this way are <makevar>WANT_GLIB</makevar>,
<makevar>WANT_GTK</makevar>, <makevar>WANT_ESOUND</makevar>,
<makevar>WANT_IMLIB</makevar>, and
<makevar>WANT_GNOME</makevar>.</para>
</sect1>
<sect1>
<title>Building mechanisms</title>