summaryrefslogtreecommitdiff
path: root/doc/pkgsrc.html
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-06-01 09:36:55 +0000
committerrillig <rillig@pkgsrc.org>2006-06-01 09:36:55 +0000
commit195dd380776a4ce07939d035fd4c01ee82a9c46c (patch)
tree8a05fcaf4b8c71fbe1d3783c57e9a815ead653a4 /doc/pkgsrc.html
parent9c62b4f5ee2f6c51b2cfaeaeb4615de0abc87788 (diff)
downloadpkgsrc-195dd380776a4ce07939d035fd4c01ee82a9c46c.tar.gz
regen.
Diffstat (limited to 'doc/pkgsrc.html')
-rw-r--r--doc/pkgsrc.html1393
1 files changed, 724 insertions, 669 deletions
diff --git a/doc/pkgsrc.html b/doc/pkgsrc.html
index b66c8fc8b8c..8a3f0db762d 100644
--- a/doc/pkgsrc.html
+++ b/doc/pkgsrc.html
@@ -35,7 +35,7 @@
</h3>
</div></div>
<div><p class="copyright">Copyright © 1994-2006 The NetBSD Foundation, Inc</p></div>
-<div><p class="pubdate">$NetBSD: pkgsrc.xml,v 1.18 2006/05/19 22:05:09 rillig Exp $</p></div>
+<div><p class="pubdate">$NetBSD: pkgsrc.xml,v 1.19 2006/06/01 08:39:03 rillig Exp $</p></div>
<div><div class="abstract">
<p class="title"><b>Abstract</b></p>
<p>pkgsrc is a centralized package management system for
@@ -152,203 +152,203 @@
</dl></dd>
<dt><span class="part"><a href="#developers-guide">II. The pkgsrc developer's guide</a></span></dt>
<dd><dl>
-<dt><span class="chapter"><a href="#components">8. Package components - files, directories and contents</a></span></dt>
+<dt><span class="chapter"><a href="#creating">8. Creating a new pkgsrc package from scratch</a></span></dt>
+<dt><span class="chapter"><a href="#components">9. Package components - files, directories and contents</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#components.Makefile">8.1. <code class="filename">Makefile</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.distinfo">8.2. <code class="filename">distinfo</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.patches">8.3. patches/*</a></span></dt>
-<dt><span class="sect1"><a href="#other-mandatory-files">8.4. Other mandatory files</a></span></dt>
-<dt><span class="sect1"><a href="#components.optional">8.5. Optional files</a></span></dt>
-<dt><span class="sect1"><a href="#work-dir">8.6. <code class="filename">work*</code></a></span></dt>
-<dt><span class="sect1"><a href="#files-dir">8.7. <code class="filename">files/*</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.Makefile">9.1. <code class="filename">Makefile</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.distinfo">9.2. <code class="filename">distinfo</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.patches">9.3. patches/*</a></span></dt>
+<dt><span class="sect1"><a href="#other-mandatory-files">9.4. Other mandatory files</a></span></dt>
+<dt><span class="sect1"><a href="#components.optional">9.5. Optional files</a></span></dt>
+<dt><span class="sect1"><a href="#work-dir">9.6. <code class="filename">work*</code></a></span></dt>
+<dt><span class="sect1"><a href="#files-dir">9.7. <code class="filename">files/*</code></a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#makefile">9. Programming in <code class="filename">Makefile</code>s</a></span></dt>
+<dt><span class="chapter"><a href="#makefile">10. Programming in <code class="filename">Makefile</code>s</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#makefile.variables">9.1. <code class="filename">Makefile</code> variables</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">9.1.1. Naming conventions</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#makefile.code">9.2. Code snippets</a></span></dt>
+<dt><span class="sect1"><a href="#makefile.variables">10.1. <code class="filename">Makefile</code> variables</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">10.1.1. Naming conventions</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#makefile.code">10.2. Code snippets</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#adding-to-list">9.2.1. Adding things to a list</a></span></dt>
-<dt><span class="sect2"><a href="#converting-internal-to-external">9.2.2. Converting an internal list into an external list</a></span></dt>
-<dt><span class="sect2"><a href="#passing-variable-to-shell">9.2.3. Passing variables to a shell command</a></span></dt>
-<dt><span class="sect2"><a href="#quoting-guideline">9.2.4. Quoting guideline</a></span></dt>
-<dt><span class="sect2"><a href="#bsd-make-bug-workaround">9.2.5. Workaround for a bug in BSD Make</a></span></dt>
+<dt><span class="sect2"><a href="#adding-to-list">10.2.1. Adding things to a list</a></span></dt>
+<dt><span class="sect2"><a href="#converting-internal-to-external">10.2.2. Converting an internal list into an external list</a></span></dt>
+<dt><span class="sect2"><a href="#passing-variable-to-shell">10.2.3. Passing variables to a shell command</a></span></dt>
+<dt><span class="sect2"><a href="#quoting-guideline">10.2.4. Quoting guideline</a></span></dt>
+<dt><span class="sect2"><a href="#bsd-make-bug-workaround">10.2.5. Workaround for a bug in BSD Make</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#plist">10. PLIST issues</a></span></dt>
+<dt><span class="chapter"><a href="#plist">11. PLIST issues</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#rcs-id">10.1. RCS ID</a></span></dt>
-<dt><span class="sect1"><a href="#automatic-plist-generation">10.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
-<dt><span class="sect1"><a href="#print-PLIST">10.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
-<dt><span class="sect1"><a href="#plist.misc">10.4. Variable substitution in PLIST</a></span></dt>
-<dt><span class="sect1"><a href="#manpage-compression">10.5. Man page compression</a></span></dt>
-<dt><span class="sect1"><a href="#using-PLIST_SRC">10.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
-<dt><span class="sect1"><a href="#platform-specific-plist">10.7. Platform-specific and differing PLISTs</a></span></dt>
-<dt><span class="sect1"><a href="#faq.common-dirs">10.8. Sharing directories between packages</a></span></dt>
+<dt><span class="sect1"><a href="#rcs-id">11.1. RCS ID</a></span></dt>
+<dt><span class="sect1"><a href="#automatic-plist-generation">11.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
+<dt><span class="sect1"><a href="#print-PLIST">11.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
+<dt><span class="sect1"><a href="#plist.misc">11.4. Variable substitution in PLIST</a></span></dt>
+<dt><span class="sect1"><a href="#manpage-compression">11.5. Man page compression</a></span></dt>
+<dt><span class="sect1"><a href="#using-PLIST_SRC">11.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
+<dt><span class="sect1"><a href="#platform-specific-plist">11.7. Platform-specific and differing PLISTs</a></span></dt>
+<dt><span class="sect1"><a href="#faq.common-dirs">11.8. Sharing directories between packages</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#buildlink">11. Buildlink methodology</a></span></dt>
+<dt><span class="chapter"><a href="#buildlink">12. Buildlink methodology</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#converting-to-buildlink3">11.1. Converting packages to use buildlink3</a></span></dt>
-<dt><span class="sect1"><a href="#creating-buildlink3.mk">11.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-buildlink3">12.1. Converting packages to use buildlink3</a></span></dt>
+<dt><span class="sect1"><a href="#creating-buildlink3.mk">12.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-bl3">11.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
-<dt><span class="sect2"><a href="#updating-buildlink-depends">11.2.2. Updating <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> in <code class="filename">buildlink3.mk</code> files</a></span></dt>
+<dt><span class="sect2"><a href="#anatomy-of-bl3">12.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
+<dt><span class="sect2"><a href="#updating-buildlink-depends">12.2.2. Updating <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> in <code class="filename">buildlink3.mk</code> files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#writing-builtin.mk">11.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#writing-builtin.mk">12.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">11.3.1. Anatomy of a <code class="filename">builtin.mk</code> file</a></span></dt>
-<dt><span class="sect2"><a href="#native-or-pkgsrc-preference">11.3.2. Global preferences for native or pkgsrc software</a></span></dt>
+<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">12.3.1. Anatomy of a <code class="filename">builtin.mk</code> file</a></span></dt>
+<dt><span class="sect2"><a href="#native-or-pkgsrc-preference">12.3.2. Global preferences for native or pkgsrc software</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#pkginstall">12. The pkginstall framework</a></span></dt>
+<dt><span class="chapter"><a href="#pkginstall">13. The pkginstall framework</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">12.1. Files and directories outside the installation prefix</a></span></dt>
+<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">13.1. Files and directories outside the installation prefix</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#dirs-outside-prefix">12.1.1. Directory manipulation</a></span></dt>
-<dt><span class="sect2"><a href="#files-outside-prefix">12.1.2. File manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#dirs-outside-prefix">13.1.1. Directory manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#files-outside-prefix">13.1.2. File manipulation</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#conf-files">12.2. Configuration files</a></span></dt>
+<dt><span class="sect1"><a href="#conf-files">13.2. Configuration files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#conf-files-sysconfdir">12.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-configure">12.2.2. Telling the software where configuration files are</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-patching">12.2.3. Patching installations</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-disable">12.2.4. Disabling handling of configuration files</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-sysconfdir">13.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-configure">13.2.2. Telling the software where configuration files are</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-patching">13.2.3. Patching installations</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-disable">13.2.4. Disabling handling of configuration files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#rcd-scripts">12.3. System startup scripts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">12.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#users-and-groups">12.4. System users and groups</a></span></dt>
-<dt><span class="sect1"><a href="#shells">12.5. System shells</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#shells-disable">12.5.1. Disabling shell registration</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#fonts">12.6. Fonts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#fonts-disable">12.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#rcd-scripts">13.3. System startup scripts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">13.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#users-and-groups">13.4. System users and groups</a></span></dt>
+<dt><span class="sect1"><a href="#shells">13.5. System shells</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#shells-disable">13.5.1. Disabling shell registration</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#fonts">13.6. Fonts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#fonts-disable">13.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#options">13. Options handling</a></span></dt>
+<dt><span class="chapter"><a href="#options">14. Options handling</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#global-default-options">13.1. Global default options</a></span></dt>
-<dt><span class="sect1"><a href="#converting-to-options">13.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
-<dt><span class="sect1"><a href="#option-names">13.3. Option Names</a></span></dt>
+<dt><span class="sect1"><a href="#global-default-options">14.1. Global default options</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-options">14.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
+<dt><span class="sect1"><a href="#option-names">14.3. Option Names</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#build">14. The build process</a></span></dt>
+<dt><span class="chapter"><a href="#build">15. The build process</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#build.intro">14.1. Introduction</a></span></dt>
-<dt><span class="sect1"><a href="#build.prefix">14.2. Program location</a></span></dt>
-<dt><span class="sect1"><a href="#build.builddirs">14.3. Directories used during the build process</a></span></dt>
-<dt><span class="sect1"><a href="#build.running">14.4. Running a phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.fetch">14.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.checksum">14.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.extract">14.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.patch">14.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.tools">14.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.wrapper">14.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.configure">14.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.build">14.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.test">14.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.install">14.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.package">14.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.helpful-targets">14.16. Other helpful targets</a></span></dt>
+<dt><span class="sect1"><a href="#build.intro">15.1. Introduction</a></span></dt>
+<dt><span class="sect1"><a href="#build.prefix">15.2. Program location</a></span></dt>
+<dt><span class="sect1"><a href="#build.builddirs">15.3. Directories used during the build process</a></span></dt>
+<dt><span class="sect1"><a href="#build.running">15.4. Running a phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.fetch">15.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.checksum">15.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.extract">15.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.patch">15.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.tools">15.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.wrapper">15.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.configure">15.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.build">15.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.test">15.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.install">15.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.package">15.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.helpful-targets">15.16. Other helpful targets</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#tools">15. Tools needed for building or running</a></span></dt>
+<dt><span class="chapter"><a href="#tools">16. Tools needed for building or running</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#pkgsrc-tools">15.1. Tools for pkgsrc builds</a></span></dt>
-<dt><span class="sect1"><a href="#package-tools">15.2. Tools needed by packages</a></span></dt>
-<dt><span class="sect1"><a href="#platform-tools">15.3. Tools provided by platforms</a></span></dt>
+<dt><span class="sect1"><a href="#pkgsrc-tools">16.1. Tools for pkgsrc builds</a></span></dt>
+<dt><span class="sect1"><a href="#package-tools">16.2. Tools needed by packages</a></span></dt>
+<dt><span class="sect1"><a href="#platform-tools">16.3. Tools provided by platforms</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#fixes">16. Making your package work</a></span></dt>
+<dt><span class="chapter"><a href="#fixes">17. Making your package work</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#general-operation">16.1. General operation</a></span></dt>
+<dt><span class="sect1"><a href="#general-operation">17.1. General operation</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">16.1.1. How to pull in variables from /etc/mk.conf</a></span></dt>
-<dt><span class="sect2"><a href="#where-to-install-documentation">16.1.2. Where to install documentation</a></span></dt>
-<dt><span class="sect2"><a href="#restricted-packages">16.1.3. Restricted packages</a></span></dt>
-<dt><span class="sect2"><a href="#dependencies">16.1.4. Handling dependencies</a></span></dt>
-<dt><span class="sect2"><a href="#conflicts">16.1.5. Handling conflicts with other packages</a></span></dt>
-<dt><span class="sect2"><a href="#not-building-packages">16.1.6. Packages that cannot or should not be built</a></span></dt>
-<dt><span class="sect2"><a href="#undeletable-packages">16.1.7. Packages which should not be deleted, once installed</a></span></dt>
-<dt><span class="sect2"><a href="#security-handling">16.1.8. Handling packages with security problems</a></span></dt>
-<dt><span class="sect2"><a href="#compiler-bugs">16.1.9. How to handle compiler bugs</a></span></dt>
-<dt><span class="sect2"><a href="#bumping-pkgrevision">16.1.10. How to handle incrementing versions when fixing an existing package</a></span></dt>
-<dt><span class="sect2"><a href="#portability-of-packages">16.1.11. Portability of packages</a></span></dt>
+<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">17.1.1. How to pull in variables from /etc/mk.conf</a></span></dt>
+<dt><span class="sect2"><a href="#where-to-install-documentation">17.1.2. Where to install documentation</a></span></dt>
+<dt><span class="sect2"><a href="#restricted-packages">17.1.3. Restricted packages</a></span></dt>
+<dt><span class="sect2"><a href="#dependencies">17.1.4. Handling dependencies</a></span></dt>
+<dt><span class="sect2"><a href="#conflicts">17.1.5. Handling conflicts with other packages</a></span></dt>
+<dt><span class="sect2"><a href="#not-building-packages">17.1.6. Packages that cannot or should not be built</a></span></dt>
+<dt><span class="sect2"><a href="#undeletable-packages">17.1.7. Packages which should not be deleted, once installed</a></span></dt>
+<dt><span class="sect2"><a href="#security-handling">17.1.8. Handling packages with security problems</a></span></dt>
+<dt><span class="sect2"><a href="#compiler-bugs">17.1.9. How to handle compiler bugs</a></span></dt>
+<dt><span class="sect2"><a href="#bumping-pkgrevision">17.1.10. How to handle incrementing versions when fixing an existing package</a></span></dt>
+<dt><span class="sect2"><a href="#portability-of-packages">17.1.11. Portability of packages</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#downloading-issues">16.2. Possible downloading issues</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.fetch">17.2. Fixing problems in the <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#no-plain-download">16.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
-<dt><span class="sect2"><a href="#modified-distfiles-same-name">16.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
+<dt><span class="sect2"><a href="#no-plain-download">17.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
+<dt><span class="sect2"><a href="#modified-distfiles-same-name">17.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#configuration-gotchas">16.3. Configuration gotchas</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.configure">17.3. Fixing problems in the <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#fixes.libtool">16.3.1. Shared libraries - libtool</a></span></dt>
-<dt><span class="sect2"><a href="#using-libtool">16.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
-<dt><span class="sect2"><a href="#autoconf-automake">16.3.3. GNU Autoconf/Automake</a></span></dt>
+<dt><span class="sect2"><a href="#fixes.libtool">17.3.1. Shared libraries - libtool</a></span></dt>
+<dt><span class="sect2"><a href="#using-libtool">17.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
+<dt><span class="sect2"><a href="#autoconf-automake">17.3.3. GNU Autoconf/Automake</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#fixes-build">16.4. Building the package</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.build">17.4. Fixing problems in the <span class="emphasis"><em>build</em></span> phase</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#fixes.build.cpp">17.4.1. Compiling C and C++ code conditionally</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#package-specific-actions">17.5. Package specific actions</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#cpp-defines">16.4.1. CPP defines</a></span></dt>
-<dt><span class="sect2"><a href="#cpp-list-examples">16.4.2. Examples of CPP defines for some platforms</a></span></dt>
-<dt><span class="sect2"><a href="#cpp-list">16.4.3. Getting a list of CPP defines</a></span></dt>
+<dt><span class="sect2"><a href="#user-interaction">17.5.1. User interaction</a></span></dt>
+<dt><span class="sect2"><a href="#handling-licenses">17.5.2. Handling licenses</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#package-specific-actions">16.5. Package specific actions</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.install">17.6. Fixing problems in the <span class="emphasis"><em>install</em></span> phase</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#user-interaction">16.5.1. User interaction</a></span></dt>
-<dt><span class="sect2"><a href="#handling-licenses">16.5.2. Handling licenses</a></span></dt>
-<dt><span class="sect2"><a href="#installing-score-files">16.5.3. Installing score files</a></span></dt>
-<dt><span class="sect2"><a href="#perl-scripts">16.5.4. Packages containing perl scripts</a></span></dt>
-<dt><span class="sect2"><a href="#hardcoded-paths">16.5.5. Packages with hardcoded paths to other interpreters</a></span></dt>
-<dt><span class="sect2"><a href="#perl-modules">16.5.6. Packages installing perl modules</a></span></dt>
-<dt><span class="sect2"><a href="#faq.info-files">16.5.7. Packages installing info files</a></span></dt>
-<dt><span class="sect2"><a href="#manpages">16.5.8. Packages installing man pages</a></span></dt>
-<dt><span class="sect2"><a href="#gconf2-data-files">16.5.9. Packages installing GConf2 data files</a></span></dt>
-<dt><span class="sect2"><a href="#scrollkeeper-data-files">16.5.10. Packages installing scrollkeeper data files</a></span></dt>
-<dt><span class="sect2"><a href="#x11-fonts">16.5.11. Packages installing X11 fonts</a></span></dt>
-<dt><span class="sect2"><a href="#gtk2-modules">16.5.12. Packages installing GTK2 modules</a></span></dt>
-<dt><span class="sect2"><a href="#sgml-xml-data">16.5.13. Packages installing SGML or XML data</a></span></dt>
-<dt><span class="sect2"><a href="#mime-database">16.5.14. Packages installing extensions to the MIME database</a></span></dt>
-<dt><span class="sect2"><a href="#intltool">16.5.15. Packages using intltool</a></span></dt>
-<dt><span class="sect2"><a href="#startup-scripts">16.5.16. Packages installing startup scripts</a></span></dt>
-<dt><span class="sect2"><a href="#tex-packages">16.5.17. Packages installing TeX modules</a></span></dt>
+<dt><span class="sect2"><a href="#installing-score-files">17.6.1. Installing score files</a></span></dt>
+<dt><span class="sect2"><a href="#perl-scripts">17.6.2. Packages containing perl scripts</a></span></dt>
+<dt><span class="sect2"><a href="#hardcoded-paths">17.6.3. Packages with hardcoded paths to other interpreters</a></span></dt>
+<dt><span class="sect2"><a href="#perl-modules">17.6.4. Packages installing perl modules</a></span></dt>
+<dt><span class="sect2"><a href="#faq.info-files">17.6.5. Packages installing info files</a></span></dt>
+<dt><span class="sect2"><a href="#manpages">17.6.6. Packages installing man pages</a></span></dt>
+<dt><span class="sect2"><a href="#gconf2-data-files">17.6.7. Packages installing GConf2 data files</a></span></dt>
+<dt><span class="sect2"><a href="#scrollkeeper-data-files">17.6.8. Packages installing scrollkeeper data files</a></span></dt>
+<dt><span class="sect2"><a href="#x11-fonts">17.6.9. Packages installing X11 fonts</a></span></dt>
+<dt><span class="sect2"><a href="#gtk2-modules">17.6.10. Packages installing GTK2 modules</a></span></dt>
+<dt><span class="sect2"><a href="#sgml-xml-data">17.6.11. Packages installing SGML or XML data</a></span></dt>
+<dt><span class="sect2"><a href="#mime-database">17.6.12. Packages installing extensions to the MIME database</a></span></dt>
+<dt><span class="sect2"><a href="#intltool">17.6.13. Packages using intltool</a></span></dt>
+<dt><span class="sect2"><a href="#startup-scripts">17.6.14. Packages installing startup scripts</a></span></dt>
+<dt><span class="sect2"><a href="#tex-packages">17.6.15. Packages installing TeX modules</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#feedback-to-author">16.6. Feedback to the author</a></span></dt>
+<dt><span class="sect1"><a href="#feedback-to-author">17.7. Feedback to the author</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#debug">17. Debugging</a></span></dt>
-<dt><span class="chapter"><a href="#submit">18. Submitting and Committing</a></span></dt>
+<dt><span class="chapter"><a href="#debug">18. Debugging</a></span></dt>
+<dt><span class="chapter"><a href="#submit">19. Submitting and Committing</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#submitting-binary-packages">18.1. Submitting binary packages</a></span></dt>
-<dt><span class="sect1"><a href="#submitting-your-package">18.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
-<dt><span class="sect1"><a href="#general-notes-for-changes">18.3. General notes when adding, updating, or removing packages</a></span></dt>
-<dt><span class="sect1"><a href="#committing-importing">18.4. Committing: Importing a package into CVS</a></span></dt>
-<dt><span class="sect1"><a href="#updating-package">18.5. Updating a package to a newer version</a></span></dt>
-<dt><span class="sect1"><a href="#moving-package">18.6. Moving a package in pkgsrc</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-binary-packages">19.1. Submitting binary packages</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-your-package">19.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
+<dt><span class="sect1"><a href="#general-notes-for-changes">19.3. General notes when adding, updating, or removing packages</a></span></dt>
+<dt><span class="sect1"><a href="#committing-importing">19.4. Committing: Importing a package into CVS</a></span></dt>
+<dt><span class="sect1"><a href="#updating-package">19.5. Updating a package to a newer version</a></span></dt>
+<dt><span class="sect1"><a href="#moving-package">19.6. Moving a package in pkgsrc</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#devfaq">19. Frequently Asked Questions</a></span></dt>
+<dt><span class="chapter"><a href="#devfaq">20. Frequently Asked Questions</a></span></dt>
</dl></dd>
<dt><span class="part"><a href="#infrastructure">III. The pkgsrc infrastructure internals</a></span></dt>
<dd><dl>
-<dt><span class="chapter"><a href="#infr.design">20. Design of the pkgsrc infrastructure</a></span></dt>
+<dt><span class="chapter"><a href="#infr.design">21. Design of the pkgsrc infrastructure</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#infr.var">20.1. Variable evaluation</a></span></dt>
+<dt><span class="sect1"><a href="#infr.var">21.1. Variable evaluation</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.var.load">20.1.1. At load time</a></span></dt>
-<dt><span class="sect2"><a href="#infr.var.run">20.1.2. At runtime</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.load">21.1.1. At load time</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.run">21.1.2. At runtime</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#infr.design.intf">20.2. Designing interfaces for Makefile fragments</a></span></dt>
+<dt><span class="sect1"><a href="#infr.design.intf">21.2. Designing interfaces for Makefile fragments</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.design.intf.proc">20.2.1. Procedures with parameters</a></span></dt>
-<dt><span class="sect2"><a href="#infr.design.intf.action">20.2.2. Actions taken on behalf of parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.proc">21.2.1. Procedures with parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.action">21.2.2. Actions taken on behalf of parameters</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#regression">21. Regression tests</a></span></dt>
+<dt><span class="chapter"><a href="#regression">22. Regression tests</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#regression.descr">21.1. The regression tests framework</a></span></dt>
-<dt><span class="sect1"><a href="#regression.run">21.2. Running the regression tests</a></span></dt>
-<dt><span class="sect1"><a href="#regression.new">21.3. Adding a new regression test</a></span></dt>
+<dt><span class="sect1"><a href="#regression.descr">22.1. The regression tests framework</a></span></dt>
+<dt><span class="sect1"><a href="#regression.run">22.2. Running the regression tests</a></span></dt>
+<dt><span class="sect1"><a href="#regression.new">22.3. Adding a new regression test</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#regression.fun.override">21.3.1. Overridable functions</a></span></dt>
-<dt><span class="sect2"><a href="#regression.fun.helper">21.3.2. Helper functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.override">22.3.1. Overridable functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.helper">22.3.2. Helper functions</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#porting">22. Porting pkgsrc</a></span></dt>
+<dt><span class="chapter"><a href="#porting">23. Porting pkgsrc</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#porting.opsys">22.1. Porting pkgsrc to a new operating system</a></span></dt>
-<dt><span class="sect1"><a href="#porting.compiler">22.2. Adding support for a new compiler</a></span></dt>
+<dt><span class="sect1"><a href="#porting.opsys">23.1. Porting pkgsrc to a new operating system</a></span></dt>
+<dt><span class="sect1"><a href="#porting.compiler">23.2. Adding support for a new compiler</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="appendix"><a href="#examples">A. A simple example package: bison</a></span></dt>
@@ -770,10 +770,13 @@ source packages</a></span></dt>
<a name="uptodate-tar"></a>2.2.1. Via tar files</h3></div></div></div>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
-<p>Updating from tar file cannot detect or preserve
- any changes you have done to your local copy of pkgsrc.
- Therefore updating via CVS is strongly
- recommended.</p>
+<p>When updating from a tar file, you first need to
+ completely remove the old pkgsrc directory. Otherwise those
+ files that have been removed from pkgsrc in the mean time will
+ not be removed on your local disk, resulting in inconsistencies.
+ When removing the old files, any changes that you have done to
+ the pkgsrc files will be lost after updating. Therefore updating
+ via CVS is strongly recommended.</p>
</div>
<p>To update pkgsrc from a tar file, download the tar file as
explained above. Then, make sure that you have not made any
@@ -786,11 +789,7 @@ source packages</a></span></dt>
<p>To update pkgsrc via CVS, make sure the environment
variable <code class="varname">CVS_RSH</code> is set as above. Then,
change to the pkgsrc directory and run <span><strong class="command">cvs -q update
- -dP</strong></span>. The &#8220;<span class="quote">-q</span>&#8221; option tells cvs to only
- report those files that have changed. The &#8220;<span class="quote">-d</span>&#8221;
- option fetches new packages (which is curiously not done by
- default), and the &#8220;<span class="quote">-P</span>&#8221; option removes empty
- directories after everything has been updated.</p>
+ -dP</strong></span>.</p>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="uptodate-cvs-switch"></a>2.2.2.1. Switching between different pkgsrc branches</h4></div></div></div>
@@ -1817,7 +1816,7 @@ source packages</a></span></dt>
pkgsrc tree instances.)</p></li>
<li><p><code class="varname">LOCALPATCHES</code>:
Directory for local patches that aren't part of pkgsrc.
- See <a href="#components.patches" title="8.3. patches/*">Section 8.3, &#8220;patches/*&#8221;</a> for more
+ See <a href="#components.patches" title="9.3. patches/*">Section 9.3, &#8220;patches/*&#8221;</a> for more
information. <em class="replaceable"><code>rel</code></em> and
<em class="replaceable"><code>arch</code></em> are replaced with OS
release (&#8220;<span class="quote">2.0</span>&#8221;, etc.) and architecture
@@ -1992,13 +1991,13 @@ PKG_OPTIONS.apache= suexec </pre>
gzipped tar file. See <a href="#logs.package" title="B.2. Packaging figlet">Section B.2, &#8220;Packaging figlet&#8221;</a> for a
continuation of the above <a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/misc/figlet/README.html" target="_top"><code class="filename">misc/figlet</code></a> example.</p>
<p>
- See <a href="#submit" title="Chapter 18. Submitting and Committing">Chapter 18, <i>Submitting and Committing</i></a> for information on how to submit
+ See <a href="#submit" title="Chapter 19. Submitting and Committing">Chapter 19, <i>Submitting and Committing</i></a> for information on how to submit
such a binary package.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="settings-for-creationg-of-binary-packages"></a>6.2. Settings for creation of binary packages</h2></div></div></div>
-<p>See <a href="#build.helpful-targets" title="14.16. Other helpful targets">Section 14.16, &#8220;Other helpful targets&#8221;</a>.</p>
+<p>See <a href="#build.helpful-targets" title="15.16. Other helpful targets">Section 15.16, &#8220;Other helpful targets&#8221;</a>.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -2907,191 +2906,282 @@ a security check before building any package. See
<div class="part" lang="en">
<div class="titlepage"><div><div><h1 class="title">
<a name="developers-guide"></a>Part II. The pkgsrc developer's guide</h1></div></div></div>
+<div class="partintro" lang="en">
+<div></div>
+<p>This part of the book deals with creating and
+ modifying packages. It starts with a &#8220;<span class="quote">HOWTO</span>&#8221;-like
+ guide on creating a new package. The remaining chapters are more
+ like a reference manual for pkgsrc.</p>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="chapter"><a href="#components">8. Package components - files, directories and contents</a></span></dt>
+<dt><span class="chapter"><a href="#creating">8. Creating a new pkgsrc package from scratch</a></span></dt>
+<dt><span class="chapter"><a href="#components">9. Package components - files, directories and contents</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#components.Makefile">8.1. <code class="filename">Makefile</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.distinfo">8.2. <code class="filename">distinfo</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.patches">8.3. patches/*</a></span></dt>
-<dt><span class="sect1"><a href="#other-mandatory-files">8.4. Other mandatory files</a></span></dt>
-<dt><span class="sect1"><a href="#components.optional">8.5. Optional files</a></span></dt>
-<dt><span class="sect1"><a href="#work-dir">8.6. <code class="filename">work*</code></a></span></dt>
-<dt><span class="sect1"><a href="#files-dir">8.7. <code class="filename">files/*</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.Makefile">9.1. <code class="filename">Makefile</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.distinfo">9.2. <code class="filename">distinfo</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.patches">9.3. patches/*</a></span></dt>
+<dt><span class="sect1"><a href="#other-mandatory-files">9.4. Other mandatory files</a></span></dt>
+<dt><span class="sect1"><a href="#components.optional">9.5. Optional files</a></span></dt>
+<dt><span class="sect1"><a href="#work-dir">9.6. <code class="filename">work*</code></a></span></dt>
+<dt><span class="sect1"><a href="#files-dir">9.7. <code class="filename">files/*</code></a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#makefile">9. Programming in <code class="filename">Makefile</code>s</a></span></dt>
+<dt><span class="chapter"><a href="#makefile">10. Programming in <code class="filename">Makefile</code>s</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#makefile.variables">9.1. <code class="filename">Makefile</code> variables</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">9.1.1. Naming conventions</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#makefile.code">9.2. Code snippets</a></span></dt>
+<dt><span class="sect1"><a href="#makefile.variables">10.1. <code class="filename">Makefile</code> variables</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">10.1.1. Naming conventions</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#makefile.code">10.2. Code snippets</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#adding-to-list">9.2.1. Adding things to a list</a></span></dt>
-<dt><span class="sect2"><a href="#converting-internal-to-external">9.2.2. Converting an internal list into an external list</a></span></dt>
-<dt><span class="sect2"><a href="#passing-variable-to-shell">9.2.3. Passing variables to a shell command</a></span></dt>
-<dt><span class="sect2"><a href="#quoting-guideline">9.2.4. Quoting guideline</a></span></dt>
-<dt><span class="sect2"><a href="#bsd-make-bug-workaround">9.2.5. Workaround for a bug in BSD Make</a></span></dt>
+<dt><span class="sect2"><a href="#adding-to-list">10.2.1. Adding things to a list</a></span></dt>
+<dt><span class="sect2"><a href="#converting-internal-to-external">10.2.2. Converting an internal list into an external list</a></span></dt>
+<dt><span class="sect2"><a href="#passing-variable-to-shell">10.2.3. Passing variables to a shell command</a></span></dt>
+<dt><span class="sect2"><a href="#quoting-guideline">10.2.4. Quoting guideline</a></span></dt>
+<dt><span class="sect2"><a href="#bsd-make-bug-workaround">10.2.5. Workaround for a bug in BSD Make</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#plist">10. PLIST issues</a></span></dt>
+<dt><span class="chapter"><a href="#plist">11. PLIST issues</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#rcs-id">10.1. RCS ID</a></span></dt>
-<dt><span class="sect1"><a href="#automatic-plist-generation">10.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
-<dt><span class="sect1"><a href="#print-PLIST">10.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
-<dt><span class="sect1"><a href="#plist.misc">10.4. Variable substitution in PLIST</a></span></dt>
-<dt><span class="sect1"><a href="#manpage-compression">10.5. Man page compression</a></span></dt>
-<dt><span class="sect1"><a href="#using-PLIST_SRC">10.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
-<dt><span class="sect1"><a href="#platform-specific-plist">10.7. Platform-specific and differing PLISTs</a></span></dt>
-<dt><span class="sect1"><a href="#faq.common-dirs">10.8. Sharing directories between packages</a></span></dt>
+<dt><span class="sect1"><a href="#rcs-id">11.1. RCS ID</a></span></dt>
+<dt><span class="sect1"><a href="#automatic-plist-generation">11.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
+<dt><span class="sect1"><a href="#print-PLIST">11.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
+<dt><span class="sect1"><a href="#plist.misc">11.4. Variable substitution in PLIST</a></span></dt>
+<dt><span class="sect1"><a href="#manpage-compression">11.5. Man page compression</a></span></dt>
+<dt><span class="sect1"><a href="#using-PLIST_SRC">11.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
+<dt><span class="sect1"><a href="#platform-specific-plist">11.7. Platform-specific and differing PLISTs</a></span></dt>
+<dt><span class="sect1"><a href="#faq.common-dirs">11.8. Sharing directories between packages</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#buildlink">11. Buildlink methodology</a></span></dt>
+<dt><span class="chapter"><a href="#buildlink">12. Buildlink methodology</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#converting-to-buildlink3">11.1. Converting packages to use buildlink3</a></span></dt>
-<dt><span class="sect1"><a href="#creating-buildlink3.mk">11.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-buildlink3">12.1. Converting packages to use buildlink3</a></span></dt>
+<dt><span class="sect1"><a href="#creating-buildlink3.mk">12.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-bl3">11.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
-<dt><span class="sect2"><a href="#updating-buildlink-depends">11.2.2. Updating <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> in <code class="filename">buildlink3.mk</code> files</a></span></dt>
+<dt><span class="sect2"><a href="#anatomy-of-bl3">12.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
+<dt><span class="sect2"><a href="#updating-buildlink-depends">12.2.2. Updating <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> in <code class="filename">buildlink3.mk</code> files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#writing-builtin.mk">11.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#writing-builtin.mk">12.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">11.3.1. Anatomy of a <code class="filename">builtin.mk</code> file</a></span></dt>
-<dt><span class="sect2"><a href="#native-or-pkgsrc-preference">11.3.2. Global preferences for native or pkgsrc software</a></span></dt>
+<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">12.3.1. Anatomy of a <code class="filename">builtin.mk</code> file</a></span></dt>
+<dt><span class="sect2"><a href="#native-or-pkgsrc-preference">12.3.2. Global preferences for native or pkgsrc software</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#pkginstall">12. The pkginstall framework</a></span></dt>
+<dt><span class="chapter"><a href="#pkginstall">13. The pkginstall framework</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">12.1. Files and directories outside the installation prefix</a></span></dt>
+<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">13.1. Files and directories outside the installation prefix</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#dirs-outside-prefix">12.1.1. Directory manipulation</a></span></dt>
-<dt><span class="sect2"><a href="#files-outside-prefix">12.1.2. File manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#dirs-outside-prefix">13.1.1. Directory manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#files-outside-prefix">13.1.2. File manipulation</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#conf-files">12.2. Configuration files</a></span></dt>
+<dt><span class="sect1"><a href="#conf-files">13.2. Configuration files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#conf-files-sysconfdir">12.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-configure">12.2.2. Telling the software where configuration files are</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-patching">12.2.3. Patching installations</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-disable">12.2.4. Disabling handling of configuration files</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-sysconfdir">13.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-configure">13.2.2. Telling the software where configuration files are</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-patching">13.2.3. Patching installations</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-disable">13.2.4. Disabling handling of configuration files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#rcd-scripts">12.3. System startup scripts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">12.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#users-and-groups">12.4. System users and groups</a></span></dt>
-<dt><span class="sect1"><a href="#shells">12.5. System shells</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#shells-disable">12.5.1. Disabling shell registration</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#fonts">12.6. Fonts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#fonts-disable">12.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#rcd-scripts">13.3. System startup scripts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">13.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#users-and-groups">13.4. System users and groups</a></span></dt>
+<dt><span class="sect1"><a href="#shells">13.5. System shells</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#shells-disable">13.5.1. Disabling shell registration</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#fonts">13.6. Fonts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#fonts-disable">13.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#options">13. Options handling</a></span></dt>
+<dt><span class="chapter"><a href="#options">14. Options handling</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#global-default-options">13.1. Global default options</a></span></dt>
-<dt><span class="sect1"><a href="#converting-to-options">13.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
-<dt><span class="sect1"><a href="#option-names">13.3. Option Names</a></span></dt>
+<dt><span class="sect1"><a href="#global-default-options">14.1. Global default options</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-options">14.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
+<dt><span class="sect1"><a href="#option-names">14.3. Option Names</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#build">14. The build process</a></span></dt>
+<dt><span class="chapter"><a href="#build">15. The build process</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#build.intro">14.1. Introduction</a></span></dt>
-<dt><span class="sect1"><a href="#build.prefix">14.2. Program location</a></span></dt>
-<dt><span class="sect1"><a href="#build.builddirs">14.3. Directories used during the build process</a></span></dt>
-<dt><span class="sect1"><a href="#build.running">14.4. Running a phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.fetch">14.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.checksum">14.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.extract">14.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.patch">14.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.tools">14.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.wrapper">14.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.configure">14.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.build">14.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.test">14.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.install">14.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.package">14.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.helpful-targets">14.16. Other helpful targets</a></span></dt>
+<dt><span class="sect1"><a href="#build.intro">15.1. Introduction</a></span></dt>
+<dt><span class="sect1"><a href="#build.prefix">15.2. Program location</a></span></dt>
+<dt><span class="sect1"><a href="#build.builddirs">15.3. Directories used during the build process</a></span></dt>
+<dt><span class="sect1"><a href="#build.running">15.4. Running a phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.fetch">15.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.checksum">15.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.extract">15.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.patch">15.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.tools">15.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.wrapper">15.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.configure">15.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.build">15.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.test">15.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.install">15.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.package">15.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.helpful-targets">15.16. Other helpful targets</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#tools">15. Tools needed for building or running</a></span></dt>
+<dt><span class="chapter"><a href="#tools">16. Tools needed for building or running</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#pkgsrc-tools">15.1. Tools for pkgsrc builds</a></span></dt>
-<dt><span class="sect1"><a href="#package-tools">15.2. Tools needed by packages</a></span></dt>
-<dt><span class="sect1"><a href="#platform-tools">15.3. Tools provided by platforms</a></span></dt>
+<dt><span class="sect1"><a href="#pkgsrc-tools">16.1. Tools for pkgsrc builds</a></span></dt>
+<dt><span class="sect1"><a href="#package-tools">16.2. Tools needed by packages</a></span></dt>
+<dt><span class="sect1"><a href="#platform-tools">16.3. Tools provided by platforms</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#fixes">16. Making your package work</a></span></dt>
+<dt><span class="chapter"><a href="#fixes">17. Making your package work</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#general-operation">16.1. General operation</a></span></dt>
+<dt><span class="sect1"><a href="#general-operation">17.1. General operation</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">16.1.1. How to pull in variables from /etc/mk.conf</a></span></dt>
-<dt><span class="sect2"><a href="#where-to-install-documentation">16.1.2. Where to install documentation</a></span></dt>
-<dt><span class="sect2"><a href="#restricted-packages">16.1.3. Restricted packages</a></span></dt>
-<dt><span class="sect2"><a href="#dependencies">16.1.4. Handling dependencies</a></span></dt>
-<dt><span class="sect2"><a href="#conflicts">16.1.5. Handling conflicts with other packages</a></span></dt>
-<dt><span class="sect2"><a href="#not-building-packages">16.1.6. Packages that cannot or should not be built</a></span></dt>
-<dt><span class="sect2"><a href="#undeletable-packages">16.1.7. Packages which should not be deleted, once installed</a></span></dt>
-<dt><span class="sect2"><a href="#security-handling">16.1.8. Handling packages with security problems</a></span></dt>
-<dt><span class="sect2"><a href="#compiler-bugs">16.1.9. How to handle compiler bugs</a></span></dt>
-<dt><span class="sect2"><a href="#bumping-pkgrevision">16.1.10. How to handle incrementing versions when fixing an existing package</a></span></dt>
-<dt><span class="sect2"><a href="#portability-of-packages">16.1.11. Portability of packages</a></span></dt>
+<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">17.1.1. How to pull in variables from /etc/mk.conf</a></span></dt>
+<dt><span class="sect2"><a href="#where-to-install-documentation">17.1.2. Where to install documentation</a></span></dt>
+<dt><span class="sect2"><a href="#restricted-packages">17.1.3. Restricted packages</a></span></dt>
+<dt><span class="sect2"><a href="#dependencies">17.1.4. Handling dependencies</a></span></dt>
+<dt><span class="sect2"><a href="#conflicts">17.1.5. Handling conflicts with other packages</a></span></dt>
+<dt><span class="sect2"><a href="#not-building-packages">17.1.6. Packages that cannot or should not be built</a></span></dt>
+<dt><span class="sect2"><a href="#undeletable-packages">17.1.7. Packages which should not be deleted, once installed</a></span></dt>
+<dt><span class="sect2"><a href="#security-handling">17.1.8. Handling packages with security problems</a></span></dt>
+<dt><span class="sect2"><a href="#compiler-bugs">17.1.9. How to handle compiler bugs</a></span></dt>
+<dt><span class="sect2"><a href="#bumping-pkgrevision">17.1.10. How to handle incrementing versions when fixing an existing package</a></span></dt>
+<dt><span class="sect2"><a href="#portability-of-packages">17.1.11. Portability of packages</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#downloading-issues">16.2. Possible downloading issues</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.fetch">17.2. Fixing problems in the <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#no-plain-download">16.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
-<dt><span class="sect2"><a href="#modified-distfiles-same-name">16.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
+<dt><span class="sect2"><a href="#no-plain-download">17.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
+<dt><span class="sect2"><a href="#modified-distfiles-same-name">17.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#configuration-gotchas">16.3. Configuration gotchas</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.configure">17.3. Fixing problems in the <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#fixes.libtool">16.3.1. Shared libraries - libtool</a></span></dt>
-<dt><span class="sect2"><a href="#using-libtool">16.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
-<dt><span class="sect2"><a href="#autoconf-automake">16.3.3. GNU Autoconf/Automake</a></span></dt>
+<dt><span class="sect2"><a href="#fixes.libtool">17.3.1. Shared libraries - libtool</a></span></dt>
+<dt><span class="sect2"><a href="#using-libtool">17.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
+<dt><span class="sect2"><a href="#autoconf-automake">17.3.3. GNU Autoconf/Automake</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#fixes-build">16.4. Building the package</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.build">17.4. Fixing problems in the <span class="emphasis"><em>build</em></span> phase</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#fixes.build.cpp">17.4.1. Compiling C and C++ code conditionally</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#package-specific-actions">17.5. Package specific actions</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#cpp-defines">16.4.1. CPP defines</a></span></dt>
-<dt><span class="sect2"><a href="#cpp-list-examples">16.4.2. Examples of CPP defines for some platforms</a></span></dt>
-<dt><span class="sect2"><a href="#cpp-list">16.4.3. Getting a list of CPP defines</a></span></dt>
+<dt><span class="sect2"><a href="#user-interaction">17.5.1. User interaction</a></span></dt>
+<dt><span class="sect2"><a href="#handling-licenses">17.5.2. Handling licenses</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#package-specific-actions">16.5. Package specific actions</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.install">17.6. Fixing problems in the <span class="emphasis"><em>install</em></span> phase</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#user-interaction">16.5.1. User interaction</a></span></dt>
-<dt><span class="sect2"><a href="#handling-licenses">16.5.2. Handling licenses</a></span></dt>
-<dt><span class="sect2"><a href="#installing-score-files">16.5.3. Installing score files</a></span></dt>
-<dt><span class="sect2"><a href="#perl-scripts">16.5.4. Packages containing perl scripts</a></span></dt>
-<dt><span class="sect2"><a href="#hardcoded-paths">16.5.5. Packages with hardcoded paths to other interpreters</a></span></dt>
-<dt><span class="sect2"><a href="#perl-modules">16.5.6. Packages installing perl modules</a></span></dt>
-<dt><span class="sect2"><a href="#faq.info-files">16.5.7. Packages installing info files</a></span></dt>
-<dt><span class="sect2"><a href="#manpages">16.5.8. Packages installing man pages</a></span></dt>
-<dt><span class="sect2"><a href="#gconf2-data-files">16.5.9. Packages installing GConf2 data files</a></span></dt>
-<dt><span class="sect2"><a href="#scrollkeeper-data-files">16.5.10. Packages installing scrollkeeper data files</a></span></dt>
-<dt><span class="sect2"><a href="#x11-fonts">16.5.11. Packages installing X11 fonts</a></span></dt>
-<dt><span class="sect2"><a href="#gtk2-modules">16.5.12. Packages installing GTK2 modules</a></span></dt>
-<dt><span class="sect2"><a href="#sgml-xml-data">16.5.13. Packages installing SGML or XML data</a></span></dt>
-<dt><span class="sect2"><a href="#mime-database">16.5.14. Packages installing extensions to the MIME database</a></span></dt>
-<dt><span class="sect2"><a href="#intltool">16.5.15. Packages using intltool</a></span></dt>
-<dt><span class="sect2"><a href="#startup-scripts">16.5.16. Packages installing startup scripts</a></span></dt>
-<dt><span class="sect2"><a href="#tex-packages">16.5.17. Packages installing TeX modules</a></span></dt>
+<dt><span class="sect2"><a href="#installing-score-files">17.6.1. Installing score files</a></span></dt>
+<dt><span class="sect2"><a href="#perl-scripts">17.6.2. Packages containing perl scripts</a></span></dt>
+<dt><span class="sect2"><a href="#hardcoded-paths">17.6.3. Packages with hardcoded paths to other interpreters</a></span></dt>
+<dt><span class="sect2"><a href="#perl-modules">17.6.4. Packages installing perl modules</a></span></dt>
+<dt><span class="sect2"><a href="#faq.info-files">17.6.5. Packages installing info files</a></span></dt>
+<dt><span class="sect2"><a href="#manpages">17.6.6. Packages installing man pages</a></span></dt>
+<dt><span class="sect2"><a href="#gconf2-data-files">17.6.7. Packages installing GConf2 data files</a></span></dt>
+<dt><span class="sect2"><a href="#scrollkeeper-data-files">17.6.8. Packages installing scrollkeeper data files</a></span></dt>
+<dt><span class="sect2"><a href="#x11-fonts">17.6.9. Packages installing X11 fonts</a></span></dt>
+<dt><span class="sect2"><a href="#gtk2-modules">17.6.10. Packages installing GTK2 modules</a></span></dt>
+<dt><span class="sect2"><a href="#sgml-xml-data">17.6.11. Packages installing SGML or XML data</a></span></dt>
+<dt><span class="sect2"><a href="#mime-database">17.6.12. Packages installing extensions to the MIME database</a></span></dt>
+<dt><span class="sect2"><a href="#intltool">17.6.13. Packages using intltool</a></span></dt>
+<dt><span class="sect2"><a href="#startup-scripts">17.6.14. Packages installing startup scripts</a></span></dt>
+<dt><span class="sect2"><a href="#tex-packages">17.6.15. Packages installing TeX modules</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#feedback-to-author">16.6. Feedback to the author</a></span></dt>
+<dt><span class="sect1"><a href="#feedback-to-author">17.7. Feedback to the author</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#debug">17. Debugging</a></span></dt>
-<dt><span class="chapter"><a href="#submit">18. Submitting and Committing</a></span></dt>
+<dt><span class="chapter"><a href="#debug">18. Debugging</a></span></dt>
+<dt><span class="chapter"><a href="#submit">19. Submitting and Committing</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#submitting-binary-packages">18.1. Submitting binary packages</a></span></dt>
-<dt><span class="sect1"><a href="#submitting-your-package">18.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
-<dt><span class="sect1"><a href="#general-notes-for-changes">18.3. General notes when adding, updating, or removing packages</a></span></dt>
-<dt><span class="sect1"><a href="#committing-importing">18.4. Committing: Importing a package into CVS</a></span></dt>
-<dt><span class="sect1"><a href="#updating-package">18.5. Updating a package to a newer version</a></span></dt>
-<dt><span class="sect1"><a href="#moving-package">18.6. Moving a package in pkgsrc</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-binary-packages">19.1. Submitting binary packages</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-your-package">19.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
+<dt><span class="sect1"><a href="#general-notes-for-changes">19.3. General notes when adding, updating, or removing packages</a></span></dt>
+<dt><span class="sect1"><a href="#committing-importing">19.4. Committing: Importing a package into CVS</a></span></dt>
+<dt><span class="sect1"><a href="#updating-package">19.5. Updating a package to a newer version</a></span></dt>
+<dt><span class="sect1"><a href="#moving-package">19.6. Moving a package in pkgsrc</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#devfaq">19. Frequently Asked Questions</a></span></dt>
+<dt><span class="chapter"><a href="#devfaq">20. Frequently Asked Questions</a></span></dt>
</dl>
</div>
+</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="components"></a>Chapter 8. Package components - files, directories and contents</h2></div></div></div>
+<a name="creating"></a>Chapter 8. Creating a new pkgsrc package from scratch</h2></div></div></div>
+<p>When you find a package that is not yet in pkgsrc, you
+ most likely have a URL from where you can download the source
+ code. Starting with this URL, creating a package involves only a
+ few steps.</p>
+<div class="procedure"><ol type="1">
+<li><p>First, install the packages <a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/url2pkg/README.html" target="_top"><code class="filename">pkgtools/url2pkg</code></a> and <a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>.</p></li>
+<li><p>Then, choose one of the top-level directories as the
+ category in which you want to place your package. You can also
+ create a directory of your own (maybe called
+ <code class="filename">local</code>). In that category directory, create
+ another directory for your package and change into
+ it.</p></li>
+<li><p>Run the program <span><strong class="command">url2pkg</strong></span>, which
+ will ask you for a URL. Enter the URL of the distribution file
+ (in most cases a <code class="filename">.tar.gz</code> file) and watch
+ how the basic ingredients of your package are created
+ automatically. The distribution file is extracted automatically
+ to fill in some details in the <code class="filename">Makefile</code>
+ that would otherwise have to be done manually.</p></li>
+<li>
+<p>Examine the extracted files to determine the
+ dependencies of your package. Ideally, this is mentioned in some
+ <code class="filename">README</code> file, but things may differ. For
+ each of these dependencies, look where it exists in pkgsrc, and
+ if there is a file called <code class="filename">buildlink3.mk</code> in
+ that directory, add a line to your package
+ <code class="filename">Makefile</code> which includes that file just
+ before the last line. If the <code class="filename">buildlink3.mk</code>
+ file does not exist, add a <code class="varname">DEPENDS</code> line to
+ the Makefile, which specifies the version of the dependency and
+ where it can be found in pkgsrc. This line should be placed in
+ the third paragraph. If the dependency is only needed for
+ building the package, but not when using it, use
+ <code class="varname">BUILD_DEPENDS</code> instead of
+ <code class="varname">DEPENDS</code>. Your package may then look like
+ this:</p>
+<pre class="programlisting">
+ [...]
+
+ BUILD_DEPENDS+= lua&gt;=5.0:../../lang/lua
+ DEPENDS+= screen-[0-9]*:../../misc/screen
+ DEPENDS+= screen&gt;=4.0:../../misc/screen
+
+ [...]
+
+ .include "../../<em class="replaceable"><code>category</code></em>/<em class="replaceable"><code>package</code></em>/buildlink3.mk"
+ .include "../../devel/glib2/buildlink3.mk"
+ .include "../../mk/bsd.pkg.mk"
+</pre>
+</li>
+<li><p>Run <span><strong class="command">pkglint</strong></span> to see what things
+ still need to be done to make your package a &#8220;<span class="quote">good</span>&#8221;
+ one. If you don't know what pkglint's warnings want to tell you,
+ try <span><strong class="command">pkglint --explain</strong></span> or <span><strong class="command">pkglint
+ -e</strong></span>, which outputs additional
+ explanations.</p></li>
+<li><p>Now, run <span><strong class="command">bmake</strong></span> to build the
+ package. For the various things that can go wrong in this phase,
+ consult <a href="#fixes" title="Chapter 17. Making your package work">Chapter 17, <i>Making your package work</i></a>.</p></li>
+<li><p>When the package builds fine, the next step is to
+ install the package. Run <span><strong class="command">bmake install</strong></span> and
+ hope that everything works.</p></li>
+<li><p>Up to now, the file <code class="filename">PLIST</code>,
+ which contains a list of the files that are installed by the
+ package, is nearly empty. Run <span><strong class="command">bmake print-PLIST
+ &gt;PLIST</strong></span> to generate a probably correct list. Check
+ the file using your preferred text editor to see if the list of
+ files looks plausible.</p></li>
+<li><p>Run <span><strong class="command">pkglint</strong></span> again to see if the
+ generated <code class="filename">PLIST</code> contains garbage or
+ not.</p></li>
+<li><p>When you ran <span><strong class="command">bmake install</strong></span>, the
+ package has been registered in the database of installed files,
+ but with an empty list of files. To fix this, run <span><strong class="command">bmake
+ deinstall</strong></span> and <span><strong class="command">bmake install</strong></span> again.
+ Now the package is registered with the list of files from
+ <code class="filename">PLIST</code>.</p></li>
+<li><p>Run <span><strong class="command">bmake package</strong></span> to create a
+ binary package from the set of installed files.</p></li>
+</ol></div>
+</div>
+<div class="chapter" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="components"></a>Chapter 9. Package components - files, directories and contents</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#components.Makefile">8.1. <code class="filename">Makefile</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.distinfo">8.2. <code class="filename">distinfo</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.patches">8.3. patches/*</a></span></dt>
-<dt><span class="sect1"><a href="#other-mandatory-files">8.4. Other mandatory files</a></span></dt>
-<dt><span class="sect1"><a href="#components.optional">8.5. Optional files</a></span></dt>
-<dt><span class="sect1"><a href="#work-dir">8.6. <code class="filename">work*</code></a></span></dt>
-<dt><span class="sect1"><a href="#files-dir">8.7. <code class="filename">files/*</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.Makefile">9.1. <code class="filename">Makefile</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.distinfo">9.2. <code class="filename">distinfo</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.patches">9.3. patches/*</a></span></dt>
+<dt><span class="sect1"><a href="#other-mandatory-files">9.4. Other mandatory files</a></span></dt>
+<dt><span class="sect1"><a href="#components.optional">9.5. Optional files</a></span></dt>
+<dt><span class="sect1"><a href="#work-dir">9.6. <code class="filename">work*</code></a></span></dt>
+<dt><span class="sect1"><a href="#files-dir">9.7. <code class="filename">files/*</code></a></span></dt>
</dl>
</div>
<p> Whenever you're preparing a package, there are a number of
@@ -3099,7 +3189,7 @@ a security check before building any package. See
sections. </p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="components.Makefile"></a>8.1. <code class="filename">Makefile</code></h2></div></div></div>
+<a name="components.Makefile"></a>9.1. <code class="filename">Makefile</code></h2></div></div></div>
<p>Building, installation and creation of a binary package are all
controlled by the package's <code class="filename">Makefile</code>.
The <code class="filename">Makefile</code> describes various things about
@@ -3287,12 +3377,12 @@ a security check before building any package. See
<li><p>Replace <code class="filename">/usr/local</code> with
&#8220;<span class="quote">${PREFIX}</span>&#8221; in all files (see patches, below).</p></li>
<li><p>If the package installs any info files, see
- <a href="#faq.info-files" title="16.5.7. Packages installing info files">Section 16.5.7, &#8220;Packages installing info files&#8221;</a>.</p></li>
+ <a href="#faq.info-files" title="17.6.5. Packages installing info files">Section 17.6.5, &#8220;Packages installing info files&#8221;</a>.</p></li>
</ul></div>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="components.distinfo"></a>8.2. <code class="filename">distinfo</code></h2></div></div></div>
+<a name="components.distinfo"></a>9.2. <code class="filename">distinfo</code></h2></div></div></div>
<p>The <code class="filename">distinfo</code> file contains the message
digest, or checksum, of each distfile needed for the package. This
ensures that the distfiles retrieved from the Internet have not been
@@ -3302,7 +3392,7 @@ a security check before building any package. See
message digests, as well as the file size.</p>
<p>The <code class="filename">distinfo</code> file also contains the
checksums for all the patches found in the
- <code class="filename">patches</code> directory (see <a href="#components.patches" title="8.3. patches/*">Section 8.3, &#8220;patches/*&#8221;</a>).</p>
+ <code class="filename">patches</code> directory (see <a href="#components.patches" title="9.3. patches/*">Section 9.3, &#8220;patches/*&#8221;</a>).</p>
<p>To regenerate the <code class="filename">distinfo</code> file, use the
<span><strong class="command">make makedistinfo</strong></span> or <span><strong class="command">make mdi</strong></span>
command.</p>
@@ -3314,7 +3404,7 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="components.patches"></a>8.3. patches/*</h2></div></div></div>
+<a name="components.patches"></a>9.3. patches/*</h2></div></div></div>
<p>This directory contains files that are used by the
<a href="http://netbsd.gw.com/cgi-bin/man-cgi?patch+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span></a> command to
modify the sources as distributed in the distribution file into a form
@@ -3347,7 +3437,7 @@ a security check before building any package. See
previously existing one with <span><strong class="command">patchdiff</strong></span>.</p>
<p>When you have finished a package, remember to generate the checksums
for the patch files by using the <span><strong class="command">make makepatchsum</strong></span>
- command, see <a href="#components.distinfo" title="8.2. distinfo">Section 8.2, &#8220;<code class="filename">distinfo</code>&#8221;</a>.</p>
+ command, see <a href="#components.distinfo" title="9.2. distinfo">Section 9.2, &#8220;<code class="filename">distinfo</code>&#8221;</a>.</p>
<p>When adding a patch that corrects a problem in the distfile (rather
than e.g. enforcing pkgsrc's view of where man pages should go), send
the patch as a bug report to the maintainer. This benefits
@@ -3371,7 +3461,7 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="other-mandatory-files"></a>8.4. Other mandatory files</h2></div></div></div>
+<a name="other-mandatory-files"></a>9.4. Other mandatory files</h2></div></div></div>
<div class="variablelist"><dl>
<dt><span class="term"><code class="filename">DESCR</code></span></dt>
<dd><p>A multi-line description of the piece of software. This should include
@@ -3384,12 +3474,12 @@ a security check before building any package. See
binaries, manual pages, etc. There are other directives which may be
entered in this file, to control the creation and deletion of
directories, and the location of inserted files.
- See <a href="#plist" title="Chapter 10. PLIST issues">Chapter 10, <i>PLIST issues</i></a> for more information. </p></dd>
+ See <a href="#plist" title="Chapter 11. PLIST issues">Chapter 11, <i>PLIST issues</i></a> for more information. </p></dd>
</dl></div>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="components.optional"></a>8.5. Optional files</h2></div></div></div>
+<a name="components.optional"></a>9.5. Optional files</h2></div></div></div>
<div class="variablelist"><dl>
<dt><span class="term"><code class="filename">INSTALL</code></span></dt>
<dd><p>This shell script is invoked twice by <a href="http://netbsd.gw.com/cgi-bin/man-cgi?pkg_add+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">pkg_add</span>(1)</span></a>.
@@ -3425,7 +3515,7 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="work-dir"></a>8.6. <code class="filename">work*</code></h2></div></div></div>
+<a name="work-dir"></a>9.6. <code class="filename">work*</code></h2></div></div></div>
<p>When you type <span><strong class="command">make</strong></span>, the distribution files are
unpacked into the directory denoted by
<code class="varname">WRKDIR</code>. It can be removed by running
@@ -3438,7 +3528,7 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="files-dir"></a>8.7. <code class="filename">files/*</code></h2></div></div></div>
+<a name="files-dir"></a>9.7. <code class="filename">files/*</code></h2></div></div></div>
<p>If you have any files that you wish to be placed in the package prior
to configuration or building, you could place these files here and use
a &#8220;<span class="quote">${CP}</span>&#8221; command in the
@@ -3450,19 +3540,19 @@ a security check before building any package. See
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="makefile"></a>Chapter 9. Programming in <code class="filename">Makefile</code>s</h2></div></div></div>
+<a name="makefile"></a>Chapter 10. Programming in <code class="filename">Makefile</code>s</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#makefile.variables">9.1. <code class="filename">Makefile</code> variables</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">9.1.1. Naming conventions</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#makefile.code">9.2. Code snippets</a></span></dt>
+<dt><span class="sect1"><a href="#makefile.variables">10.1. <code class="filename">Makefile</code> variables</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">10.1.1. Naming conventions</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#makefile.code">10.2. Code snippets</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#adding-to-list">9.2.1. Adding things to a list</a></span></dt>
-<dt><span class="sect2"><a href="#converting-internal-to-external">9.2.2. Converting an internal list into an external list</a></span></dt>
-<dt><span class="sect2"><a href="#passing-variable-to-shell">9.2.3. Passing variables to a shell command</a></span></dt>
-<dt><span class="sect2"><a href="#quoting-guideline">9.2.4. Quoting guideline</a></span></dt>
-<dt><span class="sect2"><a href="#bsd-make-bug-workaround">9.2.5. Workaround for a bug in BSD Make</a></span></dt>
+<dt><span class="sect2"><a href="#adding-to-list">10.2.1. Adding things to a list</a></span></dt>
+<dt><span class="sect2"><a href="#converting-internal-to-external">10.2.2. Converting an internal list into an external list</a></span></dt>
+<dt><span class="sect2"><a href="#passing-variable-to-shell">10.2.3. Passing variables to a shell command</a></span></dt>
+<dt><span class="sect2"><a href="#quoting-guideline">10.2.4. Quoting guideline</a></span></dt>
+<dt><span class="sect2"><a href="#bsd-make-bug-workaround">10.2.5. Workaround for a bug in BSD Make</a></span></dt>
</dl></dd>
</dl>
</div>
@@ -3482,7 +3572,7 @@ a security check before building any package. See
with them.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="makefile.variables"></a>9.1. <code class="filename">Makefile</code> variables</h2></div></div></div>
+<a name="makefile.variables"></a>10.1. <code class="filename">Makefile</code> variables</h2></div></div></div>
<p><code class="filename">Makefile</code> variables contain strings that
can be processed using the five operators ``='', ``+='', ``?='',
``:='', and ``!='', which are described in the <a href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> man
@@ -3540,7 +3630,7 @@ a security check before building any package. See
</ul></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="makefile.variables.names"></a>9.1.1. Naming conventions</h3></div></div></div>
+<a name="makefile.variables.names"></a>10.1.1. Naming conventions</h3></div></div></div>
<div class="itemizedlist"><ul type="disc">
<li><p>All variable names starting with an underscore
are reserved for use by the pkgsrc infrastructure. They shall
@@ -3557,13 +3647,13 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="makefile.code"></a>9.2. Code snippets</h2></div></div></div>
+<a name="makefile.code"></a>10.2. Code snippets</h2></div></div></div>
<p>This section presents you with some code snippets you should
use in your own code. If you don't find anything appropriate here,
you should test your code and add it here.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="adding-to-list"></a>9.2.1. Adding things to a list</h3></div></div></div>
+<a name="adding-to-list"></a>10.2.1. Adding things to a list</h3></div></div></div>
<pre class="programlisting">
STRING= foo * bar `date`
INT_LIST= # empty
@@ -3584,7 +3674,7 @@ a security check before building any package. See
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="converting-internal-to-external"></a>9.2.2. Converting an internal list into an external list</h3></div></div></div>
+<a name="converting-internal-to-external"></a>10.2.2. Converting an internal list into an external list</h3></div></div></div>
<pre class="programlisting">
EXT_LIST= # empty
.for i in ${INT_LIST}
@@ -3599,7 +3689,7 @@ a security check before building any package. See
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="passing-variable-to-shell"></a>9.2.3. Passing variables to a shell command</h3></div></div></div>
+<a name="passing-variable-to-shell"></a>10.2.3. Passing variables to a shell command</h3></div></div></div>
<pre class="programlisting">
STRING= foo bar &lt; &gt; * `date` $$HOME ' "
EXT_LIST= string=${STRING:Q} x=second\ item
@@ -3636,7 +3726,7 @@ a security check before building any package. See
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="quoting-guideline"></a>9.2.4. Quoting guideline</h3></div></div></div>
+<a name="quoting-guideline"></a>10.2.4. Quoting guideline</h3></div></div></div>
<p>There are many possible sources of wrongly quoted variables.
This section lists some of the commonly known ones.</p>
<div class="itemizedlist"><ul type="disc">
@@ -3719,7 +3809,7 @@ a security check before building any package. See
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bsd-make-bug-workaround"></a>9.2.5. Workaround for a bug in BSD Make</h3></div></div></div>
+<a name="bsd-make-bug-workaround"></a>10.2.5. Workaround for a bug in BSD Make</h3></div></div></div>
<p>The pkgsrc bmake program does not handle the following
assignment correctly. In case <code class="varname">_othervar_</code>
contains a ``-'' character, one of the closing braces is included
@@ -3735,18 +3825,18 @@ a security check before building any package. See
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="plist"></a>Chapter 10. PLIST issues</h2></div></div></div>
+<a name="plist"></a>Chapter 11. PLIST issues</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#rcs-id">10.1. RCS ID</a></span></dt>
-<dt><span class="sect1"><a href="#automatic-plist-generation">10.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
-<dt><span class="sect1"><a href="#print-PLIST">10.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
-<dt><span class="sect1"><a href="#plist.misc">10.4. Variable substitution in PLIST</a></span></dt>
-<dt><span class="sect1"><a href="#manpage-compression">10.5. Man page compression</a></span></dt>
-<dt><span class="sect1"><a href="#using-PLIST_SRC">10.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
-<dt><span class="sect1"><a href="#platform-specific-plist">10.7. Platform-specific and differing PLISTs</a></span></dt>
-<dt><span class="sect1"><a href="#faq.common-dirs">10.8. Sharing directories between packages</a></span></dt>
+<dt><span class="sect1"><a href="#rcs-id">11.1. RCS ID</a></span></dt>
+<dt><span class="sect1"><a href="#automatic-plist-generation">11.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
+<dt><span class="sect1"><a href="#print-PLIST">11.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
+<dt><span class="sect1"><a href="#plist.misc">11.4. Variable substitution in PLIST</a></span></dt>
+<dt><span class="sect1"><a href="#manpage-compression">11.5. Man page compression</a></span></dt>
+<dt><span class="sect1"><a href="#using-PLIST_SRC">11.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
+<dt><span class="sect1"><a href="#platform-specific-plist">11.7. Platform-specific and differing PLISTs</a></span></dt>
+<dt><span class="sect1"><a href="#faq.common-dirs">11.8. Sharing directories between packages</a></span></dt>
</dl>
</div>
<p> The <code class="filename">PLIST</code> file contains a package's
@@ -3759,7 +3849,7 @@ a security check before building any package. See
below!).</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="rcs-id"></a>10.1. RCS ID</h2></div></div></div>
+<a name="rcs-id"></a>11.1. RCS ID</h2></div></div></div>
<p>
Be sure to add a RCS ID line as the first thing in any
<code class="filename">PLIST</code> file you write:
@@ -3770,17 +3860,17 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="automatic-plist-generation"></a>10.2. Semi-automatic <code class="filename">PLIST</code> generation</h2></div></div></div>
+<a name="automatic-plist-generation"></a>11.2. Semi-automatic <code class="filename">PLIST</code> generation</h2></div></div></div>
<p>You can use the <span><strong class="command">make print-PLIST</strong></span> command
to output a PLIST that matches any new files since the package
- was extracted. See <a href="#build.helpful-targets" title="14.16. Other helpful targets">Section 14.16, &#8220;Other helpful targets&#8221;</a> for
+ was extracted. See <a href="#build.helpful-targets" title="15.16. Other helpful targets">Section 15.16, &#8220;Other helpful targets&#8221;</a> for
more information on this target.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="print-PLIST"></a>10.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></h2></div></div></div>
+<a name="print-PLIST"></a>11.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></h2></div></div></div>
<p> If you have used any of the *-dirs packages, as explained in
- <a href="#faq.common-dirs" title="10.8. Sharing directories between packages">Section 10.8, &#8220;Sharing directories between packages&#8221;</a>, you may have noticed that
+ <a href="#faq.common-dirs" title="11.8. Sharing directories between packages">Section 11.8, &#8220;Sharing directories between packages&#8221;</a>, you may have noticed that
<span><strong class="command">make print-PLIST</strong></span> outputs a set of
<code class="varname">@comment</code>s instead of real
<code class="varname">@dirrm</code> lines. You can also do this for
@@ -3806,7 +3896,7 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="plist.misc"></a>10.4. Variable substitution in PLIST</h2></div></div></div>
+<a name="plist.misc"></a>11.4. Variable substitution in PLIST</h2></div></div></div>
<p>
A number of variables are substituted automatically in PLISTs
when a package is installed on a system. This includes the
@@ -3852,7 +3942,7 @@ a security check before building any package. See
search for <span class="emphasis"><em>PLIST_SUBST</em></span>). </p>
<p> If you want to change other variables not listed above, you
can add variables and their expansions to this variable in the
- following way, similar to <code class="varname">MESSAGE_SUBST</code> (see <a href="#components.optional" title="8.5. Optional files">Section 8.5, &#8220;Optional files&#8221;</a>): </p>
+ following way, similar to <code class="varname">MESSAGE_SUBST</code> (see <a href="#components.optional" title="9.5. Optional files">Section 9.5, &#8220;Optional files&#8221;</a>): </p>
<pre class="programlisting">
PLIST_SUBST+= SOMEVAR="somevalue"
</pre>
@@ -3861,7 +3951,7 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manpage-compression"></a>10.5. Man page compression</h2></div></div></div>
+<a name="manpage-compression"></a>11.5. Man page compression</h2></div></div></div>
<p>Man pages should be installed in compressed form if
<code class="varname">MANZ</code> is set (in <code class="filename">bsd.own.mk</code>),
and uncompressed otherwise. To handle this in the
@@ -3874,7 +3964,7 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="using-PLIST_SRC"></a>10.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></h2></div></div></div>
+<a name="using-PLIST_SRC"></a>11.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></h2></div></div></div>
<p>To use one or more files as source for the <code class="filename">PLIST</code> used
in generating the binary package, set the variable
<code class="varname">PLIST_SRC</code> to the names of that file(s).
@@ -3883,7 +3973,7 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="platform-specific-plist"></a>10.7. Platform-specific and differing PLISTs</h2></div></div></div>
+<a name="platform-specific-plist"></a>11.7. Platform-specific and differing PLISTs</h2></div></div></div>
<p>Some packages decide to install a different set of files based on
the operating system being used. These differences can be
automatically handled by using the following files:</p>
@@ -3897,7 +3987,7 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="faq.common-dirs"></a>10.8. Sharing directories between packages</h2></div></div></div>
+<a name="faq.common-dirs"></a>11.8. Sharing directories between packages</h2></div></div></div>
<p> A &#8220;<span class="quote">shared directory</span>&#8221; is a directory where
multiple (and unrelated) packages install files. These
directories are problematic because you have to add special tricks
@@ -3954,20 +4044,20 @@ a security check before building any package. See
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="buildlink"></a>Chapter 11. Buildlink methodology</h2></div></div></div>
+<a name="buildlink"></a>Chapter 12. Buildlink methodology</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#converting-to-buildlink3">11.1. Converting packages to use buildlink3</a></span></dt>
-<dt><span class="sect1"><a href="#creating-buildlink3.mk">11.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-buildlink3">12.1. Converting packages to use buildlink3</a></span></dt>
+<dt><span class="sect1"><a href="#creating-buildlink3.mk">12.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-bl3">11.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
-<dt><span class="sect2"><a href="#updating-buildlink-depends">11.2.2. Updating <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> in <code class="filename">buildlink3.mk</code> files</a></span></dt>
+<dt><span class="sect2"><a href="#anatomy-of-bl3">12.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
+<dt><span class="sect2"><a href="#updating-buildlink-depends">12.2.2. Updating <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> in <code class="filename">buildlink3.mk</code> files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#writing-builtin.mk">11.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#writing-builtin.mk">12.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">11.3.1. Anatomy of a <code class="filename">builtin.mk</code> file</a></span></dt>
-<dt><span class="sect2"><a href="#native-or-pkgsrc-preference">11.3.2. Global preferences for native or pkgsrc software</a></span></dt>
+<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">12.3.1. Anatomy of a <code class="filename">builtin.mk</code> file</a></span></dt>
+<dt><span class="sect2"><a href="#native-or-pkgsrc-preference">12.3.2. Global preferences for native or pkgsrc software</a></span></dt>
</dl></dd>
</dl>
</div>
@@ -3995,7 +4085,7 @@ a security check before building any package. See
software. </p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="converting-to-buildlink3"></a>11.1. Converting packages to use buildlink3</h2></div></div></div>
+<a name="converting-to-buildlink3"></a>12.1. Converting packages to use buildlink3</h2></div></div></div>
<p>The process of converting packages to use the buildlink3
framework (&#8220;<span class="quote">bl3ifying</span>&#8221;) is fairly straightforward.
The things to keep in mind are:</p>
@@ -4071,7 +4161,7 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="creating-buildlink3.mk"></a>11.2. Writing <code class="filename">buildlink3.mk</code> files</h2></div></div></div>
+<a name="creating-buildlink3.mk"></a>12.2. Writing <code class="filename">buildlink3.mk</code> files</h2></div></div></div>
<p> A package's <code class="filename">buildlink3.mk</code> file is
included by Makefiles to indicate the need to compile and link
against header files and libraries provided by the package. A
@@ -4089,7 +4179,7 @@ a security check before building any package. See
<code class="prompt">%</code> createbuildlink &gt;buildlink3.mk</code></strong></pre>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="anatomy-of-bl3"></a>11.2.1. Anatomy of a buildlink3.mk file</h3></div></div></div>
+<a name="anatomy-of-bl3"></a>12.2.1. Anatomy of a buildlink3.mk file</h3></div></div></div>
<p>The following real-life example
<code class="filename">buildlink3.mk</code> is taken
from <code class="filename">pkgsrc/graphics/tiff</code>:</p>
@@ -4239,7 +4329,7 @@ a security check before building any package. See
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="updating-buildlink-depends"></a>11.2.2. Updating <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> in <code class="filename">buildlink3.mk</code> files</h3></div></div></div>
+<a name="updating-buildlink-depends"></a>12.2.2. Updating <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> in <code class="filename">buildlink3.mk</code> files</h3></div></div></div>
<p>
The situation that requires increasing the dependency listed in
<code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code>
@@ -4265,7 +4355,7 @@ a security check before building any package. See
dependency and not settle for an older one which will not
contain the necessary shared libraries. </p>
<p>
- See <a href="#dependencies" title="16.1.4. Handling dependencies">Section 16.1.4, &#8220;Handling dependencies&#8221;</a> for
+ See <a href="#dependencies" title="17.1.4. Handling dependencies">Section 17.1.4, &#8220;Handling dependencies&#8221;</a> for
more information about dependencies on other packages,
including the <code class="varname">BUILDLINK_ABI_DEPENDS</code> and
<code class="varname">ABI_DEPENDS</code> definitions. </p>
@@ -4285,7 +4375,7 @@ a security check before building any package. See
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="writing-builtin.mk"></a>11.3. Writing <code class="filename">builtin.mk</code> files</h2></div></div></div>
+<a name="writing-builtin.mk"></a>12.3. Writing <code class="filename">builtin.mk</code> files</h2></div></div></div>
<p>
Some packages in pkgsrc install headers and libraries that
coincide with headers and libraries present in the base system.
@@ -4315,7 +4405,7 @@ a security check before building any package. See
</ol></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="anatomy-of-builtin.mk"></a>11.3.1. Anatomy of a <code class="filename">builtin.mk</code> file</h3></div></div></div>
+<a name="anatomy-of-builtin.mk"></a>12.3.1. Anatomy of a <code class="filename">builtin.mk</code> file</h3></div></div></div>
<p>The following is the recommended template for builtin.mk
files: </p>
<pre class="programlisting">
@@ -4407,7 +4497,7 @@ a security check before building any package. See
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="native-or-pkgsrc-preference"></a>11.3.2. Global preferences for native or pkgsrc software</h3></div></div></div>
+<a name="native-or-pkgsrc-preference"></a>12.3.2. Global preferences for native or pkgsrc software</h3></div></div></div>
<p>
When building packages, it's possible to choose whether to set
a global preference for using either the built-in (native)
@@ -4442,29 +4532,29 @@ a security check before building any package. See
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="pkginstall"></a>Chapter 12. The pkginstall framework</h2></div></div></div>
+<a name="pkginstall"></a>Chapter 13. The pkginstall framework</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">12.1. Files and directories outside the installation prefix</a></span></dt>
+<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">13.1. Files and directories outside the installation prefix</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#dirs-outside-prefix">12.1.1. Directory manipulation</a></span></dt>
-<dt><span class="sect2"><a href="#files-outside-prefix">12.1.2. File manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#dirs-outside-prefix">13.1.1. Directory manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#files-outside-prefix">13.1.2. File manipulation</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#conf-files">12.2. Configuration files</a></span></dt>
+<dt><span class="sect1"><a href="#conf-files">13.2. Configuration files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#conf-files-sysconfdir">12.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-configure">12.2.2. Telling the software where configuration files are</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-patching">12.2.3. Patching installations</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-disable">12.2.4. Disabling handling of configuration files</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-sysconfdir">13.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-configure">13.2.2. Telling the software where configuration files are</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-patching">13.2.3. Patching installations</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-disable">13.2.4. Disabling handling of configuration files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#rcd-scripts">12.3. System startup scripts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">12.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#users-and-groups">12.4. System users and groups</a></span></dt>
-<dt><span class="sect1"><a href="#shells">12.5. System shells</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#shells-disable">12.5.1. Disabling shell registration</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#fonts">12.6. Fonts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#fonts-disable">12.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#rcd-scripts">13.3. System startup scripts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">13.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#users-and-groups">13.4. System users and groups</a></span></dt>
+<dt><span class="sect1"><a href="#shells">13.5. System shells</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#shells-disable">13.5.1. Disabling shell registration</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#fonts">13.6. Fonts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#fonts-disable">13.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
</dl>
</div>
<p>This chapter describes the framework known as
@@ -4490,7 +4580,7 @@ described above is by means of the installation scripts, which are
automatically generated by pkginstall.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="files-and-dirs-outside-prefix"></a>12.1. Files and directories outside the installation prefix</h2></div></div></div>
+<a name="files-and-dirs-outside-prefix"></a>13.1. Files and directories outside the installation prefix</h2></div></div></div>
<p>As you already know, the <code class="filename">PLIST</code> file holds a list
of files and directories that belong to a package. The names used in it
are relative to the installation prefix (<code class="filename">${PREFIX}</code>),
@@ -4509,7 +4599,7 @@ directories based on variables set in the package's
variables.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="dirs-outside-prefix"></a>12.1.1. Directory manipulation</h3></div></div></div>
+<a name="dirs-outside-prefix"></a>13.1.1. Directory manipulation</h3></div></div></div>
<p>The following variables can be set to request the creation of
directories anywhere in the file system:</p>
<div class="itemizedlist"><ul type="disc">
@@ -4536,7 +4626,7 @@ directories anywhere in the file system:</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="files-outside-prefix"></a>12.1.2. File manipulation</h3></div></div></div>
+<a name="files-outside-prefix"></a>13.1.2. File manipulation</h3></div></div></div>
<p>Creating non-empty files outside the installation prefix is tricky
because the <code class="filename">PLIST</code> forces all files to be inside it.
To overcome this problem, the only solution is to extract the file in the
@@ -4576,7 +4666,7 @@ installation prefix:</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="conf-files"></a>12.2. Configuration files</h2></div></div></div>
+<a name="conf-files"></a>13.2. Configuration files</h2></div></div></div>
<p>Configuration files are special in the sense that they are installed
in their own specific directory, <code class="varname">PKG_SYSCONFDIR</code>, and
need special treatment during installation (most of which is automated by
@@ -4588,7 +4678,7 @@ be removed if they have local modifications. This ensures that
administrators never lose any custom changes they may have made.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="conf-files-sysconfdir"></a>12.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</h3></div></div></div>
+<a name="conf-files-sysconfdir"></a>13.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</h3></div></div></div>
<p>As said before, the <code class="varname">PKG_SYSCONFDIR</code> variable
specifies where configuration files shall be installed. Its contents are
set based upon the following variables:</p>
@@ -4636,11 +4726,11 @@ following:</p>
<code class="filename">${PKG_SYSCONFBASE}</code>.</p></li>
</ol></div>
<p>It is worth mentioning that <code class="filename">${PKG_SYSCONFDIR}</code> is
-automatically added to <code class="filename">OWN_DIRS</code>. See <a href="#dirs-outside-prefix" title="12.1.1. Directory manipulation">Section 12.1.1, &#8220;Directory manipulation&#8221;</a> what this means.</p>
+automatically added to <code class="filename">OWN_DIRS</code>. See <a href="#dirs-outside-prefix" title="13.1.1. Directory manipulation">Section 13.1.1, &#8220;Directory manipulation&#8221;</a> what this means.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="conf-files-configure"></a>12.2.2. Telling the software where configuration files are</h3></div></div></div>
+<a name="conf-files-configure"></a>13.2.2. Telling the software where configuration files are</h3></div></div></div>
<p>Given that pkgsrc (and users!) expect configuration files to be in a
known place, you need to teach each package where it shall install its
files. In some cases you will have to patch the package Makefiles to
@@ -4657,7 +4747,7 @@ unfortunately).</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="conf-files-patching"></a>12.2.3. Patching installations</h3></div></div></div>
+<a name="conf-files-patching"></a>13.2.3. Patching installations</h3></div></div></div>
<p>As said before, pkginstall automatically handles configuration files.
This means that <span class="strong"><strong>the packages themselves must not
touch the contents of <code class="filename">${PKG_SYSCONFDIR}</code>
@@ -4674,7 +4764,7 @@ examples hierarchy), the pkginstall framework can use them as master copies
during the package installation to update what is in
<code class="filename">${PKG_SYSCONFDIR}</code>. To achieve this, the variables
<code class="varname">CONF_FILES</code> and <code class="varname">CONF_FILES_PERMS</code> are
-used. Check out <a href="#files-outside-prefix" title="12.1.2. File manipulation">Section 12.1.2, &#8220;File manipulation&#8221;</a> for information
+used. Check out <a href="#files-outside-prefix" title="13.1.2. File manipulation">Section 13.1.2, &#8220;File manipulation&#8221;</a> for information
about their syntax and their purpose. Here is an example, taken from the
<a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/mail/mutt/README.html" target="_top"><code class="filename">mail/mutt</code></a> package:</p>
<pre class="programlisting">
@@ -4686,7 +4776,7 @@ package and has no meaning outside it.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="conf-files-disable"></a>12.2.4. Disabling handling of configuration files</h3></div></div></div>
+<a name="conf-files-disable"></a>13.2.4. Disabling handling of configuration files</h3></div></div></div>
<p>The automatic copying of config files can be toggled by setting the
environment variable <code class="varname">PKG_CONFIG</code> prior to package
installation.</p>
@@ -4694,10 +4784,10 @@ installation.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="rcd-scripts"></a>12.3. System startup scripts</h2></div></div></div>
+<a name="rcd-scripts"></a>13.3. System startup scripts</h2></div></div></div>
<p>System startup scripts are special files because they must be
installed in a place known by the underlying OS, usually outside the
-installation prefix. Therefore, the same rules described in <a href="#files-and-dirs-outside-prefix" title="12.1. Files and directories outside the installation prefix">Section 12.1, &#8220;Files and directories outside the installation prefix&#8221;</a> apply, and the same solutions
+installation prefix. Therefore, the same rules described in <a href="#files-and-dirs-outside-prefix" title="13.1. Files and directories outside the installation prefix">Section 13.1, &#8220;Files and directories outside the installation prefix&#8221;</a> apply, and the same solutions
can be used. However, pkginstall provides a special mechanism to handle
these files.</p>
<p>In order to provide system startup scripts, the package has
@@ -4732,7 +4822,7 @@ script in an automated fashion:</p>
</ol></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="rcd-scripts-disable"></a>12.3.1. Disabling handling of system startup scripts</h3></div></div></div>
+<a name="rcd-scripts-disable"></a>13.3.1. Disabling handling of system startup scripts</h3></div></div></div>
<p>The automatic copying of config files can be toggled by setting the
environment variable <code class="varname">PKG_RCD_SCRIPTS</code> prior to package
installation. Note that the scripts will be always copied inside the
@@ -4742,7 +4832,7 @@ matter what the value of this variable is.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="users-and-groups"></a>12.4. System users and groups</h2></div></div></div>
+<a name="users-and-groups"></a>13.4. System users and groups</h2></div></div></div>
<p>If a package needs to create special users and/or groups during
installation, it can do so by using the pkginstall framework.</p>
<p>Users can be created by adding entries to the
@@ -4779,7 +4869,7 @@ are automatically hardcoded into the final installation scripts.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="shells"></a>12.5. System shells</h2></div></div></div>
+<a name="shells"></a>13.5. System shells</h2></div></div></div>
<p>Packages that install system shells should register them in the shell
database, <code class="filename">/etc/shells</code>, to make things easier to the
administrator. This must be done from the installation scripts to keep
@@ -4794,7 +4884,7 @@ following example, taken from <a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/
</pre>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="shells-disable"></a>12.5.1. Disabling shell registration</h3></div></div></div>
+<a name="shells-disable"></a>13.5.1. Disabling shell registration</h3></div></div></div>
<p>The automatic registration of shell interpreters can be disabled by
the administrator by setting the <code class="filename">PKG_REGISTER_SHELLS</code>
environment variable to <code class="literal">NO</code>.</p>
@@ -4802,7 +4892,7 @@ environment variable to <code class="literal">NO</code>.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="fonts"></a>12.6. Fonts</h2></div></div></div>
+<a name="fonts"></a>13.6. Fonts</h2></div></div></div>
<p>Packages that install X11 fonts should update the database files
that index the fonts within each fonts directory. This can easily be
accomplished within the pkginstall framework.</p>
@@ -4820,7 +4910,7 @@ installation prefix. Consider the following example, taken from <a href="ftp://
</pre>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="fonts-disable"></a>12.6.1. Disabling automatic update of the fonts databases</h3></div></div></div>
+<a name="fonts-disable"></a>13.6.1. Disabling automatic update of the fonts databases</h3></div></div></div>
<p>The automatic update of fonts databases can be disabled by
the administrator by setting the <code class="filename">PKG_UPDATE_FONTS_DB</code>
environment variable to <code class="literal">NO</code>.</p>
@@ -4829,13 +4919,13 @@ environment variable to <code class="literal">NO</code>.</p>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="options"></a>Chapter 13. Options handling</h2></div></div></div>
+<a name="options"></a>Chapter 14. Options handling</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#global-default-options">13.1. Global default options</a></span></dt>
-<dt><span class="sect1"><a href="#converting-to-options">13.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
-<dt><span class="sect1"><a href="#option-names">13.3. Option Names</a></span></dt>
+<dt><span class="sect1"><a href="#global-default-options">14.1. Global default options</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-options">14.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
+<dt><span class="sect1"><a href="#option-names">14.3. Option Names</a></span></dt>
</dl>
</div>
<p>Many packages have the ability to be built to support different
@@ -4847,7 +4937,7 @@ built into a package or to allow a set of global default options
apply.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="global-default-options"></a>13.1. Global default options</h2></div></div></div>
+<a name="global-default-options"></a>14.1. Global default options</h2></div></div></div>
<p>Global default options are listed in
<code class="varname">PKG_DEFAULT_OPTIONS</code>, which is a list of the options
that should be built into every package if that option is supported.
@@ -4855,7 +4945,7 @@ This variable should be set in <code class="filename">/etc/mk.conf</code>.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="converting-to-options"></a>13.2. Converting packages to use <code class="filename">bsd.options.mk</code></h2></div></div></div>
+<a name="converting-to-options"></a>14.2. Converting packages to use <code class="filename">bsd.options.mk</code></h2></div></div></div>
<p>The following example shows how
<code class="filename">bsd.options.mk</code> should be used
by the hypothetical ``wibble'' package, either in the package
@@ -4895,8 +4985,8 @@ main package <code class="filename">Makefile</code>.</p>
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
- . include "../../databases/openldap/buildlink3.mk"
- CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
+ . include "../../databases/openldap-client/buildlink3.mk"
+ CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap-client}
.endif
###
@@ -4993,7 +5083,7 @@ whether it is listed in <code class="varname">PKG_OPTIONS</code>:</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="option-names"></a>13.3. Option Names</h2></div></div></div>
+<a name="option-names"></a>14.3. Option Names</h2></div></div></div>
<p>Options that enable similar features in different packages (like
optional support for a library) should use a common name in all
packages that support it (like the name of the library). If another
@@ -5018,31 +5108,31 @@ support.</span>&#8221; The file is sorted by option names.</p>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="build"></a>Chapter 14. The build process</h2></div></div></div>
+<a name="build"></a>Chapter 15. The build process</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#build.intro">14.1. Introduction</a></span></dt>
-<dt><span class="sect1"><a href="#build.prefix">14.2. Program location</a></span></dt>
-<dt><span class="sect1"><a href="#build.builddirs">14.3. Directories used during the build process</a></span></dt>
-<dt><span class="sect1"><a href="#build.running">14.4. Running a phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.fetch">14.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.checksum">14.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.extract">14.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.patch">14.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.tools">14.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.wrapper">14.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.configure">14.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.build">14.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.test">14.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.install">14.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.package">14.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.helpful-targets">14.16. Other helpful targets</a></span></dt>
+<dt><span class="sect1"><a href="#build.intro">15.1. Introduction</a></span></dt>
+<dt><span class="sect1"><a href="#build.prefix">15.2. Program location</a></span></dt>
+<dt><span class="sect1"><a href="#build.builddirs">15.3. Directories used during the build process</a></span></dt>
+<dt><span class="sect1"><a href="#build.running">15.4. Running a phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.fetch">15.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.checksum">15.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.extract">15.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.patch">15.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.tools">15.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.wrapper">15.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.configure">15.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.build">15.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.test">15.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.install">15.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.package">15.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.helpful-targets">15.16. Other helpful targets</a></span></dt>
</dl>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.intro"></a>14.1. Introduction</h2></div></div></div>
+<a name="build.intro"></a>15.1. Introduction</h2></div></div></div>
<p>This chapter gives a detailed description on how a package is
built. Building a package is separated into different
<span class="emphasis"><em>phases</em></span> (for example <code class="varname">fetch</code>,
@@ -5062,7 +5152,7 @@ can be put into place on the system.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.prefix"></a>14.2. Program location</h2></div></div></div>
+<a name="build.prefix"></a>15.2. Program location</h2></div></div></div>
<p>Before outlining the process performed by the NetBSD package system in
the next section, here's a brief discussion on where programs are
installed, and which variables influence this.</p>
@@ -5073,7 +5163,7 @@ can be put into place on the system.</p>
for pkgs in the &#8220;<span class="quote">cross</span>&#8221; category. The value of
<code class="varname">PREFIX</code> needs to be put
into the various places in the program's source where paths to
- these files are encoded. See <a href="#components.patches" title="8.3. patches/*">Section 8.3, &#8220;patches/*&#8221;</a> and <a href="#fixes.libtool" title="16.3.1. Shared libraries - libtool">Section 16.3.1, &#8220;Shared libraries - libtool&#8221;</a> for more details.</p>
+ these files are encoded. See <a href="#components.patches" title="9.3. patches/*">Section 9.3, &#8220;patches/*&#8221;</a> and <a href="#fixes.libtool" title="17.3.1. Shared libraries - libtool">Section 17.3.1, &#8220;Shared libraries - libtool&#8221;</a> for more details.</p>
<p>When choosing which of these variables to use,
follow the following rules:</p>
<div class="itemizedlist"><ul type="disc">
@@ -5151,7 +5241,7 @@ can be put into place on the system.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.builddirs"></a>14.3. Directories used during the build process</h2></div></div></div>
+<a name="build.builddirs"></a>15.3. Directories used during the build process</h2></div></div></div>
<p>When building a package, a number of directories is used to store
source files, temporary files, pkgsrc-internal files, and so on. These
directories are explained here.</p>
@@ -5185,7 +5275,7 @@ that isn't hidden. This variable may be changed by a package
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.running"></a>14.4. Running a phase</h2></div></div></div>
+<a name="build.running"></a>15.4. Running a phase</h2></div></div></div>
<p>You can run a particular phase by typing <span><strong class="command">make
phase</strong></span>, where <span class="emphasis"><em>phase</em></span> is the name of the
phase. This will automatically run all phases that are required for this
@@ -5195,7 +5285,7 @@ the package will be built, but not installed.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.fetch"></a>14.5. The <span class="emphasis"><em>fetch</em></span> phase</h2></div></div></div>
+<a name="build.fetch"></a>15.5. The <span class="emphasis"><em>fetch</em></span> phase</h2></div></div></div>
<p>This will check if the file(s) given in the variables
<code class="varname">DISTFILES</code> and <code class="varname">PATCHFILES</code> (as
defined in the package's Makefile) are present on the
@@ -5217,7 +5307,7 @@ the package will be built, but not installed.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.checksum"></a>14.6. The <span class="emphasis"><em>checksum</em></span> phase</h2></div></div></div>
+<a name="build.checksum"></a>15.6. The <span class="emphasis"><em>checksum</em></span> phase</h2></div></div></div>
<p>After the distfile(s) are fetched, their checksum is generated and
compared with the checksums stored in the distinfo file. If the
checksums don't match, the build is aborted. This is to ensure the same
@@ -5227,7 +5317,7 @@ the package will be built, but not installed.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.extract"></a>14.7. The <span class="emphasis"><em>extract</em></span> phase</h2></div></div></div>
+<a name="build.extract"></a>15.7. The <span class="emphasis"><em>extract</em></span> phase</h2></div></div></div>
<p>When the distfiles are present on the local system, they
need to be extracted, as they usually come in the form of some
compressed archive format.</p>
@@ -5265,7 +5355,7 @@ the package will be built, but not installed.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.patch"></a>14.8. The <span class="emphasis"><em>patch</em></span> phase</h2></div></div></div>
+<a name="build.patch"></a>15.8. The <span class="emphasis"><em>patch</em></span> phase</h2></div></div></div>
<p>After extraction, all the patches named by the
<code class="varname">PATCHFILES</code>, those present in the patches
subdirectory of the package as well as in $LOCALPATCHES/$PKGPATH (e.g.
@@ -5275,7 +5365,7 @@ the package will be built, but not installed.</p>
files ending in <code class="filename">.orig</code> or
<code class="filename">.rej</code> are ignored. Any special options to <a href="http://netbsd.gw.com/cgi-bin/man-cgi?patch+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span></a>
can be handed in <code class="varname">PATCH_DIST_ARGS</code>.
- See <a href="#components.patches" title="8.3. patches/*">Section 8.3, &#8220;patches/*&#8221;</a> for more details.</p>
+ See <a href="#components.patches" title="9.3. patches/*">Section 9.3, &#8220;patches/*&#8221;</a> for more details.</p>
<p>By default <a href="http://netbsd.gw.com/cgi-bin/man-cgi?patch+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span></a> is given special args to make it fail if the
patches apply with some lines of fuzz. Please fix (regen) the patches
so that they apply cleanly. The rationale behind this is that
@@ -5284,14 +5374,14 @@ the package will be built, but not installed.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.tools"></a>14.9. The <span class="emphasis"><em>tools</em></span> phase</h2></div></div></div>
+<a name="build.tools"></a>15.9. The <span class="emphasis"><em>tools</em></span> phase</h2></div></div></div>
<p>This is covered in
-<a href="#tools" title="Chapter 15. Tools needed for building or running">Chapter 15, <i>Tools needed for building or running</i></a>.
+<a href="#tools" title="Chapter 16. Tools needed for building or running">Chapter 16, <i>Tools needed for building or running</i></a>.
</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.wrapper"></a>14.10. The <span class="emphasis"><em>wrapper</em></span> phase</h2></div></div></div>
+<a name="build.wrapper"></a>15.10. The <span class="emphasis"><em>wrapper</em></span> phase</h2></div></div></div>
<p>This phase creates wrapper programs for the compilers and
linkers. The following variables can be used to tweak the
wrappers.</p>
@@ -5331,7 +5421,7 @@ the package will be built, but not installed.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.configure"></a>14.11. The <span class="emphasis"><em>configure</em></span> phase</h2></div></div></div>
+<a name="build.configure"></a>15.11. The <span class="emphasis"><em>configure</em></span> phase</h2></div></div></div>
<p>Most pieces of software need information on the header files,
system calls, and library routines which are available on the platform
they run on. The process of determining this information is known as
@@ -5366,7 +5456,7 @@ being run, set <code class="varname">USE_X11BASE</code> instead.)</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.build"></a>14.12. The <span class="emphasis"><em>build</em></span> phase</h2></div></div></div>
+<a name="build.build"></a>15.12. The <span class="emphasis"><em>build</em></span> phase</h2></div></div></div>
<p>For building a package, a rough equivalent of the following code
is executed.</p>
<pre class="programlisting">
@@ -5392,12 +5482,12 @@ of <code class="varname">MAKEFILE</code> is &#8220;<span class="quote">Makefile<
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.test"></a>14.13. The <span class="emphasis"><em>test</em></span> phase</h2></div></div></div>
+<a name="build.test"></a>15.13. The <span class="emphasis"><em>test</em></span> phase</h2></div></div></div>
<p>[TODO]</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.install"></a>14.14. The <span class="emphasis"><em>install</em></span> phase</h2></div></div></div>
+<a name="build.install"></a>15.14. The <span class="emphasis"><em>install</em></span> phase</h2></div></div></div>
<p>Once the build stage has completed, the final step is to
install the software in public directories, so users can access
the programs and files.</p>
@@ -5468,12 +5558,12 @@ of <code class="varname">MAKEFILE</code> is &#8220;<span class="quote">Makefile<
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.package"></a>14.15. The <span class="emphasis"><em>package</em></span> phase</h2></div></div></div>
+<a name="build.package"></a>15.15. The <span class="emphasis"><em>package</em></span> phase</h2></div></div></div>
<p>[TODO]</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.helpful-targets"></a>14.16. Other helpful targets</h2></div></div></div>
+<a name="build.helpful-targets"></a>15.16. Other helpful targets</h2></div></div></div>
<div class="variablelist"><dl>
<dt><span class="term">pre/post-*</span></dt>
<dd><p>For any of the main targets described in the previous section, two
@@ -5674,7 +5764,7 @@ of <code class="varname">MAKEFILE</code> is &#8220;<span class="quote">Makefile<
<code class="filename">PLIST</code>, as the &#8220;<span class="quote">find
-newer</span>&#8221; command used by this target won't catch
them!</p>
-<p> See <a href="#print-PLIST" title="10.3. Tweaking output of make print-PLIST">Section 10.3, &#8220;Tweaking output of <span><strong class="command">make print-PLIST</strong></span>&#8221;</a> for more
+<p> See <a href="#print-PLIST" title="11.3. Tweaking output of make print-PLIST">Section 11.3, &#8220;Tweaking output of <span><strong class="command">make print-PLIST</strong></span>&#8221;</a> for more
information on this target.</p>
</dd>
<dt><span class="term">bulk-package</span></dt>
@@ -5711,13 +5801,13 @@ of <code class="varname">MAKEFILE</code> is &#8220;<span class="quote">Makefile<
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="tools"></a>Chapter 15. Tools needed for building or running</h2></div></div></div>
+<a name="tools"></a>Chapter 16. Tools needed for building or running</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#pkgsrc-tools">15.1. Tools for pkgsrc builds</a></span></dt>
-<dt><span class="sect1"><a href="#package-tools">15.2. Tools needed by packages</a></span></dt>
-<dt><span class="sect1"><a href="#platform-tools">15.3. Tools provided by platforms</a></span></dt>
+<dt><span class="sect1"><a href="#pkgsrc-tools">16.1. Tools for pkgsrc builds</a></span></dt>
+<dt><span class="sect1"><a href="#package-tools">16.2. Tools needed by packages</a></span></dt>
+<dt><span class="sect1"><a href="#platform-tools">16.3. Tools provided by platforms</a></span></dt>
</dl>
</div>
<p>
@@ -5751,7 +5841,7 @@ The tools used by a package can be listed by running
</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="pkgsrc-tools"></a>15.1. Tools for pkgsrc builds</h2></div></div></div>
+<a name="pkgsrc-tools"></a>16.1. Tools for pkgsrc builds</h2></div></div></div>
<p>
The default set of tools used by pkgsrc is defined in
<code class="filename">bsd.pkg.mk</code>. This includes standard Unix tools,
@@ -5768,7 +5858,7 @@ to define the tools needed.
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="package-tools"></a>15.2. Tools needed by packages</h2></div></div></div>
+<a name="package-tools"></a>16.2. Tools needed by packages</h2></div></div></div>
<p>
In the following examples, the :pkgsrc means to use the pkgsrc version
and not the native version for a build dependency.
@@ -5797,7 +5887,7 @@ tool at run-time, then just use <code class="varname">DEPENDS</code> instead.
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="platform-tools"></a>15.3. Tools provided by platforms</h2></div></div></div>
+<a name="platform-tools"></a>16.3. Tools provided by platforms</h2></div></div></div>
<p>
When improving or porting pkgsrc to a new platform, have a look
at (or create) the corresponding platform specific make file fragment under
@@ -5816,70 +5906,69 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="fixes"></a>Chapter 16. Making your package work</h2></div></div></div>
+<a name="fixes"></a>Chapter 17. Making your package work</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#general-operation">16.1. General operation</a></span></dt>
+<dt><span class="sect1"><a href="#general-operation">17.1. General operation</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">16.1.1. How to pull in variables from /etc/mk.conf</a></span></dt>
-<dt><span class="sect2"><a href="#where-to-install-documentation">16.1.2. Where to install documentation</a></span></dt>
-<dt><span class="sect2"><a href="#restricted-packages">16.1.3. Restricted packages</a></span></dt>
-<dt><span class="sect2"><a href="#dependencies">16.1.4. Handling dependencies</a></span></dt>
-<dt><span class="sect2"><a href="#conflicts">16.1.5. Handling conflicts with other packages</a></span></dt>
-<dt><span class="sect2"><a href="#not-building-packages">16.1.6. Packages that cannot or should not be built</a></span></dt>
-<dt><span class="sect2"><a href="#undeletable-packages">16.1.7. Packages which should not be deleted, once installed</a></span></dt>
-<dt><span class="sect2"><a href="#security-handling">16.1.8. Handling packages with security problems</a></span></dt>
-<dt><span class="sect2"><a href="#compiler-bugs">16.1.9. How to handle compiler bugs</a></span></dt>
-<dt><span class="sect2"><a href="#bumping-pkgrevision">16.1.10. How to handle incrementing versions when fixing an existing package</a></span></dt>
-<dt><span class="sect2"><a href="#portability-of-packages">16.1.11. Portability of packages</a></span></dt>
+<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">17.1.1. How to pull in variables from /etc/mk.conf</a></span></dt>
+<dt><span class="sect2"><a href="#where-to-install-documentation">17.1.2. Where to install documentation</a></span></dt>
+<dt><span class="sect2"><a href="#restricted-packages">17.1.3. Restricted packages</a></span></dt>
+<dt><span class="sect2"><a href="#dependencies">17.1.4. Handling dependencies</a></span></dt>
+<dt><span class="sect2"><a href="#conflicts">17.1.5. Handling conflicts with other packages</a></span></dt>
+<dt><span class="sect2"><a href="#not-building-packages">17.1.6. Packages that cannot or should not be built</a></span></dt>
+<dt><span class="sect2"><a href="#undeletable-packages">17.1.7. Packages which should not be deleted, once installed</a></span></dt>
+<dt><span class="sect2"><a href="#security-handling">17.1.8. Handling packages with security problems</a></span></dt>
+<dt><span class="sect2"><a href="#compiler-bugs">17.1.9. How to handle compiler bugs</a></span></dt>
+<dt><span class="sect2"><a href="#bumping-pkgrevision">17.1.10. How to handle incrementing versions when fixing an existing package</a></span></dt>
+<dt><span class="sect2"><a href="#portability-of-packages">17.1.11. Portability of packages</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#downloading-issues">16.2. Possible downloading issues</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.fetch">17.2. Fixing problems in the <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#no-plain-download">16.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
-<dt><span class="sect2"><a href="#modified-distfiles-same-name">16.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
+<dt><span class="sect2"><a href="#no-plain-download">17.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
+<dt><span class="sect2"><a href="#modified-distfiles-same-name">17.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#configuration-gotchas">16.3. Configuration gotchas</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.configure">17.3. Fixing problems in the <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#fixes.libtool">16.3.1. Shared libraries - libtool</a></span></dt>
-<dt><span class="sect2"><a href="#using-libtool">16.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
-<dt><span class="sect2"><a href="#autoconf-automake">16.3.3. GNU Autoconf/Automake</a></span></dt>
+<dt><span class="sect2"><a href="#fixes.libtool">17.3.1. Shared libraries - libtool</a></span></dt>
+<dt><span class="sect2"><a href="#using-libtool">17.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
+<dt><span class="sect2"><a href="#autoconf-automake">17.3.3. GNU Autoconf/Automake</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#fixes-build">16.4. Building the package</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.build">17.4. Fixing problems in the <span class="emphasis"><em>build</em></span> phase</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#fixes.build.cpp">17.4.1. Compiling C and C++ code conditionally</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#package-specific-actions">17.5. Package specific actions</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#cpp-defines">16.4.1. CPP defines</a></span></dt>
-<dt><span class="sect2"><a href="#cpp-list-examples">16.4.2. Examples of CPP defines for some platforms</a></span></dt>
-<dt><span class="sect2"><a href="#cpp-list">16.4.3. Getting a list of CPP defines</a></span></dt>
+<dt><span class="sect2"><a href="#user-interaction">17.5.1. User interaction</a></span></dt>
+<dt><span class="sect2"><a href="#handling-licenses">17.5.2. Handling licenses</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#package-specific-actions">16.5. Package specific actions</a></span></dt>
+<dt><span class="sect1"><a href="#fixes.install">17.6. Fixing problems in the <span class="emphasis"><em>install</em></span> phase</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#user-interaction">16.5.1. User interaction</a></span></dt>
-<dt><span class="sect2"><a href="#handling-licenses">16.5.2. Handling licenses</a></span></dt>
-<dt><span class="sect2"><a href="#installing-score-files">16.5.3. Installing score files</a></span></dt>
-<dt><span class="sect2"><a href="#perl-scripts">16.5.4. Packages containing perl scripts</a></span></dt>
-<dt><span class="sect2"><a href="#hardcoded-paths">16.5.5. Packages with hardcoded paths to other interpreters</a></span></dt>
-<dt><span class="sect2"><a href="#perl-modules">16.5.6. Packages installing perl modules</a></span></dt>
-<dt><span class="sect2"><a href="#faq.info-files">16.5.7. Packages installing info files</a></span></dt>
-<dt><span class="sect2"><a href="#manpages">16.5.8. Packages installing man pages</a></span></dt>
-<dt><span class="sect2"><a href="#gconf2-data-files">16.5.9. Packages installing GConf2 data files</a></span></dt>
-<dt><span class="sect2"><a href="#scrollkeeper-data-files">16.5.10. Packages installing scrollkeeper data files</a></span></dt>
-<dt><span class="sect2"><a href="#x11-fonts">16.5.11. Packages installing X11 fonts</a></span></dt>
-<dt><span class="sect2"><a href="#gtk2-modules">16.5.12. Packages installing GTK2 modules</a></span></dt>
-<dt><span class="sect2"><a href="#sgml-xml-data">16.5.13. Packages installing SGML or XML data</a></span></dt>
-<dt><span class="sect2"><a href="#mime-database">16.5.14. Packages installing extensions to the MIME database</a></span></dt>
-<dt><span class="sect2"><a href="#intltool">16.5.15. Packages using intltool</a></span></dt>
-<dt><span class="sect2"><a href="#startup-scripts">16.5.16. Packages installing startup scripts</a></span></dt>
-<dt><span class="sect2"><a href="#tex-packages">16.5.17. Packages installing TeX modules</a></span></dt>
+<dt><span class="sect2"><a href="#installing-score-files">17.6.1. Installing score files</a></span></dt>
+<dt><span class="sect2"><a href="#perl-scripts">17.6.2. Packages containing perl scripts</a></span></dt>
+<dt><span class="sect2"><a href="#hardcoded-paths">17.6.3. Packages with hardcoded paths to other interpreters</a></span></dt>
+<dt><span class="sect2"><a href="#perl-modules">17.6.4. Packages installing perl modules</a></span></dt>
+<dt><span class="sect2"><a href="#faq.info-files">17.6.5. Packages installing info files</a></span></dt>
+<dt><span class="sect2"><a href="#manpages">17.6.6. Packages installing man pages</a></span></dt>
+<dt><span class="sect2"><a href="#gconf2-data-files">17.6.7. Packages installing GConf2 data files</a></span></dt>
+<dt><span class="sect2"><a href="#scrollkeeper-data-files">17.6.8. Packages installing scrollkeeper data files</a></span></dt>
+<dt><span class="sect2"><a href="#x11-fonts">17.6.9. Packages installing X11 fonts</a></span></dt>
+<dt><span class="sect2"><a href="#gtk2-modules">17.6.10. Packages installing GTK2 modules</a></span></dt>
+<dt><span class="sect2"><a href="#sgml-xml-data">17.6.11. Packages installing SGML or XML data</a></span></dt>
+<dt><span class="sect2"><a href="#mime-database">17.6.12. Packages installing extensions to the MIME database</a></span></dt>
+<dt><span class="sect2"><a href="#intltool">17.6.13. Packages using intltool</a></span></dt>
+<dt><span class="sect2"><a href="#startup-scripts">17.6.14. Packages installing startup scripts</a></span></dt>
+<dt><span class="sect2"><a href="#tex-packages">17.6.15. Packages installing TeX modules</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#feedback-to-author">16.6. Feedback to the author</a></span></dt>
+<dt><span class="sect1"><a href="#feedback-to-author">17.7. Feedback to the author</a></span></dt>
</dl>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="general-operation"></a>16.1. General operation</h2></div></div></div>
+<a name="general-operation"></a>17.1. General operation</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="pulling-vars-from-etc-mk.conf"></a>16.1.1. How to pull in variables from /etc/mk.conf</h3></div></div></div>
+<a name="pulling-vars-from-etc-mk.conf"></a>17.1.1. How to pull in variables from /etc/mk.conf</h3></div></div></div>
<p>The problem with package-defined variables that can be
overridden via <code class="varname">MAKECONF</code> or
<code class="filename">/etc/mk.conf</code> is that <a href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> expands a
@@ -5919,7 +6008,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="where-to-install-documentation"></a>16.1.2. Where to install documentation</h3></div></div></div>
+<a name="where-to-install-documentation"></a>17.1.2. Where to install documentation</h3></div></div></div>
<p>Documentation should be installed into
<code class="filename">${PREFIX}/share/doc/${PKGBASE}</code> or
<code class="filename">${PREFIX}/share/doc/${PKGNAME}</code> (the
@@ -5927,7 +6016,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="restricted-packages"></a>16.1.3. Restricted packages</h3></div></div></div>
+<a name="restricted-packages"></a>17.1.3. Restricted packages</h3></div></div></div>
<p>Some licenses restrict how software may be re-distributed.
In order to satisfy these restrictions, the package system
defines five make variables that can be set to note these
@@ -5975,7 +6064,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="dependencies"></a>16.1.4. Handling dependencies</h3></div></div></div>
+<a name="dependencies"></a>17.1.4. Handling dependencies</h3></div></div></div>
<p>Your package may depend on some other package being present
- and there are various ways of expressing this
dependency. pkgsrc supports the <code class="varname">BUILD_DEPENDS</code>
@@ -5983,7 +6072,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
<code class="varname">USE_TOOLS</code> definition, as well as
dependencies via <code class="filename">buildlink3.mk</code>, which is
the preferred way to handle dependencies, and which uses the
- variables named above. See <a href="#buildlink" title="Chapter 11. Buildlink methodology">Chapter 11, <i>Buildlink methodology</i></a> for more
+ variables named above. See <a href="#buildlink" title="Chapter 12. Buildlink methodology">Chapter 12, <i>Buildlink methodology</i></a> for more
information.</p>
<p>The basic difference between the two variables is as
follows: The <code class="varname">DEPENDS</code> definition registers
@@ -6084,7 +6173,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
should not be used across different systems that may have
different versions of binary packages installed.</p>
<p>For security fixes, please update the package
- vulnerabilities file. See <a href="#security-handling" title="16.1.8. Handling packages with security problems">Section 16.1.8, &#8220;Handling packages with security problems&#8221;</a> for more
+ vulnerabilities file. See <a href="#security-handling" title="17.1.8. Handling packages with security problems">Section 17.1.8, &#8220;Handling packages with security problems&#8221;</a> for more
information.</p>
</li>
<li>
@@ -6119,7 +6208,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="conflicts"></a>16.1.5. Handling conflicts with other packages</h3></div></div></div>
+<a name="conflicts"></a>17.1.5. Handling conflicts with other packages</h3></div></div></div>
<p>Your package may conflict with other packages a user might
already have installed on his system, e.g. if your package
installs the same set of files like another package in our
@@ -6147,7 +6236,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="not-building-packages"></a>16.1.6. Packages that cannot or should not be built</h3></div></div></div>
+<a name="not-building-packages"></a>17.1.6. Packages that cannot or should not be built</h3></div></div></div>
<p>There are several reasons why a package might be
instructed to not build under certain circumstances. If the
package builds and runs on most platforms, the exceptions
@@ -6167,7 +6256,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="undeletable-packages"></a>16.1.7. Packages which should not be deleted, once installed</h3></div></div></div>
+<a name="undeletable-packages"></a>17.1.7. Packages which should not be deleted, once installed</h3></div></div></div>
<p>To ensure that a package may not be deleted, once it has been
installed, the <code class="varname">PKG_PRESERVE</code> definition should
be set in the package Makefile. This will be carried into any
@@ -6178,7 +6267,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="security-handling"></a>16.1.8. Handling packages with security problems</h3></div></div></div>
+<a name="security-handling"></a>17.1.8. Handling packages with security problems</h3></div></div></div>
<p>When a vulnerability is found, this should be noted in
<code class="filename">localsrc/security/advisories/pkg-vulnerabilities</code>,
and after committing that file, use <span><strong class="command">make upload</strong></span>
@@ -6194,7 +6283,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="compiler-bugs"></a>16.1.9. How to handle compiler bugs</h3></div></div></div>
+<a name="compiler-bugs"></a>17.1.9. How to handle compiler bugs</h3></div></div></div>
<p>Some source files trigger bugs in the compiler, based on
combinations of compiler version and architecture and almost
always relation to optimisation being enabled. Common symptoms
@@ -6209,7 +6298,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bumping-pkgrevision"></a>16.1.10. How to handle incrementing versions when fixing an existing package</h3></div></div></div>
+<a name="bumping-pkgrevision"></a>17.1.10. How to handle incrementing versions when fixing an existing package</h3></div></div></div>
<p>When making fixes to an existing package it can be useful
to change the version number in <code class="varname">PKGNAME</code>. To
avoid conflicting with future versions by the original author, a
@@ -6232,14 +6321,14 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="portability-of-packages"></a>16.1.11. Portability of packages</h3></div></div></div>
+<a name="portability-of-packages"></a>17.1.11. Portability of packages</h3></div></div></div>
<p>One appealing feature of pkgsrc is that it runs on many different
platforms. As a result, it is important to ensure, where possible,
that packages in pkgsrc are portable. There are some particular
details you should pay attention to while working on pkgsrc.</p>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="install-scripts"></a>16.1.11.1. ${INSTALL}, ${INSTALL_DATA_DIR}, ...</h4></div></div></div>
+<a name="install-scripts"></a>17.1.11.1. ${INSTALL}, ${INSTALL_DATA_DIR}, ...</h4></div></div></div>
<p>The BSD-compatible <span><strong class="command">install</strong></span> supplied with some
operating systems will not perform more than one operation at a time.
As such, you should call &#8220;<span class="quote">${INSTALL}</span>&#8221;, etc. like this:</p>
@@ -6252,10 +6341,10 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="downloading-issues"></a>16.2. Possible downloading issues</h2></div></div></div>
+<a name="fixes.fetch"></a>17.2. Fixing problems in the <span class="emphasis"><em>fetch</em></span> phase</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="no-plain-download"></a>16.2.1. Packages whose distfiles aren't available for plain downloading</h3></div></div></div>
+<a name="no-plain-download"></a>17.2.1. Packages whose distfiles aren't available for plain downloading</h3></div></div></div>
<p>If you need to download from a dynamic URL you can set
<code class="varname">DYNAMIC_MASTER_SITES</code> and a <span><strong class="command">make
fetch</strong></span> will call <code class="filename">files/getsite.sh</code>
@@ -6277,7 +6366,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="modified-distfiles-same-name"></a>16.2.2. How to handle modified distfiles with the 'old' name</h3></div></div></div>
+<a name="modified-distfiles-same-name"></a>17.2.2. How to handle modified distfiles with the 'old' name</h3></div></div></div>
<p>Sometimes authors of a software package make some
modifications after the software was released, and they put up a
new distfile without changing the package's version number. If a
@@ -6302,10 +6391,10 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="configuration-gotchas"></a>16.3. Configuration gotchas</h2></div></div></div>
+<a name="fixes.configure"></a>17.3. Fixing problems in the <span class="emphasis"><em>configure</em></span> phase</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="fixes.libtool"></a>16.3.1. Shared libraries - libtool</h3></div></div></div>
+<a name="fixes.libtool"></a>17.3.1. Shared libraries - libtool</h3></div></div></div>
<p>pkgsrc supports many different machines, with different
object formats like a.out and ELF, and varying abilities to do
shared library and dynamic loading at all. To accompany this,
@@ -6427,7 +6516,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="using-libtool"></a>16.3.2. Using libtool on GNU packages that already support libtool</h3></div></div></div>
+<a name="using-libtool"></a>17.3.2. Using libtool on GNU packages that already support libtool</h3></div></div></div>
<p>Add <code class="varname">USE_LIBTOOL=yes</code> to the
package Makefile. This will override the package's own libtool
in most cases. For older libtool using packages, libtool is
@@ -6467,7 +6556,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="autoconf-automake"></a>16.3.3. GNU Autoconf/Automake</h3></div></div></div>
+<a name="autoconf-automake"></a>17.3.3. GNU Autoconf/Automake</h3></div></div></div>
<p>If a package needs GNU autoconf or automake to be executed
to regenerate the configure script and Makefile.in makefile
templates, then they should be executed in a pre-configure
@@ -6509,31 +6598,36 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="fixes-build"></a>16.4. Building the package</h2></div></div></div>
+<a name="fixes.build"></a>17.4. Fixing problems in the <span class="emphasis"><em>build</em></span> phase</h2></div></div></div>
+<p>The most common failures when building a package are that
+ some platforms do not provide certain header files, functions or
+ libraries, or they provide the functions in a library that the
+ original package author didn't know. To work around this, you
+ can rewrite the source code in most cases so that it does not
+ use the missing functions or provides a replacement function.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="cpp-defines"></a>16.4.1. CPP defines</h3></div></div></div>
-<p>Sometimes you need to compile different code depending on
- the target platform. The C preprocessor has a set of predefined
- macros that can be queried by using <code class="varname">#ifdef FOO</code>
- or <code class="varname">#if defined(FOO)</code>. Among these macros are
- usually ones that describe the target CPU and operating system.
- Depending of which of the macros are defined, you can write code
- that uses features unique to a specific platform. Generally you
- should rather use the GNU autotools (automake, autoconf, etc.) to
- check for specific features (like the existence of a header file,
- a function or a library), but sometimes this is not possible or
- desired.</p>
-<p>In that case you can use the predefined macros
- below to configure your code to the platform it runs on. Almost
- every operating system, hardware architecture and compiler has its
- own macro. For example, if the macros <code class="varname">__GNUC__</code>,
- <code class="varname">__i386__</code> and <code class="varname">__NetBSD__</code> are
- all defined, you know that you are using NetBSD on an i386
- compatible CPU, and your compiler is GCC.</p>
+<a name="fixes.build.cpp"></a>17.4.1. Compiling C and C++ code conditionally</h3></div></div></div>
+<p>If a package already comes with a GNU configure script, the
+ preferred way to fix the build failure is to change the
+ configure script, not the code. In the other cases, you can
+ utilize the C preprocessor, which defines certain macros
+ depending on the operating system and hardware architecture it
+ compiles for. These macros can be queried using for example
+ <code class="varname">#if defined(__i386)</code>. Almost every operating
+ system, hardware architecture and compiler has its own macro.
+ For example, if the macros <code class="varname">__GNUC__</code>,
+ <code class="varname">__i386__</code> and <code class="varname">__NetBSD__</code>
+ are all defined, you know that you are using NetBSD on an i386
+ compatible CPU, and your compiler is GCC.</p>
+<p>The list of the following macros for hardware and
+ operating system depends on the compiler that is used. For
+ example, if you want to conditionally compile code on Solaris,
+ don't use <code class="varname">__sun__</code>, as the SunPro compiler
+ does not define it. Use <code class="varname">__sun</code> instead.</p>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="fixes-build-cpp-opsys"></a>16.4.1.1. CPP defines for operating systems</h4></div></div></div>
+<a name="fixes.build.cpp.os"></a>17.4.1.1. C preprocessor macros to identify the operating system</h4></div></div></div>
<p>To distinguish between 4.4 BSD-derived systems and the
rest of the world, you should use the following code.</p>
<pre class="programlisting">
@@ -6544,8 +6638,8 @@ TOOLS_PLATFORM.true?= true # shell builtin
/* non-BSD-specific code goes here */
#endif
</pre>
-<p>If this distinction is not fine enough, you can also use
- the following defines.</p>
+<p>If this distinction is not fine enough, you can also test
+ for the following macros.</p>
<pre class="programlisting">
FreeBSD __FreeBSD__
DragonFly __DragonFly__
@@ -6558,7 +6652,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="fixes-build-cpp-cpu"></a>16.4.1.2. CPP defines for CPUs</h4></div></div></div>
+<a name="fixes.build.cpp.arch"></a>17.4.1.2. C preprocessor macros to identify the hardware architecture</h4></div></div></div>
<pre class="programlisting">
i386 i386, __i386, __i386__
MIPS __mips
@@ -6567,63 +6661,20 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="fixes-build-cpp-compiler"></a>16.4.1.3. CPP defines for compilers</h4></div></div></div>
+<a name="fixes.build.cpp.compiler"></a>17.4.1.3. C preprocessor macros to identify the compiler</h4></div></div></div>
<pre class="programlisting">
GCC __GNUC__ (major version), __GNUC_MINOR__
SunPro __SUNPRO_C (0x570 for version 5.7)
</pre>
</div>
</div>
-<div class="sect2" lang="en">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="cpp-list-examples"></a>16.4.2. Examples of CPP defines for some platforms</h3></div></div></div>
-<p>The list of the CPP identification macros for hardware and
- operating system may depend on the compiler that is used. The
- following list contains some examples that may help you to choose
- the right ones. For example, if you want to conditionally compile
- code on Solaris, don't use <code class="varname">__sun__</code>, as the
- SunPro compiler does not define it. Use <code class="varname">__sun</code>
- instead.</p>
-<div class="variablelist"><dl>
-<dt><span class="term">GCC 3.3.3 + SuSE Linux 9.1 + i386</span></dt>
-<dd><p>__ELF__, __gnu_linux__, __i386, __i386__,
- __linux, __linux__, __unix, __unix__, i386, linux,
- unix.</p></dd>
-<dt><span class="term">GCC 2.95 + NetBSD 1.6.2 + i386</span></dt>
-<dd><p>__ELF__, __NetBSD__, __i386, __i386__,
- i386.</p></dd>
-<dt><span class="term">GCC 3.3.3 + NetBSD 2.0 + i386</span></dt>
-<dd><p>__ELF__, __NetBSD__, __i386, __i386__,
- i386.</p></dd>
-<dt><span class="term">GCC 4 + Solaris 8 + SPARC</span></dt>
-<dd><p>__ELF__, __sparc, __sparc__, __sun, __sun__,
- __SVR4, __svr4__, __unix, __unix__, sparc, sun,
- unix.</p></dd>
-<dt><span class="term">SunPro 5.7 + Solaris 8 + SPARC</span></dt>
-<dd><p>__SVR4, __sparc, __sun, __unix, sparc, sun,
- unix.</p></dd>
-</dl></div>
-</div>
-<div class="sect2" lang="en">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="cpp-list"></a>16.4.3. Getting a list of CPP defines</h3></div></div></div>
-<p>If your system uses the GNU C Compiler, you can get a list
- of symbols that are defined by default, e.g. to identify the
- platform, with the following command:</p>
-<pre class="programlisting">
- gcc -E -dM - &lt; /dev/null
-</pre>
-<p>On other systems you may get the list by using the system's
- syscall trace utility (ktrace, truss, strace) to have a look which
- arguments are passed to the actual compiler.</p>
-</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="package-specific-actions"></a>16.5. Package specific actions</h2></div></div></div>
+<a name="package-specific-actions"></a>17.5. Package specific actions</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="user-interaction"></a>16.5.1. User interaction</h3></div></div></div>
+<a name="user-interaction"></a>17.5.1. User interaction</h3></div></div></div>
<p>Occasionally, packages require interaction from the user, and this can be
in a number of ways:</p>
<div class="itemizedlist"><ul type="disc">
@@ -6645,7 +6696,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="handling-licenses"></a>16.5.2. Handling licenses</h3></div></div></div>
+<a name="handling-licenses"></a>17.5.2. Handling licenses</h3></div></div></div>
<p>A package may be covered by a license which the user has
or has not agreed to accept. For these cases, pkgsrc contains
a mechanism to note that a package is covered by a particular
@@ -6715,9 +6766,13 @@ TOOLS_PLATFORM.true?= true # shell builtin
be inappropriate when e.g. one accepts a particular license to
indicate to pkgsrc that a fee has been paid.</p>
</div>
+</div>
+<div class="sect1" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="fixes.install"></a>17.6. Fixing problems in the <span class="emphasis"><em>install</em></span> phase</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="installing-score-files"></a>16.5.3. Installing score files</h3></div></div></div>
+<a name="installing-score-files"></a>17.6.1. Installing score files</h3></div></div></div>
<p>Certain packages, most of them in the games category, install
a score file that allows all users on the system to record their
highscores. In order for this to work, the binaries need to be
@@ -6738,7 +6793,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="perl-scripts"></a>16.5.4. Packages containing perl scripts</h3></div></div></div>
+<a name="perl-scripts"></a>17.6.2. Packages containing perl scripts</h3></div></div></div>
<p>
If your package contains interpreted perl scripts, set
<code class="varname">REPLACE_PERL</code> to ensure that the proper
@@ -6748,7 +6803,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="hardcoded-paths"></a>16.5.5. Packages with hardcoded paths to other interpreters</h3></div></div></div>
+<a name="hardcoded-paths"></a>17.6.3. Packages with hardcoded paths to other interpreters</h3></div></div></div>
<p>
Your package may also contain scripts with hardcoded paths to
other interpreters besides (or as well as) perl. To correct the
@@ -6771,7 +6826,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="perl-modules"></a>16.5.6. Packages installing perl modules</h3></div></div></div>
+<a name="perl-modules"></a>17.6.4. Packages installing perl modules</h3></div></div></div>
<p>Makefiles of packages providing perl5 modules should include
the Makefile fragment
<code class="filename">../../lang/perl5/module.mk</code>. It provides a
@@ -6800,7 +6855,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="faq.info-files"></a>16.5.7. Packages installing info files</h3></div></div></div>
+<a name="faq.info-files"></a>17.6.5. Packages installing info files</h3></div></div></div>
<p>Some packages install info files or use the
&#8220;<span class="quote">makeinfo</span>&#8221; or &#8220;<span class="quote">install-info</span>&#8221;
commands. <code class="varname">INFO_FILES</code> should be defined in
@@ -6847,7 +6902,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="manpages"></a>16.5.8. Packages installing man pages</h3></div></div></div>
+<a name="manpages"></a>17.6.6. Packages installing man pages</h3></div></div></div>
<p>Many packages install manual pages. The man pages
are installed under <code class="varname">${PREFIX}/${PKGMANDIR}</code>
which is <code class="filename">/usr/pkg/man</code> by default.
@@ -6883,13 +6938,13 @@ TOOLS_PLATFORM.true?= true # shell builtin
a non-standard use of --mandir, you can set
<code class="varname">GNU_CONFIGURE_MANDIR</code> as needed.
</p>
-<p>See <a href="#manpage-compression" title="10.5. Man page compression">Section 10.5, &#8220;Man page compression&#8221;</a> for
+<p>See <a href="#manpage-compression" title="11.5. Man page compression">Section 11.5, &#8220;Man page compression&#8221;</a> for
information on installation of compressed manual pages.
</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="gconf2-data-files"></a>16.5.9. Packages installing GConf2 data files</h3></div></div></div>
+<a name="gconf2-data-files"></a>17.6.7. Packages installing GConf2 data files</h3></div></div></div>
<p>
If a package installs <code class="filename">.schemas</code> or
<code class="filename">.entries</code> files, used by GConf2,
@@ -6925,7 +6980,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="scrollkeeper-data-files"></a>16.5.10. Packages installing scrollkeeper data files</h3></div></div></div>
+<a name="scrollkeeper-data-files"></a>17.6.8. Packages installing scrollkeeper data files</h3></div></div></div>
<p>
If a package installs <code class="filename">.omf</code> files, used by
scrollkeeper, you need to take some extra steps to make sure they
@@ -6948,7 +7003,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="x11-fonts"></a>16.5.11. Packages installing X11 fonts</h3></div></div></div>
+<a name="x11-fonts"></a>17.6.9. Packages installing X11 fonts</h3></div></div></div>
<p>If a package installs font files, you will need to rebuild
the fonts database in the directory where they get installed at
installation and deinstallation time. This can be automatically
@@ -6965,7 +7020,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="gtk2-modules"></a>16.5.12. Packages installing GTK2 modules</h3></div></div></div>
+<a name="gtk2-modules"></a>17.6.10. Packages installing GTK2 modules</h3></div></div></div>
<p>If a package installs GTK2 immodules or loaders, you need to
take some extra steps to get them registered in the GTK2 database
properly:</p>
@@ -7002,7 +7057,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="sgml-xml-data"></a>16.5.13. Packages installing SGML or XML data</h3></div></div></div>
+<a name="sgml-xml-data"></a>17.6.11. Packages installing SGML or XML data</h3></div></div></div>
<p>If a package installs SGML or XML data files that need to be
registered in system-wide catalogs (like DTDs, sub-catalogs,
etc.), you need to take some extra steps:
@@ -7032,7 +7087,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="mime-database"></a>16.5.14. Packages installing extensions to the MIME database</h3></div></div></div>
+<a name="mime-database"></a>17.6.12. Packages installing extensions to the MIME database</h3></div></div></div>
<p>If a package provides extensions to the MIME database by
installing <code class="filename">.xml</code> files inside
<code class="filename">${PREFIX}/share/mime/packages</code>, you
@@ -7063,7 +7118,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="intltool"></a>16.5.15. Packages using intltool</h3></div></div></div>
+<a name="intltool"></a>17.6.13. Packages using intltool</h3></div></div></div>
<p>If a package uses intltool during its build, include the
<code class="filename">../../textproc/intltool/buildlink3.mk</code> file,
which forces it to use the intltool package provided by pkgsrc,
@@ -7076,7 +7131,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="startup-scripts"></a>16.5.16. Packages installing startup scripts</h3></div></div></div>
+<a name="startup-scripts"></a>17.6.14. Packages installing startup scripts</h3></div></div></div>
<p>If a package contains a rc.d script, it won't be copied into
the startup directory by default, but you can enable it, by adding
the option <code class="varname">PKG_RCD_SCRIPTS=YES</code> in
@@ -7087,7 +7142,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="tex-packages"></a>16.5.17. Packages installing TeX modules</h3></div></div></div>
+<a name="tex-packages"></a>17.6.15. Packages installing TeX modules</h3></div></div></div>
<p>If a package installs TeX packages into the texmf tree,
the <code class="filename">ls-R</code> database of the tree needs to be
updated.</p>
@@ -7126,7 +7181,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="feedback-to-author"></a>16.6. Feedback to the author</h2></div></div></div>
+<a name="feedback-to-author"></a>17.7. Feedback to the author</h2></div></div></div>
<p>If you have found any bugs in the package you make available,
if you had to do special steps to make it run under NetBSD or
if you enhanced the software in various other ways, be sure
@@ -7139,7 +7194,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="debug"></a>Chapter 17. Debugging</h2></div></div></div>
+<a name="debug"></a>Chapter 18. Debugging</h2></div></div></div>
<p>To check out all the gotchas when building a package, here are the steps
that I do in order to get a package working. Please note this is basically
the same as what was explained in the previous sections, only with some
@@ -7179,7 +7234,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
package. </p>
</li>
<li><p>Look at the <code class="filename">Makefile</code>, fix if necessary;
- see <a href="#components.Makefile" title="8.1. Makefile">Section 8.1, &#8220;<code class="filename">Makefile</code>&#8221;</a>.</p></li>
+ see <a href="#components.Makefile" title="9.1. Makefile">Section 9.1, &#8220;<code class="filename">Makefile</code>&#8221;</a>.</p></li>
<li>
<p>Generate a <code class="filename">PLIST</code>:</p>
<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make install</code></strong>
@@ -7220,26 +7275,26 @@ TOOLS_PLATFORM.true?= true # shell builtin
<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>pkglint</code></strong></pre>
</li>
<li><p>Submit (or commit, if you have cvs access);
- see <a href="#submit" title="Chapter 18. Submitting and Committing">Chapter 18, <i>Submitting and Committing</i></a>.</p></li>
+ see <a href="#submit" title="Chapter 19. Submitting and Committing">Chapter 19, <i>Submitting and Committing</i></a>.</p></li>
</ul></div>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="submit"></a>Chapter 18. Submitting and Committing</h2></div></div></div>
+<a name="submit"></a>Chapter 19. Submitting and Committing</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#submitting-binary-packages">18.1. Submitting binary packages</a></span></dt>
-<dt><span class="sect1"><a href="#submitting-your-package">18.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
-<dt><span class="sect1"><a href="#general-notes-for-changes">18.3. General notes when adding, updating, or removing packages</a></span></dt>
-<dt><span class="sect1"><a href="#committing-importing">18.4. Committing: Importing a package into CVS</a></span></dt>
-<dt><span class="sect1"><a href="#updating-package">18.5. Updating a package to a newer version</a></span></dt>
-<dt><span class="sect1"><a href="#moving-package">18.6. Moving a package in pkgsrc</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-binary-packages">19.1. Submitting binary packages</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-your-package">19.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
+<dt><span class="sect1"><a href="#general-notes-for-changes">19.3. General notes when adding, updating, or removing packages</a></span></dt>
+<dt><span class="sect1"><a href="#committing-importing">19.4. Committing: Importing a package into CVS</a></span></dt>
+<dt><span class="sect1"><a href="#updating-package">19.5. Updating a package to a newer version</a></span></dt>
+<dt><span class="sect1"><a href="#moving-package">19.6. Moving a package in pkgsrc</a></span></dt>
</dl>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="submitting-binary-packages"></a>18.1. Submitting binary packages</h2></div></div></div>
+<a name="submitting-binary-packages"></a>19.1. Submitting binary packages</h2></div></div></div>
<p>Our policy is that we accept binaries only from pkgsrc
developers to guarantee that the packages don't contain any
trojan horses etc. This is not to annoy anyone but rather to
@@ -7250,9 +7305,9 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="submitting-your-package"></a>18.2. Submitting source packages (for non-NetBSD-developers)</h2></div></div></div>
+<a name="submitting-your-package"></a>19.2. Submitting source packages (for non-NetBSD-developers)</h2></div></div></div>
<p>First, check that your package is complete, compiles and
- runs well; see <a href="#debug" title="Chapter 17. Debugging">Chapter 17, <i>Debugging</i></a> and the rest of this
+ runs well; see <a href="#debug" title="Chapter 18. Debugging">Chapter 18, <i>Debugging</i></a> and the rest of this
document. Next, generate an uuencoded gzipped <a href="http://netbsd.gw.com/cgi-bin/man-cgi?tar+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span></a>
archive, preferably with all files in a single directory.
Finally, <span><strong class="command">send-pr</strong></span> with category
@@ -7270,7 +7325,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="general-notes-for-changes"></a>18.3. General notes when adding, updating, or removing packages</h2></div></div></div>
+<a name="general-notes-for-changes"></a>19.3. General notes when adding, updating, or removing packages</h2></div></div></div>
<p>Please note all package additions, updates, moves, and
removals in <code class="filename">pkgsrc/doc/CHANGES</code>. It's very
important to keep this file up to date and conforming to the
@@ -7303,7 +7358,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="committing-importing"></a>18.4. Committing: Importing a package into CVS</h2></div></div></div>
+<a name="committing-importing"></a>19.4. Committing: Importing a package into CVS</h2></div></div></div>
<p>
This section is only of interest for pkgsrc developers with write
access to the pkgsrc repository. Please remember that cvs
@@ -7337,7 +7392,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="updating-package"></a>18.5. Updating a package to a newer version</h2></div></div></div>
+<a name="updating-package"></a>19.5. Updating a package to a newer version</h2></div></div></div>
<p>
Please always put a concise, appropriate and relevant summary of the
changes between old and new versions into the commit log when updating
@@ -7371,7 +7426,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="moving-package"></a>18.6. Moving a package in pkgsrc</h2></div></div></div>
+<a name="moving-package"></a>19.6. Moving a package in pkgsrc</h2></div></div></div>
<div class="orderedlist"><ol type="1">
<li><p>Make a copy of the directory somewhere else.</p></li>
<li>
@@ -7413,7 +7468,7 @@ place.</p></li>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="devfaq"></a>Chapter 19. Frequently Asked Questions</h2></div></div></div>
+<a name="devfaq"></a>Chapter 20. Frequently Asked Questions</h2></div></div></div>
<p>This section contains the answers to questions that may
arise when you are writing a package. If you don't find your
question answered here, first have a look in the other chapters,
@@ -7421,24 +7476,24 @@ place.</p></li>
<code class="literal">pkgsrc-users</code> mailing list.</p>
<div class="qandaset">
<dl>
-<dt>19.1. <a href="#id2654892">What is the difference between
+<dt>20.1. <a href="#id2655161">What is the difference between
MAKEFLAGS, .MAKEFLAGS and
MAKE_FLAGS?</a>
</dt>
-<dt>19.2. <a href="#id2654929">What is the difference between
+<dt>20.2. <a href="#id2655197">What is the difference between
MAKE, GMAKE and
MAKE_PROGRAM?</a>
</dt>
-<dt>19.3. <a href="#id2655035">What is the difference between
+<dt>20.3. <a href="#id2655236">What is the difference between
CC, PKG_CC and
PKGSRC_COMPILER?</a>
</dt>
-<dt>19.4. <a href="#id2655073">What is the difference between
+<dt>20.4. <a href="#id2655273">What is the difference between
BUILDLINK_LDFLAGS,
BUILDLINK_LDADD and
BUILDLINK_LIBS?</a>
</dt>
-<dt>19.5. <a href="#id2655091">Why does make show-var
+<dt>20.5. <a href="#id2655291">Why does make show-var
VARNAME=BUILDLINK_PREFIX.foo
say it's empty?</a>
</dt>
@@ -7448,7 +7503,7 @@ place.</p></li>
<tbody>
<tr class="question">
<td align="left" valign="top">
-<a name="id2654892"></a><a name="id2654893"></a><b>19.1.</b>
+<a name="id2655161"></a><a name="id2655162"></a><b>20.1.</b>
</td>
<td align="left" valign="top"><p>What is the difference between
<code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and
@@ -7464,7 +7519,7 @@ place.</p></li>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="id2654929"></a><a name="id2654930"></a><b>19.2.</b>
+<a name="id2655197"></a><a name="id2655198"></a><b>20.2.</b>
</td>
<td align="left" valign="top"><p>What is the difference between
<code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and
@@ -7482,7 +7537,7 @@ place.</p></li>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="id2655035"></a><a name="id2655036"></a><b>19.3.</b>
+<a name="id2655236"></a><a name="id2655237"></a><b>20.3.</b>
</td>
<td align="left" valign="top"><p>What is the difference between
<code class="varname">CC</code>, <code class="varname">PKG_CC</code> and
@@ -7500,7 +7555,7 @@ place.</p></li>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="id2655073"></a><a name="id2655074"></a><b>19.4.</b>
+<a name="id2655273"></a><a name="id2655274"></a><b>20.4.</b>
</td>
<td align="left" valign="top"><p>What is the difference between
<code class="varname">BUILDLINK_LDFLAGS</code>,
@@ -7513,7 +7568,7 @@ place.</p></li>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="id2655091"></a><a name="id2655092"></a><b>19.5.</b>
+<a name="id2655291"></a><a name="id2655292"></a><b>20.5.</b>
</td>
<td align="left" valign="top"><p>Why does <span><strong class="command">make show-var
VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span>
@@ -7544,52 +7599,52 @@ place.</p></li>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="chapter"><a href="#infr.design">20. Design of the pkgsrc infrastructure</a></span></dt>
+<dt><span class="chapter"><a href="#infr.design">21. Design of the pkgsrc infrastructure</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#infr.var">20.1. Variable evaluation</a></span></dt>
+<dt><span class="sect1"><a href="#infr.var">21.1. Variable evaluation</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.var.load">20.1.1. At load time</a></span></dt>
-<dt><span class="sect2"><a href="#infr.var.run">20.1.2. At runtime</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.load">21.1.1. At load time</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.run">21.1.2. At runtime</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#infr.design.intf">20.2. Designing interfaces for Makefile fragments</a></span></dt>
+<dt><span class="sect1"><a href="#infr.design.intf">21.2. Designing interfaces for Makefile fragments</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.design.intf.proc">20.2.1. Procedures with parameters</a></span></dt>
-<dt><span class="sect2"><a href="#infr.design.intf.action">20.2.2. Actions taken on behalf of parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.proc">21.2.1. Procedures with parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.action">21.2.2. Actions taken on behalf of parameters</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#regression">21. Regression tests</a></span></dt>
+<dt><span class="chapter"><a href="#regression">22. Regression tests</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#regression.descr">21.1. The regression tests framework</a></span></dt>
-<dt><span class="sect1"><a href="#regression.run">21.2. Running the regression tests</a></span></dt>
-<dt><span class="sect1"><a href="#regression.new">21.3. Adding a new regression test</a></span></dt>
+<dt><span class="sect1"><a href="#regression.descr">22.1. The regression tests framework</a></span></dt>
+<dt><span class="sect1"><a href="#regression.run">22.2. Running the regression tests</a></span></dt>
+<dt><span class="sect1"><a href="#regression.new">22.3. Adding a new regression test</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#regression.fun.override">21.3.1. Overridable functions</a></span></dt>
-<dt><span class="sect2"><a href="#regression.fun.helper">21.3.2. Helper functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.override">22.3.1. Overridable functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.helper">22.3.2. Helper functions</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#porting">22. Porting pkgsrc</a></span></dt>
+<dt><span class="chapter"><a href="#porting">23. Porting pkgsrc</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#porting.opsys">22.1. Porting pkgsrc to a new operating system</a></span></dt>
-<dt><span class="sect1"><a href="#porting.compiler">22.2. Adding support for a new compiler</a></span></dt>
+<dt><span class="sect1"><a href="#porting.opsys">23.1. Porting pkgsrc to a new operating system</a></span></dt>
+<dt><span class="sect1"><a href="#porting.compiler">23.2. Adding support for a new compiler</a></span></dt>
</dl></dd>
</dl>
</div>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="infr.design"></a>Chapter 20. Design of the pkgsrc infrastructure</h2></div></div></div>
+<a name="infr.design"></a>Chapter 21. Design of the pkgsrc infrastructure</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#infr.var">20.1. Variable evaluation</a></span></dt>
+<dt><span class="sect1"><a href="#infr.var">21.1. Variable evaluation</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.var.load">20.1.1. At load time</a></span></dt>
-<dt><span class="sect2"><a href="#infr.var.run">20.1.2. At runtime</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.load">21.1.1. At load time</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.run">21.1.2. At runtime</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#infr.design.intf">20.2. Designing interfaces for Makefile fragments</a></span></dt>
+<dt><span class="sect1"><a href="#infr.design.intf">21.2. Designing interfaces for Makefile fragments</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.design.intf.proc">20.2.1. Procedures with parameters</a></span></dt>
-<dt><span class="sect2"><a href="#infr.design.intf.action">20.2.2. Actions taken on behalf of parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.proc">21.2.1. Procedures with parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.action">21.2.2. Actions taken on behalf of parameters</a></span></dt>
</dl></dd>
</dl>
</div>
@@ -7599,10 +7654,10 @@ place.</p></li>
like.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="infr.var"></a>20.1. Variable evaluation</h2></div></div></div>
+<a name="infr.var"></a>21.1. Variable evaluation</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="infr.var.load"></a>20.1.1. At load time</h3></div></div></div>
+<a name="infr.var.load"></a>21.1.1. At load time</h3></div></div></div>
<p>Variable evaluation takes place either at load time or at
runtime, depending on the context in which they occur. The
contexts where variables are evaluated at load time are:</p>
@@ -7644,7 +7699,7 @@ place.</p></li>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="infr.var.run"></a>20.1.2. At runtime</h3></div></div></div>
+<a name="infr.var.run"></a>21.1.2. At runtime</h3></div></div></div>
<p>After all the files have been loaded, the values of the
variables cannot be changed anymore. Variables that are used in
the shell commands are expanded at this point.</p>
@@ -7652,14 +7707,14 @@ place.</p></li>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="infr.design.intf"></a>20.2. Designing interfaces for Makefile fragments</h2></div></div></div>
+<a name="infr.design.intf"></a>21.2. Designing interfaces for Makefile fragments</h2></div></div></div>
<p>Most of the <code class="filename">.mk</code> files fall into one
of the following classes. Cases where a file falls into more
than one class should be avoided as it often leads to subtle
bugs.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="infr.design.intf.proc"></a>20.2.1. Procedures with parameters</h3></div></div></div>
+<a name="infr.design.intf.proc"></a>21.2.1. Procedures with parameters</h3></div></div></div>
<p>In a traditional imperative programming language some of
the <code class="filename">.mk</code> files could be described as
procedures. They take some input parameters and&#8212;after
@@ -7693,7 +7748,7 @@ place.</p></li>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="infr.design.intf.action"></a>20.2.2. Actions taken on behalf of parameters</h3></div></div></div>
+<a name="infr.design.intf.action"></a>21.2.2. Actions taken on behalf of parameters</h3></div></div></div>
<p>Action files take some input parameters and may define
runtime variables. They shall not define loadtime variables.
There are action files that are included implicitly by the
@@ -7706,16 +7761,16 @@ place.</p></li>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="regression"></a>Chapter 21. Regression tests</h2></div></div></div>
+<a name="regression"></a>Chapter 22. Regression tests</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#regression.descr">21.1. The regression tests framework</a></span></dt>
-<dt><span class="sect1"><a href="#regression.run">21.2. Running the regression tests</a></span></dt>
-<dt><span class="sect1"><a href="#regression.new">21.3. Adding a new regression test</a></span></dt>
+<dt><span class="sect1"><a href="#regression.descr">22.1. The regression tests framework</a></span></dt>
+<dt><span class="sect1"><a href="#regression.run">22.2. Running the regression tests</a></span></dt>
+<dt><span class="sect1"><a href="#regression.new">22.3. Adding a new regression test</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#regression.fun.override">21.3.1. Overridable functions</a></span></dt>
-<dt><span class="sect2"><a href="#regression.fun.helper">21.3.2. Helper functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.override">22.3.1. Overridable functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.helper">22.3.2. Helper functions</a></span></dt>
</dl></dd>
</dl>
</div>
@@ -7729,12 +7784,12 @@ place.</p></li>
how you can add new tests.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="regression.descr"></a>21.1. The regression tests framework</h2></div></div></div>
+<a name="regression.descr"></a>22.1. The regression tests framework</h2></div></div></div>
<p></p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="regression.run"></a>21.2. Running the regression tests</h2></div></div></div>
+<a name="regression.run"></a>22.2. Running the regression tests</h2></div></div></div>
<p>You first need to install the <a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkg_regress/README.html" target="_top"><code class="filename">pkgtools/pkg_regress</code></a> package, which
provides the <span><strong class="command">pkg_regress</strong></span> command. Then you
can simply run that command, which will run all tests in the
@@ -7742,7 +7797,7 @@ place.</p></li>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="regression.new"></a>21.3. Adding a new regression test</h2></div></div></div>
+<a name="regression.new"></a>22.3. Adding a new regression test</h2></div></div></div>
<p>Every directory in the <code class="filename">regress</code>
category that contains a file called <code class="filename">spec</code>
is considered a regression test. This file is a shell program
@@ -7751,7 +7806,7 @@ place.</p></li>
needs.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="regression.fun.override"></a>21.3.1. Overridable functions</h3></div></div></div>
+<a name="regression.fun.override"></a>22.3.1. Overridable functions</h3></div></div></div>
<p>These functions do not take any parameters. They are all
called in &#8220;<span class="quote">set -e</span>&#8221; mode, so you should be careful
to check the exitcodes of any commands you run in the
@@ -7778,7 +7833,7 @@ place.</p></li>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="regression.fun.helper"></a>21.3.2. Helper functions</h3></div></div></div>
+<a name="regression.fun.helper"></a>22.3.2. Helper functions</h3></div></div></div>
<div class="variablelist"><dl>
<dt><span class="term"><code class="varname">exit_status(expected)</code></span></dt>
<dd><p>This function compares the exitcode of the
@@ -7801,12 +7856,12 @@ place.</p></li>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="porting"></a>Chapter 22. Porting pkgsrc</h2></div></div></div>
+<a name="porting"></a>Chapter 23. Porting pkgsrc</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#porting.opsys">22.1. Porting pkgsrc to a new operating system</a></span></dt>
-<dt><span class="sect1"><a href="#porting.compiler">22.2. Adding support for a new compiler</a></span></dt>
+<dt><span class="sect1"><a href="#porting.opsys">23.1. Porting pkgsrc to a new operating system</a></span></dt>
+<dt><span class="sect1"><a href="#porting.compiler">23.2. Adding support for a new compiler</a></span></dt>
</dl>
</div>
<p>The pkgsrc system has already been ported to many
@@ -7815,7 +7870,7 @@ place.</p></li>
portable.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="porting.opsys"></a>22.1. Porting pkgsrc to a new operating system</h2></div></div></div>
+<a name="porting.opsys"></a>23.1. Porting pkgsrc to a new operating system</h2></div></div></div>
<p>To port pkgsrc to a new operating system (called
<code class="literal">MyOS</code> in this example), you need to touch the
following files:</p>
@@ -7866,7 +7921,7 @@ place.</p></li>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="porting.compiler"></a>22.2. Adding support for a new compiler</h2></div></div></div>
+<a name="porting.compiler"></a>23.2. Adding support for a new compiler</h2></div></div></div>
<p>TODO</p>
</div>
</div>
@@ -7962,7 +8017,7 @@ looks fine.</pre>
<code class="prompt">#</code> <strong class="userinput"><code>cd bison</code></strong>
<code class="prompt">#</code> <strong class="userinput"><code>mkdir patches</code></strong></pre>
<p>Create <code class="filename">Makefile</code>, <code class="filename">DESCR</code> and
- <code class="filename">PLIST</code> (see <a href="#components" title="Chapter 8. Package components - files, directories and contents">Chapter 8, <i>Package components - files, directories and contents</i></a>)
+ <code class="filename">PLIST</code> (see <a href="#components" title="Chapter 9. Package components - files, directories and contents">Chapter 9, <i>Package components - files, directories and contents</i></a>)
then continue with fetching the distfile:</p>
<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make fetch</code></strong>
&gt;&gt; bison-1.25.tar.gz doesn't seem to exist on this system.