summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authordillo <dillo>2005-06-03 13:29:18 +0000
committerdillo <dillo>2005-06-03 13:29:18 +0000
commit59ceec4b98d5f5f46dd0f11e6e3a414704c1dd76 (patch)
tree94bbf5e65e8243e7a68ba9bfb6dfba4f9fdc894a /doc
parent2dd0a5ae588a0c79482f12997047555ab389af6f (diff)
downloadpkgsrc-59ceec4b98d5f5f46dd0f11e6e3a414704c1dd76.tar.gz
remove leading white space and reformat
remove whitespace around tags
Diffstat (limited to 'doc')
-rw-r--r--doc/guide/files/options.xml220
1 files changed, 106 insertions, 114 deletions
diff --git a/doc/guide/files/options.xml b/doc/guide/files/options.xml
index 88ebab70398..a344493f3fc 100644
--- a/doc/guide/files/options.xml
+++ b/doc/guide/files/options.xml
@@ -1,42 +1,43 @@
-<!-- $NetBSD: options.xml,v 1.5 2005/05/24 12:14:42 wiz Exp $ -->
+<!-- $NetBSD: options.xml,v 1.6 2005/06/03 13:29:18 dillo Exp $ -->
<!-- based on:
pkgsrc/mk/bsd.options.mk 1.23
-->
<chapter id="options">
- <title>Options handling</title>
-
- <para> Many packages have the ability to be built to support
- different sets of features. <filename>bsd.options.mk</filename>
- is a framework in pkgsrc that provides generic handling of those
- options that determine different ways in which the packages can be
- built. It's possible for the user to specify exactly which sets
- of options will be built into a package or to allow a set of
- global default options apply. </para>
-
- <sect1 id="global-default-options">
- <title>Global default options</title>
-
- <para> Global default options are listed in
- <varname>PKG_DEFAULT_OPTIONS</varname>, which is a list of the
- options that should be built into every package if that option
- is supported. This variable should be set in
- <filename>/etc/mk.conf</filename>. </para>
- </sect1>
-
- <sect1 id="converting-to-options">
- <title>Converting packages to use <filename>bsd.options.mk</filename></title>
-
- <para> The following example shows how
- <filename>bsd.options.mk</filename> should be used
- by the hypothetical ``wibble'' package, either in the package
- <filename>Makefile</filename>, or in a file,
- e.g. <filename>options.mk</filename>, that is included by the
- main package <filename>Makefile</filename>.
- </para>
-
- <programlisting>
+<title>Options handling</title>
+
+<para>Many packages have the ability to be built to support different
+sets of features. <filename>bsd.options.mk</filename> is a framework
+in pkgsrc that provides generic handling of those options that
+determine different ways in which the packages can be built. It's
+possible for the user to specify exactly which sets of options will be
+built into a package or to allow a set of global default options
+apply.</para>
+
+
+<sect1 id="global-default-options">
+<title>Global default options</title>
+
+<para> Global default options are listed in
+<varname>PKG_DEFAULT_OPTIONS</varname>, which is a list of the options
+that should be built into every package if that option is supported.
+This variable should be set in <filename>/etc/mk.conf</filename>.</para>
+
+</sect1>
+
+
+<sect1 id="converting-to-options">
+<title>Converting packages to use <filename>bsd.options.mk</filename></title>
+
+<para>The following example shows how
+<filename>bsd.options.mk</filename> should be used
+by the hypothetical ``wibble'' package, either in the package
+<filename>Makefile</filename>, or in a file,
+e.g. <filename>options.mk</filename>, that is included by the
+main package <filename>Makefile</filename>.</para>
+
+<programlisting>
# Global and legacy options
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
@@ -62,85 +63,76 @@ CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
- </programlisting>
-
- <para> The first section contains the information about which
- build options are supported by the package, and any default
- options settings if needed. </para>
-
- <orderedlist>
- <listitem>
- <para> <varname>PKG_OPTIONS_VAR</varname> is the
- name of the &man.make.1; variable that contains the options the
- user wishes to select. The recommended value is
- <quote>PKG_OPTIONS.<replaceable>pkg</replaceable></quote>
- but any package-specific value may be
- used. This variable should be set in a package Makefile.
- </para>
- </listitem>
-
- <listitem>
- <para> <varname>PKG_SUPPORTED_OPTIONS</varname> is a list of
- build options supported by the package. This variable
- should be set in a package Makefile. </para>
- </listitem>
-
- <listitem>
- <para><varname>PKG_SUGGESTED_OPTIONS</varname> is a list of
- build options which are enabled by default.</para>
- </listitem>
-
- <listitem>
- <para> <varname>${PKG_OPTIONS_VAR}</varname> (the variable
- named in <varname>PKG_OPTIONS_VAR</varname>)
- lists the selected build options and overrides any
- default options given in
- <varname>PKG_DEFAULT_OPTIONS</varname>. If any of the
- options begin with a <quote>-</quote>, then that option is
- always removed from the selected build options, e.g.
- </para>
-
- <programlisting>
- PKG_DEFAULT_OPTIONS= kerberos ldap sasl
- PKG_OPTIONS_VAR= WIBBLE_OPTIONS
- WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
- # leads to PKG_OPTIONS = kerberos ldap
- </programlisting>
-
- <para>or</para>
-
- <programlisting>
- PKG_OPTIONS_VAR= WIBBLE_OPTIONS
- WIBBLE_OPTIONS= kerberos -ldap ldap
- # leads to PKG_OPTIONS = kerberos
- </programlisting>
-
- <para> This variable should be set in
- <filename>/etc/mk.conf</filename>. </para>
- </listitem>
-
- <listitem><para>The <varname>PKG_OPTIONS_LEGACY_VARS</varname>
- is only needed if you are converting a package that had its own
- ad-hoc options handling to use
- <filename>bsd.options.mk</filename>. It converts global or
- legacy options variables into an equivalent
- <varname>PKG_OPTIONS.<replaceable>pkg</replaceable></varname>
- value.</para></listitem>
-
- </orderedlist>
-
- <para> After the inclusion of bsd.options.mk, the variable
- <varname>PKG_OPTIONS</varname> contains the list of the selected
- build options, properly filtered to remove unsupported and
- duplicate options.</para>
-
- <para> The remaining sections contain the logic that is specific
- to each option. There should be a check for every option
- listed in <varname>PKG_SUPPORTED_OPTIONS</varname>, and there
- should be clear documentation on what turning on the option
- will do in the comments preceding each section. The correct
- way to check for an option is to check whether it is listed in
- <varname>PKG_OPTIONS</varname>.
- </para>
- </sect1>
+</programlisting>
+
+<para>The first section contains the information about which build
+options are supported by the package, and any default options settings
+if needed.</para>
+
+<orderedlist>
+
+<listitem><para><varname>PKG_OPTIONS_VAR</varname> is the name of the
+&man.make.1; variable that contains the options the user wishes to
+select. The recommended value is
+<quote>PKG_OPTIONS.<replaceable>pkg</replaceable></quote> but any
+package-specific value may be used. This variable should be set in a
+package Makefile.</para></listitem>
+
+<listitem><para> <varname>PKG_SUPPORTED_OPTIONS</varname> is a list of
+build options supported by the package. This variable should be set
+in a package Makefile.</para></listitem>
+
+<listitem><para><varname>PKG_SUGGESTED_OPTIONS</varname> is a list of
+build options which are enabled by default.</para></listitem>
+
+<listitem>
+<para><varname>${PKG_OPTIONS_VAR}</varname> (the variable named in
+<varname>PKG_OPTIONS_VAR</varname>) lists the selected build options
+and overrides any default options given in
+<varname>PKG_DEFAULT_OPTIONS</varname>. If any of the options begin
+with a <quote>-</quote>, then that option is always removed from the
+selected build options, e.g.</para>
+
+<programlisting>
+PKG_DEFAULT_OPTIONS= kerberos ldap sasl
+PKG_OPTIONS_VAR= WIBBLE_OPTIONS
+WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
+# leads to PKG_OPTIONS = kerberos ldap
+</programlisting>
+
+<para>or</para>
+
+<programlisting>
+PKG_OPTIONS_VAR= WIBBLE_OPTIONS
+WIBBLE_OPTIONS= kerberos -ldap ldap
+# leads to PKG_OPTIONS = kerberos
+</programlisting>
+
+<para>This variable should be set in
+<filename>/etc/mk.conf</filename>.</para>
+</listitem>
+
+<listitem><para>The <varname>PKG_OPTIONS_LEGACY_VARS</varname> is only
+needed if you are converting a package that had its own ad-hoc options
+handling to use <filename>bsd.options.mk</filename>. It converts
+global or legacy options variables into an equivalent
+<varname>PKG_OPTIONS.<replaceable>pkg</replaceable></varname>
+value.</para></listitem>
+
+</orderedlist>
+
+<para>After the inclusion of bsd.options.mk, the variable
+<varname>PKG_OPTIONS</varname> contains the list of the selected build
+options, properly filtered to remove unsupported and duplicate
+options.</para>
+
+<para>The remaining sections contain the logic that is specific to
+each option. There should be a check for every option listed in
+<varname>PKG_SUPPORTED_OPTIONS</varname>, and there should be clear
+documentation on what turning on the option will do in the comments
+preceding each section. The correct way to check for an option is to
+check whether it is listed in <varname>PKG_OPTIONS</varname>.</para>
+
+</sect1>
+
</chapter>