Reindent/rewrap chapter.

Differential Revision:	https://reviews.freebsd.org/D2217
Approved by:	wblock (mentor)
Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2015-04-08 11:41:18 +00:00
parent 752cf7256d
commit 16702e66ae
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=46502

View file

@ -58,8 +58,9 @@
<important> <important>
<para>The package name must be unique among all of the ports <para>The package name must be unique among all of the ports
tree. Make sure that there is not already a port with the same tree. Make sure that there is not already a port with the
<varname>PORTNAME</varname> and if there is add one of <link same <varname>PORTNAME</varname> and if there is add one of
<link
linkend="porting-pkgnameprefix-suffix"><varname>PKGNAMEPREFIX</varname> linkend="porting-pkgnameprefix-suffix"><varname>PKGNAMEPREFIX</varname>
or <varname>PKGNAMESUFFIX</varname></link>.</para> or <varname>PKGNAMESUFFIX</varname></link>.</para>
</important> </important>
@ -106,9 +107,9 @@
<listitem> <listitem>
<para>Changes in the packing list or the install-time <para>Changes in the packing list or the install-time
behavior of the package. For example, a change to a script which behavior of the package. For example, a change to a
generates initial data for the package, like &man.ssh.1; host script which generates initial data for the package,
keys.</para> like &man.ssh.1; host keys.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -121,8 +122,8 @@
<listitem> <listitem>
<para>Silent changes to the port distfile which have <para>Silent changes to the port distfile which have
significant functional differences. For example, changes to the significant functional differences. For example,
distfile requiring a correction to changes to the distfile requiring a correction to
<filename>distinfo</filename> with no corresponding <filename>distinfo</filename> with no corresponding
change to <varname>PORTVERSION</varname>, where a change to <varname>PORTVERSION</varname>, where a
<command>diff -ru</command> of the old and new versions <command>diff -ru</command> of the old and new versions
@ -166,8 +167,9 @@
</itemizedlist> </itemizedlist>
<para>A rule of thumb is to decide whether a change <para>A rule of thumb is to decide whether a change
committed to a port is something which <emphasis>some</emphasis> people would committed to a port is something which
benefit from having. Either because of an enhancement, fix, <emphasis>some</emphasis> people would benefit from having.
Either because of an enhancement, fix,
or by virtue that the new package will actually work at or by virtue that the new package will actually work at
all. Then weigh that against that fact that it will cause all. Then weigh that against that fact that it will cause
everyone who regularly updates their ports tree to be everyone who regularly updates their ports tree to be
@ -177,7 +179,7 @@
<note> <note>
<para>People using binary packages will <para>People using binary packages will
<emphasis>never</emphasis> see the update if <emphasis>never</emphasis> see the update if
<varname>PORTREVISION</varname> is not bumped. Without <varname>PORTREVISION</varname> is not bumped. Without
increasing <varname>PORTREVISION</varname>, the increasing <varname>PORTREVISION</varname>, the
package builders have no way to detect the change and package builders have no way to detect the change and
thus, will not rebuild the package.</para> thus, will not rebuild the package.</para>
@ -215,13 +217,13 @@
the package name as described in section 0 above. the package name as described in section 0 above.
<varname>PORTEPOCH</varname> must never be decreased or <varname>PORTEPOCH</varname> must never be decreased or
reset to zero, because that would cause comparison to a reset to zero, because that would cause comparison to a
package from an earlier epoch to fail. For example, the package package from an earlier epoch to fail. For example, the
would not be detected as out of date. The new version package would not be detected as out of date. The new
number, <literal>1.0,1</literal> in the above version number, <literal>1.0,1</literal> in the above
example, is still numerically less than the previous version, example, is still numerically less than the previous
20000801, but the <literal>,1</literal> suffix is treated version, 20000801, but the <literal>,1</literal> suffix is
specially by automated tools and found to be greater than treated specially by automated tools and found to be greater
the implied suffix <literal>,0</literal> on the earlier than the implied suffix <literal>,0</literal> on the earlier
package.</para> package.</para>
<para>Dropping or resetting <varname>PORTEPOCH</varname> <para>Dropping or resetting <varname>PORTEPOCH</varname>
@ -242,8 +244,8 @@
release is made.</para> release is made.</para>
<para>For example, if a snapshot release is made on the date <para>For example, if a snapshot release is made on the date
<literal>20000917</literal>, and the previous version of the software was <literal>20000917</literal>, and the previous version of the
version <literal>1.2</literal>, do not use software was version <literal>1.2</literal>, do not use
<literal>20000917</literal> for <literal>20000917</literal> for
<varname>PORTVERSION</varname>. The correct way is a <varname>PORTVERSION</varname>. The correct way is a
<varname>PORTVERSION</varname> of <varname>PORTVERSION</varname> of
@ -398,14 +400,15 @@ PORTEPOCH= 1</programlisting>
version part is if the upstream distribution is really version part is if the upstream distribution is really
named that way, as in the named that way, as in the
<package role="port">textproc/libxml2</package> or <package role="port">textproc/libxml2</package> or
<package role="port">japanese/kinput2-freewnn</package> ports. <package role="port">japanese/kinput2-freewnn</package>
Otherwise, <varname>PORTNAME</varname> cannot ports. Otherwise, <varname>PORTNAME</varname> cannot
contain any version-specific information. It is quite contain any version-specific information. It is quite
normal for several ports to have the same normal for several ports to have the same
<varname>PORTNAME</varname>, as the <varname>PORTNAME</varname>, as the
<package role="port">www/apache*</package> ports do; in that case, <package role="port">www/apache*</package> ports do; in
different versions (and different index entries) are that case, different versions (and different index
distinguished by <varname>PKGNAMEPREFIX</varname> entries) are distinguished by
<varname>PKGNAMEPREFIX</varname>
and <varname>PKGNAMESUFFIX</varname> values.</para> and <varname>PKGNAMESUFFIX</varname> values.</para>
<para>There is a tradition of naming <para>There is a tradition of naming
@ -806,8 +809,8 @@ PORTEPOCH= 1</programlisting>
<entry><filename>editors</filename></entry> <entry><filename>editors</filename></entry>
<entry>General editors.</entry> <entry>General editors.</entry>
<entry>Specialized editors go in the section for those <entry>Specialized editors go in the section for those
tools. For example, a mathematical-formula editor will tools. For example, a mathematical-formula editor
go in <filename>math</filename>, and have will go in <filename>math</filename>, and have
<filename>editors</filename> as a second <filename>editors</filename> as a second
category.</entry> category.</entry>
</row> </row>
@ -844,8 +847,10 @@ PORTEPOCH= 1</programlisting>
<row> <row>
<entry><filename>ftp</filename></entry> <entry><filename>ftp</filename></entry>
<entry><acronym>FTP</acronym> client and server utilities.</entry> <entry><acronym>FTP</acronym> client and server
<entry>If the port speaks both <acronym>FTP</acronym> and <acronym>HTTP</acronym>, put it utilities.</entry>
<entry>If the port speaks both <acronym>FTP</acronym>
and <acronym>HTTP</acronym>, put it
in <filename>ftp</filename> with a secondary in <filename>ftp</filename> with a secondary
category of <filename>www</filename>.</entry> category of <filename>www</filename>.</entry>
</row> </row>
@ -1648,186 +1653,186 @@ PORTEPOCH= 1</programlisting>
<varname>MASTER_SITE_<replaceable>*</replaceable></varname> <varname>MASTER_SITE_<replaceable>*</replaceable></varname>
Variables</title> Variables</title>
<para>Shortcut abbreviations are available for popular archives <para>Shortcut abbreviations are available for popular
like SourceForge (<literal>SF</literal>), GNU archives like SourceForge (<literal>SF</literal>), GNU
(<literal>GNU</literal>), or Perl CPAN (<literal>GNU</literal>), or Perl CPAN
(<literal>CPAN</literal>). <varname>MASTER_SITES</varname> can (<literal>CPAN</literal>). <varname>MASTER_SITES</varname>
use them directly:</para> can use them directly:</para>
<programlisting>MASTER_SITES= GNU/make</programlisting> <programlisting>MASTER_SITES= GNU/make</programlisting>
<para>The older expanded format still works, but all ports <para>The older expanded format still works, but all ports
should be converted to the compact format. The expanded should be converted to the compact format. The expanded
format looks like this:</para> format looks like this:</para>
<programlisting>MASTER_SITES= ${MASTER_SITE_GNU} <programlisting>MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= make</programlisting> MASTER_SITE_SUBDIR= make</programlisting>
<para>These values and variables are defined in <link <para>These values and variables are defined in <link
xlink:href="https://svnweb.freebsd.org/ports/head/Mk/bsd.sites.mk?view=markup"><filename>Mk/bsd.sites.mk</filename></link>. xlink:href="https://svnweb.freebsd.org/ports/head/Mk/bsd.sites.mk?view=markup"><filename>Mk/bsd.sites.mk</filename></link>.
New entries are added often, so make sure to check the latest New entries are added often, so make sure to check the
version of this file before submitting a port.</para> latest version of this file before submitting a port.</para>
<tip> <tip>
<para>For any <para>For any
<varname>MASTER_SITE_<replaceable>FOO</replaceable></varname> <varname>MASTER_SITE_<replaceable>FOO</replaceable></varname>
variable, the shorthand variable, the shorthand
<literal><replaceable>FOO</replaceable></literal> can be <literal><replaceable>FOO</replaceable></literal> can be
used. For example, use:</para> used. For example, use:</para>
<programlisting>MASTER_SITES= <replaceable>FOO</replaceable></programlisting> <programlisting>MASTER_SITES= <replaceable>FOO</replaceable></programlisting>
<para>If <varname>MASTER_SITE_SUBDIR</varname> is needed, use <para>If <varname>MASTER_SITE_SUBDIR</varname> is needed,
this:</para> use this:</para>
<programlisting>MASTER_SITES= <replaceable>FOO</replaceable>/<replaceable>bar</replaceable></programlisting> <programlisting>MASTER_SITES= <replaceable>FOO</replaceable>/<replaceable>bar</replaceable></programlisting>
</tip> </tip>
</sect3> </sect3>
<sect3 xml:id="makefile-master_sites-magic"> <sect3 xml:id="makefile-master_sites-magic">
<title>Magic MASTER_SITES Macros</title> <title>Magic MASTER_SITES Macros</title>
<para>Several <emphasis>magic</emphasis> macros exist for <para>Several <emphasis>magic</emphasis> macros exist for
popular sites with a predictable directory structure. For popular sites with a predictable directory structure. For
these, just use the abbreviation and the system will try to these, just use the abbreviation and the system will try to
guess the correct subdirectory automatically. For a port guess the correct subdirectory automatically. For a port
named <literal>Stardict</literal>, of version named <literal>Stardict</literal>, of version
<literal>1.2.3</literal>, and hosted on SourceForge, adding <literal>1.2.3</literal>, and hosted on SourceForge, adding
this line:</para> this line:</para>
<programlisting>MASTER_SITES= SF</programlisting> <programlisting>MASTER_SITES= SF</programlisting>
<para>Will infer a subdirectory named <para>Will infer a subdirectory named
<literal>/project/stardict/stardict/1.2.3</literal>. If the <literal>/project/stardict/stardict/1.2.3</literal>. If the
guess is incorrect, it can be overridden as follows.</para> guess is incorrect, it can be overridden as follows.</para>
<programlisting>MASTER_SITES= SF/stardict/WyabdcRealPeopleTTS/${PORTVERSION}</programlisting> <programlisting>MASTER_SITES= SF/stardict/WyabdcRealPeopleTTS/${PORTVERSION}</programlisting>
<para>This can also be written as</para> <para>This can also be written as</para>
<programlisting>MASTER_SITES= SF <programlisting>MASTER_SITES= SF
MASTER_SITE_SUBDIR= stardict/WyabdcRealPeopleTTS/${PORTVERSION}</programlisting> MASTER_SITE_SUBDIR= stardict/WyabdcRealPeopleTTS/${PORTVERSION}</programlisting>
<table frame="none" xml:id="makefile-master_sites-popular"> <table frame="none" xml:id="makefile-master_sites-popular">
<title>Popular Magic <varname>MASTER_SITES</varname> <title>Popular Magic <varname>MASTER_SITES</varname>
Macros</title> Macros</title>
<tgroup cols="2"> <tgroup cols="2">
<thead> <thead>
<row> <row>
<entry>Macro</entry> <entry>Macro</entry>
<entry>Assumed subdirectory</entry> <entry>Assumed subdirectory</entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row> <row>
<entry><varname>APACHE_JAKARTA</varname></entry> <entry><varname>APACHE_JAKARTA</varname></entry>
<entry><literal>${PORTNAME:S,-,/,}/source</literal></entry> <entry><literal>${PORTNAME:S,-,/,}/source</literal></entry>
</row> </row>
<row> <row>
<entry><varname>BERLIOS</varname></entry> <entry><varname>BERLIOS</varname></entry>
<entry><literal>${PORTNAME:tl}.berlios</literal></entry> <entry><literal>${PORTNAME:tl}.berlios</literal></entry>
</row> </row>
<row> <row>
<entry><varname>CHEESESHOP</varname></entry> <entry><varname>CHEESESHOP</varname></entry>
<entry><literal>source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:C/(.*)-[0-9].*/\1/}</literal></entry> <entry><literal>source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:C/(.*)-[0-9].*/\1/}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>DEBIAN</varname></entry> <entry><varname>DEBIAN</varname></entry>
<entry><literal>pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME}</literal></entry> <entry><literal>pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>FARSIGHT</varname></entry> <entry><varname>FARSIGHT</varname></entry>
<entry><literal>${PORTNAME}</literal></entry> <entry><literal>${PORTNAME}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>GCC</varname></entry> <entry><varname>GCC</varname></entry>
<entry><literal>releases/${DISTNAME}</literal></entry> <entry><literal>releases/${DISTNAME}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>GH</varname></entry> <entry><varname>GH</varname></entry>
<entry><literal>${GH_ACCOUNT}/${GH_PROJECT}/tar.gz/${GH_TAGNAME}?dummy=/</literal></entry> <entry><literal>${GH_ACCOUNT}/${GH_PROJECT}/tar.gz/${GH_TAGNAME}?dummy=/</literal></entry>
</row> </row>
<row> <row>
<entry><varname>GHC</varname></entry> <entry><varname>GHC</varname></entry>
<entry><literal>${GH_ACCOUNT}/${GH_PROJECT}/</literal></entry> <entry><literal>${GH_ACCOUNT}/${GH_PROJECT}/</literal></entry>
</row> </row>
<row> <row>
<entry><varname>GHL</varname></entry> <entry><varname>GHL</varname></entry>
<entry><literal>${GH_ACCOUNT}/${GH_PROJECT}/legacy.tar.gz/${GH_TAGNAME}?dummy=/</literal></entry> <entry><literal>${GH_ACCOUNT}/${GH_PROJECT}/legacy.tar.gz/${GH_TAGNAME}?dummy=/</literal></entry>
</row> </row>
<row> <row>
<entry><varname>GNOME</varname></entry> <entry><varname>GNOME</varname></entry>
<entry><literal>sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</literal></entry> <entry><literal>sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>GIMP</varname></entry> <entry><varname>GIMP</varname></entry>
<entry><literal>${PORTNAME}/${PORTVERSION:R}/</literal></entry> <entry><literal>${PORTNAME}/${PORTVERSION:R}/</literal></entry>
</row> </row>
<row> <row>
<entry><varname>GNU</varname></entry> <entry><varname>GNU</varname></entry>
<entry><literal>${PORTNAME}</literal></entry> <entry><literal>${PORTNAME}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>GNU_ALPHA</varname></entry> <entry><varname>GNU_ALPHA</varname></entry>
<entry><literal>${PORTNAME}</literal></entry> <entry><literal>${PORTNAME}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>HORDE</varname></entry> <entry><varname>HORDE</varname></entry>
<entry><literal>${PORTNAME}</literal></entry> <entry><literal>${PORTNAME}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>LODEV</varname></entry> <entry><varname>LODEV</varname></entry>
<entry><literal>${PORTNAME}</literal></entry> <entry><literal>${PORTNAME}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>MATE</varname></entry> <entry><varname>MATE</varname></entry>
<entry><literal>${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</literal></entry> <entry><literal>${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>MOZDEV</varname></entry> <entry><varname>MOZDEV</varname></entry>
<entry><literal>${PORTNAME:tl}</literal></entry> <entry><literal>${PORTNAME:tl}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>NL</varname></entry> <entry><varname>NL</varname></entry>
<entry><literal>${PORTNAME}</literal></entry> <entry><literal>${PORTNAME}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>CPAN</varname></entry> <entry><varname>CPAN</varname></entry>
<entry><literal>${PORTNAME:C/-.*//}</literal></entry> <entry><literal>${PORTNAME:C/-.*//}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>SAVANNAH</varname></entry> <entry><varname>SAVANNAH</varname></entry>
<entry><literal>${PORTNAME:tl}</literal></entry> <entry><literal>${PORTNAME:tl}</literal></entry>
</row> </row>
<row> <row>
<entry><varname>SF</varname></entry> <entry><varname>SF</varname></entry>
<entry><literal>${PORTNAME:tl}/${PORTNAME:tl}/${PORTVERSION}</literal></entry> <entry><literal>${PORTNAME:tl}/${PORTNAME:tl}/${PORTVERSION}</literal></entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
</sect3> </sect3>
<sect3 xml:id="makefile-master_sites-github"> <sect3 xml:id="makefile-master_sites-github">
@ -2025,7 +2030,8 @@ EXTRACT_ONLY= source.tar.gz</programlisting>
<title><varname>PATCHFILES</varname></title> <title><varname>PATCHFILES</varname></title>
<para>If the port requires some additional patches that are <para>If the port requires some additional patches that are
available by <acronym>FTP</acronym> or <acronym>HTTP</acronym>, set <varname>PATCHFILES</varname> to available by <acronym>FTP</acronym> or
<acronym>HTTP</acronym>, set <varname>PATCHFILES</varname> to
the names of the files and <varname>PATCH_SITES</varname> to the names of the files and <varname>PATCH_SITES</varname> to
the URL of the directory that contains them (the format is the the URL of the directory that contains them (the format is the
same as <varname>MASTER_SITES</varname>).</para> same as <varname>MASTER_SITES</varname>).</para>
@ -2224,8 +2230,8 @@ DISTFILES= source1.tar.gz:source1 \
<literal>[a-zA-Z_][0-9a-zA-Z_]+</literal> for <literal>[a-zA-Z_][0-9a-zA-Z_]+</literal> for
now.</para> now.</para>
<para>Moreover, string matching is case sensitive; that is, <para>Moreover, string matching is case sensitive; that
<literal>n</literal> is different from is, <literal>n</literal> is different from
<literal>N</literal>.</para> <literal>N</literal>.</para>
<para>However, these words cannot be used for <para>However, these words cannot be used for
@ -3373,7 +3379,7 @@ xmlcatmgr:${PORTSDIR}/textproc/xmlcatmgr</programlisting>
world, will have their &os; installation broken world, will have their &os; installation broken
almost immediately, with many others quickly to follow. These almost immediately, with many others quickly to follow. These
can really be hard to detect. If in doubt, before making can really be hard to detect. If in doubt, before making
that change, make sure to run: that change, make sure to run:
<command>cd /usr/ports; make index</command>. That process <command>cd /usr/ports; make index</command>. That process
can be quite slow on older machines, but it may be able to can be quite slow on older machines, but it may be able to
save a large number of people, including yourself, save a large number of people, including yourself,
@ -3431,22 +3437,23 @@ BAR_LIB_DEPENDS= libbar.so:${PORTSDIR}/foo/bar</programlisting>
<title><varname>USE_<replaceable>*</replaceable></varname> and <title><varname>USE_<replaceable>*</replaceable></varname> and
<varname>WANT_<replaceable>*</replaceable></varname></title> <varname>WANT_<replaceable>*</replaceable></varname></title>
<para><varname>USE_<replaceable>*</replaceable></varname> are set by the port <para><varname>USE_<replaceable>*</replaceable></varname> are
maintainer to define software on which this port depends. A set by the port maintainer to define software on which this
port that needs Firefox would set</para> port depends. A port that needs Firefox would set</para>
<programlisting>USE_FIREFOX= yes</programlisting> <programlisting>USE_FIREFOX= yes</programlisting>
<para>Some <varname>USE_<replaceable>*</replaceable></varname> can accept version <para>Some <varname>USE_<replaceable>*</replaceable></varname>
numbers or other parameters. For example, a port that can accept version numbers or other parameters. For example,
requires Apache 2.2 would set</para> a port that requires Apache 2.2 would set</para>
<programlisting>USE_APACHE= 22</programlisting> <programlisting>USE_APACHE= 22</programlisting>
<para>For more control over dependencies in some cases, <para>For more control over dependencies in some cases,
<varname>WANT_<replaceable>*</replaceable></varname> are available to more <varname>WANT_<replaceable>*</replaceable></varname> are
precisely specify what is needed. For example, consider the available to more precisely specify what is needed. For
<package role="port">mail/squirrelmail</package> port. This example, consider the <package
role="port">mail/squirrelmail</package> port. This
port needs some PHP modules, which are listed in port needs some PHP modules, which are listed in
<varname>USE_PHP</varname>:</para> <varname>USE_PHP</varname>:</para>
@ -3458,8 +3465,10 @@ BAR_LIB_DEPENDS= libbar.so:${PORTSDIR}/foo/bar</programlisting>
<programlisting>WANT_PHP_WEB= yes</programlisting> <programlisting>WANT_PHP_WEB= yes</programlisting>
<para>Available <varname>USE_<replaceable>*</replaceable></varname> and <para>Available
<varname>WANT_<replaceable>*</replaceable></varname> are defined in the files in <varname>USE_<replaceable>*</replaceable></varname> and
<varname>WANT_<replaceable>*</replaceable></varname> are
defined in the files in
<filename>/usr/ports/Mk</filename>.</para> <filename>/usr/ports/Mk</filename>.</para>
</sect2> </sect2>
</sect1> </sect1>
@ -3540,8 +3549,8 @@ MASTERDIR= ${.CURDIR}/../xdvi300
<sect1 xml:id="makefile-info"> <sect1 xml:id="makefile-info">
<title>Info Files</title> <title>Info Files</title>
<para>If the package needs to install <acronym>GNU</acronym> info files, list them <para>If the package needs to install <acronym>GNU</acronym> info
in <varname>INFO</varname> (without the files, list them in <varname>INFO</varname> (without the
trailing <literal>.info</literal>), one entry per document. trailing <literal>.info</literal>), one entry per document.
These files are assumed to be installed to These files are assumed to be installed to
<filename>PREFIX/INFO_PATH</filename>. Change <filename>PREFIX/INFO_PATH</filename>. Change
@ -3579,12 +3588,12 @@ MASTERDIR= ${.CURDIR}/../xdvi300
<sect3 xml:id="makefile-options-background"> <sect3 xml:id="makefile-options-background">
<title>Background</title> <title>Background</title>
<para><varname>OPTIONS_<replaceable>*</replaceable></varname> give the <para><varname>OPTIONS_<replaceable>*</replaceable></varname>
user installing the port a dialog showing the available give the user installing the port a dialog showing the
options, and then saves those options to available options, and then saves those options to
<filename>${PORT_DBDIR}/${OPTIONS_NAME}/options</filename>. <filename>${PORT_DBDIR}/${OPTIONS_NAME}/options</filename>.
The next time the port is built, the options are The next time the port is built, the options are
reused. <varname>PORT_DBDIR</varname> defaults to reused. <varname>PORT_DBDIR</varname> defaults to
<filename>/var/db/ports</filename>. <filename>/var/db/ports</filename>.
<varname>OPTIONS_NAME</varname> is to the port origin with <varname>OPTIONS_NAME</varname> is to the port origin with
an underscore as the space separator, for example, for an underscore as the space separator, for example, for
@ -3596,7 +3605,8 @@ MASTERDIR= ${.CURDIR}/../xdvi300
framework checks for framework checks for
<filename>${PORT_DBDIR}/${OPTIONS_NAME}/options</filename>. <filename>${PORT_DBDIR}/${OPTIONS_NAME}/options</filename>.
If that file does not exist, the values of If that file does not exist, the values of
<varname>OPTIONS_<replaceable>*</replaceable></varname> are used, and a dialog box is <varname>OPTIONS_<replaceable>*</replaceable></varname>
are used, and a dialog box is
displayed where the options can be enabled or disabled. displayed where the options can be enabled or disabled.
Then <filename>options</filename> is saved and the Then <filename>options</filename> is saved and the
configured variables are used when building the port.</para> configured variables are used when building the port.</para>
@ -3708,7 +3718,9 @@ OPTIONS_GROUP_GG1= OPT9 OPT10</programlisting>
introduction of <filename>bsd.port.options.mk</filename>. introduction of <filename>bsd.port.options.mk</filename>.
But be aware that some variables will not work as expected But be aware that some variables will not work as expected
after the inclusion of <filename>bsd.port.pre.mk</filename>, after the inclusion of <filename>bsd.port.pre.mk</filename>,
typically some <varname>USE_<replaceable>*</replaceable></varname> flags.</para> typically some
<varname>USE_<replaceable>*</replaceable></varname>
flags.</para>
<example xml:id="ports-options-simple-use"> <example xml:id="ports-options-simple-use">
<title>Simple Use of <varname>OPTIONS</varname></title> <title>Simple Use of <varname>OPTIONS</varname></title>
@ -3734,7 +3746,7 @@ BAR_RUN_DEPENDS= bar:${PORTSDIR}/bar/bar
CONFIGURE_ARGS+=--without-examples CONFIGURE_ARGS+=--without-examples
.endif</programlisting> .endif</programlisting>
<para>The form shown above is discouraged. The preferred <para>The form shown above is discouraged. The preferred
method is using a configure knob to really enable and method is using a configure knob to really enable and
disable the feature to match the option:</para> disable the feature to match the option:</para>
@ -3974,12 +3986,13 @@ USE_XORG= x11 xextproto xext xrandr
<varname><replaceable>OPT</replaceable>_CONFIGURE_ENABLE</varname> <varname><replaceable>OPT</replaceable>_CONFIGURE_ENABLE</varname>
then then
<literal>--enable-<replaceable>entry</replaceable></literal> <literal>--enable-<replaceable>entry</replaceable></literal>
is appended to <varname>CONFIGURE_ARGS</varname>. When option is appended to <varname>CONFIGURE_ARGS</varname>. When
<replaceable>OPT</replaceable> is not selected, option <replaceable>OPT</replaceable> is not selected,
<literal>--disable-<replaceable>entry</replaceable></literal> <literal>--disable-<replaceable>entry</replaceable></literal>
is appended to <varname>CONFIGURE_ARGS</varname>. An optional is appended to <varname>CONFIGURE_ARGS</varname>. An
argument can be specified with an <literal>=</literal> optional argument can be specified with an
symbol. This argument is only appended to the <literal>=</literal> symbol. This argument is only appended
to the
<literal>--enable-<replaceable>entry</replaceable></literal> <literal>--enable-<replaceable>entry</replaceable></literal>
configure option. For example:</para> configure option. For example:</para>
@ -4014,12 +4027,13 @@ CONFIGURE_ARGS+= --disable-test2
<varname><replaceable>OPT</replaceable>_CONFIGURE_ENABLE</varname> <varname><replaceable>OPT</replaceable>_CONFIGURE_ENABLE</varname>
then then
<literal>--with-<replaceable>entry</replaceable></literal> <literal>--with-<replaceable>entry</replaceable></literal>
is appended to <varname>CONFIGURE_ARGS</varname>. When option is appended to <varname>CONFIGURE_ARGS</varname>. When
<replaceable>OPT</replaceable> is not selected, option <replaceable>OPT</replaceable> is not selected,
<literal>--without-<replaceable>entry</replaceable></literal> <literal>--without-<replaceable>entry</replaceable></literal>
is appended to <varname>CONFIGURE_ARGS</varname>. An optional is appended to <varname>CONFIGURE_ARGS</varname>. An
argument can be specified with an <literal>=</literal> optional argument can be specified with an
symbol. This argument is only appended to the <literal>=</literal> symbol. This argument is only appended
to the
<literal>--with-<replaceable>entry</replaceable></literal> <literal>--with-<replaceable>entry</replaceable></literal>
configure option. For example:</para> configure option. For example:</para>
@ -4529,20 +4543,21 @@ PORTVERSION= 1.0</programlisting>
that <varname>CONFLICTS_INSTALL</varname> does not match this that <varname>CONFLICTS_INSTALL</varname> does not match this
port's package itself. Otherwise enforcing its installation port's package itself. Otherwise enforcing its installation
with <varname>FORCE_PKG_REGISTER</varname> will no longer with <varname>FORCE_PKG_REGISTER</varname> will no longer
work. <varname>CONFLICTS_INSTALL</varname> check is done after the build work. <varname>CONFLICTS_INSTALL</varname> check is done
stage and prior to the install stage.</para> after the build stage and prior to the install stage.</para>
</sect2> </sect2>
<sect2 xml:id="conflicts-conflicts_build"> <sect2 xml:id="conflicts-conflicts_build">
<title><varname>CONFLICTS_BUILD</varname></title> <title><varname>CONFLICTS_BUILD</varname></title>
<para>If the port cannot be built when other specific ports are already <para>If the port cannot be built when other specific ports are
installed, list the other port names in already installed, list the other port names in
<varname>CONFLICTS_BUILD</varname>. Use <varname>CONFLICTS_BUILD</varname>. Use
shell globs like <literal>*</literal> and <literal>?</literal> shell globs like <literal>*</literal> and <literal>?</literal>
here. Use package names, not port names or origins. here. Use package names, not port names or origins.
<varname>CONFLICTS_BUILD</varname> check is done prior to the build stage. Build <varname>CONFLICTS_BUILD</varname> check is done prior to the
conflicts are not recorded in the resulting package.</para> build stage. Build conflicts are not recorded in the
resulting package.</para>
</sect2> </sect2>
<sect2 xml:id="conflicts-conflicts"> <sect2 xml:id="conflicts-conflicts">
@ -4558,8 +4573,8 @@ PORTVERSION= 1.0</programlisting>
<varname>CONFLICTS</varname> does not match this <varname>CONFLICTS</varname> does not match this
port's package itself. Otherwise enforcing its installation port's package itself. Otherwise enforcing its installation
with <varname>FORCE_PKG_REGISTER</varname> will no longer with <varname>FORCE_PKG_REGISTER</varname> will no longer
work. <varname>CONFLICTS</varname> check is done prior to the build stage work. <varname>CONFLICTS</varname> check is done prior to the
and prior to the install stage.</para> build stage and prior to the install stage.</para>
</sect2> </sect2>
</sect1> </sect1>
@ -4567,7 +4582,8 @@ PORTVERSION= 1.0</programlisting>
<title>Installing Files</title> <title>Installing Files</title>
<sect2 xml:id="install-macros"> <sect2 xml:id="install-macros">
<title><varname>INSTALL_<replaceable>*</replaceable></varname> Macros</title> <title><varname>INSTALL_<replaceable>*</replaceable></varname>
Macros</title>
<para>Use the macros provided in <para>Use the macros provided in
<filename>bsd.port.mk</filename> to ensure correct modes of <filename>bsd.port.mk</filename> to ensure correct modes of
@ -4707,7 +4723,8 @@ PORTVERSION= 1.0</programlisting>
<para>Additional <command>find</command> arguments can be <para>Additional <command>find</command> arguments can be
passed via the third argument to passed via the third argument to
<varname>COPYTREE_<replaceable>*</replaceable></varname> macros. For example, to install <varname>COPYTREE_<replaceable>*</replaceable></varname>
macros. For example, to install
all files from the first example except Makefiles, one can use all files from the first example except Makefiles, one can use
these commands.</para> these commands.</para>