summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/pkgsrc.html2094
-rw-r--r--doc/pkgsrc.txt2017
2 files changed, 2144 insertions, 1967 deletions
diff --git a/doc/pkgsrc.html b/doc/pkgsrc.html
index 22f15bf5e8b..f3b54ed92f4 100644
--- a/doc/pkgsrc.html
+++ b/doc/pkgsrc.html
@@ -31,7 +31,7 @@
</h3>
</div></div>
<div><p class="copyright">Copyright © 1994-2007 The NetBSD Foundation, Inc</p></div>
-<div><p class="pubdate">$NetBSD: pkgsrc.xml,v 1.25 2007/08/15 06:32:38 rillig Exp $</p></div>
+<div><p class="pubdate">$NetBSD: pkgsrc.xml,v 1.26 2007/09/18 08:17:21 rillig Exp $</p></div>
<div><div class="abstract">
<p class="title"><b>Abstract</b></p>
<p>pkgsrc is a centralized package management system for
@@ -127,303 +127,311 @@
<dd><dl>
<dt><span class="sect1"><a href="#building-a-single-binary-package">6.1. Building a single binary package</a></span></dt>
<dt><span class="sect1"><a href="#settings-for-creationg-of-binary-packages">6.2. Settings for creation of binary packages</a></span></dt>
-<dt><span class="sect1"><a href="#bulkbuild">6.3. Doing a bulk build of all packages</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#binary.configuration">6.3.1. Configuration</a></span></dt>
-<dt><span class="sect2"><a href="#other-environmental-considerations">6.3.2. Other environmental considerations</a></span></dt>
-<dt><span class="sect2"><a href="#operation">6.3.3. Operation</a></span></dt>
-<dt><span class="sect2"><a href="#what-it-does">6.3.4. What it does</a></span></dt>
-<dt><span class="sect2"><a href="#disk-space-requirements">6.3.5. Disk space requirements</a></span></dt>
-<dt><span class="sect2"><a href="#setting-up-a-sandbox">6.3.6. Setting up a sandbox for chrooted builds</a></span></dt>
-<dt><span class="sect2"><a href="#building-a-partial-set">6.3.7. Building a partial set of packages</a></span></dt>
-<dt><span class="sect2"><a href="#bulk-upload">6.3.8. Uploading results of a bulk build</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#creating-cdroms">6.4. Creating a multiple CD-ROM packages collection</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#cdpack-example">6.4.1. Example of cdpack</a></span></dt></dl></dd>
-</dl></dd>
-<dt><span class="chapter"><a href="#files">7. Directory layout of the installed files</a></span></dt>
-<dd><dl>
-<dt><span class="sect1"><a href="#files.localbase">7.1. File system layout in <code class="literal">${LOCALBASE}</code></a></span></dt>
-<dt><span class="sect1"><a href="#files.varbase">7.2. File system layout in <code class="literal">${VARBASE}</code></a></span></dt>
-</dl></dd>
-<dt><span class="chapter"><a href="#faq">8. Frequently Asked Questions</a></span></dt>
-<dd><dl>
-<dt><span class="sect1"><a href="#mailing-list-pointers">8.1. Are there any mailing lists for pkg-related discussion?</a></span></dt>
-<dt><span class="sect1"><a href="#pkgviews-docs">8.2. Where's the pkgviews documentation?</a></span></dt>
-<dt><span class="sect1"><a href="#faq-pkgtools">8.3. Utilities for package management (pkgtools)</a></span></dt>
-<dt><span class="sect1"><a href="#non-root-pkgsrc">8.4. How to use pkgsrc as non-root</a></span></dt>
-<dt><span class="sect1"><a href="#resume-transfers">8.5. How to resume transfers when fetching distfiles?</a></span></dt>
-<dt><span class="sect1"><a href="#x.org-from-pkgsrc">8.6. How can I install/use modular X.org from pkgsrc?</a></span></dt>
-<dt><span class="sect1"><a href="#fetch-behind-firewall">8.7. How to fetch files from behind a firewall</a></span></dt>
-<dt><span class="sect1"><a href="#passive-ftp">8.8. How do I tell <span><strong class="command">make fetch</strong></span> to do passive FTP?</a></span></dt>
-<dt><span class="sect1"><a href="#fetching-all-distfiles">8.9. How to fetch all distfiles at once</a></span></dt>
-<dt><span class="sect1"><a href="#tmac.andoc-missing">8.10. What does &#8220;<span class="quote">Don't know how to make
+</dl></dd>
+<dt><span class="chapter"><a href="#bulk">7. Creating binary packages for everything in pkgsrc (bulk
+builds)</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#bulk.pre">7.1. Think first, build later</a></span></dt>
+<dt><span class="sect1"><a href="#bulk.req">7.2. Requirements of a bulk build</a></span></dt>
+<dt><span class="sect1"><a href="#bulk.old">7.3. Running an old-style bulk build</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#binary.configuration">7.3.1. Configuration</a></span></dt>
+<dt><span class="sect2"><a href="#other-environmental-considerations">7.3.2. Other environmental considerations</a></span></dt>
+<dt><span class="sect2"><a href="#operation">7.3.3. Operation</a></span></dt>
+<dt><span class="sect2"><a href="#what-it-does">7.3.4. What it does</a></span></dt>
+<dt><span class="sect2"><a href="#disk-space-requirements">7.3.5. Disk space requirements</a></span></dt>
+<dt><span class="sect2"><a href="#setting-up-a-sandbox">7.3.6. Setting up a sandbox for chrooted builds</a></span></dt>
+<dt><span class="sect2"><a href="#building-a-partial-set">7.3.7. Building a partial set of packages</a></span></dt>
+<dt><span class="sect2"><a href="#bulk-upload">7.3.8. Uploading results of a bulk build</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#bulk.pbulk">7.4. Running a pbulk-style bulk build</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#bulk.pbulk.conf">7.4.1. Configuration</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#creating-cdroms">7.5. Creating a multiple CD-ROM packages collection</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#cdpack-example">7.5.1. Example of cdpack</a></span></dt></dl></dd>
+</dl></dd>
+<dt><span class="chapter"><a href="#files">8. Directory layout of the installed files</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#files.localbase">8.1. File system layout in <code class="literal">${LOCALBASE}</code></a></span></dt>
+<dt><span class="sect1"><a href="#files.varbase">8.2. File system layout in <code class="literal">${VARBASE}</code></a></span></dt>
+</dl></dd>
+<dt><span class="chapter"><a href="#faq">9. Frequently Asked Questions</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#mailing-list-pointers">9.1. Are there any mailing lists for pkg-related discussion?</a></span></dt>
+<dt><span class="sect1"><a href="#pkgviews-docs">9.2. Where's the pkgviews documentation?</a></span></dt>
+<dt><span class="sect1"><a href="#faq-pkgtools">9.3. Utilities for package management (pkgtools)</a></span></dt>
+<dt><span class="sect1"><a href="#non-root-pkgsrc">9.4. How to use pkgsrc as non-root</a></span></dt>
+<dt><span class="sect1"><a href="#resume-transfers">9.5. How to resume transfers when fetching distfiles?</a></span></dt>
+<dt><span class="sect1"><a href="#x.org-from-pkgsrc">9.6. How can I install/use modular X.org from pkgsrc?</a></span></dt>
+<dt><span class="sect1"><a href="#fetch-behind-firewall">9.7. How to fetch files from behind a firewall</a></span></dt>
+<dt><span class="sect1"><a href="#passive-ftp">9.8. How do I tell <span><strong class="command">make fetch</strong></span> to do passive FTP?</a></span></dt>
+<dt><span class="sect1"><a href="#fetching-all-distfiles">9.9. How to fetch all distfiles at once</a></span></dt>
+<dt><span class="sect1"><a href="#tmac.andoc-missing">9.10. What does &#8220;<span class="quote">Don't know how to make
/usr/share/tmac/tmac.andoc</span>&#8221; mean?</a></span></dt>
-<dt><span class="sect1"><a href="#bsd.own.mk-missing">8.11. What does &#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221; mean?</a></span></dt>
-<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">8.12. Using 'sudo' with pkgsrc</a></span></dt>
-<dt><span class="sect1"><a href="#faq.conf">8.13. How do I change the location of configuration files?</a></span></dt>
-<dt><span class="sect1"><a href="#audit-packages">8.14. Automated security checks</a></span></dt>
-<dt><span class="sect1"><a href="#ufaq-cflags">8.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt>
-<dt><span class="sect1"><a href="#ufaq-fail">8.16. A package does not build. What shall I do?</a></span></dt>
-<dt><span class="sect1"><a href="#faq.rcs-conflicts">8.17. What does &#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221; mean?</a></span></dt>
+<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does &#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221; mean?</a></span></dt>
+<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">9.12. Using 'sudo' with pkgsrc</a></span></dt>
+<dt><span class="sect1"><a href="#faq.conf">9.13. How do I change the location of configuration files?</a></span></dt>
+<dt><span class="sect1"><a href="#audit-packages">9.14. Automated security checks</a></span></dt>
+<dt><span class="sect1"><a href="#ufaq-cflags">9.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt>
+<dt><span class="sect1"><a href="#ufaq-fail">9.16. A package does not build. What shall I do?</a></span></dt>
+<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.17. What does &#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221; mean?</a></span></dt>
</dl></dd>
</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="#creating">9. Creating a new pkgsrc package from scratch</a></span></dt>
+<dt><span class="chapter"><a href="#creating">10. Creating a new pkgsrc package from scratch</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#creating.common">9.1. Common types of packages</a></span></dt>
+<dt><span class="sect1"><a href="#creating.common">10.1. Common types of packages</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#creating.perl-module">9.1.1. Perl modules</a></span></dt>
-<dt><span class="sect2"><a href="#creating.kde-app">9.1.2. KDE applications</a></span></dt>
+<dt><span class="sect2"><a href="#creating.perl-module">10.1.1. Perl modules</a></span></dt>
+<dt><span class="sect2"><a href="#creating.kde-app">10.1.2. KDE applications</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#creating.examples">9.2. Examples</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#creating.nvu">9.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#creating.examples">10.2. Examples</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#creating.nvu">10.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#components">10. Package components - files, directories and contents</a></span></dt>
+<dt><span class="chapter"><a href="#components">11. Package components - files, directories and contents</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#components.Makefile">10.1. <code class="filename">Makefile</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.distinfo">10.2. <code class="filename">distinfo</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.patches">10.3. patches/*</a></span></dt>
+<dt><span class="sect1"><a href="#components.Makefile">11.1. <code class="filename">Makefile</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.distinfo">11.2. <code class="filename">distinfo</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.patches">11.3. patches/*</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#components.patch.structure">10.3.1. Structure of a single patch file</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.caveats">10.3.2. Creating patch files</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.sources">10.3.3. Sources where the patch files come from</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.guidelines">10.3.4. Patching guidelines</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.feedback">10.3.5. Feedback to the author</a></span></dt>
+<dt><span class="sect2"><a href="#components.patch.structure">11.3.1. Structure of a single patch file</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.caveats">11.3.2. Creating patch files</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.sources">11.3.3. Sources where the patch files come from</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.guidelines">11.3.4. Patching guidelines</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.feedback">11.3.5. Feedback to the author</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#other-mandatory-files">10.4. Other mandatory files</a></span></dt>
-<dt><span class="sect1"><a href="#components.optional">10.5. Optional files</a></span></dt>
+<dt><span class="sect1"><a href="#other-mandatory-files">11.4. Other mandatory files</a></span></dt>
+<dt><span class="sect1"><a href="#components.optional">11.5. Optional files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#components.optional.bin">10.5.1. Files affecting the binary package</a></span></dt>
-<dt><span class="sect2"><a href="#components.optional.build">10.5.2. Files affecting the build process</a></span></dt>
-<dt><span class="sect2"><a href="#components.optional.none">10.5.3. Files affecting nothing at all</a></span></dt>
+<dt><span class="sect2"><a href="#components.optional.bin">11.5.1. Files affecting the binary package</a></span></dt>
+<dt><span class="sect2"><a href="#components.optional.build">11.5.2. Files affecting the build process</a></span></dt>
+<dt><span class="sect2"><a href="#components.optional.none">11.5.3. Files affecting nothing at all</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#work-dir">10.6. <code class="filename">work*</code></a></span></dt>
-<dt><span class="sect1"><a href="#files-dir">10.7. <code class="filename">files/*</code></a></span></dt>
+<dt><span class="sect1"><a href="#work-dir">11.6. <code class="filename">work*</code></a></span></dt>
+<dt><span class="sect1"><a href="#files-dir">11.7. <code class="filename">files/*</code></a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#makefile">11. Programming in <code class="filename">Makefile</code>s</a></span></dt>
+<dt><span class="chapter"><a href="#makefile">12. Programming in <code class="filename">Makefile</code>s</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#makefile.style">11.1. Caveats</a></span></dt>
-<dt><span class="sect1"><a href="#makefile.variables">11.2. <code class="filename">Makefile</code> variables</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">11.2.1. Naming conventions</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#makefile.code">11.3. Code snippets</a></span></dt>
+<dt><span class="sect1"><a href="#makefile.style">12.1. Caveats</a></span></dt>
+<dt><span class="sect1"><a href="#makefile.variables">12.2. <code class="filename">Makefile</code> variables</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">12.2.1. Naming conventions</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#makefile.code">12.3. Code snippets</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#adding-to-list">11.3.1. Adding things to a list</a></span></dt>
-<dt><span class="sect2"><a href="#converting-internal-to-external">11.3.2. Converting an internal list into an external list</a></span></dt>
-<dt><span class="sect2"><a href="#passing-variable-to-shell">11.3.3. Passing variables to a shell command</a></span></dt>
-<dt><span class="sect2"><a href="#quoting-guideline">11.3.4. Quoting guideline</a></span></dt>
-<dt><span class="sect2"><a href="#bsd-make-bug-workaround">11.3.5. Workaround for a bug in BSD Make</a></span></dt>
+<dt><span class="sect2"><a href="#adding-to-list">12.3.1. Adding things to a list</a></span></dt>
+<dt><span class="sect2"><a href="#converting-internal-to-external">12.3.2. Converting an internal list into an external list</a></span></dt>
+<dt><span class="sect2"><a href="#passing-variable-to-shell">12.3.3. Passing variables to a shell command</a></span></dt>
+<dt><span class="sect2"><a href="#quoting-guideline">12.3.4. Quoting guideline</a></span></dt>
+<dt><span class="sect2"><a href="#bsd-make-bug-workaround">12.3.5. Workaround for a bug in BSD Make</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#plist">12. PLIST issues</a></span></dt>
+<dt><span class="chapter"><a href="#plist">13. PLIST issues</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#rcs-id">12.1. RCS ID</a></span></dt>
-<dt><span class="sect1"><a href="#automatic-plist-generation">12.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
-<dt><span class="sect1"><a href="#print-PLIST">12.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
-<dt><span class="sect1"><a href="#plist.misc">12.4. Variable substitution in PLIST</a></span></dt>
-<dt><span class="sect1"><a href="#manpage-compression">12.5. Man page compression</a></span></dt>
-<dt><span class="sect1"><a href="#using-PLIST_SRC">12.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
-<dt><span class="sect1"><a href="#platform-specific-plist">12.7. Platform-specific and differing PLISTs</a></span></dt>
-<dt><span class="sect1"><a href="#faq.common-dirs">12.8. Sharing directories between packages</a></span></dt>
+<dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt>
+<dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
+<dt><span class="sect1"><a href="#print-PLIST">13.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
+<dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt>
+<dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt>
+<dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
+<dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt>
+<dt><span class="sect1"><a href="#faq.common-dirs">13.8. Sharing directories between packages</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#buildlink">13. Buildlink methodology</a></span></dt>
+<dt><span class="chapter"><a href="#buildlink">14. Buildlink methodology</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#converting-to-buildlink3">13.1. Converting packages to use buildlink3</a></span></dt>
-<dt><span class="sect1"><a href="#creating-buildlink3.mk">13.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-buildlink3">14.1. Converting packages to use buildlink3</a></span></dt>
+<dt><span class="sect1"><a href="#creating-buildlink3.mk">14.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-bl3">13.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
-<dt><span class="sect2"><a href="#updating-buildlink-depends">13.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">14.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
+<dt><span class="sect2"><a href="#updating-buildlink-depends">14.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">13.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#writing-builtin.mk">14.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">13.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">13.3.2. Global preferences for native or pkgsrc software</a></span></dt>
+<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">14.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">14.3.2. Global preferences for native or pkgsrc software</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#pkginstall">14. The pkginstall framework</a></span></dt>
+<dt><span class="chapter"><a href="#pkginstall">15. The pkginstall framework</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">14.1. Files and directories outside the installation prefix</a></span></dt>
+<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">15.1. Files and directories outside the installation prefix</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#dirs-outside-prefix">14.1.1. Directory manipulation</a></span></dt>
-<dt><span class="sect2"><a href="#files-outside-prefix">14.1.2. File manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#dirs-outside-prefix">15.1.1. Directory manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#files-outside-prefix">15.1.2. File manipulation</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#conf-files">14.2. Configuration files</a></span></dt>
+<dt><span class="sect1"><a href="#conf-files">15.2. Configuration files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#conf-files-sysconfdir">14.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-configure">14.2.2. Telling the software where configuration files are</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-patching">14.2.3. Patching installations</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-disable">14.2.4. Disabling handling of configuration files</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-sysconfdir">15.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-configure">15.2.2. Telling the software where configuration files are</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-patching">15.2.3. Patching installations</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-disable">15.2.4. Disabling handling of configuration files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#rcd-scripts">14.3. System startup scripts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">14.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#users-and-groups">14.4. System users and groups</a></span></dt>
-<dt><span class="sect1"><a href="#shells">14.5. System shells</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#shells-disable">14.5.1. Disabling shell registration</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#fonts">14.6. Fonts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#fonts-disable">14.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#rcd-scripts">15.3. System startup scripts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">15.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#users-and-groups">15.4. System users and groups</a></span></dt>
+<dt><span class="sect1"><a href="#shells">15.5. System shells</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#shells-disable">15.5.1. Disabling shell registration</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#fonts">15.6. Fonts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#fonts-disable">15.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#options">15. Options handling</a></span></dt>
+<dt><span class="chapter"><a href="#options">16. Options handling</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#global-default-options">15.1. Global default options</a></span></dt>
-<dt><span class="sect1"><a href="#converting-to-options">15.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
-<dt><span class="sect1"><a href="#option-names">15.3. Option Names</a></span></dt>
+<dt><span class="sect1"><a href="#global-default-options">16.1. Global default options</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-options">16.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
+<dt><span class="sect1"><a href="#option-names">16.3. Option Names</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#build">16. The build process</a></span></dt>
+<dt><span class="chapter"><a href="#build">17. The build process</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#build.intro">16.1. Introduction</a></span></dt>
-<dt><span class="sect1"><a href="#build.prefix">16.2. Program location</a></span></dt>
-<dt><span class="sect1"><a href="#build.builddirs">16.3. Directories used during the build process</a></span></dt>
-<dt><span class="sect1"><a href="#build.running">16.4. Running a phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.fetch">16.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.intro">17.1. Introduction</a></span></dt>
+<dt><span class="sect1"><a href="#build.prefix">17.2. Program location</a></span></dt>
+<dt><span class="sect1"><a href="#build.builddirs">17.3. Directories used during the build process</a></span></dt>
+<dt><span class="sect1"><a href="#build.running">17.4. Running a phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.fetch">17.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#build.fetch.what">16.5.1. What to fetch and where to get it from</a></span></dt>
-<dt><span class="sect2"><a href="#build.fetch.how">16.5.2. How are the files fetched?</a></span></dt>
+<dt><span class="sect2"><a href="#build.fetch.what">17.5.1. What to fetch and where to get it from</a></span></dt>
+<dt><span class="sect2"><a href="#build.fetch.how">17.5.2. How are the files fetched?</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#build.checksum">16.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.extract">16.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.patch">16.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.tools">16.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.wrapper">16.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.configure">16.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.build">16.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.test">16.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.install">16.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.package">16.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.clean">16.16. Cleaning up</a></span></dt>
-<dt><span class="sect1"><a href="#build.helpful-targets">16.17. Other helpful targets</a></span></dt>
-</dl></dd>
-<dt><span class="chapter"><a href="#tools">17. Tools needed for building or running</a></span></dt>
-<dd><dl>
-<dt><span class="sect1"><a href="#pkgsrc-tools">17.1. Tools for pkgsrc builds</a></span></dt>
-<dt><span class="sect1"><a href="#package-tools">17.2. Tools needed by packages</a></span></dt>
-<dt><span class="sect1"><a href="#platform-tools">17.3. Tools provided by platforms</a></span></dt>
-<dt><span class="sect1"><a href="#tools.questions">17.4. Questions regarding the tools</a></span></dt>
-</dl></dd>
-<dt><span class="chapter"><a href="#fixes">18. Making your package work</a></span></dt>
-<dd><dl>
-<dt><span class="sect1"><a href="#general-operation">18.1. General operation</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#portability-of-packages">18.1.1. Portability of packages</a></span></dt>
-<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">18.1.2. How to pull in user-settable variables from <code class="filename">mk.conf</code></a></span></dt>
-<dt><span class="sect2"><a href="#user-interaction">18.1.3. User interaction</a></span></dt>
-<dt><span class="sect2"><a href="#handling-licenses">18.1.4. Handling licenses</a></span></dt>
-<dt><span class="sect2"><a href="#restricted-packages">18.1.5. Restricted packages</a></span></dt>
-<dt><span class="sect2"><a href="#dependencies">18.1.6. Handling dependencies</a></span></dt>
-<dt><span class="sect2"><a href="#conflicts">18.1.7. Handling conflicts with other packages</a></span></dt>
-<dt><span class="sect2"><a href="#not-building-packages">18.1.8. Packages that cannot or should not be built</a></span></dt>
-<dt><span class="sect2"><a href="#undeletable-packages">18.1.9. Packages which should not be deleted, once installed</a></span></dt>
-<dt><span class="sect2"><a href="#security-handling">18.1.10. Handling packages with security problems</a></span></dt>
-<dt><span class="sect2"><a href="#bumping-pkgrevision">18.1.11. How to handle incrementing versions when fixing an existing package</a></span></dt>
-<dt><span class="sect2"><a href="#fixes.subst">18.1.12. Substituting variable text in the package files (the SUBST framework)</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.fetch">18.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">18.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
-<dt><span class="sect2"><a href="#modified-distfiles-same-name">18.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.configure">18.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">18.3.1. Shared libraries - libtool</a></span></dt>
-<dt><span class="sect2"><a href="#using-libtool">18.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
-<dt><span class="sect2"><a href="#autoconf-automake">18.3.3. GNU Autoconf/Automake</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#programming-languages">18.4. Programming languages</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#basic-programming-languages">18.4.1. C, C++, and Fortran</a></span></dt>
-<dt><span class="sect2"><a href="#java-programming-language">18.4.2. Java</a></span></dt>
-<dt><span class="sect2"><a href="#perl-scripts">18.4.3. Packages containing perl scripts</a></span></dt>
-<dt><span class="sect2"><a href="#other-programming-languages">18.4.4. Other programming languages</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.build">18.5. 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">18.5.1. Compiling C and C++ code conditionally</a></span></dt>
-<dt><span class="sect2"><a href="#compiler-bugs">18.5.2. How to handle compiler bugs</a></span></dt>
-<dt><span class="sect2"><a href="#undefined-reference">18.5.3. Undefined reference to &#8220;<span class="quote">...</span>&#8221;</a></span></dt>
-<dt><span class="sect2"><a href="#out-of-memory">18.5.4. Running out of memory</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.install">18.6. Fixing problems in the <span class="emphasis"><em>install</em></span> phase</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#install-scripts">18.6.1. Creating needed directories</a></span></dt>
-<dt><span class="sect2"><a href="#where-to-install-documentation">18.6.2. Where to install documentation</a></span></dt>
-<dt><span class="sect2"><a href="#installing-score-files">18.6.3. Installing highscore files</a></span></dt>
-<dt><span class="sect2"><a href="#destdir-support">18.6.4. Adding DESTDIR support to packages</a></span></dt>
-<dt><span class="sect2"><a href="#hardcoded-paths">18.6.5. Packages with hardcoded paths to other interpreters</a></span></dt>
-<dt><span class="sect2"><a href="#perl-modules">18.6.6. Packages installing perl modules</a></span></dt>
-<dt><span class="sect2"><a href="#faq.info-files">18.6.7. Packages installing info files</a></span></dt>
-<dt><span class="sect2"><a href="#manpages">18.6.8. Packages installing man pages</a></span></dt>
-<dt><span class="sect2"><a href="#gconf2-data-files">18.6.9. Packages installing GConf2 data files</a></span></dt>
-<dt><span class="sect2"><a href="#scrollkeeper-data-files">18.6.10. Packages installing scrollkeeper data files</a></span></dt>
-<dt><span class="sect2"><a href="#x11-fonts">18.6.11. Packages installing X11 fonts</a></span></dt>
-<dt><span class="sect2"><a href="#gtk2-modules">18.6.12. Packages installing GTK2 modules</a></span></dt>
-<dt><span class="sect2"><a href="#sgml-xml-data">18.6.13. Packages installing SGML or XML data</a></span></dt>
-<dt><span class="sect2"><a href="#mime-database">18.6.14. Packages installing extensions to the MIME database</a></span></dt>
-<dt><span class="sect2"><a href="#intltool">18.6.15. Packages using intltool</a></span></dt>
-<dt><span class="sect2"><a href="#startup-scripts">18.6.16. Packages installing startup scripts</a></span></dt>
-<dt><span class="sect2"><a href="#tex-packages">18.6.17. Packages installing TeX modules</a></span></dt>
-<dt><span class="sect2"><a href="#emulation-packages">18.6.18. Packages supporting running binaries in
+<dt><span class="sect1"><a href="#build.checksum">17.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.extract">17.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.patch">17.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.tools">17.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.wrapper">17.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.configure">17.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.build">17.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.test">17.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.install">17.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.package">17.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.clean">17.16. Cleaning up</a></span></dt>
+<dt><span class="sect1"><a href="#build.helpful-targets">17.17. Other helpful targets</a></span></dt>
+</dl></dd>
+<dt><span class="chapter"><a href="#tools">18. Tools needed for building or running</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#pkgsrc-tools">18.1. Tools for pkgsrc builds</a></span></dt>
+<dt><span class="sect1"><a href="#package-tools">18.2. Tools needed by packages</a></span></dt>
+<dt><span class="sect1"><a href="#platform-tools">18.3. Tools provided by platforms</a></span></dt>
+<dt><span class="sect1"><a href="#tools.questions">18.4. Questions regarding the tools</a></span></dt>
+</dl></dd>
+<dt><span class="chapter"><a href="#fixes">19. Making your package work</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#general-operation">19.1. General operation</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#portability-of-packages">19.1.1. Portability of packages</a></span></dt>
+<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">19.1.2. How to pull in user-settable variables from <code class="filename">mk.conf</code></a></span></dt>
+<dt><span class="sect2"><a href="#user-interaction">19.1.3. User interaction</a></span></dt>
+<dt><span class="sect2"><a href="#handling-licenses">19.1.4. Handling licenses</a></span></dt>
+<dt><span class="sect2"><a href="#restricted-packages">19.1.5. Restricted packages</a></span></dt>
+<dt><span class="sect2"><a href="#dependencies">19.1.6. Handling dependencies</a></span></dt>
+<dt><span class="sect2"><a href="#conflicts">19.1.7. Handling conflicts with other packages</a></span></dt>
+<dt><span class="sect2"><a href="#not-building-packages">19.1.8. Packages that cannot or should not be built</a></span></dt>
+<dt><span class="sect2"><a href="#undeletable-packages">19.1.9. Packages which should not be deleted, once installed</a></span></dt>
+<dt><span class="sect2"><a href="#security-handling">19.1.10. Handling packages with security problems</a></span></dt>
+<dt><span class="sect2"><a href="#bumping-pkgrevision">19.1.11. How to handle incrementing versions when fixing an existing package</a></span></dt>
+<dt><span class="sect2"><a href="#fixes.subst">19.1.12. Substituting variable text in the package files (the SUBST framework)</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.fetch">19.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">19.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
+<dt><span class="sect2"><a href="#modified-distfiles-same-name">19.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.configure">19.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">19.3.1. Shared libraries - libtool</a></span></dt>
+<dt><span class="sect2"><a href="#using-libtool">19.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
+<dt><span class="sect2"><a href="#autoconf-automake">19.3.3. GNU Autoconf/Automake</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#programming-languages">19.4. Programming languages</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#basic-programming-languages">19.4.1. C, C++, and Fortran</a></span></dt>
+<dt><span class="sect2"><a href="#java-programming-language">19.4.2. Java</a></span></dt>
+<dt><span class="sect2"><a href="#perl-scripts">19.4.3. Packages containing perl scripts</a></span></dt>
+<dt><span class="sect2"><a href="#other-programming-languages">19.4.4. Other programming languages</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.build">19.5. 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">19.5.1. Compiling C and C++ code conditionally</a></span></dt>
+<dt><span class="sect2"><a href="#compiler-bugs">19.5.2. How to handle compiler bugs</a></span></dt>
+<dt><span class="sect2"><a href="#undefined-reference">19.5.3. Undefined reference to &#8220;<span class="quote">...</span>&#8221;</a></span></dt>
+<dt><span class="sect2"><a href="#out-of-memory">19.5.4. Running out of memory</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.install">19.6. Fixing problems in the <span class="emphasis"><em>install</em></span> phase</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#install-scripts">19.6.1. Creating needed directories</a></span></dt>
+<dt><span class="sect2"><a href="#where-to-install-documentation">19.6.2. Where to install documentation</a></span></dt>
+<dt><span class="sect2"><a href="#installing-score-files">19.6.3. Installing highscore files</a></span></dt>
+<dt><span class="sect2"><a href="#destdir-support">19.6.4. Adding DESTDIR support to packages</a></span></dt>
+<dt><span class="sect2"><a href="#hardcoded-paths">19.6.5. Packages with hardcoded paths to other interpreters</a></span></dt>
+<dt><span class="sect2"><a href="#perl-modules">19.6.6. Packages installing perl modules</a></span></dt>
+<dt><span class="sect2"><a href="#faq.info-files">19.6.7. Packages installing info files</a></span></dt>
+<dt><span class="sect2"><a href="#manpages">19.6.8. Packages installing man pages</a></span></dt>
+<dt><span class="sect2"><a href="#gconf2-data-files">19.6.9. Packages installing GConf2 data files</a></span></dt>
+<dt><span class="sect2"><a href="#scrollkeeper-data-files">19.6.10. Packages installing scrollkeeper data files</a></span></dt>
+<dt><span class="sect2"><a href="#x11-fonts">19.6.11. Packages installing X11 fonts</a></span></dt>
+<dt><span class="sect2"><a href="#gtk2-modules">19.6.12. Packages installing GTK2 modules</a></span></dt>
+<dt><span class="sect2"><a href="#sgml-xml-data">19.6.13. Packages installing SGML or XML data</a></span></dt>
+<dt><span class="sect2"><a href="#mime-database">19.6.14. Packages installing extensions to the MIME database</a></span></dt>
+<dt><span class="sect2"><a href="#intltool">19.6.15. Packages using intltool</a></span></dt>
+<dt><span class="sect2"><a href="#startup-scripts">19.6.16. Packages installing startup scripts</a></span></dt>
+<dt><span class="sect2"><a href="#tex-packages">19.6.17. Packages installing TeX modules</a></span></dt>
+<dt><span class="sect2"><a href="#emulation-packages">19.6.18. Packages supporting running binaries in
emulation</a></span></dt>
-<dt><span class="sect2"><a href="#hicolor-theme">18.6.19. Packages installing hicolor theme icons</a></span></dt>
-<dt><span class="sect2"><a href="#desktop-files">18.6.20. Packages installing desktop files</a></span></dt>
+<dt><span class="sect2"><a href="#hicolor-theme">19.6.19. Packages installing hicolor theme icons</a></span></dt>
+<dt><span class="sect2"><a href="#desktop-files">19.6.20. Packages installing desktop files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#punting">18.7. Marking packages as having problems</a></span></dt>
+<dt><span class="sect1"><a href="#punting">19.7. Marking packages as having problems</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#debug">19. Debugging</a></span></dt>
-<dt><span class="chapter"><a href="#submit">20. Submitting and Committing</a></span></dt>
+<dt><span class="chapter"><a href="#debug">20. Debugging</a></span></dt>
+<dt><span class="chapter"><a href="#submit">21. Submitting and Committing</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#submitting-binary-packages">20.1. Submitting binary packages</a></span></dt>
-<dt><span class="sect1"><a href="#submitting-your-package">20.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
-<dt><span class="sect1"><a href="#general-notes-for-changes">20.3. General notes when adding, updating, or removing packages</a></span></dt>
-<dt><span class="sect1"><a href="#committing-importing">20.4. Committing: Importing a package into CVS</a></span></dt>
-<dt><span class="sect1"><a href="#updating-package">20.5. Updating a package to a newer version</a></span></dt>
-<dt><span class="sect1"><a href="#moving-package">20.6. Moving a package in pkgsrc</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-binary-packages">21.1. Submitting binary packages</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-your-package">21.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
+<dt><span class="sect1"><a href="#general-notes-for-changes">21.3. General notes when adding, updating, or removing packages</a></span></dt>
+<dt><span class="sect1"><a href="#committing-importing">21.4. Committing: Importing a package into CVS</a></span></dt>
+<dt><span class="sect1"><a href="#updating-package">21.5. Updating a package to a newer version</a></span></dt>
+<dt><span class="sect1"><a href="#moving-package">21.6. Moving a package in pkgsrc</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#devfaq">21. Frequently Asked Questions</a></span></dt>
-<dt><span class="chapter"><a href="#gnome">22. GNOME packaging and porting</a></span></dt>
+<dt><span class="chapter"><a href="#devfaq">22. Frequently Asked Questions</a></span></dt>
+<dt><span class="chapter"><a href="#gnome">23. GNOME packaging and porting</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#meta-packages">22.1. Meta packages</a></span></dt>
-<dt><span class="sect1"><a href="#new-package">22.2. Packaging a GNOME application</a></span></dt>
-<dt><span class="sect1"><a href="#full-update">22.3. Updating GNOME to a newer version</a></span></dt>
-<dt><span class="sect1"><a href="#patching">22.4. Patching guidelines</a></span></dt>
+<dt><span class="sect1"><a href="#meta-packages">23.1. Meta packages</a></span></dt>
+<dt><span class="sect1"><a href="#new-package">23.2. Packaging a GNOME application</a></span></dt>
+<dt><span class="sect1"><a href="#full-update">23.3. Updating GNOME to a newer version</a></span></dt>
+<dt><span class="sect1"><a href="#patching">23.4. Patching guidelines</a></span></dt>
</dl></dd>
</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">23. Design of the pkgsrc infrastructure</a></span></dt>
+<dt><span class="chapter"><a href="#infr.design">24. Design of the pkgsrc infrastructure</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#infr.vardef">23.1. The meaning of variable definitions</a></span></dt>
-<dt><span class="sect1"><a href="#infr.vardef.problems">23.2. Avoiding problems before they arise</a></span></dt>
-<dt><span class="sect1"><a href="#infr.var">23.3. Variable evaluation</a></span></dt>
+<dt><span class="sect1"><a href="#infr.vardef">24.1. The meaning of variable definitions</a></span></dt>
+<dt><span class="sect1"><a href="#infr.vardef.problems">24.2. Avoiding problems before they arise</a></span></dt>
+<dt><span class="sect1"><a href="#infr.var">24.3. Variable evaluation</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.var.load">23.3.1. At load time</a></span></dt>
-<dt><span class="sect2"><a href="#infr.var.run">23.3.2. At runtime</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.load">24.3.1. At load time</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.run">24.3.2. At runtime</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#infr.varspec">23.4. How can variables be specified?</a></span></dt>
-<dt><span class="sect1"><a href="#infr.design.intf">23.5. Designing interfaces for Makefile fragments</a></span></dt>
+<dt><span class="sect1"><a href="#infr.varspec">24.4. How can variables be specified?</a></span></dt>
+<dt><span class="sect1"><a href="#infr.design.intf">24.5. Designing interfaces for Makefile fragments</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.design.intf.proc">23.5.1. Procedures with parameters</a></span></dt>
-<dt><span class="sect2"><a href="#infr.design.intf.action">23.5.2. Actions taken on behalf of parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.proc">24.5.1. Procedures with parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.action">24.5.2. Actions taken on behalf of parameters</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#infr.order">23.6. The order in which files are loaded</a></span></dt>
+<dt><span class="sect1"><a href="#infr.order">24.6. The order in which files are loaded</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.order.prefs">23.6.1. The order in <code class="filename">bsd.prefs.mk</code></a></span></dt>
-<dt><span class="sect2"><a href="#infr.order.pkg">23.6.2. The order in <code class="filename">bsd.pkg.mk</code></a></span></dt>
+<dt><span class="sect2"><a href="#infr.order.prefs">24.6.1. The order in <code class="filename">bsd.prefs.mk</code></a></span></dt>
+<dt><span class="sect2"><a href="#infr.order.pkg">24.6.2. The order in <code class="filename">bsd.pkg.mk</code></a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#regression">24. Regression tests</a></span></dt>
+<dt><span class="chapter"><a href="#regression">25. Regression tests</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#regression.descr">24.1. The regression tests framework</a></span></dt>
-<dt><span class="sect1"><a href="#regression.run">24.2. Running the regression tests</a></span></dt>
-<dt><span class="sect1"><a href="#regression.new">24.3. Adding a new regression test</a></span></dt>
+<dt><span class="sect1"><a href="#regression.descr">25.1. The regression tests framework</a></span></dt>
+<dt><span class="sect1"><a href="#regression.run">25.2. Running the regression tests</a></span></dt>
+<dt><span class="sect1"><a href="#regression.new">25.3. Adding a new regression test</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#regression.fun.override">24.3.1. Overridable functions</a></span></dt>
-<dt><span class="sect2"><a href="#regression.fun.helper">24.3.2. Helper functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.override">25.3.1. Overridable functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.helper">25.3.2. Helper functions</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#porting">25. Porting pkgsrc</a></span></dt>
+<dt><span class="chapter"><a href="#porting">26. Porting pkgsrc</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#porting.opsys">25.1. Porting pkgsrc to a new operating system</a></span></dt>
-<dt><span class="sect1"><a href="#porting.compiler">25.2. Adding support for a new compiler</a></span></dt>
+<dt><span class="sect1"><a href="#porting.opsys">26.1. Porting pkgsrc to a new operating system</a></span></dt>
+<dt><span class="sect1"><a href="#porting.compiler">26.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>
@@ -467,9 +475,9 @@ source packages</a></span></dt>
</dt>
<dt>3.1. <a href="#binary-kits">Binary kits and available packages</a>
</dt>
-<dt>10.1. <a href="#patch-examples">Patching examples</a>
+<dt>11.1. <a href="#patch-examples">Patching examples</a>
</dt>
-<dt>22.1. <a href="#plist-handling">PLIST handling for GNOME packages</a>
+<dt>23.1. <a href="#plist-handling">PLIST handling for GNOME packages</a>
</dt>
</dl>
</div>
@@ -554,14 +562,14 @@ pkgsrc provides the following key features:
<p>The following principles are basic to pkgsrc:</p>
<div class="itemizedlist"><ul type="disc">
<li><p>&#8220;<span class="quote">It should only work if it's right.</span>&#8221;
-&#8212; That means, if a package contains bugs, it's better to find
+&mdash; That means, if a package contains bugs, it's better to find
them and to complain about them rather than to just install the package
and hope that it works. There are numerous checks in pkgsrc that try to
find such bugs: Static analysis tools (<a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>), build-time checks (portability
of shell scripts), and post-installation checks (installed files,
references to shared libraries, script interpreters).</p></li>
<li><p>&#8220;<span class="quote">If it works, it should work everywhere</span>&#8221;
-&#8212; Like NetBSD has been ported to many hardware architectures,
+&mdash; Like NetBSD has been ported to many hardware architectures,
pkgsrc has been ported to many operating systems. Care is taken that
packages behave the same on all platforms.</p></li>
</ul></div>
@@ -830,45 +838,53 @@ minutes!</p>
<dd><dl>
<dt><span class="sect1"><a href="#building-a-single-binary-package">6.1. Building a single binary package</a></span></dt>
<dt><span class="sect1"><a href="#settings-for-creationg-of-binary-packages">6.2. Settings for creation of binary packages</a></span></dt>
-<dt><span class="sect1"><a href="#bulkbuild">6.3. Doing a bulk build of all packages</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#binary.configuration">6.3.1. Configuration</a></span></dt>
-<dt><span class="sect2"><a href="#other-environmental-considerations">6.3.2. Other environmental considerations</a></span></dt>
-<dt><span class="sect2"><a href="#operation">6.3.3. Operation</a></span></dt>
-<dt><span class="sect2"><a href="#what-it-does">6.3.4. What it does</a></span></dt>
-<dt><span class="sect2"><a href="#disk-space-requirements">6.3.5. Disk space requirements</a></span></dt>
-<dt><span class="sect2"><a href="#setting-up-a-sandbox">6.3.6. Setting up a sandbox for chrooted builds</a></span></dt>
-<dt><span class="sect2"><a href="#building-a-partial-set">6.3.7. Building a partial set of packages</a></span></dt>
-<dt><span class="sect2"><a href="#bulk-upload">6.3.8. Uploading results of a bulk build</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#creating-cdroms">6.4. Creating a multiple CD-ROM packages collection</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#cdpack-example">6.4.1. Example of cdpack</a></span></dt></dl></dd>
-</dl></dd>
-<dt><span class="chapter"><a href="#files">7. Directory layout of the installed files</a></span></dt>
-<dd><dl>
-<dt><span class="sect1"><a href="#files.localbase">7.1. File system layout in <code class="literal">${LOCALBASE}</code></a></span></dt>
-<dt><span class="sect1"><a href="#files.varbase">7.2. File system layout in <code class="literal">${VARBASE}</code></a></span></dt>
-</dl></dd>
-<dt><span class="chapter"><a href="#faq">8. Frequently Asked Questions</a></span></dt>
-<dd><dl>
-<dt><span class="sect1"><a href="#mailing-list-pointers">8.1. Are there any mailing lists for pkg-related discussion?</a></span></dt>
-<dt><span class="sect1"><a href="#pkgviews-docs">8.2. Where's the pkgviews documentation?</a></span></dt>
-<dt><span class="sect1"><a href="#faq-pkgtools">8.3. Utilities for package management (pkgtools)</a></span></dt>
-<dt><span class="sect1"><a href="#non-root-pkgsrc">8.4. How to use pkgsrc as non-root</a></span></dt>
-<dt><span class="sect1"><a href="#resume-transfers">8.5. How to resume transfers when fetching distfiles?</a></span></dt>
-<dt><span class="sect1"><a href="#x.org-from-pkgsrc">8.6. How can I install/use modular X.org from pkgsrc?</a></span></dt>
-<dt><span class="sect1"><a href="#fetch-behind-firewall">8.7. How to fetch files from behind a firewall</a></span></dt>
-<dt><span class="sect1"><a href="#passive-ftp">8.8. How do I tell <span><strong class="command">make fetch</strong></span> to do passive FTP?</a></span></dt>
-<dt><span class="sect1"><a href="#fetching-all-distfiles">8.9. How to fetch all distfiles at once</a></span></dt>
-<dt><span class="sect1"><a href="#tmac.andoc-missing">8.10. What does &#8220;<span class="quote">Don't know how to make
+</dl></dd>
+<dt><span class="chapter"><a href="#bulk">7. Creating binary packages for everything in pkgsrc (bulk
+builds)</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#bulk.pre">7.1. Think first, build later</a></span></dt>
+<dt><span class="sect1"><a href="#bulk.req">7.2. Requirements of a bulk build</a></span></dt>
+<dt><span class="sect1"><a href="#bulk.old">7.3. Running an old-style bulk build</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#binary.configuration">7.3.1. Configuration</a></span></dt>
+<dt><span class="sect2"><a href="#other-environmental-considerations">7.3.2. Other environmental considerations</a></span></dt>
+<dt><span class="sect2"><a href="#operation">7.3.3. Operation</a></span></dt>
+<dt><span class="sect2"><a href="#what-it-does">7.3.4. What it does</a></span></dt>
+<dt><span class="sect2"><a href="#disk-space-requirements">7.3.5. Disk space requirements</a></span></dt>
+<dt><span class="sect2"><a href="#setting-up-a-sandbox">7.3.6. Setting up a sandbox for chrooted builds</a></span></dt>
+<dt><span class="sect2"><a href="#building-a-partial-set">7.3.7. Building a partial set of packages</a></span></dt>
+<dt><span class="sect2"><a href="#bulk-upload">7.3.8. Uploading results of a bulk build</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#bulk.pbulk">7.4. Running a pbulk-style bulk build</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#bulk.pbulk.conf">7.4.1. Configuration</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#creating-cdroms">7.5. Creating a multiple CD-ROM packages collection</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#cdpack-example">7.5.1. Example of cdpack</a></span></dt></dl></dd>
+</dl></dd>
+<dt><span class="chapter"><a href="#files">8. Directory layout of the installed files</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#files.localbase">8.1. File system layout in <code class="literal">${LOCALBASE}</code></a></span></dt>
+<dt><span class="sect1"><a href="#files.varbase">8.2. File system layout in <code class="literal">${VARBASE}</code></a></span></dt>
+</dl></dd>
+<dt><span class="chapter"><a href="#faq">9. Frequently Asked Questions</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#mailing-list-pointers">9.1. Are there any mailing lists for pkg-related discussion?</a></span></dt>
+<dt><span class="sect1"><a href="#pkgviews-docs">9.2. Where's the pkgviews documentation?</a></span></dt>
+<dt><span class="sect1"><a href="#faq-pkgtools">9.3. Utilities for package management (pkgtools)</a></span></dt>
+<dt><span class="sect1"><a href="#non-root-pkgsrc">9.4. How to use pkgsrc as non-root</a></span></dt>
+<dt><span class="sect1"><a href="#resume-transfers">9.5. How to resume transfers when fetching distfiles?</a></span></dt>
+<dt><span class="sect1"><a href="#x.org-from-pkgsrc">9.6. How can I install/use modular X.org from pkgsrc?</a></span></dt>
+<dt><span class="sect1"><a href="#fetch-behind-firewall">9.7. How to fetch files from behind a firewall</a></span></dt>
+<dt><span class="sect1"><a href="#passive-ftp">9.8. How do I tell <span><strong class="command">make fetch</strong></span> to do passive FTP?</a></span></dt>
+<dt><span class="sect1"><a href="#fetching-all-distfiles">9.9. How to fetch all distfiles at once</a></span></dt>
+<dt><span class="sect1"><a href="#tmac.andoc-missing">9.10. What does &#8220;<span class="quote">Don't know how to make
/usr/share/tmac/tmac.andoc</span>&#8221; mean?</a></span></dt>
-<dt><span class="sect1"><a href="#bsd.own.mk-missing">8.11. What does &#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221; mean?</a></span></dt>
-<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">8.12. Using 'sudo' with pkgsrc</a></span></dt>
-<dt><span class="sect1"><a href="#faq.conf">8.13. How do I change the location of configuration files?</a></span></dt>
-<dt><span class="sect1"><a href="#audit-packages">8.14. Automated security checks</a></span></dt>
-<dt><span class="sect1"><a href="#ufaq-cflags">8.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt>
-<dt><span class="sect1"><a href="#ufaq-fail">8.16. A package does not build. What shall I do?</a></span></dt>
-<dt><span class="sect1"><a href="#faq.rcs-conflicts">8.17. What does &#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221; mean?</a></span></dt>
+<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does &#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221; mean?</a></span></dt>
+<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">9.12. Using 'sudo' with pkgsrc</a></span></dt>
+<dt><span class="sect1"><a href="#faq.conf">9.13. How do I change the location of configuration files?</a></span></dt>
+<dt><span class="sect1"><a href="#audit-packages">9.14. Automated security checks</a></span></dt>
+<dt><span class="sect1"><a href="#ufaq-cflags">9.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt>
+<dt><span class="sect1"><a href="#ufaq-fail">9.16. A package does not build. What shall I do?</a></span></dt>
+<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.17. What does &#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221; mean?</a></span></dt>
</dl></dd>
</dl>
</div>
@@ -2355,12 +2371,12 @@ works.</p>
can be NFS-mounted while <code class="filename">${WRKOBJDIR}</code>
is local to every architecture. (It should be noted that
<code class="varname">PKGSRCDIR</code> should not be set by the user
- &#8212; it is an internal definition which refers to the
+ &mdash; it is an internal definition which refers to the
root of the pkgsrc tree. It is possible to have many
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="10.3. patches/*">Section 10.3, &#8220;patches/*&#8221;</a> for more
+ See <a href="#components.patches" title="11.3. patches/*">Section 11.3, &#8220;patches/*&#8221;</a> for more
information.</p></li>
<li><p><code class="varname">PKGMAKECONF</code>: Location of
the <a href="#mk.conf"><code class="filename">mk.conf</code></a> file used by a package's
@@ -2593,19 +2609,6 @@ PKG_OPTIONS.apache= suexec </pre>
<dl>
<dt><span class="sect1"><a href="#building-a-single-binary-package">6.1. Building a single binary package</a></span></dt>
<dt><span class="sect1"><a href="#settings-for-creationg-of-binary-packages">6.2. Settings for creation of binary packages</a></span></dt>
-<dt><span class="sect1"><a href="#bulkbuild">6.3. Doing a bulk build of all packages</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#binary.configuration">6.3.1. Configuration</a></span></dt>
-<dt><span class="sect2"><a href="#other-environmental-considerations">6.3.2. Other environmental considerations</a></span></dt>
-<dt><span class="sect2"><a href="#operation">6.3.3. Operation</a></span></dt>
-<dt><span class="sect2"><a href="#what-it-does">6.3.4. What it does</a></span></dt>
-<dt><span class="sect2"><a href="#disk-space-requirements">6.3.5. Disk space requirements</a></span></dt>
-<dt><span class="sect2"><a href="#setting-up-a-sandbox">6.3.6. Setting up a sandbox for chrooted builds</a></span></dt>
-<dt><span class="sect2"><a href="#building-a-partial-set">6.3.7. Building a partial set of packages</a></span></dt>
-<dt><span class="sect2"><a href="#bulk-upload">6.3.8. Uploading results of a bulk build</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#creating-cdroms">6.4. Creating a multiple CD-ROM packages collection</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#cdpack-example">6.4.1. Example of cdpack</a></span></dt></dl></dd>
</dl>
</div>
<div class="sect1" lang="en">
@@ -2631,34 +2634,113 @@ PKG_OPTIONS.apache= suexec </pre>
<code class="filename">/usr/pkgsrc/packages</code>, in the form of a
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/pkgsrc/current/pkgsrc/misc/figlet/README.html" target="_top"><code class="filename">misc/figlet</code></a> example.</p>
-<p>See <a href="#submit" title="Chapter 20. Submitting and Committing">Chapter 20, <i>Submitting and Committing</i></a> for information on how to submit
+<p>See <a href="#submit" title="Chapter 21. Submitting and Committing">Chapter 21, <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="16.17. Other helpful targets">Section 16.17, &#8220;Other helpful targets&#8221;</a>.</p>
+<p>See <a href="#build.helpful-targets" title="17.17. Other helpful targets">Section 17.17, &#8220;Other helpful targets&#8221;</a>.</p>
+</div>
</div>
+<div class="chapter" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="bulk"></a>Chapter 7. Creating binary packages for everything in pkgsrc (bulk
+builds)</h2></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="sect1"><a href="#bulk.pre">7.1. Think first, build later</a></span></dt>
+<dt><span class="sect1"><a href="#bulk.req">7.2. Requirements of a bulk build</a></span></dt>
+<dt><span class="sect1"><a href="#bulk.old">7.3. Running an old-style bulk build</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#binary.configuration">7.3.1. Configuration</a></span></dt>
+<dt><span class="sect2"><a href="#other-environmental-considerations">7.3.2. Other environmental considerations</a></span></dt>
+<dt><span class="sect2"><a href="#operation">7.3.3. Operation</a></span></dt>
+<dt><span class="sect2"><a href="#what-it-does">7.3.4. What it does</a></span></dt>
+<dt><span class="sect2"><a href="#disk-space-requirements">7.3.5. Disk space requirements</a></span></dt>
+<dt><span class="sect2"><a href="#setting-up-a-sandbox">7.3.6. Setting up a sandbox for chrooted builds</a></span></dt>
+<dt><span class="sect2"><a href="#building-a-partial-set">7.3.7. Building a partial set of packages</a></span></dt>
+<dt><span class="sect2"><a href="#bulk-upload">7.3.8. Uploading results of a bulk build</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#bulk.pbulk">7.4. Running a pbulk-style bulk build</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#bulk.pbulk.conf">7.4.1. Configuration</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#creating-cdroms">7.5. Creating a multiple CD-ROM packages collection</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#cdpack-example">7.5.1. Example of cdpack</a></span></dt></dl></dd>
+</dl>
+</div>
+<p>When you have multiple machines that should run the same packages,
+it is wasted time if they all build their packages themselves from
+source. There are two ways of getting a set of binary packages: The old
+bulk build system, or the new (as of 2007) parallel bulk build (pbulk)
+system. This chapter describes how to set them up so that the packages
+are most likely to be usable later.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="bulkbuild"></a>6.3. Doing a bulk build of all packages</h2></div></div></div>
-<p>If you want to get a full set of precompiled binary
- packages, this section describes how to get them. Beware that
- the bulk build will remove all currently installed packages from
- your system!</p>
-<p>Having an FTP server configured either on the
- machine doing the bulk builds or on a nearby NFS server can help
- to make the packages available to other machines that can then
- save time by installing only the binary packages. See <a href="http://netbsd.gw.com/cgi-bin/man-cgi?ftpd+8+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">ftpd</span>(8)</span></a> for
- more information. If you use a remote NFS server's storage, be
- sure to not actually compile on NFS storage, as this slows
- things down a lot.</p>
+<a name="bulk.pre"></a>7.1. Think first, build later</h2></div></div></div>
+<p>Since a bulk build takes several days or even weeks to finish, you
+should think about the setup before you start everything. Pay attention
+to at least the following points:</p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<p>If you want to upload the binary packages to
+ftp.NetBSD.org, make sure the setup complies to the requirements for binary
+packages:</p>
+<div class="itemizedlist"><ul type="circle">
+<li><p>To end up on ftp.NetBSD.org, the packages must be built
+by a NetBSD developer on a trusted machine (that is, where you and only
+you have root access).</p></li>
+<li><p>Packages on ftp.NetBSD.org should only be created from
+the stable branches (like 2007Q1), so that users browsing the available
+collections can see at a glance how old the packages
+are.</p></li>
+<li><p>The packages must be built as root, since some packages
+require set-uid binaries at runtime, and creating those packages as
+unprivileged user doesn't work well at the moment.</p></li>
+</ul></div>
+</li>
+<li><p>Make sure that the bulk build cannot break anything in
+your system. Most bulk builds run as root, so they should be run at least
+in a chroot environment or something even more restrictive, depending on
+what the operating system provides. There have been numerous cases where
+certain packages tried to install files outside the
+<code class="filename">LOCALBASE</code> or wanted to edit some files in
+<code class="filename">/etc</code>. Furthermore, the bulk builds install and
+deinstall packages in <code class="filename">/usr/pkg</code> (or whatever
+<code class="filename">LOCALBASE</code> is) during their operation, so be sure
+that you don't need any package during the build.</p></li>
+</ul></div>
+</div>
+<div class="sect1" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="bulk.req"></a>7.2. Requirements of a bulk build</h2></div></div></div>
+<p>A complete bulk build requires lots of disk space. Some of the
+disk space can be read-only, some other must be writable. Some can be on
+remote filesystems (such as NFS) and some should be local. Some can be
+temporary filesystems, others must survive a sudden reboot.</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>10 GB for the distfiles (read-write, remote, temporary)</p></li>
+<li><p>10 GB for the binary packages (read-write, remote, permanent)</p></li>
+<li><p>400 MB for the pkgsrc tree (read-only, remote, permanent)</p></li>
+<li><p>5 GB for <code class="filename">LOCALBASE</code> (read-write, local, temporary for pbulk, permanent for old-bulk)</p></li>
+<li><p>5 GB for the log files (read-write, remote, permanent)</p></li>
+<li><p>5 GB for temporary files (read-write, local, temporary)</p></li>
+</ul></div>
+</div>
+<div class="sect1" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="bulk.old"></a>7.3. Running an old-style bulk build</h2></div></div></div>
+<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Warning</h3>
+<p>The rest of this section is rather old. Don't rely on it
+too much.</p>
+</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="binary.configuration"></a>6.3.1. Configuration</h3></div></div></div>
+<a name="binary.configuration"></a>7.3.1. Configuration</h3></div></div></div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="binary.bulk.build.conf"></a>6.3.1.1. <code class="filename">build.conf</code>
+<a name="binary.bulk.build.conf"></a>7.3.1.1. <code class="filename">build.conf</code>
</h4></div></div></div>
<p>The <code class="filename">build.conf</code> file is the main
configuration file for bulk builds. You can configure how your
@@ -2672,7 +2754,7 @@ PKG_OPTIONS.apache= suexec </pre>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="binary.mk.conf"></a>6.3.1.2. <a href="#mk.conf"><code class="filename">mk.conf</code></a>
+<a name="binary.mk.conf"></a>7.3.1.2. <a href="#mk.conf"><code class="filename">mk.conf</code></a>
</h4></div></div></div>
<p>You may want to set variables in <a href="#mk.conf"><code class="filename">mk.conf</code></a>.
Look at <code class="filename">pkgsrc/mk/defaults/mk.conf</code> for
@@ -2740,7 +2822,7 @@ _ACCEPTABLE= yes
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="pre-build.local"></a>6.3.1.3. <code class="filename">pre-build.local</code>
+<a name="pre-build.local"></a>7.3.1.3. <code class="filename">pre-build.local</code>
</h4></div></div></div>
<p>It is possible to configure the bulk build to perform
certain site-specific tasks at the end of the pre-build
@@ -2758,7 +2840,7 @@ _ACCEPTABLE= yes
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="other-environmental-considerations"></a>6.3.2. Other environmental considerations</h3></div></div></div>
+<a name="other-environmental-considerations"></a>7.3.2. Other environmental considerations</h3></div></div></div>
<p>As <code class="filename">/usr/pkg</code> will be completely
deleted at the start of bulk builds, make sure your login
shell is placed somewhere else. Either drop it into
@@ -2783,7 +2865,7 @@ fi
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="operation"></a>6.3.3. Operation</h3></div></div></div>
+<a name="operation"></a>7.3.3. Operation</h3></div></div></div>
<p>Make sure you don't need any of the packages still
installed.</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
@@ -2813,7 +2895,7 @@ fi
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="what-it-does"></a>6.3.4. What it does</h3></div></div></div>
+<a name="what-it-does"></a>7.3.4. What it does</h3></div></div></div>
<p>The bulk builds consist of three steps:</p>
<div class="variablelist"><dl>
<dt><span class="term">1. pre-build</span></dt>
@@ -2845,7 +2927,7 @@ fi
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="disk-space-requirements"></a>6.3.5. Disk space requirements</h3></div></div></div>
+<a name="disk-space-requirements"></a>7.3.5. Disk space requirements</h3></div></div></div>
<p>Currently, roughly the following requirements are valid for
NetBSD 2.0/i386:</p>
<div class="itemizedlist"><ul type="disc">
@@ -2862,7 +2944,7 @@ fi
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="setting-up-a-sandbox"></a>6.3.6. Setting up a sandbox for chrooted builds</h3></div></div></div>
+<a name="setting-up-a-sandbox"></a>7.3.6. Setting up a sandbox for chrooted builds</h3></div></div></div>
<p>If you don't want all the packages nuked from a machine
(rendering it useless for anything but pkg compiling), there
is the possibility of doing the package bulk build inside a
@@ -2906,7 +2988,7 @@ fi
</li>
<li>
<p><code class="filename">/usr/src</code> (system sources,
- e. g. for <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/sysutils/aperture/README.html" target="_top"><code class="filename">sysutils/aperture</code></a>):</p>
+ e.&nbsp;g. for <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/sysutils/aperture/README.html" target="_top"><code class="filename">sysutils/aperture</code></a>):</p>
<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>ln -s ../disk1/cvs .</code></strong>
<code class="prompt">#</code> <strong class="userinput"><code>ln -s cvs/src-2.0 src</code></strong></pre>
</li>
@@ -2932,7 +3014,7 @@ fi
<code class="filename">/usr/sandbox/usr/pkgsrc/packages</code> and
<code class="filename">.../distfiles</code> point somewhere
appropriate. NFS- and/or nullfs-mounts may come in handy!</p></li>
-<li><p>Edit <a href="#mk.conf"><code class="filename">mk.conf</code></a>, see <a href="#binary.mk.conf" title="6.3.1.2. mk.conf">Section 6.3.1.2, &#8220;<code class="filename">mk.conf</code>&#8221;</a>.</p></li>
+<li><p>Edit <a href="#mk.conf"><code class="filename">mk.conf</code></a>, see <a href="#binary.mk.conf" title="7.3.1.2. mk.conf">Section 7.3.1.2, &#8220;<code class="filename">mk.conf</code>&#8221;</a>.</p></li>
<li><p>Adjust <code class="filename">mk/bulk/build.conf</code> to suit your needs.</p></li>
</ol></div>
<p>When the chroot sandbox is set up, you can start
@@ -2949,7 +3031,7 @@ fi
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="building-a-partial-set"></a>6.3.7. Building a partial set of packages</h3></div></div></div>
+<a name="building-a-partial-set"></a>7.3.7. Building a partial set of packages</h3></div></div></div>
<p>In addition to building a complete set of all packages in
pkgsrc, the <code class="filename">pkgsrc/mk/bulk/build</code> script
may be used to build a subset of the packages contained in
@@ -2972,7 +3054,7 @@ fi
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk-upload"></a>6.3.8. Uploading results of a bulk build</h3></div></div></div>
+<a name="bulk-upload"></a>7.3.8. Uploading results of a bulk build</h3></div></div></div>
<p>This section describes how pkgsrc developers can upload binary
pkgs built by bulk builds to ftp.NetBSD.org.</p>
<p>If you would like to automatically create checksum files for the
@@ -3048,7 +3130,17 @@ nbftp% <strong class="userinput"><code>chmod 755 .</code></strong>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="creating-cdroms"></a>6.4. Creating a multiple CD-ROM packages collection</h2></div></div></div>
+<a name="bulk.pbulk"></a>7.4. Running a pbulk-style bulk build</h2></div></div></div>
+<div class="sect2" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bulk.pbulk.conf"></a>7.4.1. Configuration</h3></div></div></div>
+<p>TODO; see <a href="http://wiki.netbsd.se/index.php/pbulk-HOWTO" target="_top">the wiki</a> for
+more information.</p>
+</div>
+</div>
+<div class="sect1" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="creating-cdroms"></a>7.5. Creating a multiple CD-ROM packages collection</h2></div></div></div>
<p>After your pkgsrc bulk-build has completed, you may wish to
create a CD-ROM set of the resulting binary packages to assist
in installing packages on other machines. The
@@ -3059,7 +3151,7 @@ nbftp% <strong class="userinput"><code>chmod 755 .</code></strong>
CD as that package.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="cdpack-example"></a>6.4.1. Example of cdpack</h3></div></div></div>
+<a name="cdpack-example"></a>7.5.1. Example of cdpack</h3></div></div></div>
<p>Complete documentation for cdpack is found in the cdpack(1)
man page. The following short example assumes that the binary
packages are left in
@@ -3094,12 +3186,12 @@ nbftp% <strong class="userinput"><code>chmod 755 .</code></strong>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="files"></a>Chapter 7. Directory layout of the installed files</h2></div></div></div>
+<a name="files"></a>Chapter 8. Directory layout of the installed files</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#files.localbase">7.1. File system layout in <code class="literal">${LOCALBASE}</code></a></span></dt>
-<dt><span class="sect1"><a href="#files.varbase">7.2. File system layout in <code class="literal">${VARBASE}</code></a></span></dt>
+<dt><span class="sect1"><a href="#files.localbase">8.1. File system layout in <code class="literal">${LOCALBASE}</code></a></span></dt>
+<dt><span class="sect1"><a href="#files.varbase">8.2. File system layout in <code class="literal">${VARBASE}</code></a></span></dt>
</dl>
</div>
<p>The files that are installed by pkgsrc are organized in a way that
@@ -3148,7 +3240,7 @@ itself.</p></li>
</ul></div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="files.localbase"></a>7.1. File system layout in <code class="literal">${LOCALBASE}</code>
+<a name="files.localbase"></a>8.1. File system layout in <code class="literal">${LOCALBASE}</code>
</h2></div></div></div>
<p>The following directories exist in a typical pkgsrc installation
in <code class="filename">${LOCALBASE}</code>.</p>
@@ -3214,7 +3306,7 @@ installation.</p></dd>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="files.varbase"></a>7.2. File system layout in <code class="literal">${VARBASE}</code>
+<a name="files.varbase"></a>8.2. File system layout in <code class="literal">${VARBASE}</code>
</h2></div></div></div>
<div class="variablelist"><dl>
<dt><span class="term"><code class="filename">db/pkg</code> (the usual location of
@@ -3235,28 +3327,28 @@ currently running.</p></dd>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="faq"></a>Chapter 8. Frequently Asked Questions</h2></div></div></div>
+<a name="faq"></a>Chapter 9. Frequently Asked Questions</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#mailing-list-pointers">8.1. Are there any mailing lists for pkg-related discussion?</a></span></dt>
-<dt><span class="sect1"><a href="#pkgviews-docs">8.2. Where's the pkgviews documentation?</a></span></dt>
-<dt><span class="sect1"><a href="#faq-pkgtools">8.3. Utilities for package management (pkgtools)</a></span></dt>
-<dt><span class="sect1"><a href="#non-root-pkgsrc">8.4. How to use pkgsrc as non-root</a></span></dt>
-<dt><span class="sect1"><a href="#resume-transfers">8.5. How to resume transfers when fetching distfiles?</a></span></dt>
-<dt><span class="sect1"><a href="#x.org-from-pkgsrc">8.6. How can I install/use modular X.org from pkgsrc?</a></span></dt>
-<dt><span class="sect1"><a href="#fetch-behind-firewall">8.7. How to fetch files from behind a firewall</a></span></dt>
-<dt><span class="sect1"><a href="#passive-ftp">8.8. How do I tell <span><strong class="command">make fetch</strong></span> to do passive FTP?</a></span></dt>
-<dt><span class="sect1"><a href="#fetching-all-distfiles">8.9. How to fetch all distfiles at once</a></span></dt>
-<dt><span class="sect1"><a href="#tmac.andoc-missing">8.10. What does &#8220;<span class="quote">Don't know how to make
+<dt><span class="sect1"><a href="#mailing-list-pointers">9.1. Are there any mailing lists for pkg-related discussion?</a></span></dt>
+<dt><span class="sect1"><a href="#pkgviews-docs">9.2. Where's the pkgviews documentation?</a></span></dt>
+<dt><span class="sect1"><a href="#faq-pkgtools">9.3. Utilities for package management (pkgtools)</a></span></dt>
+<dt><span class="sect1"><a href="#non-root-pkgsrc">9.4. How to use pkgsrc as non-root</a></span></dt>
+<dt><span class="sect1"><a href="#resume-transfers">9.5. How to resume transfers when fetching distfiles?</a></span></dt>
+<dt><span class="sect1"><a href="#x.org-from-pkgsrc">9.6. How can I install/use modular X.org from pkgsrc?</a></span></dt>
+<dt><span class="sect1"><a href="#fetch-behind-firewall">9.7. How to fetch files from behind a firewall</a></span></dt>
+<dt><span class="sect1"><a href="#passive-ftp">9.8. How do I tell <span><strong class="command">make fetch</strong></span> to do passive FTP?</a></span></dt>
+<dt><span class="sect1"><a href="#fetching-all-distfiles">9.9. How to fetch all distfiles at once</a></span></dt>
+<dt><span class="sect1"><a href="#tmac.andoc-missing">9.10. What does &#8220;<span class="quote">Don't know how to make
/usr/share/tmac/tmac.andoc</span>&#8221; mean?</a></span></dt>
-<dt><span class="sect1"><a href="#bsd.own.mk-missing">8.11. What does &#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221; mean?</a></span></dt>
-<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">8.12. Using 'sudo' with pkgsrc</a></span></dt>
-<dt><span class="sect1"><a href="#faq.conf">8.13. How do I change the location of configuration files?</a></span></dt>
-<dt><span class="sect1"><a href="#audit-packages">8.14. Automated security checks</a></span></dt>
-<dt><span class="sect1"><a href="#ufaq-cflags">8.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt>
-<dt><span class="sect1"><a href="#ufaq-fail">8.16. A package does not build. What shall I do?</a></span></dt>
-<dt><span class="sect1"><a href="#faq.rcs-conflicts">8.17. What does &#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221; mean?</a></span></dt>
+<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does &#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221; mean?</a></span></dt>
+<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">9.12. Using 'sudo' with pkgsrc</a></span></dt>
+<dt><span class="sect1"><a href="#faq.conf">9.13. How do I change the location of configuration files?</a></span></dt>
+<dt><span class="sect1"><a href="#audit-packages">9.14. Automated security checks</a></span></dt>
+<dt><span class="sect1"><a href="#ufaq-cflags">9.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt>
+<dt><span class="sect1"><a href="#ufaq-fail">9.16. A package does not build. What shall I do?</a></span></dt>
+<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.17. What does &#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221; mean?</a></span></dt>
</dl>
</div>
<p>This section contains hints, tips &amp; tricks on special things in
@@ -3264,7 +3356,7 @@ pkgsrc that we didn't find a better place for in the previous chapters, and
it contains items for both pkgsrc users and developers.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="mailing-list-pointers"></a>8.1. Are there any mailing lists for pkg-related discussion?</h2></div></div></div>
+<a name="mailing-list-pointers"></a>9.1. Are there any mailing lists for pkg-related discussion?</h2></div></div></div>
<p>The following mailing lists may be of interest to pkgsrc users:</p>
<div class="itemizedlist"><ul type="disc">
<li><p><a href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-users" target="_top">pkgsrc-users</a>:
@@ -3295,14 +3387,14 @@ it contains items for both pkgsrc users and developers.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="pkgviews-docs"></a>8.2. Where's the pkgviews documentation?</h2></div></div></div>
+<a name="pkgviews-docs"></a>9.2. Where's the pkgviews documentation?</h2></div></div></div>
<p>Pkgviews is tightly integrated with buildlink. You can find a
pkgviews User's guide in
<code class="filename">pkgsrc/mk/buildlink3/PKGVIEWS_UG</code>.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="faq-pkgtools"></a>8.3. Utilities for package management (pkgtools)</h2></div></div></div>
+<a name="faq-pkgtools"></a>9.3. Utilities for package management (pkgtools)</h2></div></div></div>
<p>The directory <code class="filename">pkgsrc/pkgtools</code> contains
a number of useful utilities for both users and developers of pkgsrc. This
section attempts only to make the reader aware of the utilities and when
@@ -3379,7 +3471,7 @@ utilities)</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="non-root-pkgsrc"></a>8.4. How to use pkgsrc as non-root</h2></div></div></div>
+<a name="non-root-pkgsrc"></a>9.4. How to use pkgsrc as non-root</h2></div></div></div>
<p>If you want to use pkgsrc as non-root user, you can set some
variables to make pkgsrc work under these conditions. At the very least,
you need to set <code class="varname">UNPRIVILEGED</code> to &#8220;<span class="quote">yes</span>&#8221;; this
@@ -3400,7 +3492,7 @@ that allow finer tuning of the tree layout.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="resume-transfers"></a>8.5. How to resume transfers when fetching distfiles?</h2></div></div></div>
+<a name="resume-transfers"></a>9.5. How to resume transfers when fetching distfiles?</h2></div></div></div>
<p>By default, resuming transfers in pkgsrc is disabled, but you can
enable this feature by adding the option
<code class="varname">PKG_RESUME_TRANSFERS=YES</code> into
@@ -3424,7 +3516,7 @@ FETCH_OUTPUT_ARGS= -O
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="x.org-from-pkgsrc"></a>8.6. How can I install/use modular X.org from pkgsrc?</h2></div></div></div>
+<a name="x.org-from-pkgsrc"></a>9.6. How can I install/use modular X.org from pkgsrc?</h2></div></div></div>
<p>If you want to use modular X.org from pkgsrc instead of your system's own X11
(<code class="filename">/usr/X11R6</code>, <code class="filename">/usr/openwin</code>, ...)
you will have to add the following line into
@@ -3440,7 +3532,7 @@ X11_TYPE=modular
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="fetch-behind-firewall"></a>8.7. How to fetch files from behind a firewall</h2></div></div></div>
+<a name="fetch-behind-firewall"></a>9.7. How to fetch files from behind a firewall</h2></div></div></div>
<p>If you are sitting behind a firewall which does not allow direct
connections to Internet hosts (i.e. non-NAT), you may specify the
relevant proxy hosts. This is done using an environment variable in the
@@ -3455,7 +3547,7 @@ http_proxy=http://orpheus.amdahl.com:80/
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="passive-ftp"></a>8.8. How do I tell <span><strong class="command">make fetch</strong></span> to do passive FTP?</h2></div></div></div>
+<a name="passive-ftp"></a>9.8. How do I tell <span><strong class="command">make fetch</strong></span> to do passive FTP?</h2></div></div></div>
<p>This depends on which utility is used to retrieve distfiles. From
<code class="filename">bsd.pkg.mk</code>, <code class="varname">FETCH_CMD</code> is assigned
the first available command from the following list:</p>
@@ -3475,7 +3567,7 @@ transfers.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="fetching-all-distfiles"></a>8.9. How to fetch all distfiles at once</h2></div></div></div>
+<a name="fetching-all-distfiles"></a>9.9. How to fetch all distfiles at once</h2></div></div></div>
<p>You would like to download all the distfiles in a single batch
from work or university, where you can't run a <span><strong class="command">make
fetch</strong></span>. There is an archive of distfiles on <a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/" target="_top">ftp.NetBSD.org</a>,
@@ -3507,7 +3599,7 @@ by running:</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="tmac.andoc-missing"></a>8.10. What does &#8220;<span class="quote">Don't know how to make
+<a name="tmac.andoc-missing"></a>9.10. What does &#8220;<span class="quote">Don't know how to make
/usr/share/tmac/tmac.andoc</span>&#8221; mean?</h2></div></div></div>
<p>When compiling the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_install/README.html" target="_top"><code class="filename">pkgtools/pkg_install</code></a>
package, you get the error from make that it doesn't know how to make
@@ -3521,7 +3613,7 @@ environment or in <a href="#mk.conf"><code class="filename">mk.conf</code></a>.<
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="bsd.own.mk-missing"></a>8.11. What does &#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221; mean?</h2></div></div></div>
+<a name="bsd.own.mk-missing"></a>9.11. What does &#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221; mean?</h2></div></div></div>
<p>You didn't install the compiler set, <code class="filename">comp.tgz</code>,
when you installed your NetBSD machine. Please get and install it, by
extracting it in <code class="filename">/</code>:</p>
@@ -3533,7 +3625,7 @@ the one that corresponds to your release (determine via <span><strong class="com
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="using-sudo-with-pkgsrc"></a>8.12. Using 'sudo' with pkgsrc</h2></div></div></div>
+<a name="using-sudo-with-pkgsrc"></a>9.12. Using 'sudo' with pkgsrc</h2></div></div></div>
<p>When installing packages as non-root user and using the just-in-time
<a href="http://netbsd.gw.com/cgi-bin/man-cgi?su+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">su</span>(1)</span></a> feature of pkgsrc, it can become annoying to type in the root
password for each required package installed. To avoid this, the sudo
@@ -3551,7 +3643,7 @@ SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="faq.conf"></a>8.13. How do I change the location of configuration files?</h2></div></div></div>
+<a name="faq.conf"></a>9.13. How do I change the location of configuration files?</h2></div></div></div>
<p>As the system administrator, you can choose where configuration files
are installed. The default settings make all these files go into
<code class="filename">${PREFIX}/etc</code> or some of its subdirectories; this may
@@ -3573,7 +3665,7 @@ reinstall any affected packages.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="audit-packages"></a>8.14. Automated security checks</h2></div></div></div>
+<a name="audit-packages"></a>9.14. Automated security checks</h2></div></div></div>
<p>Please be aware that there can often be bugs in third-party software,
and some of these bugs can leave a machine vulnerable to exploitation by
attackers. In an effort to lessen the exposure, the NetBSD packages team
@@ -3607,7 +3699,7 @@ check.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="ufaq-cflags"></a>8.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</h2></div></div></div>
+<a name="ufaq-cflags"></a>9.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</h2></div></div></div>
<p>When you add your own preferences to the
<code class="varname">CFLAGS</code> variable in your
<a href="#mk.conf"><code class="filename">mk.conf</code></a>, these flags are passed in
@@ -3629,7 +3721,7 @@ check.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="ufaq-fail"></a>8.16. A package does not build. What shall I do?</h2></div></div></div>
+<a name="ufaq-fail"></a>9.16. A package does not build. What shall I do?</h2></div></div></div>
<div class="procedure"><ol type="1">
<li><p>Make sure that your copy of pkgsrc is consistent. A
case that occurs often is that people only update pkgsrc in
@@ -3650,7 +3742,7 @@ check.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="faq.rcs-conflicts"></a>8.17. What does &#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221; mean?</h2></div></div></div>
+<a name="faq.rcs-conflicts"></a>9.17. What does &#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221; mean?</h2></div></div></div>
<p>You have modified a file from pkgsrc, and someone else has
modified that same file afterwards in the CVS repository. Both changes
are in the same region of the file, so when you updated pkgsrc, the
@@ -3675,238 +3767,238 @@ anymore, you can remove that file and run <span><strong class="command">cvs -q u
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="chapter"><a href="#creating">9. Creating a new pkgsrc package from scratch</a></span></dt>
+<dt><span class="chapter"><a href="#creating">10. Creating a new pkgsrc package from scratch</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#creating.common">9.1. Common types of packages</a></span></dt>
+<dt><span class="sect1"><a href="#creating.common">10.1. Common types of packages</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#creating.perl-module">9.1.1. Perl modules</a></span></dt>
-<dt><span class="sect2"><a href="#creating.kde-app">9.1.2. KDE applications</a></span></dt>
+<dt><span class="sect2"><a href="#creating.perl-module">10.1.1. Perl modules</a></span></dt>
+<dt><span class="sect2"><a href="#creating.kde-app">10.1.2. KDE applications</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#creating.examples">9.2. Examples</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#creating.nvu">9.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#creating.examples">10.2. Examples</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#creating.nvu">10.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#components">10. Package components - files, directories and contents</a></span></dt>
+<dt><span class="chapter"><a href="#components">11. Package components - files, directories and contents</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#components.Makefile">10.1. <code class="filename">Makefile</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.distinfo">10.2. <code class="filename">distinfo</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.patches">10.3. patches/*</a></span></dt>
+<dt><span class="sect1"><a href="#components.Makefile">11.1. <code class="filename">Makefile</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.distinfo">11.2. <code class="filename">distinfo</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.patches">11.3. patches/*</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#components.patch.structure">10.3.1. Structure of a single patch file</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.caveats">10.3.2. Creating patch files</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.sources">10.3.3. Sources where the patch files come from</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.guidelines">10.3.4. Patching guidelines</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.feedback">10.3.5. Feedback to the author</a></span></dt>
+<dt><span class="sect2"><a href="#components.patch.structure">11.3.1. Structure of a single patch file</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.caveats">11.3.2. Creating patch files</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.sources">11.3.3. Sources where the patch files come from</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.guidelines">11.3.4. Patching guidelines</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.feedback">11.3.5. Feedback to the author</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#other-mandatory-files">10.4. Other mandatory files</a></span></dt>
-<dt><span class="sect1"><a href="#components.optional">10.5. Optional files</a></span></dt>
+<dt><span class="sect1"><a href="#other-mandatory-files">11.4. Other mandatory files</a></span></dt>
+<dt><span class="sect1"><a href="#components.optional">11.5. Optional files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#components.optional.bin">10.5.1. Files affecting the binary package</a></span></dt>
-<dt><span class="sect2"><a href="#components.optional.build">10.5.2. Files affecting the build process</a></span></dt>
-<dt><span class="sect2"><a href="#components.optional.none">10.5.3. Files affecting nothing at all</a></span></dt>
+<dt><span class="sect2"><a href="#components.optional.bin">11.5.1. Files affecting the binary package</a></span></dt>
+<dt><span class="sect2"><a href="#components.optional.build">11.5.2. Files affecting the build process</a></span></dt>
+<dt><span class="sect2"><a href="#components.optional.none">11.5.3. Files affecting nothing at all</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#work-dir">10.6. <code class="filename">work*</code></a></span></dt>
-<dt><span class="sect1"><a href="#files-dir">10.7. <code class="filename">files/*</code></a></span></dt>
+<dt><span class="sect1"><a href="#work-dir">11.6. <code class="filename">work*</code></a></span></dt>
+<dt><span class="sect1"><a href="#files-dir">11.7. <code class="filename">files/*</code></a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#makefile">11. Programming in <code class="filename">Makefile</code>s</a></span></dt>
+<dt><span class="chapter"><a href="#makefile">12. Programming in <code class="filename">Makefile</code>s</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#makefile.style">11.1. Caveats</a></span></dt>
-<dt><span class="sect1"><a href="#makefile.variables">11.2. <code class="filename">Makefile</code> variables</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">11.2.1. Naming conventions</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#makefile.code">11.3. Code snippets</a></span></dt>
+<dt><span class="sect1"><a href="#makefile.style">12.1. Caveats</a></span></dt>
+<dt><span class="sect1"><a href="#makefile.variables">12.2. <code class="filename">Makefile</code> variables</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">12.2.1. Naming conventions</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#makefile.code">12.3. Code snippets</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#adding-to-list">11.3.1. Adding things to a list</a></span></dt>
-<dt><span class="sect2"><a href="#converting-internal-to-external">11.3.2. Converting an internal list into an external list</a></span></dt>
-<dt><span class="sect2"><a href="#passing-variable-to-shell">11.3.3. Passing variables to a shell command</a></span></dt>
-<dt><span class="sect2"><a href="#quoting-guideline">11.3.4. Quoting guideline</a></span></dt>
-<dt><span class="sect2"><a href="#bsd-make-bug-workaround">11.3.5. Workaround for a bug in BSD Make</a></span></dt>
+<dt><span class="sect2"><a href="#adding-to-list">12.3.1. Adding things to a list</a></span></dt>
+<dt><span class="sect2"><a href="#converting-internal-to-external">12.3.2. Converting an internal list into an external list</a></span></dt>
+<dt><span class="sect2"><a href="#passing-variable-to-shell">12.3.3. Passing variables to a shell command</a></span></dt>
+<dt><span class="sect2"><a href="#quoting-guideline">12.3.4. Quoting guideline</a></span></dt>
+<dt><span class="sect2"><a href="#bsd-make-bug-workaround">12.3.5. Workaround for a bug in BSD Make</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#plist">12. PLIST issues</a></span></dt>
+<dt><span class="chapter"><a href="#plist">13. PLIST issues</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#rcs-id">12.1. RCS ID</a></span></dt>
-<dt><span class="sect1"><a href="#automatic-plist-generation">12.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
-<dt><span class="sect1"><a href="#print-PLIST">12.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
-<dt><span class="sect1"><a href="#plist.misc">12.4. Variable substitution in PLIST</a></span></dt>
-<dt><span class="sect1"><a href="#manpage-compression">12.5. Man page compression</a></span></dt>
-<dt><span class="sect1"><a href="#using-PLIST_SRC">12.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
-<dt><span class="sect1"><a href="#platform-specific-plist">12.7. Platform-specific and differing PLISTs</a></span></dt>
-<dt><span class="sect1"><a href="#faq.common-dirs">12.8. Sharing directories between packages</a></span></dt>
+<dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt>
+<dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
+<dt><span class="sect1"><a href="#print-PLIST">13.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
+<dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt>
+<dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt>
+<dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
+<dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt>
+<dt><span class="sect1"><a href="#faq.common-dirs">13.8. Sharing directories between packages</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#buildlink">13. Buildlink methodology</a></span></dt>
+<dt><span class="chapter"><a href="#buildlink">14. Buildlink methodology</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#converting-to-buildlink3">13.1. Converting packages to use buildlink3</a></span></dt>
-<dt><span class="sect1"><a href="#creating-buildlink3.mk">13.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-buildlink3">14.1. Converting packages to use buildlink3</a></span></dt>
+<dt><span class="sect1"><a href="#creating-buildlink3.mk">14.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-bl3">13.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
-<dt><span class="sect2"><a href="#updating-buildlink-depends">13.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">14.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
+<dt><span class="sect2"><a href="#updating-buildlink-depends">14.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">13.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#writing-builtin.mk">14.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">13.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">13.3.2. Global preferences for native or pkgsrc software</a></span></dt>
+<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">14.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">14.3.2. Global preferences for native or pkgsrc software</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#pkginstall">14. The pkginstall framework</a></span></dt>
+<dt><span class="chapter"><a href="#pkginstall">15. The pkginstall framework</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">14.1. Files and directories outside the installation prefix</a></span></dt>
+<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">15.1. Files and directories outside the installation prefix</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#dirs-outside-prefix">14.1.1. Directory manipulation</a></span></dt>
-<dt><span class="sect2"><a href="#files-outside-prefix">14.1.2. File manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#dirs-outside-prefix">15.1.1. Directory manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#files-outside-prefix">15.1.2. File manipulation</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#conf-files">14.2. Configuration files</a></span></dt>
+<dt><span class="sect1"><a href="#conf-files">15.2. Configuration files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#conf-files-sysconfdir">14.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-configure">14.2.2. Telling the software where configuration files are</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-patching">14.2.3. Patching installations</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-disable">14.2.4. Disabling handling of configuration files</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-sysconfdir">15.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-configure">15.2.2. Telling the software where configuration files are</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-patching">15.2.3. Patching installations</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-disable">15.2.4. Disabling handling of configuration files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#rcd-scripts">14.3. System startup scripts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">14.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#users-and-groups">14.4. System users and groups</a></span></dt>
-<dt><span class="sect1"><a href="#shells">14.5. System shells</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#shells-disable">14.5.1. Disabling shell registration</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#fonts">14.6. Fonts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#fonts-disable">14.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#rcd-scripts">15.3. System startup scripts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">15.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#users-and-groups">15.4. System users and groups</a></span></dt>
+<dt><span class="sect1"><a href="#shells">15.5. System shells</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#shells-disable">15.5.1. Disabling shell registration</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#fonts">15.6. Fonts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#fonts-disable">15.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#options">15. Options handling</a></span></dt>
+<dt><span class="chapter"><a href="#options">16. Options handling</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#global-default-options">15.1. Global default options</a></span></dt>
-<dt><span class="sect1"><a href="#converting-to-options">15.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
-<dt><span class="sect1"><a href="#option-names">15.3. Option Names</a></span></dt>
+<dt><span class="sect1"><a href="#global-default-options">16.1. Global default options</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-options">16.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
+<dt><span class="sect1"><a href="#option-names">16.3. Option Names</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#build">16. The build process</a></span></dt>
+<dt><span class="chapter"><a href="#build">17. The build process</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#build.intro">16.1. Introduction</a></span></dt>
-<dt><span class="sect1"><a href="#build.prefix">16.2. Program location</a></span></dt>
-<dt><span class="sect1"><a href="#build.builddirs">16.3. Directories used during the build process</a></span></dt>
-<dt><span class="sect1"><a href="#build.running">16.4. Running a phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.fetch">16.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.intro">17.1. Introduction</a></span></dt>
+<dt><span class="sect1"><a href="#build.prefix">17.2. Program location</a></span></dt>
+<dt><span class="sect1"><a href="#build.builddirs">17.3. Directories used during the build process</a></span></dt>
+<dt><span class="sect1"><a href="#build.running">17.4. Running a phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.fetch">17.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#build.fetch.what">16.5.1. What to fetch and where to get it from</a></span></dt>
-<dt><span class="sect2"><a href="#build.fetch.how">16.5.2. How are the files fetched?</a></span></dt>
+<dt><span class="sect2"><a href="#build.fetch.what">17.5.1. What to fetch and where to get it from</a></span></dt>
+<dt><span class="sect2"><a href="#build.fetch.how">17.5.2. How are the files fetched?</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#build.checksum">16.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.extract">16.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.patch">16.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.tools">16.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.wrapper">16.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.configure">16.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.build">16.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.test">16.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.install">16.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.package">16.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.clean">16.16. Cleaning up</a></span></dt>
-<dt><span class="sect1"><a href="#build.helpful-targets">16.17. Other helpful targets</a></span></dt>
-</dl></dd>
-<dt><span class="chapter"><a href="#tools">17. Tools needed for building or running</a></span></dt>
-<dd><dl>
-<dt><span class="sect1"><a href="#pkgsrc-tools">17.1. Tools for pkgsrc builds</a></span></dt>
-<dt><span class="sect1"><a href="#package-tools">17.2. Tools needed by packages</a></span></dt>
-<dt><span class="sect1"><a href="#platform-tools">17.3. Tools provided by platforms</a></span></dt>
-<dt><span class="sect1"><a href="#tools.questions">17.4. Questions regarding the tools</a></span></dt>
-</dl></dd>
-<dt><span class="chapter"><a href="#fixes">18. Making your package work</a></span></dt>
-<dd><dl>
-<dt><span class="sect1"><a href="#general-operation">18.1. General operation</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#portability-of-packages">18.1.1. Portability of packages</a></span></dt>
-<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">18.1.2. How to pull in user-settable variables from <code class="filename">mk.conf</code></a></span></dt>
-<dt><span class="sect2"><a href="#user-interaction">18.1.3. User interaction</a></span></dt>
-<dt><span class="sect2"><a href="#handling-licenses">18.1.4. Handling licenses</a></span></dt>
-<dt><span class="sect2"><a href="#restricted-packages">18.1.5. Restricted packages</a></span></dt>
-<dt><span class="sect2"><a href="#dependencies">18.1.6. Handling dependencies</a></span></dt>
-<dt><span class="sect2"><a href="#conflicts">18.1.7. Handling conflicts with other packages</a></span></dt>
-<dt><span class="sect2"><a href="#not-building-packages">18.1.8. Packages that cannot or should not be built</a></span></dt>
-<dt><span class="sect2"><a href="#undeletable-packages">18.1.9. Packages which should not be deleted, once installed</a></span></dt>
-<dt><span class="sect2"><a href="#security-handling">18.1.10. Handling packages with security problems</a></span></dt>
-<dt><span class="sect2"><a href="#bumping-pkgrevision">18.1.11. How to handle incrementing versions when fixing an existing package</a></span></dt>
-<dt><span class="sect2"><a href="#fixes.subst">18.1.12. Substituting variable text in the package files (the SUBST framework)</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.fetch">18.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">18.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
-<dt><span class="sect2"><a href="#modified-distfiles-same-name">18.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.configure">18.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">18.3.1. Shared libraries - libtool</a></span></dt>
-<dt><span class="sect2"><a href="#using-libtool">18.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
-<dt><span class="sect2"><a href="#autoconf-automake">18.3.3. GNU Autoconf/Automake</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#programming-languages">18.4. Programming languages</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#basic-programming-languages">18.4.1. C, C++, and Fortran</a></span></dt>
-<dt><span class="sect2"><a href="#java-programming-language">18.4.2. Java</a></span></dt>
-<dt><span class="sect2"><a href="#perl-scripts">18.4.3. Packages containing perl scripts</a></span></dt>
-<dt><span class="sect2"><a href="#other-programming-languages">18.4.4. Other programming languages</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.build">18.5. 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">18.5.1. Compiling C and C++ code conditionally</a></span></dt>
-<dt><span class="sect2"><a href="#compiler-bugs">18.5.2. How to handle compiler bugs</a></span></dt>
-<dt><span class="sect2"><a href="#undefined-reference">18.5.3. Undefined reference to &#8220;<span class="quote">...</span>&#8221;</a></span></dt>
-<dt><span class="sect2"><a href="#out-of-memory">18.5.4. Running out of memory</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.install">18.6. Fixing problems in the <span class="emphasis"><em>install</em></span> phase</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#install-scripts">18.6.1. Creating needed directories</a></span></dt>
-<dt><span class="sect2"><a href="#where-to-install-documentation">18.6.2. Where to install documentation</a></span></dt>
-<dt><span class="sect2"><a href="#installing-score-files">18.6.3. Installing highscore files</a></span></dt>
-<dt><span class="sect2"><a href="#destdir-support">18.6.4. Adding DESTDIR support to packages</a></span></dt>
-<dt><span class="sect2"><a href="#hardcoded-paths">18.6.5. Packages with hardcoded paths to other interpreters</a></span></dt>
-<dt><span class="sect2"><a href="#perl-modules">18.6.6. Packages installing perl modules</a></span></dt>
-<dt><span class="sect2"><a href="#faq.info-files">18.6.7. Packages installing info files</a></span></dt>
-<dt><span class="sect2"><a href="#manpages">18.6.8. Packages installing man pages</a></span></dt>
-<dt><span class="sect2"><a href="#gconf2-data-files">18.6.9. Packages installing GConf2 data files</a></span></dt>
-<dt><span class="sect2"><a href="#scrollkeeper-data-files">18.6.10. Packages installing scrollkeeper data files</a></span></dt>
-<dt><span class="sect2"><a href="#x11-fonts">18.6.11. Packages installing X11 fonts</a></span></dt>
-<dt><span class="sect2"><a href="#gtk2-modules">18.6.12. Packages installing GTK2 modules</a></span></dt>
-<dt><span class="sect2"><a href="#sgml-xml-data">18.6.13. Packages installing SGML or XML data</a></span></dt>
-<dt><span class="sect2"><a href="#mime-database">18.6.14. Packages installing extensions to the MIME database</a></span></dt>
-<dt><span class="sect2"><a href="#intltool">18.6.15. Packages using intltool</a></span></dt>
-<dt><span class="sect2"><a href="#startup-scripts">18.6.16. Packages installing startup scripts</a></span></dt>
-<dt><span class="sect2"><a href="#tex-packages">18.6.17. Packages installing TeX modules</a></span></dt>
-<dt><span class="sect2"><a href="#emulation-packages">18.6.18. Packages supporting running binaries in
+<dt><span class="sect1"><a href="#build.checksum">17.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.extract">17.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.patch">17.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.tools">17.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.wrapper">17.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.configure">17.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.build">17.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.test">17.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.install">17.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.package">17.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.clean">17.16. Cleaning up</a></span></dt>
+<dt><span class="sect1"><a href="#build.helpful-targets">17.17. Other helpful targets</a></span></dt>
+</dl></dd>
+<dt><span class="chapter"><a href="#tools">18. Tools needed for building or running</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#pkgsrc-tools">18.1. Tools for pkgsrc builds</a></span></dt>
+<dt><span class="sect1"><a href="#package-tools">18.2. Tools needed by packages</a></span></dt>
+<dt><span class="sect1"><a href="#platform-tools">18.3. Tools provided by platforms</a></span></dt>
+<dt><span class="sect1"><a href="#tools.questions">18.4. Questions regarding the tools</a></span></dt>
+</dl></dd>
+<dt><span class="chapter"><a href="#fixes">19. Making your package work</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#general-operation">19.1. General operation</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#portability-of-packages">19.1.1. Portability of packages</a></span></dt>
+<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">19.1.2. How to pull in user-settable variables from <code class="filename">mk.conf</code></a></span></dt>
+<dt><span class="sect2"><a href="#user-interaction">19.1.3. User interaction</a></span></dt>
+<dt><span class="sect2"><a href="#handling-licenses">19.1.4. Handling licenses</a></span></dt>
+<dt><span class="sect2"><a href="#restricted-packages">19.1.5. Restricted packages</a></span></dt>
+<dt><span class="sect2"><a href="#dependencies">19.1.6. Handling dependencies</a></span></dt>
+<dt><span class="sect2"><a href="#conflicts">19.1.7. Handling conflicts with other packages</a></span></dt>
+<dt><span class="sect2"><a href="#not-building-packages">19.1.8. Packages that cannot or should not be built</a></span></dt>
+<dt><span class="sect2"><a href="#undeletable-packages">19.1.9. Packages which should not be deleted, once installed</a></span></dt>
+<dt><span class="sect2"><a href="#security-handling">19.1.10. Handling packages with security problems</a></span></dt>
+<dt><span class="sect2"><a href="#bumping-pkgrevision">19.1.11. How to handle incrementing versions when fixing an existing package</a></span></dt>
+<dt><span class="sect2"><a href="#fixes.subst">19.1.12. Substituting variable text in the package files (the SUBST framework)</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.fetch">19.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">19.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
+<dt><span class="sect2"><a href="#modified-distfiles-same-name">19.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.configure">19.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">19.3.1. Shared libraries - libtool</a></span></dt>
+<dt><span class="sect2"><a href="#using-libtool">19.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
+<dt><span class="sect2"><a href="#autoconf-automake">19.3.3. GNU Autoconf/Automake</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#programming-languages">19.4. Programming languages</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#basic-programming-languages">19.4.1. C, C++, and Fortran</a></span></dt>
+<dt><span class="sect2"><a href="#java-programming-language">19.4.2. Java</a></span></dt>
+<dt><span class="sect2"><a href="#perl-scripts">19.4.3. Packages containing perl scripts</a></span></dt>
+<dt><span class="sect2"><a href="#other-programming-languages">19.4.4. Other programming languages</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.build">19.5. 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">19.5.1. Compiling C and C++ code conditionally</a></span></dt>
+<dt><span class="sect2"><a href="#compiler-bugs">19.5.2. How to handle compiler bugs</a></span></dt>
+<dt><span class="sect2"><a href="#undefined-reference">19.5.3. Undefined reference to &#8220;<span class="quote">...</span>&#8221;</a></span></dt>
+<dt><span class="sect2"><a href="#out-of-memory">19.5.4. Running out of memory</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.install">19.6. Fixing problems in the <span class="emphasis"><em>install</em></span> phase</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#install-scripts">19.6.1. Creating needed directories</a></span></dt>
+<dt><span class="sect2"><a href="#where-to-install-documentation">19.6.2. Where to install documentation</a></span></dt>
+<dt><span class="sect2"><a href="#installing-score-files">19.6.3. Installing highscore files</a></span></dt>
+<dt><span class="sect2"><a href="#destdir-support">19.6.4. Adding DESTDIR support to packages</a></span></dt>
+<dt><span class="sect2"><a href="#hardcoded-paths">19.6.5. Packages with hardcoded paths to other interpreters</a></span></dt>
+<dt><span class="sect2"><a href="#perl-modules">19.6.6. Packages installing perl modules</a></span></dt>
+<dt><span class="sect2"><a href="#faq.info-files">19.6.7. Packages installing info files</a></span></dt>
+<dt><span class="sect2"><a href="#manpages">19.6.8. Packages installing man pages</a></span></dt>
+<dt><span class="sect2"><a href="#gconf2-data-files">19.6.9. Packages installing GConf2 data files</a></span></dt>
+<dt><span class="sect2"><a href="#scrollkeeper-data-files">19.6.10. Packages installing scrollkeeper data files</a></span></dt>
+<dt><span class="sect2"><a href="#x11-fonts">19.6.11. Packages installing X11 fonts</a></span></dt>
+<dt><span class="sect2"><a href="#gtk2-modules">19.6.12. Packages installing GTK2 modules</a></span></dt>
+<dt><span class="sect2"><a href="#sgml-xml-data">19.6.13. Packages installing SGML or XML data</a></span></dt>
+<dt><span class="sect2"><a href="#mime-database">19.6.14. Packages installing extensions to the MIME database</a></span></dt>
+<dt><span class="sect2"><a href="#intltool">19.6.15. Packages using intltool</a></span></dt>
+<dt><span class="sect2"><a href="#startup-scripts">19.6.16. Packages installing startup scripts</a></span></dt>
+<dt><span class="sect2"><a href="#tex-packages">19.6.17. Packages installing TeX modules</a></span></dt>
+<dt><span class="sect2"><a href="#emulation-packages">19.6.18. Packages supporting running binaries in
emulation</a></span></dt>
-<dt><span class="sect2"><a href="#hicolor-theme">18.6.19. Packages installing hicolor theme icons</a></span></dt>
-<dt><span class="sect2"><a href="#desktop-files">18.6.20. Packages installing desktop files</a></span></dt>
+<dt><span class="sect2"><a href="#hicolor-theme">19.6.19. Packages installing hicolor theme icons</a></span></dt>
+<dt><span class="sect2"><a href="#desktop-files">19.6.20. Packages installing desktop files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#punting">18.7. Marking packages as having problems</a></span></dt>
+<dt><span class="sect1"><a href="#punting">19.7. Marking packages as having problems</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#debug">19. Debugging</a></span></dt>
-<dt><span class="chapter"><a href="#submit">20. Submitting and Committing</a></span></dt>
+<dt><span class="chapter"><a href="#debug">20. Debugging</a></span></dt>
+<dt><span class="chapter"><a href="#submit">21. Submitting and Committing</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#submitting-binary-packages">20.1. Submitting binary packages</a></span></dt>
-<dt><span class="sect1"><a href="#submitting-your-package">20.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
-<dt><span class="sect1"><a href="#general-notes-for-changes">20.3. General notes when adding, updating, or removing packages</a></span></dt>
-<dt><span class="sect1"><a href="#committing-importing">20.4. Committing: Importing a package into CVS</a></span></dt>
-<dt><span class="sect1"><a href="#updating-package">20.5. Updating a package to a newer version</a></span></dt>
-<dt><span class="sect1"><a href="#moving-package">20.6. Moving a package in pkgsrc</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-binary-packages">21.1. Submitting binary packages</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-your-package">21.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
+<dt><span class="sect1"><a href="#general-notes-for-changes">21.3. General notes when adding, updating, or removing packages</a></span></dt>
+<dt><span class="sect1"><a href="#committing-importing">21.4. Committing: Importing a package into CVS</a></span></dt>
+<dt><span class="sect1"><a href="#updating-package">21.5. Updating a package to a newer version</a></span></dt>
+<dt><span class="sect1"><a href="#moving-package">21.6. Moving a package in pkgsrc</a></span></dt>
</dl></dd>
-<dt><span class="chapter"><a href="#devfaq">21. Frequently Asked Questions</a></span></dt>
-<dt><span class="chapter"><a href="#gnome">22. GNOME packaging and porting</a></span></dt>
+<dt><span class="chapter"><a href="#devfaq">22. Frequently Asked Questions</a></span></dt>
+<dt><span class="chapter"><a href="#gnome">23. GNOME packaging and porting</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#meta-packages">22.1. Meta packages</a></span></dt>
-<dt><span class="sect1"><a href="#new-package">22.2. Packaging a GNOME application</a></span></dt>
-<dt><span class="sect1"><a href="#full-update">22.3. Updating GNOME to a newer version</a></span></dt>
-<dt><span class="sect1"><a href="#patching">22.4. Patching guidelines</a></span></dt>
+<dt><span class="sect1"><a href="#meta-packages">23.1. Meta packages</a></span></dt>
+<dt><span class="sect1"><a href="#new-package">23.2. Packaging a GNOME application</a></span></dt>
+<dt><span class="sect1"><a href="#full-update">23.3. Updating GNOME to a newer version</a></span></dt>
+<dt><span class="sect1"><a href="#patching">23.4. Patching guidelines</a></span></dt>
</dl></dd>
</dl>
</div>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="creating"></a>Chapter 9. Creating a new pkgsrc package from scratch</h2></div></div></div>
+<a name="creating"></a>Chapter 10. Creating a new pkgsrc package from scratch</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#creating.common">9.1. Common types of packages</a></span></dt>
+<dt><span class="sect1"><a href="#creating.common">10.1. Common types of packages</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#creating.perl-module">9.1.1. Perl modules</a></span></dt>
-<dt><span class="sect2"><a href="#creating.kde-app">9.1.2. KDE applications</a></span></dt>
+<dt><span class="sect2"><a href="#creating.perl-module">10.1.1. Perl modules</a></span></dt>
+<dt><span class="sect2"><a href="#creating.kde-app">10.1.2. KDE applications</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#creating.examples">9.2. Examples</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#creating.nvu">9.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#creating.examples">10.2. Examples</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#creating.nvu">10.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
</dl>
</div>
<p>When you find a package that is not yet in pkgsrc, you
@@ -3963,7 +4055,7 @@ know what pkglint's warnings want to tell you, try <span><strong class="command"
-e</strong></span>, which outputs additional
explanations.</p></li>
<li><p>In many cases the package is not yet ready to build. You can
-find instructions for the most common cases in the next section, <a href="#creating.common" title="9.1. Common types of packages">Section 9.1, &#8220;Common types of packages&#8221;</a>. After you have followed the instructions
+find instructions for the most common cases in the next section, <a href="#creating.common" title="10.1. Common types of packages">Section 10.1, &#8220;Common types of packages&#8221;</a>. After you have followed the instructions
over there, you can hopefully continue here.</p></li>
<li><p>Run <span><strong class="command">bmake clean</strong></span> to clean the working
directory from the extracted files. Besides these files, a lot of cache
@@ -3971,7 +4063,7 @@ files and other system information has been saved in the working
directory, which may become wrong after you edited the
<code class="filename">Makefile</code>.</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 18. Making your package work">Chapter 18, <i>Making your package work</i></a>.</p></li>
+the various things that can go wrong in this phase, consult <a href="#fixes" title="Chapter 19. Making your package work">Chapter 19, <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>
@@ -3994,16 +4086,16 @@ package from the set of installed files.</p></li>
</ol></div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="creating.common"></a>9.1. Common types of packages</h2></div></div></div>
+<a name="creating.common"></a>10.1. Common types of packages</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="creating.perl-module"></a>9.1.1. Perl modules</h3></div></div></div>
+<a name="creating.perl-module"></a>10.1.1. Perl modules</h3></div></div></div>
<p>Simple Perl modules are handled automatically by
<span><strong class="command">url2pkg</strong></span>, including dependencies.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="creating.kde-app"></a>9.1.2. KDE applications</h3></div></div></div>
+<a name="creating.kde-app"></a>10.1.2. KDE applications</h3></div></div></div>
<p>KDE applications should always include
<code class="filename">meta-pkgs/kde3/kde3.mk</code>, which contains numerous
settings that are typical of KDE packages.</p>
@@ -4011,13 +4103,13 @@ settings that are typical of KDE packages.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="creating.examples"></a>9.2. Examples</h2></div></div></div>
+<a name="creating.examples"></a>10.2. Examples</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="creating.nvu"></a>9.2.1. How the www/nvu package came into pkgsrc</h3></div></div></div>
+<a name="creating.nvu"></a>10.2.1. How the www/nvu package came into pkgsrc</h3></div></div></div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="creating.nvu.init"></a>9.2.1.1. The initial package</h4></div></div></div>
+<a name="creating.nvu.init"></a>10.2.1.1. The initial package</h4></div></div></div>
<p>Looking at the file <code class="filename">pkgsrc/doc/TODO</code>, I saw
that the &#8220;<span class="quote">nvu</span>&#8221; package has not yet been imported into
pkgsrc. As the description says it has to do with the web, the obvious
@@ -4080,7 +4172,7 @@ Good luck! (See pkgsrc/doc/pkgsrc.txt for some more help :-)
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="creating.nvu.problems"></a>9.2.1.2. Fixing all kinds of problems to make the package work</h4></div></div></div>
+<a name="creating.nvu.problems"></a>10.2.1.2. Fixing all kinds of problems to make the package work</h4></div></div></div>
<p>Now that the package has been extracted, let's see what's inside
it. The package has a <code class="filename">README.txt</code>, but that only
says something about mozilla, so it's probably useless for seeing what
@@ -4216,7 +4308,7 @@ everything worked.</p>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="creating.nvu.inst"></a>9.2.1.3. Installing the package</h4></div></div></div>
+<a name="creating.nvu.inst"></a>10.2.1.3. Installing the package</h4></div></div></div>
<pre class="programlisting">
<code class="prompt">$</code> bmake CHECK_FILES=no install
[...]
@@ -4230,29 +4322,29 @@ everything worked.</p>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="components"></a>Chapter 10. Package components - files, directories and contents</h2></div></div></div>
+<a name="components"></a>Chapter 11. 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">10.1. <code class="filename">Makefile</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.distinfo">10.2. <code class="filename">distinfo</code></a></span></dt>
-<dt><span class="sect1"><a href="#components.patches">10.3. patches/*</a></span></dt>
+<dt><span class="sect1"><a href="#components.Makefile">11.1. <code class="filename">Makefile</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.distinfo">11.2. <code class="filename">distinfo</code></a></span></dt>
+<dt><span class="sect1"><a href="#components.patches">11.3. patches/*</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#components.patch.structure">10.3.1. Structure of a single patch file</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.caveats">10.3.2. Creating patch files</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.sources">10.3.3. Sources where the patch files come from</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.guidelines">10.3.4. Patching guidelines</a></span></dt>
-<dt><span class="sect2"><a href="#components.patches.feedback">10.3.5. Feedback to the author</a></span></dt>
+<dt><span class="sect2"><a href="#components.patch.structure">11.3.1. Structure of a single patch file</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.caveats">11.3.2. Creating patch files</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.sources">11.3.3. Sources where the patch files come from</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.guidelines">11.3.4. Patching guidelines</a></span></dt>
+<dt><span class="sect2"><a href="#components.patches.feedback">11.3.5. Feedback to the author</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#other-mandatory-files">10.4. Other mandatory files</a></span></dt>
-<dt><span class="sect1"><a href="#components.optional">10.5. Optional files</a></span></dt>
+<dt><span class="sect1"><a href="#other-mandatory-files">11.4. Other mandatory files</a></span></dt>
+<dt><span class="sect1"><a href="#components.optional">11.5. Optional files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#components.optional.bin">10.5.1. Files affecting the binary package</a></span></dt>
-<dt><span class="sect2"><a href="#components.optional.build">10.5.2. Files affecting the build process</a></span></dt>
-<dt><span class="sect2"><a href="#components.optional.none">10.5.3. Files affecting nothing at all</a></span></dt>
+<dt><span class="sect2"><a href="#components.optional.bin">11.5.1. Files affecting the binary package</a></span></dt>
+<dt><span class="sect2"><a href="#components.optional.build">11.5.2. Files affecting the build process</a></span></dt>
+<dt><span class="sect2"><a href="#components.optional.none">11.5.3. Files affecting nothing at all</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#work-dir">10.6. <code class="filename">work*</code></a></span></dt>
-<dt><span class="sect1"><a href="#files-dir">10.7. <code class="filename">files/*</code></a></span></dt>
+<dt><span class="sect1"><a href="#work-dir">11.6. <code class="filename">work*</code></a></span></dt>
+<dt><span class="sect1"><a href="#files-dir">11.7. <code class="filename">files/*</code></a></span></dt>
</dl>
</div>
<p>Whenever you're preparing a package, there are a number of
@@ -4260,7 +4352,7 @@ files involved which are described in the following
sections.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="components.Makefile"></a>10.1. <code class="filename">Makefile</code>
+<a name="components.Makefile"></a>11.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>.
@@ -4317,7 +4409,7 @@ converters games mbone print x11
<code class="varname">DYNAMIC_MASTER_SITES</code>,
<code class="varname">DIST_SUBDIR</code>, <code class="varname">EXTRACT_SUFX</code>
and <code class="varname">DISTFILES</code> are discussed in detail in
- <a href="#build.fetch" title="16.5. The fetch phase">Section 16.5, &#8220;The <span class="emphasis"><em>fetch</em></span> phase&#8221;</a>.</p></li>
+ <a href="#build.fetch" title="17.5. The fetch phase">Section 17.5, &#8220;The <span class="emphasis"><em>fetch</em></span> phase&#8221;</a>.</p></li>
</ul></div>
<p>The second section contains information about separately
downloaded patches, if any.
@@ -4394,12 +4486,12 @@ converters games mbone print x11
<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="18.6.7. Packages installing info files">Section 18.6.7, &#8220;Packages installing info files&#8221;</a>.</p></li>
+<li><p>If the package installs any info files, see <a href="#faq.info-files" title="19.6.7. Packages installing info files">Section 19.6.7, &#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>10.2. <code class="filename">distinfo</code>
+<a name="components.distinfo"></a>11.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
@@ -4410,7 +4502,7 @@ converters games mbone print x11
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="10.3. patches/*">Section 10.3, &#8220;patches/*&#8221;</a>).</p>
+ <code class="filename">patches</code> directory (see <a href="#components.patches" title="11.3. patches/*">Section 11.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>
@@ -4422,7 +4514,7 @@ converters games mbone print x11
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="components.patches"></a>10.3. patches/*</h2></div></div></div>
+<a name="components.patches"></a>11.3. patches/*</h2></div></div></div>
<p>Many packages still don't work out-of-the box on the various
platforms that are supported by pkgsrc. Therefore, a number of custom
patch files are needed to make the package work. These patch files are
@@ -4434,7 +4526,7 @@ converters games mbone print x11
<code class="filename">patch-ab</code>, etc.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="components.patch.structure"></a>10.3.1. Structure of a single patch file</h3></div></div></div>
+<a name="components.patch.structure"></a>11.3.1. Structure of a single patch file</h3></div></div></div>
<p>The <code class="filename">patch-*</code> files should be in
<span><strong class="command">diff -bu</strong></span> format, and apply without a fuzz to avoid
problems. (To force patches to apply with fuzz you can set
@@ -4466,7 +4558,7 @@ converters games mbone print x11
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="components.patches.caveats"></a>10.3.2. Creating patch files</h3></div></div></div>
+<a name="components.patches.caveats"></a>11.3.2. Creating patch files</h3></div></div></div>
<p>One important thing to mention is to pay attention that no RCS
IDs get stored in the patch files, as these will cause problems when
later checked into the NetBSD CVS tree. Use the
@@ -4485,7 +4577,7 @@ converters games mbone print x11
directory to <code class="filename">patches/</code>.</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="10.2. distinfo">Section 10.2, &#8220;<code class="filename">distinfo</code>&#8221;</a>.</p>
+ makepatchsum</strong></span> command, see <a href="#components.distinfo" title="11.2. distinfo">Section 11.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
@@ -4497,7 +4589,7 @@ converters games mbone print x11
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="components.patches.sources"></a>10.3.3. Sources where the patch files come from</h3></div></div></div>
+<a name="components.patches.sources"></a>11.3.3. Sources where the patch files come from</h3></div></div></div>
<p>If you want to share patches between multiple packages
in pkgsrc, e.g. because they use the same distfiles, set
<code class="varname">PATCHDIR</code> to the path where the patch files
@@ -4524,7 +4616,7 @@ PATCHDIR= ${.CURDIR}/../xemacs/patches
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="components.patches.guidelines"></a>10.3.4. Patching guidelines</h3></div></div></div>
+<a name="components.patches.guidelines"></a>11.3.4. Patching guidelines</h3></div></div></div>
<p>When fixing a portability issue in the code do not use
preprocessor magic to check for the current operating system nor
platform. Doing so hurts portability to other platforms because
@@ -4534,7 +4626,7 @@ PATCHDIR= ${.CURDIR}/../xemacs/patches
specific <span class="emphasis"><em>features</em></span> you need. For example,
instead of assuming that kqueue is available under NetBSD and
using the <code class="varname">__NetBSD__</code> macro to conditionalize
- kqueue support, add a check that detects kqueue itself &#8212;
+ kqueue support, add a check that detects kqueue itself &mdash;
yes, this generally involves patching the
<span><strong class="command">configure</strong></span> script. There is absolutely nothing
that prevents some OSes from adopting interfaces from other OSes
@@ -4548,7 +4640,7 @@ PATCHDIR= ${.CURDIR}/../xemacs/patches
<span class="emphasis"><em>It doesn't work unless it is right!</em></span></p>
<p>Some typical examples:</p>
<div class="table">
-<a name="patch-examples"></a><p class="title"><b>Table 10.1. Patching examples</b></p>
+<a name="patch-examples"></a><p class="title"><b>Table 11.1. Patching examples</b></p>
<div class="table-contents"><table summary="Patching examples" border="1">
<colgroup>
<col>
@@ -4638,7 +4730,7 @@ monitor_file(...)
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="components.patches.feedback"></a>10.3.5. Feedback to the author</h3></div></div></div>
+<a name="components.patches.feedback"></a>11.3.5. Feedback to the author</h3></div></div></div>
<p>Always, always, <span class="strong"><strong>always</strong></span>
feed back any <span class="emphasis"><em>portability fixes</em></span> or
improvements you do to a package to the mainstream developers.
@@ -4659,7 +4751,7 @@ monitor_file(...)
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="other-mandatory-files"></a>10.4. Other mandatory files</h2></div></div></div>
+<a name="other-mandatory-files"></a>11.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
@@ -4671,16 +4763,16 @@ monitor_file(...)
system: all the 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 12. PLIST issues">Chapter 12, <i>PLIST issues</i></a> for more
+ inserted files. See <a href="#plist" title="Chapter 13. PLIST issues">Chapter 13, <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>10.5. Optional files</h2></div></div></div>
+<a name="components.optional"></a>11.5. Optional files</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="components.optional.bin"></a>10.5.1. Files affecting the binary package</h3></div></div></div>
+<a name="components.optional.bin"></a>11.5.1. Files affecting the binary package</h3></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>.
@@ -4689,7 +4781,7 @@ monitor_file(...)
are moved in place. This can be used to do any custom
procedures not possible with @exec commands in
<code class="filename">PLIST</code>. See <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> and
- <a href="http://netbsd.gw.com/cgi-bin/man-cgi?pkg_create+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">pkg_create</span>(1)</span></a> for more information. See also <a href="#files-and-dirs-outside-prefix" title="14.1. Files and directories outside the installation prefix">Section 14.1, &#8220;Files and directories outside the installation prefix&#8221;</a>.</p></dd>
+ <a href="http://netbsd.gw.com/cgi-bin/man-cgi?pkg_create+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">pkg_create</span>(1)</span></a> for more information. See also <a href="#files-and-dirs-outside-prefix" title="15.1. Files and directories outside the installation prefix">Section 15.1, &#8220;Files and directories outside the installation prefix&#8221;</a>.</p></dd>
<dt><span class="term"><code class="filename">DEINSTALL</code></span></dt>
<dd><p>This script is executed before and after any files are removed. It is
this script's responsibility to clean up any additional messy details
@@ -4730,7 +4822,7 @@ MESSAGE_SUBST+= SOMEVAR="somevalue"
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="components.optional.build"></a>10.5.2. Files affecting the build process</h3></div></div></div>
+<a name="components.optional.build"></a>11.5.2. Files affecting the build process</h3></div></div></div>
<div class="variablelist"><dl>
<dt><span class="term"><code class="filename">Makefile.common</code></span></dt>
<dd><p>This file contains arbitrary things that could
@@ -4742,7 +4834,7 @@ MESSAGE_SUBST+= SOMEVAR="somevalue"
describes what it does.</p></dd>
<dt><span class="term"><code class="filename">buildlink3.mk</code></span></dt>
<dd><p>This file contains the dependency information
- for the buildlink3 framework (see <a href="#buildlink" title="Chapter 13. Buildlink methodology">Chapter 13, <i>Buildlink methodology</i></a>).</p></dd>
+ for the buildlink3 framework (see <a href="#buildlink" title="Chapter 14. Buildlink methodology">Chapter 14, <i>Buildlink methodology</i></a>).</p></dd>
<dt><span class="term"><code class="filename">hacks.mk</code></span></dt>
<dd><p>This file contains workarounds for compiler bugs
and similar things. It is included automatically by the pkgsrc
@@ -4751,7 +4843,7 @@ MESSAGE_SUBST+= SOMEVAR="somevalue"
it.</p></dd>
<dt><span class="term"><code class="filename">options.mk</code></span></dt>
<dd><p>This file contains the code for the
- package-specific options (see <a href="#options" title="Chapter 15. Options handling">Chapter 15, <i>Options handling</i></a>) that can be
+ package-specific options (see <a href="#options" title="Chapter 16. Options handling">Chapter 16, <i>Options handling</i></a>) that can be
selected by the user. If a package has only one or two options,
it is equally acceptable to put the code directly into the
<code class="filename">Makefile</code>.</p></dd>
@@ -4759,7 +4851,7 @@ MESSAGE_SUBST+= SOMEVAR="somevalue"
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="components.optional.none"></a>10.5.3. Files affecting nothing at all</h3></div></div></div>
+<a name="components.optional.none"></a>11.5.3. Files affecting nothing at all</h3></div></div></div>
<div class="variablelist"><dl>
<dt><span class="term"><code class="filename">README*</code></span></dt>
<dd><p>These files do not take place in the creation of
@@ -4774,7 +4866,7 @@ MESSAGE_SUBST+= SOMEVAR="somevalue"
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="work-dir"></a>10.6. <code class="filename">work*</code>
+<a name="work-dir"></a>11.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
@@ -4788,7 +4880,7 @@ MESSAGE_SUBST+= SOMEVAR="somevalue"
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="files-dir"></a>10.7. <code class="filename">files/*</code>
+<a name="files-dir"></a>11.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
@@ -4808,20 +4900,20 @@ FILESDIR=${.CURDIR}/../xemacs/files
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="makefile"></a>Chapter 11. Programming in <code class="filename">Makefile</code>s</h2></div></div></div>
+<a name="makefile"></a>Chapter 12. 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.style">11.1. Caveats</a></span></dt>
-<dt><span class="sect1"><a href="#makefile.variables">11.2. <code class="filename">Makefile</code> variables</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">11.2.1. Naming conventions</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#makefile.code">11.3. Code snippets</a></span></dt>
+<dt><span class="sect1"><a href="#makefile.style">12.1. Caveats</a></span></dt>
+<dt><span class="sect1"><a href="#makefile.variables">12.2. <code class="filename">Makefile</code> variables</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">12.2.1. Naming conventions</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#makefile.code">12.3. Code snippets</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#adding-to-list">11.3.1. Adding things to a list</a></span></dt>
-<dt><span class="sect2"><a href="#converting-internal-to-external">11.3.2. Converting an internal list into an external list</a></span></dt>
-<dt><span class="sect2"><a href="#passing-variable-to-shell">11.3.3. Passing variables to a shell command</a></span></dt>
-<dt><span class="sect2"><a href="#quoting-guideline">11.3.4. Quoting guideline</a></span></dt>
-<dt><span class="sect2"><a href="#bsd-make-bug-workaround">11.3.5. Workaround for a bug in BSD Make</a></span></dt>
+<dt><span class="sect2"><a href="#adding-to-list">12.3.1. Adding things to a list</a></span></dt>
+<dt><span class="sect2"><a href="#converting-internal-to-external">12.3.2. Converting an internal list into an external list</a></span></dt>
+<dt><span class="sect2"><a href="#passing-variable-to-shell">12.3.3. Passing variables to a shell command</a></span></dt>
+<dt><span class="sect2"><a href="#quoting-guideline">12.3.4. Quoting guideline</a></span></dt>
+<dt><span class="sect2"><a href="#bsd-make-bug-workaround">12.3.5. Workaround for a bug in BSD Make</a></span></dt>
</dl></dd>
</dl>
</div>
@@ -4841,7 +4933,7 @@ FILESDIR=${.CURDIR}/../xemacs/files
with them.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="makefile.style"></a>11.1. Caveats</h2></div></div></div>
+<a name="makefile.style"></a>12.1. Caveats</h2></div></div></div>
<div class="itemizedlist"><ul type="disc"><li>
<p>When you are creating a file as a
target of a rule, always write the data to a temporary file first
@@ -4874,7 +4966,7 @@ correct:
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="makefile.variables"></a>11.2. <code class="filename">Makefile</code> variables</h2></div></div></div>
+<a name="makefile.variables"></a>12.2. <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
@@ -4905,7 +4997,7 @@ correct:
operate on the words, others operate on the string as a whole. When
a string is split into words, it is split as you would expect
it from <a href="http://netbsd.gw.com/cgi-bin/man-cgi?sh+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">sh</span>(1)</span></a>.</p>
-<p>No rule without exception&#8212;the <span><strong class="command">.for</strong></span>
+<p>No rule without exception&mdash;the <span><strong class="command">.for</strong></span>
loop does not follow the shell quoting rules but splits at sequences
of whitespace.</p>
<p>There are several types of variables that should be handled
@@ -4932,7 +5024,7 @@ correct:
</ul></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="makefile.variables.names"></a>11.2.1. Naming conventions</h3></div></div></div>
+<a name="makefile.variables.names"></a>12.2.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
@@ -4949,13 +5041,13 @@ correct:
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="makefile.code"></a>11.3. Code snippets</h2></div></div></div>
+<a name="makefile.code"></a>12.3. 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>11.3.1. Adding things to a list</h3></div></div></div>
+<a name="adding-to-list"></a>12.3.1. Adding things to a list</h3></div></div></div>
<pre class="programlisting">
STRING= foo * bar `date`
INT_LIST= # empty
@@ -4976,7 +5068,7 @@ EXT_LIST+= ${ANOTHER_EXT_LIST} # 4
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="converting-internal-to-external"></a>11.3.2. Converting an internal list into an external list</h3></div></div></div>
+<a name="converting-internal-to-external"></a>12.3.2. Converting an internal list into an external list</h3></div></div></div>
<pre class="programlisting">
EXT_LIST= # empty
.for i in ${INT_LIST}
@@ -4991,7 +5083,7 @@ EXT_LIST+= ${i:Q}""
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="passing-variable-to-shell"></a>11.3.3. Passing variables to a shell command</h3></div></div></div>
+<a name="passing-variable-to-shell"></a>12.3.3. Passing variables to a shell command</h3></div></div></div>
<p>Sometimes you may want to print an arbitrary string. There
are many ways to get it wrong and only few that can handle every
nastiness.</p>
@@ -5035,7 +5127,7 @@ all:
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="quoting-guideline"></a>11.3.4. Quoting guideline</h3></div></div></div>
+<a name="quoting-guideline"></a>12.3.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">
@@ -5118,7 +5210,7 @@ for_test:
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bsd-make-bug-workaround"></a>11.3.5. Workaround for a bug in BSD Make</h3></div></div></div>
+<a name="bsd-make-bug-workaround"></a>12.3.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
@@ -5134,18 +5226,18 @@ VAR:= ${VAR:N${_othervar_:C/-//}}
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="plist"></a>Chapter 12. PLIST issues</h2></div></div></div>
+<a name="plist"></a>Chapter 13. 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">12.1. RCS ID</a></span></dt>
-<dt><span class="sect1"><a href="#automatic-plist-generation">12.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
-<dt><span class="sect1"><a href="#print-PLIST">12.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
-<dt><span class="sect1"><a href="#plist.misc">12.4. Variable substitution in PLIST</a></span></dt>
-<dt><span class="sect1"><a href="#manpage-compression">12.5. Man page compression</a></span></dt>
-<dt><span class="sect1"><a href="#using-PLIST_SRC">12.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
-<dt><span class="sect1"><a href="#platform-specific-plist">12.7. Platform-specific and differing PLISTs</a></span></dt>
-<dt><span class="sect1"><a href="#faq.common-dirs">12.8. Sharing directories between packages</a></span></dt>
+<dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt>
+<dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
+<dt><span class="sect1"><a href="#print-PLIST">13.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></a></span></dt>
+<dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt>
+<dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt>
+<dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
+<dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt>
+<dt><span class="sect1"><a href="#faq.common-dirs">13.8. Sharing directories between packages</a></span></dt>
</dl>
</div>
<p>The <code class="filename">PLIST</code> file contains a package's
@@ -5158,7 +5250,7 @@ VAR:= ${VAR:N${_othervar_:C/-//}}
below!).</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="rcs-id"></a>12.1. RCS ID</h2></div></div></div>
+<a name="rcs-id"></a>13.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:</p>
<pre class="programlisting">
@@ -5167,18 +5259,18 @@ VAR:= ${VAR:N${_othervar_:C/-//}}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="automatic-plist-generation"></a>12.2. Semi-automatic <code class="filename">PLIST</code> generation</h2></div></div></div>
+<a name="automatic-plist-generation"></a>13.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="16.17. Other helpful targets">Section 16.17, &#8220;Other helpful targets&#8221;</a> for
+ was extracted. See <a href="#build.helpful-targets" title="17.17. Other helpful targets">Section 17.17, &#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>12.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span>
+<a name="print-PLIST"></a>13.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="12.8. Sharing directories between packages">Section 12.8, &#8220;Sharing directories between packages&#8221;</a>, you may have noticed that
+ <a href="#faq.common-dirs" title="13.8. Sharing directories between packages">Section 13.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
@@ -5204,7 +5296,7 @@ PRINT_PLIST_AWK+= /^@dirrm share\/specific/ { print "@comment " $$0; next;
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="plist.misc"></a>12.4. Variable substitution in PLIST</h2></div></div></div>
+<a name="plist.misc"></a>13.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
following variables:</p>
@@ -5249,7 +5341,7 @@ PRINT_PLIST_AWK+= /^@dirrm share\/specific/ { print "@comment " $$0; next;
search for <code class="varname">PLIST_SUBST</code>).</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="10.5. Optional files">Section 10.5, &#8220;Optional files&#8221;</a>):</p>
+ following way, similar to <code class="varname">MESSAGE_SUBST</code> (see <a href="#components.optional" title="11.5. Optional files">Section 11.5, &#8220;Optional files&#8221;</a>):</p>
<pre class="programlisting">
PLIST_SUBST+= SOMEVAR="somevalue"
</pre>
@@ -5259,7 +5351,7 @@ PLIST_SUBST+= SOMEVAR="somevalue"
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manpage-compression"></a>12.5. Man page compression</h2></div></div></div>
+<a name="manpage-compression"></a>13.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
@@ -5272,7 +5364,7 @@ PLIST_SUBST+= SOMEVAR="somevalue"
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="using-PLIST_SRC"></a>12.6. Changing PLIST source with <code class="varname">PLIST_SRC</code>
+<a name="using-PLIST_SRC"></a>13.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
@@ -5283,7 +5375,7 @@ PLIST_SUBST+= SOMEVAR="somevalue"
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="platform-specific-plist"></a>12.7. Platform-specific and differing PLISTs</h2></div></div></div>
+<a name="platform-specific-plist"></a>13.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>
@@ -5297,7 +5389,7 @@ PLIST_SUBST+= SOMEVAR="somevalue"
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="faq.common-dirs"></a>12.8. Sharing directories between packages</h2></div></div></div>
+<a name="faq.common-dirs"></a>13.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
@@ -5352,20 +5444,20 @@ USE_DIRS+= xdg-1.1
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="buildlink"></a>Chapter 13. Buildlink methodology</h2></div></div></div>
+<a name="buildlink"></a>Chapter 14. 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">13.1. Converting packages to use buildlink3</a></span></dt>
-<dt><span class="sect1"><a href="#creating-buildlink3.mk">13.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-buildlink3">14.1. Converting packages to use buildlink3</a></span></dt>
+<dt><span class="sect1"><a href="#creating-buildlink3.mk">14.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-bl3">13.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
-<dt><span class="sect2"><a href="#updating-buildlink-depends">13.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">14.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
+<dt><span class="sect2"><a href="#updating-buildlink-depends">14.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">13.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
+<dt><span class="sect1"><a href="#writing-builtin.mk">14.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">13.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">13.3.2. Global preferences for native or pkgsrc software</a></span></dt>
+<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">14.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">14.3.2. Global preferences for native or pkgsrc software</a></span></dt>
</dl></dd>
</dl>
</div>
@@ -5393,7 +5485,7 @@ USE_DIRS+= xdg-1.1
software.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="converting-to-buildlink3"></a>13.1. Converting packages to use buildlink3</h2></div></div></div>
+<a name="converting-to-buildlink3"></a>14.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>
@@ -5470,7 +5562,7 @@ BUILDLINK_API_DEPENDS.foo+= foo&gt;=1.1.0
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="creating-buildlink3.mk"></a>13.2. Writing <code class="filename">buildlink3.mk</code> files</h2></div></div></div>
+<a name="creating-buildlink3.mk"></a>14.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
@@ -5490,7 +5582,7 @@ BUILDLINK_API_DEPENDS.foo+= foo&gt;=1.1.0
</pre>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="anatomy-of-bl3"></a>13.2.1. Anatomy of a buildlink3.mk file</h3></div></div></div>
+<a name="anatomy-of-bl3"></a>14.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>
@@ -5627,7 +5719,7 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="updating-buildlink-depends"></a>13.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>14.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>
after a package update is when the API or interface to the
@@ -5650,7 +5742,7 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
packages made using it will require the correct package
dependency and not settle for an older one which will not
contain the necessary shared libraries.</p>
-<p>See <a href="#dependencies" title="18.1.6. Handling dependencies">Section 18.1.6, &#8220;Handling dependencies&#8221;</a> for
+<p>See <a href="#dependencies" title="19.1.6. Handling dependencies">Section 19.1.6, &#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>
@@ -5669,7 +5761,7 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="writing-builtin.mk"></a>13.3. Writing <code class="filename">builtin.mk</code> files</h2></div></div></div>
+<a name="writing-builtin.mk"></a>14.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.
Aside from a <code class="filename">buildlink3.mk</code> file, these
@@ -5694,7 +5786,7 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
</ol></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="anatomy-of-builtin.mk"></a>13.3.1. Anatomy of a <code class="filename">builtin.mk</code> file</h3></div></div></div>
+<a name="anatomy-of-builtin.mk"></a>14.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">
@@ -5781,7 +5873,7 @@ CHECK_BUILTIN.foo?= no
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="native-or-pkgsrc-preference"></a>13.3.2. Global preferences for native or pkgsrc software</h3></div></div></div>
+<a name="native-or-pkgsrc-preference"></a>14.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)
version or the pkgsrc version of software to satisfy a
@@ -5814,29 +5906,29 @@ PREFER_NATIVE= getopt skey tcp_wrappers
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="pkginstall"></a>Chapter 14. The pkginstall framework</h2></div></div></div>
+<a name="pkginstall"></a>Chapter 15. 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">14.1. Files and directories outside the installation prefix</a></span></dt>
+<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">15.1. Files and directories outside the installation prefix</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#dirs-outside-prefix">14.1.1. Directory manipulation</a></span></dt>
-<dt><span class="sect2"><a href="#files-outside-prefix">14.1.2. File manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#dirs-outside-prefix">15.1.1. Directory manipulation</a></span></dt>
+<dt><span class="sect2"><a href="#files-outside-prefix">15.1.2. File manipulation</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#conf-files">14.2. Configuration files</a></span></dt>
+<dt><span class="sect1"><a href="#conf-files">15.2. Configuration files</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#conf-files-sysconfdir">14.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-configure">14.2.2. Telling the software where configuration files are</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-patching">14.2.3. Patching installations</a></span></dt>
-<dt><span class="sect2"><a href="#conf-files-disable">14.2.4. Disabling handling of configuration files</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-sysconfdir">15.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-configure">15.2.2. Telling the software where configuration files are</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-patching">15.2.3. Patching installations</a></span></dt>
+<dt><span class="sect2"><a href="#conf-files-disable">15.2.4. Disabling handling of configuration files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#rcd-scripts">14.3. System startup scripts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">14.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#users-and-groups">14.4. System users and groups</a></span></dt>
-<dt><span class="sect1"><a href="#shells">14.5. System shells</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#shells-disable">14.5.1. Disabling shell registration</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="#fonts">14.6. Fonts</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="#fonts-disable">14.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#rcd-scripts">15.3. System startup scripts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">15.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#users-and-groups">15.4. System users and groups</a></span></dt>
+<dt><span class="sect1"><a href="#shells">15.5. System shells</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#shells-disable">15.5.1. Disabling shell registration</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="#fonts">15.6. Fonts</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="#fonts-disable">15.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
</dl>
</div>
<p>This chapter describes the framework known as
@@ -5862,7 +5954,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>14.1. Files and directories outside the installation prefix</h2></div></div></div>
+<a name="files-and-dirs-outside-prefix"></a>15.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>),
@@ -5895,7 +5987,7 @@ and directories based on variables set in the package's
these variables.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="dirs-outside-prefix"></a>14.1.1. Directory manipulation</h3></div></div></div>
+<a name="dirs-outside-prefix"></a>15.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">
@@ -5922,7 +6014,7 @@ MAKE_DIRS_PERMS+= ${VARBASE}/foo/private ${ROOT_USER} ${ROOT_GROUP} 0700
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="files-outside-prefix"></a>14.1.2. File manipulation</h3></div></div></div>
+<a name="files-outside-prefix"></a>15.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
@@ -5962,7 +6054,7 @@ SUPPORT_FILES_PERMS+= ${PREFIX}/share/somefile ${VARBASE}/somefile ${ROOT_USER}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="conf-files"></a>14.2. Configuration files</h2></div></div></div>
+<a name="conf-files"></a>15.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
@@ -5974,7 +6066,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>14.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</h3></div></div></div>
+<a name="conf-files-sysconfdir"></a>15.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>
@@ -6022,11 +6114,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="14.1.1. Directory manipulation">Section 14.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="15.1.1. Directory manipulation">Section 15.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>14.2.2. Telling the software where configuration files are</h3></div></div></div>
+<a name="conf-files-configure"></a>15.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
@@ -6043,7 +6135,7 @@ unfortunately).</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="conf-files-patching"></a>14.2.3. Patching installations</h3></div></div></div>
+<a name="conf-files-patching"></a>15.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>
@@ -6060,7 +6152,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="14.1.2. File manipulation">Section 14.1.2, &#8220;File manipulation&#8221;</a> for information
+used. Check out <a href="#files-outside-prefix" title="15.1.2. File manipulation">Section 15.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/pkgsrc/current/pkgsrc/mail/mutt/README.html" target="_top"><code class="filename">mail/mutt</code></a> package:</p>
<pre class="programlisting">
@@ -6072,7 +6164,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>14.2.4. Disabling handling of configuration files</h3></div></div></div>
+<a name="conf-files-disable"></a>15.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>
@@ -6080,10 +6172,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>14.3. System startup scripts</h2></div></div></div>
+<a name="rcd-scripts"></a>15.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="14.1. Files and directories outside the installation prefix">Section 14.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="15.1. Files and directories outside the installation prefix">Section 15.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
@@ -6118,7 +6210,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>14.3.1. Disabling handling of system startup scripts</h3></div></div></div>
+<a name="rcd-scripts-disable"></a>15.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
@@ -6128,7 +6220,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>14.4. System users and groups</h2></div></div></div>
+<a name="users-and-groups"></a>15.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
@@ -6165,7 +6257,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>14.5. System shells</h2></div></div></div>
+<a name="shells"></a>15.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
@@ -6180,7 +6272,7 @@ PKG_SHELL= ${PREFIX}/bin/zsh
</pre>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="shells-disable"></a>14.5.1. Disabling shell registration</h3></div></div></div>
+<a name="shells-disable"></a>15.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>
@@ -6188,7 +6280,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>14.6. Fonts</h2></div></div></div>
+<a name="fonts"></a>15.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>
@@ -6206,7 +6298,7 @@ FONTS_DIRS.ttf= ${PREFIX}/lib/X11/fonts/TTF
</pre>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="fonts-disable"></a>14.6.1. Disabling automatic update of the fonts databases</h3></div></div></div>
+<a name="fonts-disable"></a>15.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>
@@ -6215,13 +6307,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 15. Options handling</h2></div></div></div>
+<a name="options"></a>Chapter 16. 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">15.1. Global default options</a></span></dt>
-<dt><span class="sect1"><a href="#converting-to-options">15.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
-<dt><span class="sect1"><a href="#option-names">15.3. Option Names</a></span></dt>
+<dt><span class="sect1"><a href="#global-default-options">16.1. Global default options</a></span></dt>
+<dt><span class="sect1"><a href="#converting-to-options">16.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
+<dt><span class="sect1"><a href="#option-names">16.3. Option Names</a></span></dt>
</dl>
</div>
<p>Many packages have the ability to be built to support different
@@ -6233,7 +6325,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>15.1. Global default options</h2></div></div></div>
+<a name="global-default-options"></a>16.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.
@@ -6241,7 +6333,7 @@ This variable should be set in <a href="#mk.conf"><code class="filename">mk.conf
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="converting-to-options"></a>15.2. Converting packages to use <code class="filename">bsd.options.mk</code>
+<a name="converting-to-options"></a>16.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
@@ -6380,7 +6472,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>15.3. Option Names</h2></div></div></div>
+<a name="option-names"></a>16.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
@@ -6405,36 +6497,36 @@ 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 16. The build process</h2></div></div></div>
+<a name="build"></a>Chapter 17. 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">16.1. Introduction</a></span></dt>
-<dt><span class="sect1"><a href="#build.prefix">16.2. Program location</a></span></dt>
-<dt><span class="sect1"><a href="#build.builddirs">16.3. Directories used during the build process</a></span></dt>
-<dt><span class="sect1"><a href="#build.running">16.4. Running a phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.fetch">16.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#build.fetch.what">16.5.1. What to fetch and where to get it from</a></span></dt>
-<dt><span class="sect2"><a href="#build.fetch.how">16.5.2. How are the files fetched?</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#build.checksum">16.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.extract">16.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.patch">16.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.tools">16.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.wrapper">16.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.configure">16.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.build">16.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.test">16.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.install">16.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.package">16.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
-<dt><span class="sect1"><a href="#build.clean">16.16. Cleaning up</a></span></dt>
-<dt><span class="sect1"><a href="#build.helpful-targets">16.17. Other helpful targets</a></span></dt>
+<dt><span class="sect1"><a href="#build.intro">17.1. Introduction</a></span></dt>
+<dt><span class="sect1"><a href="#build.prefix">17.2. Program location</a></span></dt>
+<dt><span class="sect1"><a href="#build.builddirs">17.3. Directories used during the build process</a></span></dt>
+<dt><span class="sect1"><a href="#build.running">17.4. Running a phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.fetch">17.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#build.fetch.what">17.5.1. What to fetch and where to get it from</a></span></dt>
+<dt><span class="sect2"><a href="#build.fetch.how">17.5.2. How are the files fetched?</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#build.checksum">17.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.extract">17.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.patch">17.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.tools">17.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.wrapper">17.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.configure">17.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.build">17.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.test">17.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.install">17.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.package">17.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
+<dt><span class="sect1"><a href="#build.clean">17.16. Cleaning up</a></span></dt>
+<dt><span class="sect1"><a href="#build.helpful-targets">17.17. 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>16.1. Introduction</h2></div></div></div>
+<a name="build.intro"></a>17.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>,
@@ -6461,7 +6553,7 @@ support.</span>&#8221; The file is sorted by option names.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.prefix"></a>16.2. Program location</h2></div></div></div>
+<a name="build.prefix"></a>17.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>
@@ -6472,7 +6564,7 @@ support.</span>&#8221; The file is sorted by option names.</p>
for pkgs in the <code class="filename">cross</code> 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="10.3. patches/*">Section 10.3, &#8220;patches/*&#8221;</a> and <a href="#fixes.libtool" title="18.3.1. Shared libraries - libtool">Section 18.3.1, &#8220;Shared libraries - libtool&#8221;</a> for more details.</p>
+ these files are encoded. See <a href="#components.patches" title="11.3. patches/*">Section 11.3, &#8220;patches/*&#8221;</a> and <a href="#fixes.libtool" title="19.3.1. Shared libraries - libtool">Section 19.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">
@@ -6562,7 +6654,7 @@ GTKDIR_DEFAULT= ${LOCALBASE}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.builddirs"></a>16.3. Directories used during the build process</h2></div></div></div>
+<a name="build.builddirs"></a>17.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>
@@ -6599,7 +6691,7 @@ GTKDIR_DEFAULT= ${LOCALBASE}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.running"></a>16.4. Running a phase</h2></div></div></div>
+<a name="build.running"></a>17.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
@@ -6609,14 +6701,14 @@ GTKDIR_DEFAULT= ${LOCALBASE}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.fetch"></a>16.5. The <span class="emphasis"><em>fetch</em></span> phase</h2></div></div></div>
+<a name="build.fetch"></a>17.5. The <span class="emphasis"><em>fetch</em></span> phase</h2></div></div></div>
<p>The first step in building a package is to fetch the
distribution files (distfiles) from the sites that are providing
them. This is the task of the <span class="emphasis"><em>fetch</em></span>
phase.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="build.fetch.what"></a>16.5.1. What to fetch and where to get it from</h3></div></div></div>
+<a name="build.fetch.what"></a>17.5.1. What to fetch and where to get it from</h3></div></div></div>
<p>In simple cases, <code class="varname">MASTER_SITES</code>
defines all URLs from where the distfile, whose name is
derived from the <code class="varname">DISTNAME</code> variable, is
@@ -6712,7 +6804,7 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=project_name/}
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="build.fetch.how"></a>16.5.2. How are the files fetched?</h3></div></div></div>
+<a name="build.fetch.how"></a>17.5.2. How are the files fetched?</h3></div></div></div>
<p>The <span class="emphasis"><em>fetch</em></span> phase makes sure that
all the distfiles exist in a local directory
(<code class="varname">DISTDIR</code>, which can be set by the pkgsrc
@@ -6743,7 +6835,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.checksum"></a>16.6. The <span class="emphasis"><em>checksum</em></span> phase</h2></div></div></div>
+<a name="build.checksum"></a>17.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
@@ -6754,7 +6846,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.extract"></a>16.7. The <span class="emphasis"><em>extract</em></span> phase</h2></div></div></div>
+<a name="build.extract"></a>17.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>
@@ -6794,7 +6886,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.patch"></a>16.8. The <span class="emphasis"><em>patch</em></span> phase</h2></div></div></div>
+<a name="build.patch"></a>17.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
@@ -6805,7 +6897,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
applied, 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="10.3. patches/*">Section 10.3, &#8220;patches/*&#8221;</a> for more details.</p>
+ <code class="varname">PATCH_DIST_ARGS</code>. See <a href="#components.patches" title="11.3. patches/*">Section 11.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
@@ -6815,13 +6907,13 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.tools"></a>16.9. The <span class="emphasis"><em>tools</em></span> phase</h2></div></div></div>
-<p>This is covered in <a href="#tools" title="Chapter 17. Tools needed for building or running">Chapter 17, <i>Tools needed for building or running</i></a>.
+<a name="build.tools"></a>17.9. The <span class="emphasis"><em>tools</em></span> phase</h2></div></div></div>
+<p>This is covered in <a href="#tools" title="Chapter 18. Tools needed for building or running">Chapter 18, <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>16.10. The <span class="emphasis"><em>wrapper</em></span> phase</h2></div></div></div>
+<a name="build.wrapper"></a>17.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>
@@ -6859,7 +6951,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.configure"></a>16.11. The <span class="emphasis"><em>configure</em></span> phase</h2></div></div></div>
+<a name="build.configure"></a>17.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
@@ -6904,7 +6996,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.build"></a>16.12. The <span class="emphasis"><em>build</em></span> phase</h2></div></div></div>
+<a name="build.build"></a>17.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">
@@ -6939,12 +7031,12 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.test"></a>16.13. The <span class="emphasis"><em>test</em></span> phase</h2></div></div></div>
+<a name="build.test"></a>17.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>16.14. The <span class="emphasis"><em>install</em></span> phase</h2></div></div></div>
+<a name="build.install"></a>17.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>
@@ -7029,7 +7121,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.package"></a>16.15. The <span class="emphasis"><em>package</em></span> phase</h2></div></div></div>
+<a name="build.package"></a>17.15. The <span class="emphasis"><em>package</em></span> phase</h2></div></div></div>
<p>Once the install stage has completed, a binary package of
the installed files can be built. These binary packages can be
used for quick installation without previous compilation, e.g. by
@@ -7049,7 +7141,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.clean"></a>16.16. Cleaning up</h2></div></div></div>
+<a name="build.clean"></a>17.16. Cleaning up</h2></div></div></div>
<p>Once you're finished with a package, you can clean the work
directory by running <span><strong class="command">make clean</strong></span>. If you want
to clean the work directories of all dependencies too, use
@@ -7057,7 +7149,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="build.helpful-targets"></a>16.17. Other helpful targets</h2></div></div></div>
+<a name="build.helpful-targets"></a>17.17. 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
@@ -7367,7 +7459,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
<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="12.3. Tweaking output of make print-PLIST">Section 12.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="13.3. Tweaking output of make print-PLIST">Section 13.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>
@@ -7376,7 +7468,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
package already exists, no action is taken. If not, this
target will compile, install and package it (and its
depends, if <code class="varname">PKG_DEPENDS</code> is set
- properly. See <a href="#binary.configuration" title="6.3.1. Configuration">Section 6.3.1, &#8220;Configuration&#8221;</a>).
+ properly. See <a href="#binary.configuration" title="7.3.1. Configuration">Section 7.3.1, &#8220;Configuration&#8221;</a>).
After creating the binary package, the sources, the
just-installed package and its required packages are
removed, preserving free disk space.</p>
@@ -7408,14 +7500,14 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="tools"></a>Chapter 17. Tools needed for building or running</h2></div></div></div>
+<a name="tools"></a>Chapter 18. 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">17.1. Tools for pkgsrc builds</a></span></dt>
-<dt><span class="sect1"><a href="#package-tools">17.2. Tools needed by packages</a></span></dt>
-<dt><span class="sect1"><a href="#platform-tools">17.3. Tools provided by platforms</a></span></dt>
-<dt><span class="sect1"><a href="#tools.questions">17.4. Questions regarding the tools</a></span></dt>
+<dt><span class="sect1"><a href="#pkgsrc-tools">18.1. Tools for pkgsrc builds</a></span></dt>
+<dt><span class="sect1"><a href="#package-tools">18.2. Tools needed by packages</a></span></dt>
+<dt><span class="sect1"><a href="#platform-tools">18.3. Tools provided by platforms</a></span></dt>
+<dt><span class="sect1"><a href="#tools.questions">18.4. Questions regarding the tools</a></span></dt>
</dl>
</div>
<p>The <code class="varname">USE_TOOLS</code> definition is used both internally
@@ -7439,7 +7531,7 @@ yacc) or a better sed.</p>
<span><strong class="command">make show-tools</strong></span>.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="pkgsrc-tools"></a>17.1. Tools for pkgsrc builds</h2></div></div></div>
+<a name="pkgsrc-tools"></a>18.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,
such as: <span><strong class="command">cat</strong></span>, <span><strong class="command">awk</strong></span>,
@@ -7452,7 +7544,7 @@ to define the tools needed.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="package-tools"></a>17.2. Tools needed by packages</h2></div></div></div>
+<a name="package-tools"></a>18.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.
And the :run means that it is used for a
@@ -7475,7 +7567,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>17.3. Tools provided by platforms</h2></div></div></div>
+<a name="platform-tools"></a>18.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
<code class="filename">pkgsrc/mk/tools/tools.${OPSYS}.mk</code> which defines
@@ -7492,15 +7584,15 @@ 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="tools.questions"></a>17.4. Questions regarding the tools</h2></div></div></div>
+<a name="tools.questions"></a>18.4. Questions regarding the tools</h2></div></div></div>
<div class="qandaset">
<dl>
-<dt>17.4.1. <a href="#tools.new">How do I add a new tool?</a>
+<dt>18.4.1. <a href="#tools.new">How do I add a new tool?</a>
</dt>
-<dt>17.4.2. <a href="#tools.listall">How do I get a list of all available
+<dt>18.4.2. <a href="#tools.listall">How do I get a list of all available
tools?</a>
</dt>
-<dt>17.4.3. <a href="#tools.used">How can I get a list of all the tools that a
+<dt>18.4.3. <a href="#tools.used">How can I get a list of all the tools that a
package is using while being built? I want to know whether it
uses sed or not.</a>
</dt>
@@ -7510,7 +7602,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
<tbody>
<tr class="question">
<td align="left" valign="top">
-<a name="tools.new"></a><a name="id2707918"></a><b>17.4.1.</b>
+<a name="tools.new"></a><a name="id2708056"></a><b>18.4.1.</b>
</td>
<td align="left" valign="top"><p>How do I add a new tool?</p></td>
</tr>
@@ -7520,7 +7612,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="tools.listall"></a><a name="id2707928"></a><b>17.4.2.</b>
+<a name="tools.listall"></a><a name="id2708066"></a><b>18.4.2.</b>
</td>
<td align="left" valign="top"><p>How do I get a list of all available
tools?</p></td>
@@ -7531,7 +7623,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="tools.used"></a><a name="id2708007"></a><b>17.4.3.</b>
+<a name="tools.used"></a><a name="id2708145"></a><b>18.4.3.</b>
</td>
<td align="left" valign="top"><p>How can I get a list of all the tools that a
package is using while being built? I want to know whether it
@@ -7549,83 +7641,83 @@ 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 18. Making your package work</h2></div></div></div>
+<a name="fixes"></a>Chapter 19. 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">18.1. General operation</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#portability-of-packages">18.1.1. Portability of packages</a></span></dt>
-<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">18.1.2. How to pull in user-settable variables from <code class="filename">mk.conf</code></a></span></dt>
-<dt><span class="sect2"><a href="#user-interaction">18.1.3. User interaction</a></span></dt>
-<dt><span class="sect2"><a href="#handling-licenses">18.1.4. Handling licenses</a></span></dt>
-<dt><span class="sect2"><a href="#restricted-packages">18.1.5. Restricted packages</a></span></dt>
-<dt><span class="sect2"><a href="#dependencies">18.1.6. Handling dependencies</a></span></dt>
-<dt><span class="sect2"><a href="#conflicts">18.1.7. Handling conflicts with other packages</a></span></dt>
-<dt><span class="sect2"><a href="#not-building-packages">18.1.8. Packages that cannot or should not be built</a></span></dt>
-<dt><span class="sect2"><a href="#undeletable-packages">18.1.9. Packages which should not be deleted, once installed</a></span></dt>
-<dt><span class="sect2"><a href="#security-handling">18.1.10. Handling packages with security problems</a></span></dt>
-<dt><span class="sect2"><a href="#bumping-pkgrevision">18.1.11. How to handle incrementing versions when fixing an existing package</a></span></dt>
-<dt><span class="sect2"><a href="#fixes.subst">18.1.12. Substituting variable text in the package files (the SUBST framework)</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.fetch">18.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">18.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
-<dt><span class="sect2"><a href="#modified-distfiles-same-name">18.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.configure">18.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">18.3.1. Shared libraries - libtool</a></span></dt>
-<dt><span class="sect2"><a href="#using-libtool">18.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
-<dt><span class="sect2"><a href="#autoconf-automake">18.3.3. GNU Autoconf/Automake</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#programming-languages">18.4. Programming languages</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#basic-programming-languages">18.4.1. C, C++, and Fortran</a></span></dt>
-<dt><span class="sect2"><a href="#java-programming-language">18.4.2. Java</a></span></dt>
-<dt><span class="sect2"><a href="#perl-scripts">18.4.3. Packages containing perl scripts</a></span></dt>
-<dt><span class="sect2"><a href="#other-programming-languages">18.4.4. Other programming languages</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.build">18.5. 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">18.5.1. Compiling C and C++ code conditionally</a></span></dt>
-<dt><span class="sect2"><a href="#compiler-bugs">18.5.2. How to handle compiler bugs</a></span></dt>
-<dt><span class="sect2"><a href="#undefined-reference">18.5.3. Undefined reference to &#8220;<span class="quote">...</span>&#8221;</a></span></dt>
-<dt><span class="sect2"><a href="#out-of-memory">18.5.4. Running out of memory</a></span></dt>
-</dl></dd>
-<dt><span class="sect1"><a href="#fixes.install">18.6. Fixing problems in the <span class="emphasis"><em>install</em></span> phase</a></span></dt>
-<dd><dl>
-<dt><span class="sect2"><a href="#install-scripts">18.6.1. Creating needed directories</a></span></dt>
-<dt><span class="sect2"><a href="#where-to-install-documentation">18.6.2. Where to install documentation</a></span></dt>
-<dt><span class="sect2"><a href="#installing-score-files">18.6.3. Installing highscore files</a></span></dt>
-<dt><span class="sect2"><a href="#destdir-support">18.6.4. Adding DESTDIR support to packages</a></span></dt>
-<dt><span class="sect2"><a href="#hardcoded-paths">18.6.5. Packages with hardcoded paths to other interpreters</a></span></dt>
-<dt><span class="sect2"><a href="#perl-modules">18.6.6. Packages installing perl modules</a></span></dt>
-<dt><span class="sect2"><a href="#faq.info-files">18.6.7. Packages installing info files</a></span></dt>
-<dt><span class="sect2"><a href="#manpages">18.6.8. Packages installing man pages</a></span></dt>
-<dt><span class="sect2"><a href="#gconf2-data-files">18.6.9. Packages installing GConf2 data files</a></span></dt>
-<dt><span class="sect2"><a href="#scrollkeeper-data-files">18.6.10. Packages installing scrollkeeper data files</a></span></dt>
-<dt><span class="sect2"><a href="#x11-fonts">18.6.11. Packages installing X11 fonts</a></span></dt>
-<dt><span class="sect2"><a href="#gtk2-modules">18.6.12. Packages installing GTK2 modules</a></span></dt>
-<dt><span class="sect2"><a href="#sgml-xml-data">18.6.13. Packages installing SGML or XML data</a></span></dt>
-<dt><span class="sect2"><a href="#mime-database">18.6.14. Packages installing extensions to the MIME database</a></span></dt>
-<dt><span class="sect2"><a href="#intltool">18.6.15. Packages using intltool</a></span></dt>
-<dt><span class="sect2"><a href="#startup-scripts">18.6.16. Packages installing startup scripts</a></span></dt>
-<dt><span class="sect2"><a href="#tex-packages">18.6.17. Packages installing TeX modules</a></span></dt>
-<dt><span class="sect2"><a href="#emulation-packages">18.6.18. Packages supporting running binaries in
+<dt><span class="sect1"><a href="#general-operation">19.1. General operation</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#portability-of-packages">19.1.1. Portability of packages</a></span></dt>
+<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">19.1.2. How to pull in user-settable variables from <code class="filename">mk.conf</code></a></span></dt>
+<dt><span class="sect2"><a href="#user-interaction">19.1.3. User interaction</a></span></dt>
+<dt><span class="sect2"><a href="#handling-licenses">19.1.4. Handling licenses</a></span></dt>
+<dt><span class="sect2"><a href="#restricted-packages">19.1.5. Restricted packages</a></span></dt>
+<dt><span class="sect2"><a href="#dependencies">19.1.6. Handling dependencies</a></span></dt>
+<dt><span class="sect2"><a href="#conflicts">19.1.7. Handling conflicts with other packages</a></span></dt>
+<dt><span class="sect2"><a href="#not-building-packages">19.1.8. Packages that cannot or should not be built</a></span></dt>
+<dt><span class="sect2"><a href="#undeletable-packages">19.1.9. Packages which should not be deleted, once installed</a></span></dt>
+<dt><span class="sect2"><a href="#security-handling">19.1.10. Handling packages with security problems</a></span></dt>
+<dt><span class="sect2"><a href="#bumping-pkgrevision">19.1.11. How to handle incrementing versions when fixing an existing package</a></span></dt>
+<dt><span class="sect2"><a href="#fixes.subst">19.1.12. Substituting variable text in the package files (the SUBST framework)</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.fetch">19.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">19.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
+<dt><span class="sect2"><a href="#modified-distfiles-same-name">19.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.configure">19.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">19.3.1. Shared libraries - libtool</a></span></dt>
+<dt><span class="sect2"><a href="#using-libtool">19.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
+<dt><span class="sect2"><a href="#autoconf-automake">19.3.3. GNU Autoconf/Automake</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#programming-languages">19.4. Programming languages</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#basic-programming-languages">19.4.1. C, C++, and Fortran</a></span></dt>
+<dt><span class="sect2"><a href="#java-programming-language">19.4.2. Java</a></span></dt>
+<dt><span class="sect2"><a href="#perl-scripts">19.4.3. Packages containing perl scripts</a></span></dt>
+<dt><span class="sect2"><a href="#other-programming-languages">19.4.4. Other programming languages</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.build">19.5. 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">19.5.1. Compiling C and C++ code conditionally</a></span></dt>
+<dt><span class="sect2"><a href="#compiler-bugs">19.5.2. How to handle compiler bugs</a></span></dt>
+<dt><span class="sect2"><a href="#undefined-reference">19.5.3. Undefined reference to &#8220;<span class="quote">...</span>&#8221;</a></span></dt>
+<dt><span class="sect2"><a href="#out-of-memory">19.5.4. Running out of memory</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#fixes.install">19.6. Fixing problems in the <span class="emphasis"><em>install</em></span> phase</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#install-scripts">19.6.1. Creating needed directories</a></span></dt>
+<dt><span class="sect2"><a href="#where-to-install-documentation">19.6.2. Where to install documentation</a></span></dt>
+<dt><span class="sect2"><a href="#installing-score-files">19.6.3. Installing highscore files</a></span></dt>
+<dt><span class="sect2"><a href="#destdir-support">19.6.4. Adding DESTDIR support to packages</a></span></dt>
+<dt><span class="sect2"><a href="#hardcoded-paths">19.6.5. Packages with hardcoded paths to other interpreters</a></span></dt>
+<dt><span class="sect2"><a href="#perl-modules">19.6.6. Packages installing perl modules</a></span></dt>
+<dt><span class="sect2"><a href="#faq.info-files">19.6.7. Packages installing info files</a></span></dt>
+<dt><span class="sect2"><a href="#manpages">19.6.8. Packages installing man pages</a></span></dt>
+<dt><span class="sect2"><a href="#gconf2-data-files">19.6.9. Packages installing GConf2 data files</a></span></dt>
+<dt><span class="sect2"><a href="#scrollkeeper-data-files">19.6.10. Packages installing scrollkeeper data files</a></span></dt>
+<dt><span class="sect2"><a href="#x11-fonts">19.6.11. Packages installing X11 fonts</a></span></dt>
+<dt><span class="sect2"><a href="#gtk2-modules">19.6.12. Packages installing GTK2 modules</a></span></dt>
+<dt><span class="sect2"><a href="#sgml-xml-data">19.6.13. Packages installing SGML or XML data</a></span></dt>
+<dt><span class="sect2"><a href="#mime-database">19.6.14. Packages installing extensions to the MIME database</a></span></dt>
+<dt><span class="sect2"><a href="#intltool">19.6.15. Packages using intltool</a></span></dt>
+<dt><span class="sect2"><a href="#startup-scripts">19.6.16. Packages installing startup scripts</a></span></dt>
+<dt><span class="sect2"><a href="#tex-packages">19.6.17. Packages installing TeX modules</a></span></dt>
+<dt><span class="sect2"><a href="#emulation-packages">19.6.18. Packages supporting running binaries in
emulation</a></span></dt>
-<dt><span class="sect2"><a href="#hicolor-theme">18.6.19. Packages installing hicolor theme icons</a></span></dt>
-<dt><span class="sect2"><a href="#desktop-files">18.6.20. Packages installing desktop files</a></span></dt>
+<dt><span class="sect2"><a href="#hicolor-theme">19.6.19. Packages installing hicolor theme icons</a></span></dt>
+<dt><span class="sect2"><a href="#desktop-files">19.6.20. Packages installing desktop files</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#punting">18.7. Marking packages as having problems</a></span></dt>
+<dt><span class="sect1"><a href="#punting">19.7. Marking packages as having problems</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>18.1. General operation</h2></div></div></div>
+<a name="general-operation"></a>19.1. General operation</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="portability-of-packages"></a>18.1.1. Portability of packages</h3></div></div></div>
+<a name="portability-of-packages"></a>19.1.1. 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. This
@@ -7634,7 +7726,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="pulling-vars-from-etc-mk.conf"></a>18.1.2. How to pull in user-settable variables from <a href="#mk.conf"><code class="filename">mk.conf</code></a>
+<a name="pulling-vars-from-etc-mk.conf"></a>19.1.2. How to pull in user-settable variables from <a href="#mk.conf"><code class="filename">mk.conf</code></a>
</h3></div></div></div>
<p>The pkgsrc user can configure pkgsrc by overriding several
variables in the file pointed to by <code class="varname">MAKECONF</code>,
@@ -7662,7 +7754,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="user-interaction"></a>18.1.3. User interaction</h3></div></div></div>
+<a name="user-interaction"></a>19.1.3. 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">
@@ -7691,7 +7783,7 @@ INTERACTIVE_STAGE= configure install
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="handling-licenses"></a>18.1.4. Handling licenses</h3></div></div></div>
+<a name="handling-licenses"></a>19.1.4. Handling licenses</h3></div></div></div>
<p>Authors of software can choose the licence under which
software can be copied. This is due to copyright law, and reasons
for license choices are outside the scope of pkgsrc. The pkgsrc
@@ -7780,7 +7872,7 @@ ACCEPTABLE_LICENSES+=xv-license
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="restricted-packages"></a>18.1.5. Restricted packages</h3></div></div></div>
+<a name="restricted-packages"></a>19.1.5. Restricted packages</h3></div></div></div>
<p>Some licenses restrict how software may be re-distributed.
Because a license tag is required unless the package is Free or
Open Source, all packages with restrictions should have license
@@ -7848,7 +7940,7 @@ ACCEPTABLE_LICENSES+=xv-license
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="dependencies"></a>18.1.6. Handling dependencies</h3></div></div></div>
+<a name="dependencies"></a>19.1.6. 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> and
@@ -7856,7 +7948,7 @@ ACCEPTABLE_LICENSES+=xv-license
<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 13. Buildlink methodology">Chapter 13, <i>Buildlink methodology</i></a> for more information.</p>
+ See <a href="#buildlink" title="Chapter 14. Buildlink methodology">Chapter 14, <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
that pre-requisite in the binary package so it will be pulled in
@@ -7953,7 +8045,7 @@ ABI_DEPENDS+= tiff&gt;=3.6.1:../../graphics/tiff
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="18.1.10. Handling packages with security problems">Section 18.1.10, &#8220;Handling packages with security problems&#8221;</a> for more
+ vulnerabilities file. See <a href="#security-handling" title="19.1.10. Handling packages with security problems">Section 19.1.10, &#8220;Handling packages with security problems&#8221;</a> for more
information.</p>
</li>
<li>
@@ -7980,7 +8072,7 @@ DEPENDS+= teTeX-[0-9]*:../../print/teTeX
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="conflicts"></a>18.1.7. Handling conflicts with other packages</h3></div></div></div>
+<a name="conflicts"></a>19.1.7. 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 as another package in the pkgsrc
@@ -8006,7 +8098,7 @@ CONFLICTS= Xaw3d-[0-9]*
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="not-building-packages"></a>18.1.8. Packages that cannot or should not be built</h3></div></div></div>
+<a name="not-building-packages"></a>19.1.8. 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
@@ -8034,7 +8126,7 @@ CONFLICTS= Xaw3d-[0-9]*
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="undeletable-packages"></a>18.1.9. Packages which should not be deleted, once installed</h3></div></div></div>
+<a name="undeletable-packages"></a>19.1.9. 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
@@ -8045,7 +8137,7 @@ CONFLICTS= Xaw3d-[0-9]*
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="security-handling"></a>18.1.10. Handling packages with security problems</h3></div></div></div>
+<a name="security-handling"></a>19.1.10. 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>
@@ -8061,7 +8153,7 @@ CONFLICTS= Xaw3d-[0-9]*
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bumping-pkgrevision"></a>18.1.11. How to handle incrementing versions when fixing an existing package</h3></div></div></div>
+<a name="bumping-pkgrevision"></a>19.1.11. 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
@@ -8120,7 +8212,7 @@ DISTNAME= foo-17.43
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="fixes.subst"></a>18.1.12. Substituting variable text in the package files (the SUBST framework)</h3></div></div></div>
+<a name="fixes.subst"></a>19.1.12. Substituting variable text in the package files (the SUBST framework)</h3></div></div></div>
<p>When you want to replace the same text in multiple files
or when the replacement text varies, patches alone cannot help.
This is where the SUBST framework comes in. It provides an
@@ -8180,10 +8272,10 @@ SUBST_SED.fix-paths+= -e 's,"/var/log,"${VARBASE}/log,g'
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="fixes.fetch"></a>18.2. Fixing problems in the <span class="emphasis"><em>fetch</em></span> phase</h2></div></div></div>
+<a name="fixes.fetch"></a>19.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>18.2.1. Packages whose distfiles aren't available for plain downloading</h3></div></div></div>
+<a name="no-plain-download"></a>19.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>
@@ -8204,7 +8296,7 @@ FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"."
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="modified-distfiles-same-name"></a>18.2.2. How to handle modified distfiles with the 'old' name</h3></div></div></div>
+<a name="modified-distfiles-same-name"></a>19.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
@@ -8221,7 +8313,7 @@ FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"."
<code class="varname">DISTFILES</code> and
<code class="varname">PATCHFILES</code> for this package will be put in that
subdirectory of the local distfiles directory.
- (See <a href="#bumping-pkgrevision" title="18.1.11. How to handle incrementing versions when fixing an existing package">Section 18.1.11, &#8220;How to handle incrementing versions when fixing an existing package&#8221;</a> for more details.)
+ (See <a href="#bumping-pkgrevision" title="19.1.11. How to handle incrementing versions when fixing an existing package">Section 19.1.11, &#8220;How to handle incrementing versions when fixing an existing package&#8221;</a> for more details.)
In case this
happens more often, <code class="varname">PKGNAME</code> can be used (thus
including the <code class="filename">nbX</code> suffix) or a date stamp
@@ -8237,10 +8329,10 @@ FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"."
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="fixes.configure"></a>18.3. Fixing problems in the <span class="emphasis"><em>configure</em></span> phase</h2></div></div></div>
+<a name="fixes.configure"></a>19.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>18.3.1. Shared libraries - libtool</h3></div></div></div>
+<a name="fixes.libtool"></a>19.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,
@@ -8365,7 +8457,7 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="using-libtool"></a>18.3.2. Using libtool on GNU packages that already support libtool</h3></div></div></div>
+<a name="using-libtool"></a>19.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
@@ -8406,7 +8498,7 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="autoconf-automake"></a>18.3.3. GNU Autoconf/Automake</h3></div></div></div>
+<a name="autoconf-automake"></a>19.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
@@ -8447,14 +8539,14 @@ pre-configure:
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="programming-languages"></a>18.4. Programming languages</h2></div></div></div>
+<a name="programming-languages"></a>19.4. Programming languages</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="basic-programming-languages"></a>18.4.1. C, C++, and Fortran</h3></div></div></div>
+<a name="basic-programming-languages"></a>19.4.1. C, C++, and Fortran</h3></div></div></div>
<p>Compilers for the C, C++, and Fortran languages comes with
the NetBSD base system. By default, pkgsrc assumes that a package
is written in C and will hide all other compilers (via the wrapper
- framework, see <a href="#buildlink" title="Chapter 13. Buildlink methodology">Chapter 13, <i>Buildlink methodology</i></a>).</p>
+ framework, see <a href="#buildlink" title="Chapter 14. Buildlink methodology">Chapter 14, <i>Buildlink methodology</i></a>).</p>
<p>To declare which language's compiler a package needs, set
the <code class="varname">USE_LANGUAGES</code> variable. Allowed values
currently are &#8220;<span class="quote">c</span>&#8221;, &#8220;<span class="quote">c++</span>&#8221;, and
@@ -8465,7 +8557,7 @@ pre-configure:
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="java-programming-language"></a>18.4.2. Java</h3></div></div></div>
+<a name="java-programming-language"></a>19.4.2. Java</h3></div></div></div>
<p>If a program is written in Java, use the Java framework in
pkgsrc. The package must include
<code class="filename">../../mk/java-vm.mk</code>. This Makefile fragment
@@ -8488,7 +8580,7 @@ pre-configure:
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="perl-scripts"></a>18.4.3. Packages containing perl scripts</h3></div></div></div>
+<a name="perl-scripts"></a>19.4.3. Packages containing perl scripts</h3></div></div></div>
<p>If your package contains interpreted perl scripts, add
&#8220;<span class="quote">perl</span>&#8221; to the <code class="varname">USE_TOOLS</code> variable
and set <code class="varname">REPLACE_PERL</code> to ensure that the proper
@@ -8500,12 +8592,12 @@ pre-configure:
<p>If a particular version of perl is needed, set the
<code class="varname">PERL5_REQD</code> variable to the version number. The
default is &#8220;<span class="quote">5.0</span>&#8221;.</p>
-<p>See <a href="#perl-modules" title="18.6.6. Packages installing perl modules">Section 18.6.6, &#8220;Packages installing perl modules&#8221;</a> for information
+<p>See <a href="#perl-modules" title="19.6.6. Packages installing perl modules">Section 19.6.6, &#8220;Packages installing perl modules&#8221;</a> for information
about handling perl modules.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="other-programming-languages"></a>18.4.4. Other programming languages</h3></div></div></div>
+<a name="other-programming-languages"></a>19.4.4. Other programming languages</h3></div></div></div>
<p>Currently, there is no special handling for other languages
in pkgsrc. If a compiler package provides a
<code class="filename">buildlink3.mk</code> file, include that, otherwise
@@ -8515,7 +8607,7 @@ pre-configure:
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="fixes.build"></a>18.5. Fixing problems in the <span class="emphasis"><em>build</em></span> phase</h2></div></div></div>
+<a name="fixes.build"></a>19.5. 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
@@ -8524,7 +8616,7 @@ pre-configure:
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="fixes.build.cpp"></a>18.5.1. Compiling C and C++ code conditionally</h3></div></div></div>
+<a name="fixes.build.cpp"></a>19.5.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
@@ -8544,7 +8636,7 @@ pre-configure:
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.os"></a>18.5.1.1. C preprocessor macros to identify the operating system</h4></div></div></div>
+<a name="fixes.build.cpp.os"></a>19.5.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">
@@ -8570,7 +8662,7 @@ Solaris sun, __sun
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="fixes.build.cpp.arch"></a>18.5.1.2. C preprocessor macros to identify the hardware architecture</h4></div></div></div>
+<a name="fixes.build.cpp.arch"></a>19.5.1.2. C preprocessor macros to identify the hardware architecture</h4></div></div></div>
<pre class="programlisting">
i386 i386, __i386, __i386__
MIPS __mips
@@ -8579,7 +8671,7 @@ SPARC sparc, __sparc
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="fixes.build.cpp.compiler"></a>18.5.1.3. C preprocessor macros to identify the compiler</h4></div></div></div>
+<a name="fixes.build.cpp.compiler"></a>19.5.1.3. C preprocessor macros to identify the compiler</h4></div></div></div>
<pre class="programlisting">
GCC __GNUC__ (major version), __GNUC_MINOR__
MIPSpro _COMPILER_VERSION (0x741 for MIPSpro 7.41)
@@ -8590,7 +8682,7 @@ SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8)
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="compiler-bugs"></a>18.5.2. How to handle compiler bugs</h3></div></div></div>
+<a name="compiler-bugs"></a>19.5.2. 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
@@ -8605,7 +8697,7 @@ SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8)
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="undefined-reference"></a>18.5.3. Undefined reference to &#8220;<span class="quote">...</span>&#8221;</h3></div></div></div>
+<a name="undefined-reference"></a>19.5.3. Undefined reference to &#8220;<span class="quote">...</span>&#8221;</h3></div></div></div>
<p>This error message often means that a package did not
link to a shared library it needs. The following functions are
known to cause this error message over and over.</p>
@@ -8667,7 +8759,7 @@ SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8)
bmake</strong></span>.</p>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="undefined-reference-sunpro"></a>18.5.3.1. Special issue: The SunPro compiler</h4></div></div></div>
+<a name="undefined-reference-sunpro"></a>19.5.3.1. Special issue: The SunPro compiler</h4></div></div></div>
<p>When you are using the SunPro compiler, there is another
possibility. That compiler cannot handle the following code:</p>
<pre class="programlisting">
@@ -8693,7 +8785,7 @@ of functions.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="out-of-memory"></a>18.5.4. Running out of memory</h3></div></div></div>
+<a name="out-of-memory"></a>19.5.4. Running out of memory</h3></div></div></div>
<p>Sometimes packages fail to build because the compiler runs
into an operating system specific soft limit. With the
<code class="varname">UNLIMIT_RESOURCES</code> variable pkgsrc can be told
@@ -8707,10 +8799,10 @@ of functions.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="fixes.install"></a>18.6. Fixing problems in the <span class="emphasis"><em>install</em></span> phase</h2></div></div></div>
+<a name="fixes.install"></a>19.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="install-scripts"></a>18.6.1. Creating needed directories</h3></div></div></div>
+<a name="install-scripts"></a>19.6.1. Creating needed directories</h3></div></div></div>
<p>The BSD-compatible <span><strong class="command">install</strong></span> supplied
with some operating systems cannot create more than one
directory at a time. As such, you should call
@@ -8726,7 +8818,7 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="where-to-install-documentation"></a>18.6.2. Where to install documentation</h3></div></div></div>
+<a name="where-to-install-documentation"></a>19.6.2. Where to install documentation</h3></div></div></div>
<p>In general, documentation should be installed into
<code class="filename">${PREFIX}/share/doc/${PKGBASE}</code> or
<code class="filename">${PREFIX}/share/doc/${PKGNAME}</code> (the latter
@@ -8755,7 +8847,7 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="installing-score-files"></a>18.6.3. Installing highscore files</h3></div></div></div>
+<a name="installing-score-files"></a>19.6.3. Installing highscore 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
@@ -8776,7 +8868,7 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="destdir-support"></a>18.6.4. Adding DESTDIR support to packages</h3></div></div></div>
+<a name="destdir-support"></a>19.6.4. Adding DESTDIR support to packages</h3></div></div></div>
<div class="itemizedlist"><ul type="disc">
<li><p>All installation operations have to be prefixed with
<code class="filename">${DESTDIR}</code>.</p></li>
@@ -8795,7 +8887,7 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="hardcoded-paths"></a>18.6.5. Packages with hardcoded paths to other interpreters</h3></div></div></div>
+<a name="hardcoded-paths"></a>19.6.5. 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
full pathname to the script interpreter, you need to set the
@@ -8817,7 +8909,7 @@ REPLACE_FILES.tcl= # list of tcl scripts which need to be fixed,
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="perl-modules"></a>18.6.6. Packages installing perl modules</h3></div></div></div>
+<a name="perl-modules"></a>19.6.6. 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
@@ -8846,7 +8938,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="faq.info-files"></a>18.6.7. Packages installing info files</h3></div></div></div>
+<a name="faq.info-files"></a>19.6.7. 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
@@ -8893,7 +8985,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="manpages"></a>18.6.8. Packages installing man pages</h3></div></div></div>
+<a name="manpages"></a>19.6.8. Packages installing man pages</h3></div></div></div>
<p>All packages that install manual pages should install them
into the same directory, so that there is one common place to look
for them. In pkgsrc, this place is
@@ -8925,12 +9017,12 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
Or if the <code class="filename">./configure</code> script uses
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="12.5. Man page compression">Section 12.5, &#8220;Man page compression&#8221;</a> for
+<p>See <a href="#manpage-compression" title="13.5. Man page compression">Section 13.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>18.6.9. Packages installing GConf2 data files</h3></div></div></div>
+<a name="gconf2-data-files"></a>19.6.9. 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,
you need to take some extra steps to make sure they get registered
@@ -8950,7 +9042,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
need to manually patch the package.</p></li>
<li><p>Check the PLIST and remove any entries under the etc/gconf
directory, as they will be handled automatically. See
- <a href="#faq.conf" title="8.13. How do I change the location of configuration files?">Section 8.13, &#8220;How do I change the location of configuration files?&#8221;</a> for more information.</p></li>
+ <a href="#faq.conf" title="9.13. How do I change the location of configuration files?">Section 9.13, &#8220;How do I change the location of configuration files?&#8221;</a> for more information.</p></li>
<li><p>Define the <code class="varname">GCONF2_SCHEMAS</code> variable in
your <code class="filename">Makefile</code> with a list of all
<code class="filename">.schemas</code> files installed by the package, if
@@ -8964,7 +9056,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="scrollkeeper-data-files"></a>18.6.10. Packages installing scrollkeeper data files</h3></div></div></div>
+<a name="scrollkeeper-data-files"></a>19.6.10. 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
get registered in the database:</p>
@@ -8984,7 +9076,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="x11-fonts"></a>18.6.11. Packages installing X11 fonts</h3></div></div></div>
+<a name="x11-fonts"></a>19.6.11. 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
@@ -9001,7 +9093,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="gtk2-modules"></a>18.6.12. Packages installing GTK2 modules</h3></div></div></div>
+<a name="gtk2-modules"></a>19.6.12. 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>
@@ -9029,7 +9121,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="sgml-xml-data"></a>18.6.13. Packages installing SGML or XML data</h3></div></div></div>
+<a name="sgml-xml-data"></a>19.6.13. 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:</p>
@@ -9057,7 +9149,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="mime-database"></a>18.6.14. Packages installing extensions to the MIME database</h3></div></div></div>
+<a name="mime-database"></a>19.6.14. 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
@@ -9087,7 +9179,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="intltool"></a>18.6.15. Packages using intltool</h3></div></div></div>
+<a name="intltool"></a>19.6.15. Packages using intltool</h3></div></div></div>
<p>If a package uses intltool during its build, add
<code class="literal">intltool</code> to the <code class="varname">USE_TOOLS</code>,
which forces it to use the intltool package provided by pkgsrc,
@@ -9098,7 +9190,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="startup-scripts"></a>18.6.16. Packages installing startup scripts</h3></div></div></div>
+<a name="startup-scripts"></a>19.6.16. 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
@@ -9109,7 +9201,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="tex-packages"></a>18.6.17. Packages installing TeX modules</h3></div></div></div>
+<a name="tex-packages"></a>19.6.17. 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>
@@ -9147,7 +9239,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="emulation-packages"></a>18.6.18. Packages supporting running binaries in
+<a name="emulation-packages"></a>19.6.18. Packages supporting running binaries in
emulation</h3></div></div></div>
<p>There are some packages that provide libraries and
executables for running binaries from a one operating system
@@ -9164,7 +9256,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="hicolor-theme"></a>18.6.19. Packages installing hicolor theme icons</h3></div></div></div>
+<a name="hicolor-theme"></a>19.6.19. Packages installing hicolor theme icons</h3></div></div></div>
<p>If a package installs images under the
<code class="filename">share/icons/hicolor</code> and/or updates the
<code class="filename">share/icons/hicolor/icon-theme.cache</code>
@@ -9186,7 +9278,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="desktop-files"></a>18.6.20. Packages installing desktop files</h3></div></div></div>
+<a name="desktop-files"></a>19.6.20. Packages installing desktop files</h3></div></div></div>
<p>If a package installs <code class="filename">.desktop</code> files
under <code class="filename">share/applications</code> and these include
MIME information, you need to take extra steps to ensure that they
@@ -9205,7 +9297,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="punting"></a>18.7. Marking packages as having problems</h2></div></div></div>
+<a name="punting"></a>19.7. Marking packages as having problems</h2></div></div></div>
<p>In some cases one does not have the time to solve a problem
immediately. There are currently two ways to declare that one knows
that a package has problems.</p>
@@ -9232,7 +9324,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="debug"></a>Chapter 19. Debugging</h2></div></div></div>
+<a name="debug"></a>Chapter 20. 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
@@ -9270,7 +9362,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
package.</p>
</li>
<li><p>Look at the <code class="filename">Makefile</code>, fix if
- necessary; see <a href="#components.Makefile" title="10.1. Makefile">Section 10.1, &#8220;<code class="filename">Makefile</code>&#8221;</a>.</p></li>
+ necessary; see <a href="#components.Makefile" title="11.1. Makefile">Section 11.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>
@@ -9309,39 +9401,39 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
reports:</p>
<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 20. Submitting and Committing">Chapter 20, <i>Submitting and Committing</i></a>.</p></li>
+<li><p>Submit (or commit, if you have cvs access); see <a href="#submit" title="Chapter 21. Submitting and Committing">Chapter 21, <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 20. Submitting and Committing</h2></div></div></div>
+<a name="submit"></a>Chapter 21. 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">20.1. Submitting binary packages</a></span></dt>
-<dt><span class="sect1"><a href="#submitting-your-package">20.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
-<dt><span class="sect1"><a href="#general-notes-for-changes">20.3. General notes when adding, updating, or removing packages</a></span></dt>
-<dt><span class="sect1"><a href="#committing-importing">20.4. Committing: Importing a package into CVS</a></span></dt>
-<dt><span class="sect1"><a href="#updating-package">20.5. Updating a package to a newer version</a></span></dt>
-<dt><span class="sect1"><a href="#moving-package">20.6. Moving a package in pkgsrc</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-binary-packages">21.1. Submitting binary packages</a></span></dt>
+<dt><span class="sect1"><a href="#submitting-your-package">21.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
+<dt><span class="sect1"><a href="#general-notes-for-changes">21.3. General notes when adding, updating, or removing packages</a></span></dt>
+<dt><span class="sect1"><a href="#committing-importing">21.4. Committing: Importing a package into CVS</a></span></dt>
+<dt><span class="sect1"><a href="#updating-package">21.5. Updating a package to a newer version</a></span></dt>
+<dt><span class="sect1"><a href="#moving-package">21.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>20.1. Submitting binary packages</h2></div></div></div>
+<a name="submitting-binary-packages"></a>21.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
protect our users! You're still free to put up your home-made
binary packages and tell the world where to get them. NetBSD
developers doing bulk builds and wanting to upload them please
- see <a href="#bulk-upload" title="6.3.8. Uploading results of a bulk build">Section 6.3.8, &#8220;Uploading results of a bulk build&#8221;</a>.</p>
+ see <a href="#bulk-upload" title="7.3.8. Uploading results of a bulk build">Section 7.3.8, &#8220;Uploading results of a bulk build&#8221;</a>.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="submitting-your-package"></a>20.2. Submitting source packages (for non-NetBSD-developers)</h2></div></div></div>
+<a name="submitting-your-package"></a>21.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 19. Debugging">Chapter 19, <i>Debugging</i></a> and the rest of this
+ runs well; see <a href="#debug" title="Chapter 20. Debugging">Chapter 20, <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 that contains all files that make up the package.
Finally, send this package to the pkgsrc bug tracking system,
@@ -9366,7 +9458,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="general-notes-for-changes"></a>20.3. General notes when adding, updating, or removing packages</h2></div></div></div>
+<a name="general-notes-for-changes"></a>21.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-<em class="replaceable"><code>YYYY</code></em></code>. It's very
important to keep this file up to date and conforming to the
@@ -9399,7 +9491,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="committing-importing"></a>20.4. Committing: Importing a package into CVS</h2></div></div></div>
+<a name="committing-importing"></a>21.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
imports files relative to the current working directory, and that
@@ -9425,7 +9517,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="updating-package"></a>20.5. Updating a package to a newer version</h2></div></div></div>
+<a name="updating-package"></a>21.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
a package. There are various reasons for this:</p>
@@ -9449,7 +9541,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="moving-package"></a>20.6. Moving a package in pkgsrc</h2></div></div></div>
+<a name="moving-package"></a>21.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>
@@ -9483,7 +9575,7 @@ place.</p></li>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="devfaq"></a>Chapter 21. Frequently Asked Questions</h2></div></div></div>
+<a name="devfaq"></a>Chapter 22. 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,
@@ -9491,39 +9583,39 @@ place.</p></li>
<code class="literal">pkgsrc-users</code> mailing list.</p>
<div class="qandaset">
<dl>
-<dt>21.1. <a href="#devfaq.makeflags">What is the difference between
+<dt>22.1. <a href="#devfaq.makeflags">What is the difference between
MAKEFLAGS, .MAKEFLAGS and
MAKE_FLAGS?</a>
</dt>
-<dt>21.2. <a href="#devfaq.make">What is the difference between
+<dt>22.2. <a href="#devfaq.make">What is the difference between
MAKE, GMAKE and
MAKE_PROGRAM?</a>
</dt>
-<dt>21.3. <a href="#devfaq.cc">What is the difference between
+<dt>22.3. <a href="#devfaq.cc">What is the difference between
CC, PKG_CC and
PKGSRC_COMPILER?</a>
</dt>
-<dt>21.4. <a href="#devfaq.bl3flags">What is the difference between
+<dt>22.4. <a href="#devfaq.bl3flags">What is the difference between
BUILDLINK_LDFLAGS,
BUILDLINK_LDADD and
BUILDLINK_LIBS?</a>
</dt>
-<dt>21.5. <a href="#devfaq.bl3prefix">Why does make show-var
+<dt>22.5. <a href="#devfaq.bl3prefix">Why does make show-var
VARNAME=BUILDLINK_PREFIX.foo
say it's empty?</a>
</dt>
-<dt>21.6. <a href="#devfaq.master_sites">What does
+<dt>22.6. <a href="#devfaq.master_sites">What does
${MASTER_SITE_SOURCEFORGE:=package/} mean? I
don't understand the := inside
it.</a>
</dt>
-<dt>21.7. <a href="#devfaq.mailinglists">Which mailing lists are there for package
+<dt>22.7. <a href="#devfaq.mailinglists">Which mailing lists are there for package
developers?</a>
</dt>
-<dt>21.8. <a href="#devfaq.documentation">Where is the pkgsrc
+<dt>22.8. <a href="#devfaq.documentation">Where is the pkgsrc
documentation?</a>
</dt>
-<dt>21.9. <a href="#devfaq.too-much-time">I have a little time to kill. What shall I
+<dt>22.9. <a href="#devfaq.too-much-time">I have a little time to kill. What shall I
do?</a>
</dt>
</dl>
@@ -9532,7 +9624,7 @@ do?</a>
<tbody>
<tr class="question">
<td align="left" valign="top">
-<a name="devfaq.makeflags"></a><a name="id2713609"></a><b>21.1.</b>
+<a name="devfaq.makeflags"></a><a name="id2713952"></a><b>22.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
@@ -9548,7 +9640,7 @@ do?</a>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="devfaq.make"></a><a name="id2713648"></a><b>21.2.</b>
+<a name="devfaq.make"></a><a name="id2713990"></a><b>22.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
@@ -9566,7 +9658,7 @@ do?</a>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="devfaq.cc"></a><a name="id2713688"></a><b>21.3.</b>
+<a name="devfaq.cc"></a><a name="id2714030"></a><b>22.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
@@ -9584,7 +9676,7 @@ do?</a>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="devfaq.bl3flags"></a><a name="id2713728"></a><b>21.4.</b>
+<a name="devfaq.bl3flags"></a><a name="id2714070"></a><b>22.4.</b>
</td>
<td align="left" valign="top"><p>What is the difference between
<code class="varname">BUILDLINK_LDFLAGS</code>,
@@ -9597,7 +9689,7 @@ do?</a>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="devfaq.bl3prefix"></a><a name="id2713816"></a><b>21.5.</b>
+<a name="devfaq.bl3prefix"></a><a name="id2714090"></a><b>22.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>
@@ -9613,7 +9705,7 @@ do?</a>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="devfaq.master_sites"></a><a name="id2713846"></a><b>21.6.</b>
+<a name="devfaq.master_sites"></a><a name="id2714120"></a><b>22.6.</b>
</td>
<td align="left" valign="top"><p>What does
<code class="literal">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I
@@ -9637,7 +9729,7 @@ do?</a>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="devfaq.mailinglists"></a><a name="id2713923"></a><b>21.7.</b>
+<a name="devfaq.mailinglists"></a><a name="id2714197"></a><b>22.7.</b>
</td>
<td align="left" valign="top"><p>Which mailing lists are there for package
developers?</p></td>
@@ -9662,7 +9754,7 @@ do?</a>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="devfaq.documentation"></a><a name="id2713961"></a><b>21.8.</b>
+<a name="devfaq.documentation"></a><a name="id2714304"></a><b>22.8.</b>
</td>
<td align="left" valign="top"><p>Where is the pkgsrc
documentation?</p></td>
@@ -9710,7 +9802,7 @@ do?</a>
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="devfaq.too-much-time"></a><a name="id2714160"></a><b>21.9.</b>
+<a name="devfaq.too-much-time"></a><a name="id2714365"></a><b>22.9.</b>
</td>
<td align="left" valign="top"><p>I have a little time to kill. What shall I
do?</p></td>
@@ -9726,7 +9818,7 @@ anyway.</p>
will tell you about newer versions of installed packages that are
available, but not yet updated in pkgsrc.</p></li>
<li><p>Browse <code class="filename">pkgsrc/doc/TODO</code>
- &#8212; it contains a list of suggested new packages and a list of
+ &mdash; it contains a list of suggested new packages and a list of
cleanups and enhancements for pkgsrc that would be nice to
have.</p></li>
<li><p>Review packages for which review was requested on
@@ -9741,14 +9833,14 @@ anyway.</p>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="gnome"></a>Chapter 22. GNOME packaging and porting</h2></div></div></div>
+<a name="gnome"></a>Chapter 23. GNOME packaging and porting</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="#meta-packages">22.1. Meta packages</a></span></dt>
-<dt><span class="sect1"><a href="#new-package">22.2. Packaging a GNOME application</a></span></dt>
-<dt><span class="sect1"><a href="#full-update">22.3. Updating GNOME to a newer version</a></span></dt>
-<dt><span class="sect1"><a href="#patching">22.4. Patching guidelines</a></span></dt>
+<dt><span class="sect1"><a href="#meta-packages">23.1. Meta packages</a></span></dt>
+<dt><span class="sect1"><a href="#new-package">23.2. Packaging a GNOME application</a></span></dt>
+<dt><span class="sect1"><a href="#full-update">23.3. Updating GNOME to a newer version</a></span></dt>
+<dt><span class="sect1"><a href="#patching">23.4. Patching guidelines</a></span></dt>
</dl>
</div>
<p>Quoting <a href="http://www.gnome.org/" target="_top">GNOME's web
@@ -9785,7 +9877,7 @@ important information regarding their internals.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="meta-packages"></a>22.1. Meta packages</h2></div></div></div>
+<a name="meta-packages"></a>23.1. Meta packages</h2></div></div></div>
<p>pkgsrc includes three GNOME-related meta packages:</p>
<div class="itemizedlist"><ul type="disc">
<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-base/README.html" target="_top"><code class="filename">meta-pkgs/gnome-base</code></a>: Provides
@@ -9819,7 +9911,7 @@ change it to alphabetical sorting!</em></span></p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="new-package"></a>22.2. Packaging a GNOME application</h2></div></div></div>
+<a name="new-package"></a>23.2. Packaging a GNOME application</h2></div></div></div>
<p>Almost all GNOME applications are written in C and use a common
set of tools as their build system. Things get different with the new
bindings to other languages (such as Python), but the following will
@@ -9880,7 +9972,7 @@ solution is given. After applying the solution be sure to
<span class="emphasis"><em>regenerate the package's file list</em></span> with
<span><strong class="command">make print-PLIST</strong></span> and ensure it is correct.</p>
<div class="table">
-<a name="plist-handling"></a><p class="title"><b>Table 22.1. PLIST handling for GNOME packages</b></p>
+<a name="plist-handling"></a><p class="title"><b>Table 23.1. PLIST handling for GNOME packages</b></p>
<div class="table-contents"><table summary="PLIST handling for GNOME packages" border="1">
<colgroup>
<col>
@@ -9893,24 +9985,24 @@ solution is given. After applying the solution be sure to
<tbody>
<tr>
<td>Installs OMF files under <code class="filename">share/omf</code>.</td>
-<td>See <a href="#scrollkeeper-data-files" title="18.6.10. Packages installing scrollkeeper data files">Section 18.6.10, &#8220;Packages installing scrollkeeper data files&#8221;</a>.</td>
+<td>See <a href="#scrollkeeper-data-files" title="19.6.10. Packages installing scrollkeeper data files">Section 19.6.10, &#8220;Packages installing scrollkeeper data files&#8221;</a>.</td>
</tr>
<tr>
<td>Installs icons under the
<code class="filename">share/icons/hicolor</code> hierarchy or updates
<code class="filename">share/icons/hicolor/icon-theme.cache</code>.</td>
-<td>See <a href="#hicolor-theme" title="18.6.19. Packages installing hicolor theme icons">Section 18.6.19, &#8220;Packages installing hicolor theme icons&#8221;</a>.</td>
+<td>See <a href="#hicolor-theme" title="19.6.19. Packages installing hicolor theme icons">Section 19.6.19, &#8220;Packages installing hicolor theme icons&#8221;</a>.</td>
</tr>
<tr>
<td>Installs files under
<code class="filename">share/mime/packages</code>.</td>
-<td>See <a href="#mime-database" title="18.6.14. Packages installing extensions to the MIME database">Section 18.6.14, &#8220;Packages installing extensions to the MIME database&#8221;</a>.</td>
+<td>See <a href="#mime-database" title="19.6.14. Packages installing extensions to the MIME database">Section 19.6.14, &#8220;Packages installing extensions to the MIME database&#8221;</a>.</td>
</tr>
<tr>
<td>Installs <code class="filename">.desktop</code> files under
<code class="filename">share/applications</code> and these include MIME
information.</td>
-<td>See <a href="#desktop-files" title="18.6.20. Packages installing desktop files">Section 18.6.20, &#8220;Packages installing desktop files&#8221;</a>.</td>
+<td>See <a href="#desktop-files" title="19.6.20. Packages installing desktop files">Section 19.6.20, &#8220;Packages installing desktop files&#8221;</a>.</td>
</tr>
</tbody>
</table></div>
@@ -9919,7 +10011,7 @@ solution is given. After applying the solution be sure to
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="full-update"></a>22.3. Updating GNOME to a newer version</h2></div></div></div>
+<a name="full-update"></a>23.3. Updating GNOME to a newer version</h2></div></div></div>
<p>When seeing GNOME as a whole, there are two kinds of
updates:</p>
<div class="variablelist"><dl>
@@ -10008,11 +10100,11 @@ followed:</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="patching"></a>22.4. Patching guidelines</h2></div></div></div>
+<a name="patching"></a>23.4. Patching guidelines</h2></div></div></div>
<p>GNOME is a very big component in pkgsrc which approaches 100
packages. Please, it is very important that you always, always,
<span class="strong"><strong>always</strong></span> feed back any portability
-fixes you do to a GNOME package to the mainstream developers (see <a href="#components.patches.feedback" title="10.3.5. Feedback to the author">Section 10.3.5, &#8220;Feedback to the author&#8221;</a>). This is the only way to get
+fixes you do to a GNOME package to the mainstream developers (see <a href="#components.patches.feedback" title="11.3.5. Feedback to the author">Section 11.3.5, &#8220;Feedback to the author&#8221;</a>). This is the only way to get
their attention on portability issues and to ensure that future versions
can be built out-of-the box on NetBSD. The less custom patches in
pkgsrc, the easier further updates are. Those developers in charge of
@@ -10029,7 +10121,7 @@ issues. While the FreeBSD GNOME people are doing a great job in porting
GNOME to their operating system, the official GNOME sources are now
plagued by conditionals that check for <code class="varname">__FreeBSD__</code>
and similar macros. This hurts portability. Please see our patching
-guidelines (<a href="#components.patches.guidelines" title="10.3.4. Patching guidelines">Section 10.3.4, &#8220;Patching guidelines&#8221;</a>) for more
+guidelines (<a href="#components.patches.guidelines" title="11.3.4. Patching guidelines">Section 11.3.4, &#8220;Patching guidelines&#8221;</a>) for more
details.</p>
</div>
</div>
@@ -10046,68 +10138,68 @@ details.</p>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="chapter"><a href="#infr.design">23. Design of the pkgsrc infrastructure</a></span></dt>
+<dt><span class="chapter"><a href="#infr.design">24. Design of the pkgsrc infrastructure</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#infr.vardef">23.1. The meaning of variable definitions</a></span></dt>
-<dt><span class="sect1"><a href="#infr.vardef.problems">23.2. Avoiding problems before they arise</a></span></dt>
-<dt><span class="sect1"><a href="#infr.var">23.3. Variable evaluation</a></span></dt>
+<dt><span class="sect1"><a href="#infr.vardef">24.1. The meaning of variable definitions</a></span></dt>
+<dt><span class="sect1"><a href="#infr.vardef.problems">24.2. Avoiding problems before they arise</a></span></dt>
+<dt><span class="sect1"><a href="#infr.var">24.3. Variable evaluation</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.var.load">23.3.1. At load time</a></span></dt>
-<dt><span class="sect2"><a href="#infr.var.run">23.3.2. At runtime</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.load">24.3.1. At load time</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.run">24.3.2. At runtime</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#infr.varspec">23.4. How can variables be specified?</a></span></dt>
-<dt><span class="sect1"><a href="#infr.design.intf">23.5. Designing interfaces for Makefile fragments</a></span></dt>
+<dt><span class="sect1"><a href="#infr.varspec">24.4. How can variables be specified?</a></span></dt>
+<dt><span class="sect1"><a href="#infr.design.intf">24.5. Designing interfaces for Makefile fragments</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.design.intf.proc">23.5.1. Procedures with parameters</a></span></dt>
-<dt><span class="sect2"><a href="#infr.design.intf.action">23.5.2. Actions taken on behalf of parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.proc">24.5.1. Procedures with parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.action">24.5.2. Actions taken on behalf of parameters</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#infr.order">23.6. The order in which files are loaded</a></span></dt>
+<dt><span class="sect1"><a href="#infr.order">24.6. The order in which files are loaded</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.order.prefs">23.6.1. The order in <code class="filename">bsd.prefs.mk</code></a></span></dt>
-<dt><span class="sect2"><a href="#infr.order.pkg">23.6.2. The order in <code class="filename">bsd.pkg.mk</code></a></span></dt>
+<dt><span class="sect2"><a href="#infr.order.prefs">24.6.1. The order in <code class="filename">bsd.prefs.mk</code></a></span></dt>
+<dt><span class="sect2"><a href="#infr.order.pkg">24.6.2. The order in <code class="filename">bsd.pkg.mk</code></a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#regression">24. Regression tests</a></span></dt>
+<dt><span class="chapter"><a href="#regression">25. Regression tests</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#regression.descr">24.1. The regression tests framework</a></span></dt>
-<dt><span class="sect1"><a href="#regression.run">24.2. Running the regression tests</a></span></dt>
-<dt><span class="sect1"><a href="#regression.new">24.3. Adding a new regression test</a></span></dt>
+<dt><span class="sect1"><a href="#regression.descr">25.1. The regression tests framework</a></span></dt>
+<dt><span class="sect1"><a href="#regression.run">25.2. Running the regression tests</a></span></dt>
+<dt><span class="sect1"><a href="#regression.new">25.3. Adding a new regression test</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#regression.fun.override">24.3.1. Overridable functions</a></span></dt>
-<dt><span class="sect2"><a href="#regression.fun.helper">24.3.2. Helper functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.override">25.3.1. Overridable functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.helper">25.3.2. Helper functions</a></span></dt>
</dl></dd>
</dl></dd>
-<dt><span class="chapter"><a href="#porting">25. Porting pkgsrc</a></span></dt>
+<dt><span class="chapter"><a href="#porting">26. Porting pkgsrc</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="#porting.opsys">25.1. Porting pkgsrc to a new operating system</a></span></dt>
-<dt><span class="sect1"><a href="#porting.compiler">25.2. Adding support for a new compiler</a></span></dt>
+<dt><span class="sect1"><a href="#porting.opsys">26.1. Porting pkgsrc to a new operating system</a></span></dt>
+<dt><span class="sect1"><a href="#porting.compiler">26.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 23. Design of the pkgsrc infrastructure</h2></div></div></div>
+<a name="infr.design"></a>Chapter 24. 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.vardef">23.1. The meaning of variable definitions</a></span></dt>
-<dt><span class="sect1"><a href="#infr.vardef.problems">23.2. Avoiding problems before they arise</a></span></dt>
-<dt><span class="sect1"><a href="#infr.var">23.3. Variable evaluation</a></span></dt>
+<dt><span class="sect1"><a href="#infr.vardef">24.1. The meaning of variable definitions</a></span></dt>
+<dt><span class="sect1"><a href="#infr.vardef.problems">24.2. Avoiding problems before they arise</a></span></dt>
+<dt><span class="sect1"><a href="#infr.var">24.3. Variable evaluation</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.var.load">23.3.1. At load time</a></span></dt>
-<dt><span class="sect2"><a href="#infr.var.run">23.3.2. At runtime</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.load">24.3.1. At load time</a></span></dt>
+<dt><span class="sect2"><a href="#infr.var.run">24.3.2. At runtime</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#infr.varspec">23.4. How can variables be specified?</a></span></dt>
-<dt><span class="sect1"><a href="#infr.design.intf">23.5. Designing interfaces for Makefile fragments</a></span></dt>
+<dt><span class="sect1"><a href="#infr.varspec">24.4. How can variables be specified?</a></span></dt>
+<dt><span class="sect1"><a href="#infr.design.intf">24.5. Designing interfaces for Makefile fragments</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.design.intf.proc">23.5.1. Procedures with parameters</a></span></dt>
-<dt><span class="sect2"><a href="#infr.design.intf.action">23.5.2. Actions taken on behalf of parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.proc">24.5.1. Procedures with parameters</a></span></dt>
+<dt><span class="sect2"><a href="#infr.design.intf.action">24.5.2. Actions taken on behalf of parameters</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="#infr.order">23.6. The order in which files are loaded</a></span></dt>
+<dt><span class="sect1"><a href="#infr.order">24.6. The order in which files are loaded</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#infr.order.prefs">23.6.1. The order in <code class="filename">bsd.prefs.mk</code></a></span></dt>
-<dt><span class="sect2"><a href="#infr.order.pkg">23.6.2. The order in <code class="filename">bsd.pkg.mk</code></a></span></dt>
+<dt><span class="sect2"><a href="#infr.order.prefs">24.6.1. The order in <code class="filename">bsd.prefs.mk</code></a></span></dt>
+<dt><span class="sect2"><a href="#infr.order.pkg">24.6.2. The order in <code class="filename">bsd.pkg.mk</code></a></span></dt>
</dl></dd>
</dl>
</div>
@@ -10117,7 +10209,7 @@ details.</p>
like.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="infr.vardef"></a>23.1. The meaning of variable definitions</h2></div></div></div>
+<a name="infr.vardef"></a>24.1. The meaning of variable definitions</h2></div></div></div>
<p>Whenever a variable is defined in the pkgsrc
infrastructure, the location and the way of definition provide
much information about the intended use of that variable.
@@ -10148,7 +10240,7 @@ details.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="infr.vardef.problems"></a>23.2. Avoiding problems before they arise</h2></div></div></div>
+<a name="infr.vardef.problems"></a>24.2. Avoiding problems before they arise</h2></div></div></div>
<p>All variables that contain lists of things should default
to being empty. Two examples that do not follow this rule are
<code class="varname">USE_LANGUAGES</code> and
@@ -10172,10 +10264,10 @@ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} additional-files.tar.gz
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="infr.var"></a>23.3. Variable evaluation</h2></div></div></div>
+<a name="infr.var"></a>24.3. 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>23.3.1. At load time</h3></div></div></div>
+<a name="infr.var.load"></a>24.3.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>
@@ -10217,7 +10309,7 @@ CFLAGS+= -Wall
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="infr.var.run"></a>23.3.2. At runtime</h3></div></div></div>
+<a name="infr.var.run"></a>24.3.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>
@@ -10225,7 +10317,7 @@ CFLAGS+= -Wall
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="infr.varspec"></a>23.4. How can variables be specified?</h2></div></div></div>
+<a name="infr.varspec"></a>24.4. How can variables be specified?</h2></div></div></div>
<p>There are many ways in which the definition and use of a
variable can be restricted in order to detect bugs and
violations of the (mostly unwritten) policies. See the
@@ -10234,18 +10326,18 @@ CFLAGS+= -Wall
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="infr.design.intf"></a>23.5. Designing interfaces for Makefile fragments</h2></div></div></div>
+<a name="infr.design.intf"></a>24.5. 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>23.5.1. Procedures with parameters</h3></div></div></div>
+<a name="infr.design.intf.proc"></a>24.5.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
- inclusion&#8212;provide a result in output parameters. Since all
+ procedures. They take some input parameters and&mdash;after
+ inclusion&mdash;provide a result in output parameters. Since all
variables in <code class="filename">Makefile</code>s have global scope
care must be taken not to use parameter names that have already
another meaning. For example, <code class="varname">PKGNAME</code> is a
@@ -10275,7 +10367,7 @@ CFLAGS+= -Wall
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="infr.design.intf.action"></a>23.5.2. Actions taken on behalf of parameters</h3></div></div></div>
+<a name="infr.design.intf.action"></a>24.5.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
@@ -10287,7 +10379,7 @@ CFLAGS+= -Wall
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="infr.order"></a>23.6. The order in which files are loaded</h2></div></div></div>
+<a name="infr.order"></a>24.6. The order in which files are loaded</h2></div></div></div>
<p>Package <code class="filename">Makefile</code>s usually consist of
a set of variable definitions, and include the file
<code class="filename">../../mk/bsd.pkg.mk</code> in the very last line.
@@ -10302,7 +10394,7 @@ CFLAGS+= -Wall
are loaded and gives reasons for that order.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="infr.order.prefs"></a>23.6.1. The order in <code class="filename">bsd.prefs.mk</code>
+<a name="infr.order.prefs"></a>24.6.1. The order in <code class="filename">bsd.prefs.mk</code>
</h3></div></div></div>
<p>The very first action in <code class="filename">bsd.prefs.mk</code>
is to define some essential variables like
@@ -10327,7 +10419,7 @@ CFLAGS+= -Wall
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="infr.order.pkg"></a>23.6.2. The order in <code class="filename">bsd.pkg.mk</code>
+<a name="infr.order.pkg"></a>24.6.2. The order in <code class="filename">bsd.pkg.mk</code>
</h3></div></div></div>
<p>First, <code class="filename">bsd.prefs.mk</code> is loaded.</p>
<p>Then, the various <code class="filename">*-vars.mk</code> files are
@@ -10360,16 +10452,16 @@ CFLAGS+= -Wall
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="regression"></a>Chapter 24. Regression tests</h2></div></div></div>
+<a name="regression"></a>Chapter 25. 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">24.1. The regression tests framework</a></span></dt>
-<dt><span class="sect1"><a href="#regression.run">24.2. Running the regression tests</a></span></dt>
-<dt><span class="sect1"><a href="#regression.new">24.3. Adding a new regression test</a></span></dt>
+<dt><span class="sect1"><a href="#regression.descr">25.1. The regression tests framework</a></span></dt>
+<dt><span class="sect1"><a href="#regression.run">25.2. Running the regression tests</a></span></dt>
+<dt><span class="sect1"><a href="#regression.new">25.3. Adding a new regression test</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#regression.fun.override">24.3.1. Overridable functions</a></span></dt>
-<dt><span class="sect2"><a href="#regression.fun.helper">24.3.2. Helper functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.override">25.3.1. Overridable functions</a></span></dt>
+<dt><span class="sect2"><a href="#regression.fun.helper">25.3.2. Helper functions</a></span></dt>
</dl></dd>
</dl>
</div>
@@ -10383,12 +10475,12 @@ CFLAGS+= -Wall
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>24.1. The regression tests framework</h2></div></div></div>
+<a name="regression.descr"></a>25.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>24.2. Running the regression tests</h2></div></div></div>
+<a name="regression.run"></a>25.2. Running the regression tests</h2></div></div></div>
<p>You first need to install the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/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
@@ -10396,7 +10488,7 @@ CFLAGS+= -Wall
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="regression.new"></a>24.3. Adding a new regression test</h2></div></div></div>
+<a name="regression.new"></a>25.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
@@ -10405,7 +10497,7 @@ CFLAGS+= -Wall
needs.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="regression.fun.override"></a>24.3.1. Overridable functions</h3></div></div></div>
+<a name="regression.fun.override"></a>25.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
@@ -10432,7 +10524,7 @@ CFLAGS+= -Wall
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="regression.fun.helper"></a>24.3.2. Helper functions</h3></div></div></div>
+<a name="regression.fun.helper"></a>25.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
@@ -10455,12 +10547,12 @@ CFLAGS+= -Wall
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
-<a name="porting"></a>Chapter 25. Porting pkgsrc</h2></div></div></div>
+<a name="porting"></a>Chapter 26. 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">25.1. Porting pkgsrc to a new operating system</a></span></dt>
-<dt><span class="sect1"><a href="#porting.compiler">25.2. Adding support for a new compiler</a></span></dt>
+<dt><span class="sect1"><a href="#porting.opsys">26.1. Porting pkgsrc to a new operating system</a></span></dt>
+<dt><span class="sect1"><a href="#porting.compiler">26.2. Adding support for a new compiler</a></span></dt>
</dl>
</div>
<p>The pkgsrc system has already been ported to many
@@ -10469,7 +10561,7 @@ CFLAGS+= -Wall
portable.</p>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="porting.opsys"></a>25.1. Porting pkgsrc to a new operating system</h2></div></div></div>
+<a name="porting.opsys"></a>26.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>
@@ -10519,7 +10611,7 @@ CFLAGS+= -Wall
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="porting.compiler"></a>25.2. Adding support for a new compiler</h2></div></div></div>
+<a name="porting.compiler"></a>26.2. Adding support for a new compiler</h2></div></div></div>
<p>TODO</p>
</div>
</div>
@@ -10616,7 +10708,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 10. Package components - files, directories and contents">Chapter 10, <i>Package components - files, directories and contents</i></a>)
+ <code class="filename">PLIST</code> (see <a href="#components" title="Chapter 11. Package components - files, directories and contents">Chapter 11, <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.
diff --git a/doc/pkgsrc.txt b/doc/pkgsrc.txt
index 7fcd26e112c..1a99b73e092 100644
--- a/doc/pkgsrc.txt
+++ b/doc/pkgsrc.txt
@@ -14,7 +14,7 @@ The pkgsrc Developers
Copyright 1994-2007 The NetBSD Foundation, Inc
-$NetBSD: pkgsrc.xml,v 1.25 2007/08/15 06:32:38 rillig Exp $
+$NetBSD: pkgsrc.xml,v 1.26 2007/09/18 08:17:21 rillig Exp $
Abstract
@@ -108,309 +108,318 @@ I. The pkgsrc user's guide
6.1. Building a single binary package
6.2. Settings for creation of binary packages
- 6.3. Doing a bulk build of all packages
-
- 6.3.1. Configuration
- 6.3.2. Other environmental considerations
- 6.3.3. Operation
- 6.3.4. What it does
- 6.3.5. Disk space requirements
- 6.3.6. Setting up a sandbox for chrooted builds
- 6.3.7. Building a partial set of packages
- 6.3.8. Uploading results of a bulk build
-
- 6.4. Creating a multiple CD-ROM packages collection
-
- 6.4.1. Example of cdpack
-
- 7. Directory layout of the installed files
-
- 7.1. File system layout in ${LOCALBASE}
- 7.2. File system layout in ${VARBASE}
-
- 8. Frequently Asked Questions
-
- 8.1. Are there any mailing lists for pkg-related discussion?
- 8.2. Where's the pkgviews documentation?
- 8.3. Utilities for package management (pkgtools)
- 8.4. How to use pkgsrc as non-root
- 8.5. How to resume transfers when fetching distfiles?
- 8.6. How can I install/use modular X.org from pkgsrc?
- 8.7. How to fetch files from behind a firewall
- 8.8. How do I tell make fetch to do passive FTP?
- 8.9. How to fetch all distfiles at once
- 8.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc"
+
+ 7. Creating binary packages for everything in pkgsrc (bulk builds)
+
+ 7.1. Think first, build later
+ 7.2. Requirements of a bulk build
+ 7.3. Running an old-style bulk build
+
+ 7.3.1. Configuration
+ 7.3.2. Other environmental considerations
+ 7.3.3. Operation
+ 7.3.4. What it does
+ 7.3.5. Disk space requirements
+ 7.3.6. Setting up a sandbox for chrooted builds
+ 7.3.7. Building a partial set of packages
+ 7.3.8. Uploading results of a bulk build
+
+ 7.4. Running a pbulk-style bulk build
+
+ 7.4.1. Configuration
+
+ 7.5. Creating a multiple CD-ROM packages collection
+
+ 7.5.1. Example of cdpack
+
+ 8. Directory layout of the installed files
+
+ 8.1. File system layout in ${LOCALBASE}
+ 8.2. File system layout in ${VARBASE}
+
+ 9. Frequently Asked Questions
+
+ 9.1. Are there any mailing lists for pkg-related discussion?
+ 9.2. Where's the pkgviews documentation?
+ 9.3. Utilities for package management (pkgtools)
+ 9.4. How to use pkgsrc as non-root
+ 9.5. How to resume transfers when fetching distfiles?
+ 9.6. How can I install/use modular X.org from pkgsrc?
+ 9.7. How to fetch files from behind a firewall
+ 9.8. How do I tell make fetch to do passive FTP?
+ 9.9. How to fetch all distfiles at once
+ 9.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc"
mean?
- 8.11. What does "Could not find bsd.own.mk" mean?
- 8.12. Using 'sudo' with pkgsrc
- 8.13. How do I change the location of configuration files?
- 8.14. Automated security checks
- 8.15. Why do some packages ignore my CFLAGS?
- 8.16. A package does not build. What shall I do?
- 8.17. What does "Makefile appears to contain unresolved cvs/rcs/???
+ 9.11. What does "Could not find bsd.own.mk" mean?
+ 9.12. Using 'sudo' with pkgsrc
+ 9.13. How do I change the location of configuration files?
+ 9.14. Automated security checks
+ 9.15. Why do some packages ignore my CFLAGS?
+ 9.16. A package does not build. What shall I do?
+ 9.17. What does "Makefile appears to contain unresolved cvs/rcs/???
merge conflicts" mean?
II. The pkgsrc developer's guide
- 9. Creating a new pkgsrc package from scratch
+ 10. Creating a new pkgsrc package from scratch
- 9.1. Common types of packages
+ 10.1. Common types of packages
- 9.1.1. Perl modules
- 9.1.2. KDE applications
+ 10.1.1. Perl modules
+ 10.1.2. KDE applications
- 9.2. Examples
+ 10.2. Examples
- 9.2.1. How the www/nvu package came into pkgsrc
+ 10.2.1. How the www/nvu package came into pkgsrc
- 10. Package components - files, directories and contents
+ 11. Package components - files, directories and contents
- 10.1. Makefile
- 10.2. distinfo
- 10.3. patches/*
+ 11.1. Makefile
+ 11.2. distinfo
+ 11.3. patches/*
- 10.3.1. Structure of a single patch file
- 10.3.2. Creating patch files
- 10.3.3. Sources where the patch files come from
- 10.3.4. Patching guidelines
- 10.3.5. Feedback to the author
+ 11.3.1. Structure of a single patch file
+ 11.3.2. Creating patch files
+ 11.3.3. Sources where the patch files come from
+ 11.3.4. Patching guidelines
+ 11.3.5. Feedback to the author
- 10.4. Other mandatory files
- 10.5. Optional files
+ 11.4. Other mandatory files
+ 11.5. Optional files
- 10.5.1. Files affecting the binary package
- 10.5.2. Files affecting the build process
- 10.5.3. Files affecting nothing at all
+ 11.5.1. Files affecting the binary package
+ 11.5.2. Files affecting the build process
+ 11.5.3. Files affecting nothing at all
- 10.6. work*
- 10.7. files/*
+ 11.6. work*
+ 11.7. files/*
- 11. Programming in Makefiles
+ 12. Programming in Makefiles
- 11.1. Caveats
- 11.2. Makefile variables
+ 12.1. Caveats
+ 12.2. Makefile variables
- 11.2.1. Naming conventions
+ 12.2.1. Naming conventions
- 11.3. Code snippets
+ 12.3. Code snippets
- 11.3.1. Adding things to a list
- 11.3.2. Converting an internal list into an external list
- 11.3.3. Passing variables to a shell command
- 11.3.4. Quoting guideline
- 11.3.5. Workaround for a bug in BSD Make
+ 12.3.1. Adding things to a list
+ 12.3.2. Converting an internal list into an external list
+ 12.3.3. Passing variables to a shell command
+ 12.3.4. Quoting guideline
+ 12.3.5. Workaround for a bug in BSD Make
- 12. PLIST issues
+ 13. PLIST issues
- 12.1. RCS ID
- 12.2. Semi-automatic PLIST generation
- 12.3. Tweaking output of make print-PLIST
- 12.4. Variable substitution in PLIST
- 12.5. Man page compression
- 12.6. Changing PLIST source with PLIST_SRC
- 12.7. Platform-specific and differing PLISTs
- 12.8. Sharing directories between packages
+ 13.1. RCS ID
+ 13.2. Semi-automatic PLIST generation
+ 13.3. Tweaking output of make print-PLIST
+ 13.4. Variable substitution in PLIST
+ 13.5. Man page compression
+ 13.6. Changing PLIST source with PLIST_SRC
+ 13.7. Platform-specific and differing PLISTs
+ 13.8. Sharing directories between packages
- 13. Buildlink methodology
+ 14. Buildlink methodology
- 13.1. Converting packages to use buildlink3
- 13.2. Writing buildlink3.mk files
+ 14.1. Converting packages to use buildlink3
+ 14.2. Writing buildlink3.mk files
- 13.2.1. Anatomy of a buildlink3.mk file
- 13.2.2. Updating BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files
+ 14.2.1. Anatomy of a buildlink3.mk file
+ 14.2.2. Updating BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files
- 13.3. Writing builtin.mk files
+ 14.3. Writing builtin.mk files
- 13.3.1. Anatomy of a builtin.mk file
- 13.3.2. Global preferences for native or pkgsrc software
+ 14.3.1. Anatomy of a builtin.mk file
+ 14.3.2. Global preferences for native or pkgsrc software
- 14. The pkginstall framework
+ 15. The pkginstall framework
- 14.1. Files and directories outside the installation prefix
+ 15.1. Files and directories outside the installation prefix
- 14.1.1. Directory manipulation
- 14.1.2. File manipulation
+ 15.1.1. Directory manipulation
+ 15.1.2. File manipulation
- 14.2. Configuration files
+ 15.2. Configuration files
- 14.2.1. How PKG_SYSCONFDIR is set
- 14.2.2. Telling the software where configuration files are
- 14.2.3. Patching installations
- 14.2.4. Disabling handling of configuration files
+ 15.2.1. How PKG_SYSCONFDIR is set
+ 15.2.2. Telling the software where configuration files are
+ 15.2.3. Patching installations
+ 15.2.4. Disabling handling of configuration files
- 14.3. System startup scripts
+ 15.3. System startup scripts
- 14.3.1. Disabling handling of system startup scripts
+ 15.3.1. Disabling handling of system startup scripts
- 14.4. System users and groups
- 14.5. System shells
+ 15.4. System users and groups
+ 15.5. System shells
- 14.5.1. Disabling shell registration
+ 15.5.1. Disabling shell registration
- 14.6. Fonts
+ 15.6. Fonts
- 14.6.1. Disabling automatic update of the fonts databases
+ 15.6.1. Disabling automatic update of the fonts databases
- 15. Options handling
+ 16. Options handling
- 15.1. Global default options
- 15.2. Converting packages to use bsd.options.mk
- 15.3. Option Names
+ 16.1. Global default options
+ 16.2. Converting packages to use bsd.options.mk
+ 16.3. Option Names
- 16. The build process
+ 17. The build process
- 16.1. Introduction
- 16.2. Program location
- 16.3. Directories used during the build process
- 16.4. Running a phase
- 16.5. The fetch phase
+ 17.1. Introduction
+ 17.2. Program location
+ 17.3. Directories used during the build process
+ 17.4. Running a phase
+ 17.5. The fetch phase
- 16.5.1. What to fetch and where to get it from
- 16.5.2. How are the files fetched?
+ 17.5.1. What to fetch and where to get it from
+ 17.5.2. How are the files fetched?
- 16.6. The checksum phase
- 16.7. The extract phase
- 16.8. The patch phase
- 16.9. The tools phase
- 16.10. The wrapper phase
- 16.11. The configure phase
- 16.12. The build phase
- 16.13. The test phase
- 16.14. The install phase
- 16.15. The package phase
- 16.16. Cleaning up
- 16.17. Other helpful targets
+ 17.6. The checksum phase
+ 17.7. The extract phase
+ 17.8. The patch phase
+ 17.9. The tools phase
+ 17.10. The wrapper phase
+ 17.11. The configure phase
+ 17.12. The build phase
+ 17.13. The test phase
+ 17.14. The install phase
+ 17.15. The package phase
+ 17.16. Cleaning up
+ 17.17. Other helpful targets
- 17. Tools needed for building or running
+ 18. Tools needed for building or running
- 17.1. Tools for pkgsrc builds
- 17.2. Tools needed by packages
- 17.3. Tools provided by platforms
- 17.4. Questions regarding the tools
+ 18.1. Tools for pkgsrc builds
+ 18.2. Tools needed by packages
+ 18.3. Tools provided by platforms
+ 18.4. Questions regarding the tools
- 18. Making your package work
+ 19. Making your package work
- 18.1. General operation
+ 19.1. General operation
- 18.1.1. Portability of packages
- 18.1.2. How to pull in user-settable variables from mk.conf
- 18.1.3. User interaction
- 18.1.4. Handling licenses
- 18.1.5. Restricted packages
- 18.1.6. Handling dependencies
- 18.1.7. Handling conflicts with other packages
- 18.1.8. Packages that cannot or should not be built
- 18.1.9. Packages which should not be deleted, once installed
- 18.1.10. Handling packages with security problems
- 18.1.11. How to handle incrementing versions when fixing an
+ 19.1.1. Portability of packages
+ 19.1.2. How to pull in user-settable variables from mk.conf
+ 19.1.3. User interaction
+ 19.1.4. Handling licenses
+ 19.1.5. Restricted packages
+ 19.1.6. Handling dependencies
+ 19.1.7. Handling conflicts with other packages
+ 19.1.8. Packages that cannot or should not be built
+ 19.1.9. Packages which should not be deleted, once installed
+ 19.1.10. Handling packages with security problems
+ 19.1.11. How to handle incrementing versions when fixing an
existing package
- 18.1.12. Substituting variable text in the package files (the SUBST
+ 19.1.12. Substituting variable text in the package files (the SUBST
framework)
- 18.2. Fixing problems in the fetch phase
+ 19.2. Fixing problems in the fetch phase
- 18.2.1. Packages whose distfiles aren't available for plain
+ 19.2.1. Packages whose distfiles aren't available for plain
downloading
- 18.2.2. How to handle modified distfiles with the 'old' name
-
- 18.3. Fixing problems in the configure phase
-
- 18.3.1. Shared libraries - libtool
- 18.3.2. Using libtool on GNU packages that already support libtool
- 18.3.3. GNU Autoconf/Automake
-
- 18.4. Programming languages
-
- 18.4.1. C, C++, and Fortran
- 18.4.2. Java
- 18.4.3. Packages containing perl scripts
- 18.4.4. Other programming languages
-
- 18.5. Fixing problems in the build phase
-
- 18.5.1. Compiling C and C++ code conditionally
- 18.5.2. How to handle compiler bugs
- 18.5.3. Undefined reference to "..."
- 18.5.4. Running out of memory
-
- 18.6. Fixing problems in the install phase
-
- 18.6.1. Creating needed directories
- 18.6.2. Where to install documentation
- 18.6.3. Installing highscore files
- 18.6.4. Adding DESTDIR support to packages
- 18.6.5. Packages with hardcoded paths to other interpreters
- 18.6.6. Packages installing perl modules
- 18.6.7. Packages installing info files
- 18.6.8. Packages installing man pages
- 18.6.9. Packages installing GConf2 data files
- 18.6.10. Packages installing scrollkeeper data files
- 18.6.11. Packages installing X11 fonts
- 18.6.12. Packages installing GTK2 modules
- 18.6.13. Packages installing SGML or XML data
- 18.6.14. Packages installing extensions to the MIME database
- 18.6.15. Packages using intltool
- 18.6.16. Packages installing startup scripts
- 18.6.17. Packages installing TeX modules
- 18.6.18. Packages supporting running binaries in emulation
- 18.6.19. Packages installing hicolor theme icons
- 18.6.20. Packages installing desktop files
-
- 18.7. Marking packages as having problems
-
- 19. Debugging
- 20. Submitting and Committing
-
- 20.1. Submitting binary packages
- 20.2. Submitting source packages (for non-NetBSD-developers)
- 20.3. General notes when adding, updating, or removing packages
- 20.4. Committing: Importing a package into CVS
- 20.5. Updating a package to a newer version
- 20.6. Moving a package in pkgsrc
-
- 21. Frequently Asked Questions
- 22. GNOME packaging and porting
-
- 22.1. Meta packages
- 22.2. Packaging a GNOME application
- 22.3. Updating GNOME to a newer version
- 22.4. Patching guidelines
+ 19.2.2. How to handle modified distfiles with the 'old' name
+
+ 19.3. Fixing problems in the configure phase
+
+ 19.3.1. Shared libraries - libtool
+ 19.3.2. Using libtool on GNU packages that already support libtool
+ 19.3.3. GNU Autoconf/Automake
+
+ 19.4. Programming languages
+
+ 19.4.1. C, C++, and Fortran
+ 19.4.2. Java
+ 19.4.3. Packages containing perl scripts
+ 19.4.4. Other programming languages
+
+ 19.5. Fixing problems in the build phase
+
+ 19.5.1. Compiling C and C++ code conditionally
+ 19.5.2. How to handle compiler bugs
+ 19.5.3. Undefined reference to "..."
+ 19.5.4. Running out of memory
+
+ 19.6. Fixing problems in the install phase
+
+ 19.6.1. Creating needed directories
+ 19.6.2. Where to install documentation
+ 19.6.3. Installing highscore files
+ 19.6.4. Adding DESTDIR support to packages
+ 19.6.5. Packages with hardcoded paths to other interpreters
+ 19.6.6. Packages installing perl modules
+ 19.6.7. Packages installing info files
+ 19.6.8. Packages installing man pages
+ 19.6.9. Packages installing GConf2 data files
+ 19.6.10. Packages installing scrollkeeper data files
+ 19.6.11. Packages installing X11 fonts
+ 19.6.12. Packages installing GTK2 modules
+ 19.6.13. Packages installing SGML or XML data
+ 19.6.14. Packages installing extensions to the MIME database
+ 19.6.15. Packages using intltool
+ 19.6.16. Packages installing startup scripts
+ 19.6.17. Packages installing TeX modules
+ 19.6.18. Packages supporting running binaries in emulation
+ 19.6.19. Packages installing hicolor theme icons
+ 19.6.20. Packages installing desktop files
+
+ 19.7. Marking packages as having problems
+
+ 20. Debugging
+ 21. Submitting and Committing
+
+ 21.1. Submitting binary packages
+ 21.2. Submitting source packages (for non-NetBSD-developers)
+ 21.3. General notes when adding, updating, or removing packages
+ 21.4. Committing: Importing a package into CVS
+ 21.5. Updating a package to a newer version
+ 21.6. Moving a package in pkgsrc
+
+ 22. Frequently Asked Questions
+ 23. GNOME packaging and porting
+
+ 23.1. Meta packages
+ 23.2. Packaging a GNOME application
+ 23.3. Updating GNOME to a newer version
+ 23.4. Patching guidelines
III. The pkgsrc infrastructure internals
- 23. Design of the pkgsrc infrastructure
+ 24. Design of the pkgsrc infrastructure
- 23.1. The meaning of variable definitions
- 23.2. Avoiding problems before they arise
- 23.3. Variable evaluation
+ 24.1. The meaning of variable definitions
+ 24.2. Avoiding problems before they arise
+ 24.3. Variable evaluation
- 23.3.1. At load time
- 23.3.2. At runtime
+ 24.3.1. At load time
+ 24.3.2. At runtime
- 23.4. How can variables be specified?
- 23.5. Designing interfaces for Makefile fragments
+ 24.4. How can variables be specified?
+ 24.5. Designing interfaces for Makefile fragments
- 23.5.1. Procedures with parameters
- 23.5.2. Actions taken on behalf of parameters
+ 24.5.1. Procedures with parameters
+ 24.5.2. Actions taken on behalf of parameters
- 23.6. The order in which files are loaded
+ 24.6. The order in which files are loaded
- 23.6.1. The order in bsd.prefs.mk
- 23.6.2. The order in bsd.pkg.mk
+ 24.6.1. The order in bsd.prefs.mk
+ 24.6.2. The order in bsd.pkg.mk
- 24. Regression tests
+ 25. Regression tests
- 24.1. The regression tests framework
- 24.2. Running the regression tests
- 24.3. Adding a new regression test
+ 25.1. The regression tests framework
+ 25.2. Running the regression tests
+ 25.3. Adding a new regression test
- 24.3.1. Overridable functions
- 24.3.2. Helper functions
+ 25.3.1. Overridable functions
+ 25.3.2. Helper functions
- 25. Porting pkgsrc
+ 26. Porting pkgsrc
- 25.1. Porting pkgsrc to a new operating system
- 25.2. Adding support for a new compiler
+ 26.1. Porting pkgsrc to a new operating system
+ 26.2. Adding support for a new compiler
A. A simple example package: bison
@@ -446,8 +455,8 @@ List of Tables
1.1. Platforms supported by pkgsrc
3.1. Binary kits and available packages
-10.1. Patching examples
-22.1. PLIST handling for GNOME packages
+11.1. Patching examples
+23.1. PLIST handling for GNOME packages
Chapter 1. What is pkgsrc?
@@ -739,45 +748,54 @@ Table of Contents
6.1. Building a single binary package
6.2. Settings for creation of binary packages
- 6.3. Doing a bulk build of all packages
-
- 6.3.1. Configuration
- 6.3.2. Other environmental considerations
- 6.3.3. Operation
- 6.3.4. What it does
- 6.3.5. Disk space requirements
- 6.3.6. Setting up a sandbox for chrooted builds
- 6.3.7. Building a partial set of packages
- 6.3.8. Uploading results of a bulk build
-
- 6.4. Creating a multiple CD-ROM packages collection
-
- 6.4.1. Example of cdpack
-
-7. Directory layout of the installed files
-
- 7.1. File system layout in ${LOCALBASE}
- 7.2. File system layout in ${VARBASE}
-
-8. Frequently Asked Questions
-
- 8.1. Are there any mailing lists for pkg-related discussion?
- 8.2. Where's the pkgviews documentation?
- 8.3. Utilities for package management (pkgtools)
- 8.4. How to use pkgsrc as non-root
- 8.5. How to resume transfers when fetching distfiles?
- 8.6. How can I install/use modular X.org from pkgsrc?
- 8.7. How to fetch files from behind a firewall
- 8.8. How do I tell make fetch to do passive FTP?
- 8.9. How to fetch all distfiles at once
- 8.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
- 8.11. What does "Could not find bsd.own.mk" mean?
- 8.12. Using 'sudo' with pkgsrc
- 8.13. How do I change the location of configuration files?
- 8.14. Automated security checks
- 8.15. Why do some packages ignore my CFLAGS?
- 8.16. A package does not build. What shall I do?
- 8.17. What does "Makefile appears to contain unresolved cvs/rcs/??? merge
+
+7. Creating binary packages for everything in pkgsrc (bulk builds)
+
+ 7.1. Think first, build later
+ 7.2. Requirements of a bulk build
+ 7.3. Running an old-style bulk build
+
+ 7.3.1. Configuration
+ 7.3.2. Other environmental considerations
+ 7.3.3. Operation
+ 7.3.4. What it does
+ 7.3.5. Disk space requirements
+ 7.3.6. Setting up a sandbox for chrooted builds
+ 7.3.7. Building a partial set of packages
+ 7.3.8. Uploading results of a bulk build
+
+ 7.4. Running a pbulk-style bulk build
+
+ 7.4.1. Configuration
+
+ 7.5. Creating a multiple CD-ROM packages collection
+
+ 7.5.1. Example of cdpack
+
+8. Directory layout of the installed files
+
+ 8.1. File system layout in ${LOCALBASE}
+ 8.2. File system layout in ${VARBASE}
+
+9. Frequently Asked Questions
+
+ 9.1. Are there any mailing lists for pkg-related discussion?
+ 9.2. Where's the pkgviews documentation?
+ 9.3. Utilities for package management (pkgtools)
+ 9.4. How to use pkgsrc as non-root
+ 9.5. How to resume transfers when fetching distfiles?
+ 9.6. How can I install/use modular X.org from pkgsrc?
+ 9.7. How to fetch files from behind a firewall
+ 9.8. How do I tell make fetch to do passive FTP?
+ 9.9. How to fetch all distfiles at once
+ 9.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
+ 9.11. What does "Could not find bsd.own.mk" mean?
+ 9.12. Using 'sudo' with pkgsrc
+ 9.13. How do I change the location of configuration files?
+ 9.14. Automated security checks
+ 9.15. Why do some packages ignore my CFLAGS?
+ 9.16. A package does not build. What shall I do?
+ 9.17. What does "Makefile appears to contain unresolved cvs/rcs/??? merge
conflicts" mean?
Chapter 2. Where to get pkgsrc and how to keep it up-to-date
@@ -1959,7 +1977,7 @@ XXX
tree. It is possible to have many pkgsrc tree instances.)
* LOCALPATCHES: Directory for local patches that aren't part of pkgsrc. See
- Section 10.3, "patches/*" for more information.
+ Section 11.3, "patches/*" for more information.
* PKGMAKECONF: Location of the mk.conf file used by a package's BSD-style
Makefile. If this is not set, MAKECONF is set to /dev/null to avoid picking
@@ -2134,20 +2152,6 @@ Table of Contents
6.1. Building a single binary package
6.2. Settings for creation of binary packages
-6.3. Doing a bulk build of all packages
-
- 6.3.1. Configuration
- 6.3.2. Other environmental considerations
- 6.3.3. Operation
- 6.3.4. What it does
- 6.3.5. Disk space requirements
- 6.3.6. Setting up a sandbox for chrooted builds
- 6.3.7. Building a partial set of packages
- 6.3.8. Uploading results of a bulk build
-
-6.4. Creating a multiple CD-ROM packages collection
-
- 6.4.1. Example of cdpack
6.1. Building a single binary package
@@ -2170,28 +2174,103 @@ manipulate it. Binary packages are created by default in /usr/pkgsrc/packages,
in the form of a gzipped tar file. See Section B.2, "Packaging figlet" for a
continuation of the above misc/figlet example.
-See Chapter 20, Submitting and Committing for information on how to submit such
+See Chapter 21, Submitting and Committing for information on how to submit such
a binary package.
6.2. Settings for creation of binary packages
-See Section 16.17, "Other helpful targets".
+See Section 17.17, "Other helpful targets".
+
+Chapter 7. Creating binary packages for everything in pkgsrc (bulk builds)
+
+Table of Contents
+
+7.1. Think first, build later
+7.2. Requirements of a bulk build
+7.3. Running an old-style bulk build
+
+ 7.3.1. Configuration
+ 7.3.2. Other environmental considerations
+ 7.3.3. Operation
+ 7.3.4. What it does
+ 7.3.5. Disk space requirements
+ 7.3.6. Setting up a sandbox for chrooted builds
+ 7.3.7. Building a partial set of packages
+ 7.3.8. Uploading results of a bulk build
+
+7.4. Running a pbulk-style bulk build
+
+ 7.4.1. Configuration
-6.3. Doing a bulk build of all packages
+7.5. Creating a multiple CD-ROM packages collection
-If you want to get a full set of precompiled binary packages, this section
-describes how to get them. Beware that the bulk build will remove all currently
-installed packages from your system!
+ 7.5.1. Example of cdpack
-Having an FTP server configured either on the machine doing the bulk builds or
-on a nearby NFS server can help to make the packages available to other
-machines that can then save time by installing only the binary packages. See
-ftpd(8) for more information. If you use a remote NFS server's storage, be sure
-to not actually compile on NFS storage, as this slows things down a lot.
+When you have multiple machines that should run the same packages, it is wasted
+time if they all build their packages themselves from source. There are two
+ways of getting a set of binary packages: The old bulk build system, or the new
+(as of 2007) parallel bulk build (pbulk) system. This chapter describes how to
+set them up so that the packages are most likely to be usable later.
-6.3.1. Configuration
+7.1. Think first, build later
-6.3.1.1. build.conf
+Since a bulk build takes several days or even weeks to finish, you should think
+about the setup before you start everything. Pay attention to at least the
+following points:
+
+ * If you want to upload the binary packages to ftp.NetBSD.org, make sure the
+ setup complies to the requirements for binary packages:
+
+ o To end up on ftp.NetBSD.org, the packages must be built by a NetBSD
+ developer on a trusted machine (that is, where you and only you have
+ root access).
+
+ o Packages on ftp.NetBSD.org should only be created from the stable
+ branches (like 2007Q1), so that users browsing the available
+ collections can see at a glance how old the packages are.
+
+ o The packages must be built as root, since some packages require set-uid
+ binaries at runtime, and creating those packages as unprivileged user
+ doesn't work well at the moment.
+
+ * Make sure that the bulk build cannot break anything in your system. Most
+ bulk builds run as root, so they should be run at least in a chroot
+ environment or something even more restrictive, depending on what the
+ operating system provides. There have been numerous cases where certain
+ packages tried to install files outside the LOCALBASE or wanted to edit
+ some files in /etc. Furthermore, the bulk builds install and deinstall
+ packages in /usr/pkg (or whatever LOCALBASE is) during their operation, so
+ be sure that you don't need any package during the build.
+
+7.2. Requirements of a bulk build
+
+A complete bulk build requires lots of disk space. Some of the disk space can
+be read-only, some other must be writable. Some can be on remote filesystems
+(such as NFS) and some should be local. Some can be temporary filesystems,
+others must survive a sudden reboot.
+
+ * 10 GB for the distfiles (read-write, remote, temporary)
+
+ * 10 GB for the binary packages (read-write, remote, permanent)
+
+ * 400 MB for the pkgsrc tree (read-only, remote, permanent)
+
+ * 5 GB for LOCALBASE (read-write, local, temporary for pbulk, permanent for
+ old-bulk)
+
+ * 5 GB for the log files (read-write, remote, permanent)
+
+ * 5 GB for temporary files (read-write, local, temporary)
+
+7.3. Running an old-style bulk build
+
+Warning
+
+The rest of this section is rather old. Don't rely on it too much.
+
+7.3.1. Configuration
+
+7.3.1.1. build.conf
The build.conf file is the main configuration file for bulk builds. You can
configure how your copy of pkgsrc is kept up to date, how the distfiles are
@@ -2200,7 +2279,7 @@ find an annotated example file in pkgsrc/mk/bulk/build.conf-example. To use it,
copy build.conf-example to build.conf and edit it, following the comments in
that file.
-6.3.1.2. mk.conf
+7.3.1.2. mk.conf
You may want to set variables in mk.conf. Look at pkgsrc/mk/defaults/mk.conf
for details of the default settings. You will want to ensure that
@@ -2251,7 +2330,7 @@ Some other options are scattered in the pkgsrc infrastructure:
bulk builds is not completely idle. Otherwise some test programs will seem
to hang, while they are just waiting for new random data to be available.
-6.3.1.3. pre-build.local
+7.3.1.3. pre-build.local
It is possible to configure the bulk build to perform certain site-specific
tasks at the end of the pre-build stage. If the file pre-build.local exists in
@@ -2264,7 +2343,7 @@ echo "I do not have enough disk space to build this pig." \
to prevent the system from trying to build a particular package which requires
nearly 3 GB of disk space.
-6.3.2. Other environmental considerations
+7.3.2. Other environmental considerations
As /usr/pkg will be completely deleted at the start of bulk builds, make sure
your login shell is placed somewhere else. Either drop it into /usr/local/bin
@@ -2284,7 +2363,7 @@ Not doing so will result in you being not able to log in via ssh after the bulk
build is finished or if the machine gets rebooted or crashes. You have been
warned! :)
-6.3.3. Operation
+7.3.3. Operation
Make sure you don't need any of the packages still installed.
@@ -2309,7 +2388,7 @@ panic, ...), you can continue it by running:
At the end of the bulk build, you will get a summary via mail, and find build
logs in the directory specified by FTP in the build.conf file.
-6.3.4. What it does
+7.3.4. What it does
The bulk builds consist of three steps:
@@ -2336,7 +2415,7 @@ logs of broken builds can be found in the package's directory. These files are
used by the bulk-targets to mark broken builds to not waste time trying to
rebuild them, and they can be used to debug these broken package builds later.
-6.3.5. Disk space requirements
+7.3.5. Disk space requirements
Currently, roughly the following requirements are valid for NetBSD 2.0/i386:
@@ -2352,7 +2431,7 @@ demand to disk space. Afterwards, if the package is needed again, it will be
installed via pkg_add(1) instead of building again, so there are no cycles
wasted by recompiling.
-6.3.6. Setting up a sandbox for chrooted builds
+7.3.6. Setting up a sandbox for chrooted builds
If you don't want all the packages nuked from a machine (rendering it useless
for anything but pkg compiling), there is the possibility of doing the package
@@ -2416,7 +2495,7 @@ src/etc, be sure the following items are present and properly configured:
10. Make /usr/sandbox/usr/pkgsrc/packages and .../distfiles point somewhere
appropriate. NFS- and/or nullfs-mounts may come in handy!
-11. Edit mk.conf, see Section 6.3.1.2, "mk.conf".
+11. Edit mk.conf, see Section 7.3.1.2, "mk.conf".
12. Adjust mk/bulk/build.conf to suit your needs.
@@ -2432,7 +2511,7 @@ build, mail will be sent with the results of the build. Created binary pkgs
will be in /usr/sandbox/usr/pkgsrc/packages (wherever that points/mounts to/
from).
-6.3.7. Building a partial set of packages
+7.3.7. Building a partial set of packages
In addition to building a complete set of all packages in pkgsrc, the pkgsrc/mk
/bulk/build script may be used to build a subset of the packages contained in
@@ -2454,7 +2533,7 @@ One use of this is to do a bulk build with SPECIFIC_PKGS in a chroot sandbox
periodically to have a complete set of the binary packages needed for your site
available without the overhead of building extra packages that are not needed.
-6.3.8. Uploading results of a bulk build
+7.3.8. Uploading results of a bulk build
This section describes how pkgsrc developers can upload binary pkgs built by
bulk builds to ftp.NetBSD.org.
@@ -2535,7 +2614,13 @@ nbftp% rmdir upload
nbftp% chmod 755 .
-6.4. Creating a multiple CD-ROM packages collection
+7.4. Running a pbulk-style bulk build
+
+7.4.1. Configuration
+
+TODO; see the wiki for more information.
+
+7.5. Creating a multiple CD-ROM packages collection
After your pkgsrc bulk-build has completed, you may wish to create a CD-ROM set
of the resulting binary packages to assist in installing packages on other
@@ -2543,7 +2628,7 @@ machines. The pkgtools/cdpack package provides a simple tool for creating the
ISO 9660 images. cdpack arranges the packages on the CD-ROMs in a way that
keeps all the dependencies for a given package on the same CD as that package.
-6.4.1. Example of cdpack
+7.5.1. Example of cdpack
Complete documentation for cdpack is found in the cdpack(1) man page. The
following short example assumes that the binary packages are left in /usr/
@@ -2575,12 +2660,12 @@ Now create the images:
Each image will contain README, COPYING, and bin/myscript in their root
directories.
-Chapter 7. Directory layout of the installed files
+Chapter 8. Directory layout of the installed files
Table of Contents
-7.1. File system layout in ${LOCALBASE}
-7.2. File system layout in ${VARBASE}
+8.1. File system layout in ${LOCALBASE}
+8.2. File system layout in ${VARBASE}
The files that are installed by pkgsrc are organized in a way that is similar
to what you find in the /usr directory of the base system. But some details are
@@ -2619,7 +2704,7 @@ below.
* PKG_SYSCONFDIR corresponds to /etc in the base system. It contains
configuration files of the packages, as well as pkgsrc's mk.conf itself.
-7.1. File system layout in ${LOCALBASE}
+8.1. File system layout in ${LOCALBASE}
The following directories exist in a typical pkgsrc installation in $
{LOCALBASE}.
@@ -2696,7 +2781,7 @@ var (the usual location of ${VARBASE})
Contains files that may be modified after installation.
-7.2. File system layout in ${VARBASE}
+8.2. File system layout in ${VARBASE}
db/pkg (the usual location of ${PKG_DBDIR})
@@ -2714,34 +2799,34 @@ run
Contains informational files about daemons that are currently running.
-Chapter 8. Frequently Asked Questions
+Chapter 9. Frequently Asked Questions
Table of Contents
-8.1. Are there any mailing lists for pkg-related discussion?
-8.2. Where's the pkgviews documentation?
-8.3. Utilities for package management (pkgtools)
-8.4. How to use pkgsrc as non-root
-8.5. How to resume transfers when fetching distfiles?
-8.6. How can I install/use modular X.org from pkgsrc?
-8.7. How to fetch files from behind a firewall
-8.8. How do I tell make fetch to do passive FTP?
-8.9. How to fetch all distfiles at once
-8.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
-8.11. What does "Could not find bsd.own.mk" mean?
-8.12. Using 'sudo' with pkgsrc
-8.13. How do I change the location of configuration files?
-8.14. Automated security checks
-8.15. Why do some packages ignore my CFLAGS?
-8.16. A package does not build. What shall I do?
-8.17. What does "Makefile appears to contain unresolved cvs/rcs/??? merge
+9.1. Are there any mailing lists for pkg-related discussion?
+9.2. Where's the pkgviews documentation?
+9.3. Utilities for package management (pkgtools)
+9.4. How to use pkgsrc as non-root
+9.5. How to resume transfers when fetching distfiles?
+9.6. How can I install/use modular X.org from pkgsrc?
+9.7. How to fetch files from behind a firewall
+9.8. How do I tell make fetch to do passive FTP?
+9.9. How to fetch all distfiles at once
+9.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
+9.11. What does "Could not find bsd.own.mk" mean?
+9.12. Using 'sudo' with pkgsrc
+9.13. How do I change the location of configuration files?
+9.14. Automated security checks
+9.15. Why do some packages ignore my CFLAGS?
+9.16. A package does not build. What shall I do?
+9.17. What does "Makefile appears to contain unresolved cvs/rcs/??? merge
conflicts" mean?
This section contains hints, tips & tricks on special things in pkgsrc that we
didn't find a better place for in the previous chapters, and it contains items
for both pkgsrc users and developers.
-8.1. Are there any mailing lists for pkg-related discussion?
+9.1. Are there any mailing lists for pkg-related discussion?
The following mailing lists may be of interest to pkgsrc users:
@@ -2768,12 +2853,12 @@ To subscribe, do:
Archives for all these mailing lists are available from http://
mail-index.NetBSD.org/.
-8.2. Where's the pkgviews documentation?
+9.2. Where's the pkgviews documentation?
Pkgviews is tightly integrated with buildlink. You can find a pkgviews User's
guide in pkgsrc/mk/buildlink3/PKGVIEWS_UG.
-8.3. Utilities for package management (pkgtools)
+9.3. Utilities for package management (pkgtools)
The directory pkgsrc/pkgtools contains a number of useful utilities for both
users and developers of pkgsrc. This section attempts only to make the reader
@@ -2840,7 +2925,7 @@ Utilities for people maintaining pkgsrc (or: more obscure pkg utilities)
* pkgtools/libkver: Spoof kernel version for chrooted cross builds.
-8.4. How to use pkgsrc as non-root
+9.4. How to use pkgsrc as non-root
If you want to use pkgsrc as non-root user, you can set some variables to make
pkgsrc work under these conditions. At the very least, you need to set
@@ -2858,7 +2943,7 @@ choose and use multiple default directories under ~/pkg as the installation
targets. These directories can be overridden by the "--prefix" flag provided by
the script, as well as some others that allow finer tuning of the tree layout.
-8.5. How to resume transfers when fetching distfiles?
+9.5. How to resume transfers when fetching distfiles?
By default, resuming transfers in pkgsrc is disabled, but you can enable this
feature by adding the option PKG_RESUME_TRANSFERS=YES into mk.conf. If, during
@@ -2876,7 +2961,7 @@ FETCH_BEFORE_ARGS= --passive-ftp
FETCH_RESUME_ARGS= -c
FETCH_OUTPUT_ARGS= -O
-8.6. How can I install/use modular X.org from pkgsrc?
+9.6. How can I install/use modular X.org from pkgsrc?
If you want to use modular X.org from pkgsrc instead of your system's own X11
(/usr/X11R6, /usr/openwin, ...) you will have to add the following line into
@@ -2888,7 +2973,7 @@ Note
The DragonFly operating system defaults to using modular X.org from pkgsrc.
-8.7. How to fetch files from behind a firewall
+9.7. How to fetch files from behind a firewall
If you are sitting behind a firewall which does not allow direct connections to
Internet hosts (i.e. non-NAT), you may specify the relevant proxy hosts. This
@@ -2899,7 +2984,7 @@ the proxy port number. So the proxy environment variables are:
ftp_proxy=ftp://orpheus.amdahl.com:80/
http_proxy=http://orpheus.amdahl.com:80/
-8.8. How do I tell make fetch to do passive FTP?
+9.8. How do I tell make fetch to do passive FTP?
This depends on which utility is used to retrieve distfiles. From bsd.pkg.mk,
FETCH_CMD is assigned the first available command from the following list:
@@ -2916,7 +3001,7 @@ following to your mk.conf file: PASSIVE_FETCH=1.
Having that option present will prevent /usr/bin/ftp from falling back to
active transfers.
-8.9. How to fetch all distfiles at once
+9.9. How to fetch all distfiles at once
You would like to download all the distfiles in a single batch from work or
university, where you can't run a make fetch. There is an archive of distfiles
@@ -2951,7 +3036,7 @@ everything by running:
% make fetch NO_SKIP=yes
-8.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
+9.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
When compiling the pkgtools/pkg_install package, you get the error from make
that it doesn't know how to make /usr/share/tmac/tmac.andoc? This indicates
@@ -2961,7 +3046,7 @@ distribution on your machine. It is recommended to do that to format man pages.
In the case of the pkgtools/pkg_install package, you can get away with setting
NOMAN=YES either in the environment or in mk.conf.
-8.11. What does "Could not find bsd.own.mk" mean?
+9.11. What does "Could not find bsd.own.mk" mean?
You didn't install the compiler set, comp.tgz, when you installed your NetBSD
machine. Please get and install it, by extracting it in /:
@@ -2972,7 +3057,7 @@ machine. Please get and install it, by extracting it in /:
comp.tgz is part of every NetBSD release. Get the one that corresponds to your
release (determine via uname -r).
-8.12. Using 'sudo' with pkgsrc
+9.12. Using 'sudo' with pkgsrc
When installing packages as non-root user and using the just-in-time su(1)
feature of pkgsrc, it can become annoying to type in the root password for each
@@ -2985,7 +3070,7 @@ mk.conf, somewhere after the definition of the LOCALBASE variable:
SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c
.endif
-8.13. How do I change the location of configuration files?
+9.13. How do I change the location of configuration files?
As the system administrator, you can choose where configuration files are
installed. The default settings make all these files go into ${PREFIX}/etc or
@@ -3005,7 +3090,7 @@ of PKGBASE.
Note that after changing these settings, you must rebuild and reinstall any
affected packages.
-8.14. Automated security checks
+9.14. Automated security checks
Please be aware that there can often be bugs in third-party software, and some
of these bugs can leave a machine vulnerable to exploitation by attackers. In
@@ -3035,7 +3120,7 @@ If this package is installed, pkgsrc builds will use it to perform a security
check before building any package. See Section 5.2, "Variables affecting the
build process" for ways to control this check.
-8.15. Why do some packages ignore my CFLAGS?
+9.15. Why do some packages ignore my CFLAGS?
When you add your own preferences to the CFLAGS variable in your mk.conf, these
flags are passed in environment variables to the ./configure scripts and to
@@ -3049,7 +3134,7 @@ Usually you can remove these lines. But be aware that some "smart" programmers
write so bad code that it only works for the specific combination of CFLAGS
they have chosen.
-8.16. A package does not build. What shall I do?
+9.16. A package does not build. What shall I do?
1. Make sure that your copy of pkgsrc is consistent. A case that occurs often
is that people only update pkgsrc in parts, because of performance reasons.
@@ -3065,7 +3150,7 @@ they have chosen.
4. If the problem still exists, write a mail to the pkgsrc-users mailing list.
-8.17. What does "Makefile appears to contain unresolved cvs/rcs/??? merge
+9.17. What does "Makefile appears to contain unresolved cvs/rcs/??? merge
conflicts" mean?
You have modified a file from pkgsrc, and someone else has modified that same
@@ -3086,241 +3171,241 @@ more like a reference manual for pkgsrc.
Table of Contents
-9. Creating a new pkgsrc package from scratch
+10. Creating a new pkgsrc package from scratch
- 9.1. Common types of packages
+ 10.1. Common types of packages
- 9.1.1. Perl modules
- 9.1.2. KDE applications
+ 10.1.1. Perl modules
+ 10.1.2. KDE applications
- 9.2. Examples
+ 10.2. Examples
- 9.2.1. How the www/nvu package came into pkgsrc
+ 10.2.1. How the www/nvu package came into pkgsrc
-10. Package components - files, directories and contents
+11. Package components - files, directories and contents
- 10.1. Makefile
- 10.2. distinfo
- 10.3. patches/*
+ 11.1. Makefile
+ 11.2. distinfo
+ 11.3. patches/*
- 10.3.1. Structure of a single patch file
- 10.3.2. Creating patch files
- 10.3.3. Sources where the patch files come from
- 10.3.4. Patching guidelines
- 10.3.5. Feedback to the author
+ 11.3.1. Structure of a single patch file
+ 11.3.2. Creating patch files
+ 11.3.3. Sources where the patch files come from
+ 11.3.4. Patching guidelines
+ 11.3.5. Feedback to the author
- 10.4. Other mandatory files
- 10.5. Optional files
+ 11.4. Other mandatory files
+ 11.5. Optional files
- 10.5.1. Files affecting the binary package
- 10.5.2. Files affecting the build process
- 10.5.3. Files affecting nothing at all
+ 11.5.1. Files affecting the binary package
+ 11.5.2. Files affecting the build process
+ 11.5.3. Files affecting nothing at all
- 10.6. work*
- 10.7. files/*
+ 11.6. work*
+ 11.7. files/*
-11. Programming in Makefiles
+12. Programming in Makefiles
- 11.1. Caveats
- 11.2. Makefile variables
+ 12.1. Caveats
+ 12.2. Makefile variables
- 11.2.1. Naming conventions
+ 12.2.1. Naming conventions
- 11.3. Code snippets
+ 12.3. Code snippets
- 11.3.1. Adding things to a list
- 11.3.2. Converting an internal list into an external list
- 11.3.3. Passing variables to a shell command
- 11.3.4. Quoting guideline
- 11.3.5. Workaround for a bug in BSD Make
+ 12.3.1. Adding things to a list
+ 12.3.2. Converting an internal list into an external list
+ 12.3.3. Passing variables to a shell command
+ 12.3.4. Quoting guideline
+ 12.3.5. Workaround for a bug in BSD Make
-12. PLIST issues
+13. PLIST issues
- 12.1. RCS ID
- 12.2. Semi-automatic PLIST generation
- 12.3. Tweaking output of make print-PLIST
- 12.4. Variable substitution in PLIST
- 12.5. Man page compression
- 12.6. Changing PLIST source with PLIST_SRC
- 12.7. Platform-specific and differing PLISTs
- 12.8. Sharing directories between packages
+ 13.1. RCS ID
+ 13.2. Semi-automatic PLIST generation
+ 13.3. Tweaking output of make print-PLIST
+ 13.4. Variable substitution in PLIST
+ 13.5. Man page compression
+ 13.6. Changing PLIST source with PLIST_SRC
+ 13.7. Platform-specific and differing PLISTs
+ 13.8. Sharing directories between packages
-13. Buildlink methodology
+14. Buildlink methodology
- 13.1. Converting packages to use buildlink3
- 13.2. Writing buildlink3.mk files
+ 14.1. Converting packages to use buildlink3
+ 14.2. Writing buildlink3.mk files
- 13.2.1. Anatomy of a buildlink3.mk file
- 13.2.2. Updating BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files
+ 14.2.1. Anatomy of a buildlink3.mk file
+ 14.2.2. Updating BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files
- 13.3. Writing builtin.mk files
+ 14.3. Writing builtin.mk files
- 13.3.1. Anatomy of a builtin.mk file
- 13.3.2. Global preferences for native or pkgsrc software
+ 14.3.1. Anatomy of a builtin.mk file
+ 14.3.2. Global preferences for native or pkgsrc software
-14. The pkginstall framework
+15. The pkginstall framework
- 14.1. Files and directories outside the installation prefix
+ 15.1. Files and directories outside the installation prefix
- 14.1.1. Directory manipulation
- 14.1.2. File manipulation
+ 15.1.1. Directory manipulation
+ 15.1.2. File manipulation
- 14.2. Configuration files
+ 15.2. Configuration files
- 14.2.1. How PKG_SYSCONFDIR is set
- 14.2.2. Telling the software where configuration files are
- 14.2.3. Patching installations
- 14.2.4. Disabling handling of configuration files
+ 15.2.1. How PKG_SYSCONFDIR is set
+ 15.2.2. Telling the software where configuration files are
+ 15.2.3. Patching installations
+ 15.2.4. Disabling handling of configuration files
- 14.3. System startup scripts
+ 15.3. System startup scripts
- 14.3.1. Disabling handling of system startup scripts
+ 15.3.1. Disabling handling of system startup scripts
- 14.4. System users and groups
- 14.5. System shells
+ 15.4. System users and groups
+ 15.5. System shells
- 14.5.1. Disabling shell registration
+ 15.5.1. Disabling shell registration
- 14.6. Fonts
+ 15.6. Fonts
- 14.6.1. Disabling automatic update of the fonts databases
+ 15.6.1. Disabling automatic update of the fonts databases
-15. Options handling
+16. Options handling
- 15.1. Global default options
- 15.2. Converting packages to use bsd.options.mk
- 15.3. Option Names
+ 16.1. Global default options
+ 16.2. Converting packages to use bsd.options.mk
+ 16.3. Option Names
-16. The build process
+17. The build process
- 16.1. Introduction
- 16.2. Program location
- 16.3. Directories used during the build process
- 16.4. Running a phase
- 16.5. The fetch phase
+ 17.1. Introduction
+ 17.2. Program location
+ 17.3. Directories used during the build process
+ 17.4. Running a phase
+ 17.5. The fetch phase
- 16.5.1. What to fetch and where to get it from
- 16.5.2. How are the files fetched?
+ 17.5.1. What to fetch and where to get it from
+ 17.5.2. How are the files fetched?
- 16.6. The checksum phase
- 16.7. The extract phase
- 16.8. The patch phase
- 16.9. The tools phase
- 16.10. The wrapper phase
- 16.11. The configure phase
- 16.12. The build phase
- 16.13. The test phase
- 16.14. The install phase
- 16.15. The package phase
- 16.16. Cleaning up
- 16.17. Other helpful targets
+ 17.6. The checksum phase
+ 17.7. The extract phase
+ 17.8. The patch phase
+ 17.9. The tools phase
+ 17.10. The wrapper phase
+ 17.11. The configure phase
+ 17.12. The build phase
+ 17.13. The test phase
+ 17.14. The install phase
+ 17.15. The package phase
+ 17.16. Cleaning up
+ 17.17. Other helpful targets
-17. Tools needed for building or running
+18. Tools needed for building or running
- 17.1. Tools for pkgsrc builds
- 17.2. Tools needed by packages
- 17.3. Tools provided by platforms
- 17.4. Questions regarding the tools
+ 18.1. Tools for pkgsrc builds
+ 18.2. Tools needed by packages
+ 18.3. Tools provided by platforms
+ 18.4. Questions regarding the tools
-18. Making your package work
+19. Making your package work
- 18.1. General operation
+ 19.1. General operation
- 18.1.1. Portability of packages
- 18.1.2. How to pull in user-settable variables from mk.conf
- 18.1.3. User interaction
- 18.1.4. Handling licenses
- 18.1.5. Restricted packages
- 18.1.6. Handling dependencies
- 18.1.7. Handling conflicts with other packages
- 18.1.8. Packages that cannot or should not be built
- 18.1.9. Packages which should not be deleted, once installed
- 18.1.10. Handling packages with security problems
- 18.1.11. How to handle incrementing versions when fixing an existing
+ 19.1.1. Portability of packages
+ 19.1.2. How to pull in user-settable variables from mk.conf
+ 19.1.3. User interaction
+ 19.1.4. Handling licenses
+ 19.1.5. Restricted packages
+ 19.1.6. Handling dependencies
+ 19.1.7. Handling conflicts with other packages
+ 19.1.8. Packages that cannot or should not be built
+ 19.1.9. Packages which should not be deleted, once installed
+ 19.1.10. Handling packages with security problems
+ 19.1.11. How to handle incrementing versions when fixing an existing
package
- 18.1.12. Substituting variable text in the package files (the SUBST
+ 19.1.12. Substituting variable text in the package files (the SUBST
framework)
- 18.2. Fixing problems in the fetch phase
+ 19.2. Fixing problems in the fetch phase
- 18.2.1. Packages whose distfiles aren't available for plain downloading
- 18.2.2. How to handle modified distfiles with the 'old' name
+ 19.2.1. Packages whose distfiles aren't available for plain downloading
+ 19.2.2. How to handle modified distfiles with the 'old' name
- 18.3. Fixing problems in the configure phase
+ 19.3. Fixing problems in the configure phase
- 18.3.1. Shared libraries - libtool
- 18.3.2. Using libtool on GNU packages that already support libtool
- 18.3.3. GNU Autoconf/Automake
+ 19.3.1. Shared libraries - libtool
+ 19.3.2. Using libtool on GNU packages that already support libtool
+ 19.3.3. GNU Autoconf/Automake
- 18.4. Programming languages
+ 19.4. Programming languages
- 18.4.1. C, C++, and Fortran
- 18.4.2. Java
- 18.4.3. Packages containing perl scripts
- 18.4.4. Other programming languages
+ 19.4.1. C, C++, and Fortran
+ 19.4.2. Java
+ 19.4.3. Packages containing perl scripts
+ 19.4.4. Other programming languages
- 18.5. Fixing problems in the build phase
+ 19.5. Fixing problems in the build phase
- 18.5.1. Compiling C and C++ code conditionally
- 18.5.2. How to handle compiler bugs
- 18.5.3. Undefined reference to "..."
- 18.5.4. Running out of memory
+ 19.5.1. Compiling C and C++ code conditionally
+ 19.5.2. How to handle compiler bugs
+ 19.5.3. Undefined reference to "..."
+ 19.5.4. Running out of memory
- 18.6. Fixing problems in the install phase
+ 19.6. Fixing problems in the install phase
- 18.6.1. Creating needed directories
- 18.6.2. Where to install documentation
- 18.6.3. Installing highscore files
- 18.6.4. Adding DESTDIR support to packages
- 18.6.5. Packages with hardcoded paths to other interpreters
- 18.6.6. Packages installing perl modules
- 18.6.7. Packages installing info files
- 18.6.8. Packages installing man pages
- 18.6.9. Packages installing GConf2 data files
- 18.6.10. Packages installing scrollkeeper data files
- 18.6.11. Packages installing X11 fonts
- 18.6.12. Packages installing GTK2 modules
- 18.6.13. Packages installing SGML or XML data
- 18.6.14. Packages installing extensions to the MIME database
- 18.6.15. Packages using intltool
- 18.6.16. Packages installing startup scripts
- 18.6.17. Packages installing TeX modules
- 18.6.18. Packages supporting running binaries in emulation
- 18.6.19. Packages installing hicolor theme icons
- 18.6.20. Packages installing desktop files
+ 19.6.1. Creating needed directories
+ 19.6.2. Where to install documentation
+ 19.6.3. Installing highscore files
+ 19.6.4. Adding DESTDIR support to packages
+ 19.6.5. Packages with hardcoded paths to other interpreters
+ 19.6.6. Packages installing perl modules
+ 19.6.7. Packages installing info files
+ 19.6.8. Packages installing man pages
+ 19.6.9. Packages installing GConf2 data files
+ 19.6.10. Packages installing scrollkeeper data files
+ 19.6.11. Packages installing X11 fonts
+ 19.6.12. Packages installing GTK2 modules
+ 19.6.13. Packages installing SGML or XML data
+ 19.6.14. Packages installing extensions to the MIME database
+ 19.6.15. Packages using intltool
+ 19.6.16. Packages installing startup scripts
+ 19.6.17. Packages installing TeX modules
+ 19.6.18. Packages supporting running binaries in emulation
+ 19.6.19. Packages installing hicolor theme icons
+ 19.6.20. Packages installing desktop files
- 18.7. Marking packages as having problems
+ 19.7. Marking packages as having problems
-19. Debugging
-20. Submitting and Committing
+20. Debugging
+21. Submitting and Committing
- 20.1. Submitting binary packages
- 20.2. Submitting source packages (for non-NetBSD-developers)
- 20.3. General notes when adding, updating, or removing packages
- 20.4. Committing: Importing a package into CVS
- 20.5. Updating a package to a newer version
- 20.6. Moving a package in pkgsrc
+ 21.1. Submitting binary packages
+ 21.2. Submitting source packages (for non-NetBSD-developers)
+ 21.3. General notes when adding, updating, or removing packages
+ 21.4. Committing: Importing a package into CVS
+ 21.5. Updating a package to a newer version
+ 21.6. Moving a package in pkgsrc
-21. Frequently Asked Questions
-22. GNOME packaging and porting
+22. Frequently Asked Questions
+23. GNOME packaging and porting
- 22.1. Meta packages
- 22.2. Packaging a GNOME application
- 22.3. Updating GNOME to a newer version
- 22.4. Patching guidelines
+ 23.1. Meta packages
+ 23.2. Packaging a GNOME application
+ 23.3. Updating GNOME to a newer version
+ 23.4. Patching guidelines
-Chapter 9. Creating a new pkgsrc package from scratch
+Chapter 10. Creating a new pkgsrc package from scratch
Table of Contents
-9.1. Common types of packages
+10.1. Common types of packages
- 9.1.1. Perl modules
- 9.1.2. KDE applications
+ 10.1.1. Perl modules
+ 10.1.2. KDE applications
-9.2. Examples
+10.2. Examples
- 9.2.1. How the www/nvu package came into pkgsrc
+ 10.2.1. How the www/nvu package came into pkgsrc
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
@@ -3367,7 +3452,7 @@ package involves only a few steps.
pkglint --explain or pkglint -e, which outputs additional explanations.
6. In many cases the package is not yet ready to build. You can find
- instructions for the most common cases in the next section, Section 9.1,
+ instructions for the most common cases in the next section, Section 10.1,
"Common types of packages". After you have followed the instructions over
there, you can hopefully continue here.
@@ -3377,7 +3462,7 @@ package involves only a few steps.
edited the Makefile.
8. Now, run bmake to build the package. For the various things that can go
- wrong in this phase, consult Chapter 18, Making your package work.
+ wrong in this phase, consult Chapter 19, Making your package work.
9. When the package builds fine, the next step is to install the package. Run
bmake install and hope that everything works.
@@ -3397,23 +3482,23 @@ package involves only a few steps.
13. Run bmake package to create a binary package from the set of installed
files.
-9.1. Common types of packages
+10.1. Common types of packages
-9.1.1. Perl modules
+10.1.1. Perl modules
Simple Perl modules are handled automatically by url2pkg, including
dependencies.
-9.1.2. KDE applications
+10.1.2. KDE applications
KDE applications should always include meta-pkgs/kde3/kde3.mk, which contains
numerous settings that are typical of KDE packages.
-9.2. Examples
+10.2. Examples
-9.2.1. How the www/nvu package came into pkgsrc
+10.2.1. How the www/nvu package came into pkgsrc
-9.2.1.1. The initial package
+10.2.1.1. The initial package
Looking at the file pkgsrc/doc/TODO, I saw that the "nvu" package has not yet
been imported into pkgsrc. As the description says it has to do with the web,
@@ -3470,7 +3555,7 @@ Remember to correct CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done!
Good luck! (See pkgsrc/doc/pkgsrc.txt for some more help :-)
-9.2.1.2. Fixing all kinds of problems to make the package work
+10.2.1.2. Fixing all kinds of problems to make the package work
Now that the package has been extracted, let's see what's inside it. The
package has a README.txt, but that only says something about mozilla, so it's
@@ -3593,7 +3678,7 @@ looked up in www/seamonkey which patch files were relevant for this issue and
copied them to the patches directory. Then I retried, fixed the patches so that
they applied cleanly and retried again. This time, everything worked.
-9.2.1.3. Installing the package
+10.2.1.3. Installing the package
$ bmake CHECK_FILES=no install
[...]
@@ -3601,34 +3686,34 @@ $ bmake print-PLIST >PLIST
$ bmake deinstall
$ bmake install
-Chapter 10. Package components - files, directories and contents
+Chapter 11. Package components - files, directories and contents
Table of Contents
-10.1. Makefile
-10.2. distinfo
-10.3. patches/*
+11.1. Makefile
+11.2. distinfo
+11.3. patches/*
- 10.3.1. Structure of a single patch file
- 10.3.2. Creating patch files
- 10.3.3. Sources where the patch files come from
- 10.3.4. Patching guidelines
- 10.3.5. Feedback to the author
+ 11.3.1. Structure of a single patch file
+ 11.3.2. Creating patch files
+ 11.3.3. Sources where the patch files come from
+ 11.3.4. Patching guidelines
+ 11.3.5. Feedback to the author
-10.4. Other mandatory files
-10.5. Optional files
+11.4. Other mandatory files
+11.5. Optional files
- 10.5.1. Files affecting the binary package
- 10.5.2. Files affecting the build process
- 10.5.3. Files affecting nothing at all
+ 11.5.1. Files affecting the binary package
+ 11.5.2. Files affecting the build process
+ 11.5.3. Files affecting nothing at all
-10.6. work*
-10.7. files/*
+11.6. work*
+11.7. files/*
Whenever you're preparing a package, there are a number of files involved which
are described in the following sections.
-10.1. Makefile
+11.1. Makefile
Building, installation and creation of a binary package are all controlled by
the package's Makefile. The Makefile describes various things about a package,
@@ -3672,7 +3757,7 @@ mostly historical and has no further meaning.
converters games mbone print x11
* MASTER_SITES, DYNAMIC_MASTER_SITES, DIST_SUBDIR, EXTRACT_SUFX and DISTFILES
- are discussed in detail in Section 16.5, "The fetch phase".
+ are discussed in detail in Section 17.5, "The fetch phase".
The second section contains information about separately downloaded patches, if
any.
@@ -3732,10 +3817,10 @@ Please pay attention to the following gotchas:
* Replace /usr/local with "${PREFIX}" in all files (see patches, below).
- * If the package installs any info files, see Section 18.6.7, "Packages
+ * If the package installs any info files, see Section 19.6.7, "Packages
installing info files".
-10.2. distinfo
+11.2. distinfo
The distinfo file contains the message digest, or checksum, of each distfile
needed for the package. This ensures that the distfiles retrieved from the
@@ -3745,7 +3830,7 @@ algorithms, all distfiles are protected using both SHA1 and RMD160 message
digests, as well as the file size.
The distinfo file also contains the checksums for all the patches found in the
-patches directory (see Section 10.3, "patches/*").
+patches directory (see Section 11.3, "patches/*").
To regenerate the distinfo file, use the make makedistinfo or make mdi command.
@@ -3754,7 +3839,7 @@ example www/navigator). These are kept in the same distinfo file and care
should be taken when upgrading such a package to ensure distfile information is
not lost.
-10.3. patches/*
+11.3. patches/*
Many packages still don't work out-of-the box on the various platforms that are
supported by pkgsrc. Therefore, a number of custom patch files are needed to
@@ -3764,7 +3849,7 @@ In the patch phase, these patches are applied to the files in WRKSRC directory
after extracting them, in alphabetic order, so patch-aa is applied before
patch-ab, etc.
-10.3.1. Structure of a single patch file
+11.3.1. Structure of a single patch file
The patch-* files should be in diff -bu format, and apply without a fuzz to
avoid problems. (To force patches to apply with fuzz you can set
@@ -3791,7 +3876,7 @@ knows the code of the application can make some use of the patch. Special care
should be taken for the upstream developers, since we generally want that they
accept our patches, so we have less work in the future.
-10.3.2. Creating patch files
+11.3.2. Creating patch files
One important thing to mention is to pay attention that no RCS IDs get stored
in the patch files, as these will cause problems when later checked into the
@@ -3807,7 +3892,7 @@ patchdiff. Copy the patches you want to use or update from the work/.newpatches
directory to patches/.
When you have finished a package, remember to generate the checksums for the
-patch files by using the make makepatchsum command, see Section 10.2,
+patch files by using the make makepatchsum command, see Section 11.2,
"distinfo".
When adding a patch that corrects a problem in the distfile (rather than e.g.
@@ -3817,7 +3902,7 @@ usually makes it possible to remove the patch in future version.
The file names of the patch files are usually of the form patch-[a-z][a-z].
-10.3.3. Sources where the patch files come from
+11.3.3. Sources where the patch files come from
If you want to share patches between multiple packages in pkgsrc, e.g. because
they use the same distfiles, set PATCHDIR to the path where the patch files can
@@ -3837,7 +3922,7 @@ for pkgsrc/graphics/png, keep it in $LOCALPATCHES/graphics/png/mypatch. All
files in the named directory are expected to be patch files, and they are
applied after pkgsrc patches are applied.
-10.3.4. Patching guidelines
+11.3.4. Patching guidelines
When fixing a portability issue in the code do not use preprocessor magic to
check for the current operating system nor platform. Doing so hurts portability
@@ -3861,7 +3946,7 @@ doesn't work unless it is right!
Some typical examples:
-Table 10.1. Patching examples
+Table 11.1. Patching examples
+-------------------------------------------------------------------------------------------+
| Where | Incorrect | Correct |
@@ -3893,7 +3978,7 @@ For more information, please read the Making packager-friendly software article
to package; all the suggestions in it were collected from our experience in
pkgsrc work, so they are possibly helpful when creating patches too.
-10.3.5. Feedback to the author
+11.3.5. Feedback to the author
Always, always, always feed back any portability fixes or improvements you do
to a package to the mainstream developers. This is the only way to get their
@@ -3910,7 +3995,7 @@ much hassle.
Support the idea of free software!
-10.4. Other mandatory files
+11.4. Other mandatory files
DESCR
@@ -3924,12 +4009,12 @@ PLIST
This file governs the files that are installed on your system: all the
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 Chapter 12, PLIST issues for more
+ and the location of inserted files. See Chapter 13, PLIST issues for more
information.
-10.5. Optional files
+11.5. Optional files
-10.5.1. Files affecting the binary package
+11.5.1. Files affecting the binary package
INSTALL
@@ -3937,7 +4022,7 @@ INSTALL
extraction and before files are moved in place, the second time after the
files to install are moved in place. This can be used to do any custom
procedures not possible with @exec commands in PLIST. See pkg_add(1) and
- pkg_create(1) for more information. See also Section 14.1, "Files and
+ pkg_create(1) for more information. See also Section 15.1, "Files and
directories outside the installation prefix".
DEINSTALL
@@ -3969,7 +4054,7 @@ ALTERNATIVES
FIXME: There is no documentation on the alternatives framework.
-10.5.2. Files affecting the build process
+11.5.2. Files affecting the build process
Makefile.common
@@ -3982,7 +4067,7 @@ Makefile.common
buildlink3.mk
This file contains the dependency information for the buildlink3 framework
- (see Chapter 13, Buildlink methodology).
+ (see Chapter 14, Buildlink methodology).
hacks.mk
@@ -3993,11 +4078,11 @@ hacks.mk
options.mk
This file contains the code for the package-specific options (see
- Chapter 15, Options handling) that can be selected by the user. If a
+ Chapter 16, Options handling) that can be selected by the user. If a
package has only one or two options, it is equally acceptable to put the
code directly into the Makefile.
-10.5.3. Files affecting nothing at all
+11.5.3. Files affecting nothing at all
README*
@@ -4009,7 +4094,7 @@ TODO
This file contains things that need to be done to make the package even
better.
-10.6. work*
+11.6. work*
When you type make, the distribution files are unpacked into the directory
denoted by WRKDIR. It can be removed by running make clean. Besides the
@@ -4017,7 +4102,7 @@ sources, this directory is also used to keep various timestamp files. The
directory gets removed completely on clean. The default is ${.CURDIR}/work or $
{.CURDIR}/work.${MACHINE_ARCH} if OBJMACHINE is set.
-10.7. files/*
+11.7. files/*
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 ${CP}
@@ -4030,22 +4115,22 @@ variable to point to the other package's files directory, e.g.:
FILESDIR=${.CURDIR}/../xemacs/files
-Chapter 11. Programming in Makefiles
+Chapter 12. Programming in Makefiles
Table of Contents
-11.1. Caveats
-11.2. Makefile variables
+12.1. Caveats
+12.2. Makefile variables
- 11.2.1. Naming conventions
+ 12.2.1. Naming conventions
-11.3. Code snippets
+12.3. Code snippets
- 11.3.1. Adding things to a list
- 11.3.2. Converting an internal list into an external list
- 11.3.3. Passing variables to a shell command
- 11.3.4. Quoting guideline
- 11.3.5. Workaround for a bug in BSD Make
+ 12.3.1. Adding things to a list
+ 12.3.2. Converting an internal list into an external list
+ 12.3.3. Passing variables to a shell command
+ 12.3.4. Quoting guideline
+ 12.3.5. Workaround for a bug in BSD Make
Pkgsrc consists of many Makefile fragments, each of which forms a well-defined
part of the pkgsrc system. Using the make(1) system as a programming language
@@ -4061,7 +4146,7 @@ used.
This chapter describes some patterns, that appear quite often in Makefiles,
including the pitfalls that come along with them.
-11.1. Caveats
+12.1. Caveats
* When you are creating a file as a target of a rule, always write the data
to a temporary file first and finally rename that file. Otherwise there
@@ -4089,7 +4174,7 @@ including the pitfalls that come along with them.
pressing ^C. This does not happen when one of the commands fails (like
false(1) above).
-11.2. Makefile variables
+12.2. Makefile variables
Makefile variables contain strings that can be processed using the five
operators ``='', ``+='', ``?='', ``:='', and ``!='', which are described in the
@@ -4140,7 +4225,7 @@ Strings and two types of lists.
elements can contain any characters, including whitespace. That's why they
cannot be used in .for loops. Examples are DISTFILES and MASTER_SITES.
-11.2.1. Naming conventions
+12.2.1. Naming conventions
* All variable names starting with an underscore are reserved for use by the
pkgsrc infrastructure. They shall not be used by package Makefiles.
@@ -4151,13 +4236,13 @@ Strings and two types of lists.
* All list variables should have a ``plural'' name, e.g. PKG_OPTIONS or
DISTFILES.
-11.3. Code snippets
+12.3. Code snippets
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.
-11.3.1. Adding things to a list
+12.3.1. Adding things to a list
STRING= foo * bar `date`
INT_LIST= # empty
@@ -4175,7 +4260,7 @@ all other cases, you must not add a quoting level. You must not merge internal
and external lists, unless you are sure that all entries are correctly
interpreted in both lists.
-11.3.2. Converting an internal list into an external list
+12.3.2. Converting an internal list into an external list
EXT_LIST= # empty
.for i in ${INT_LIST}
@@ -4186,7 +4271,7 @@ This code converts the internal list INT_LIST into the external list EXT_LIST.
As the elements of an internal list are unquoted they must be quoted here. The
reason for appending "" is explained below.
-11.3.3. Passing variables to a shell command
+12.3.3. Passing variables to a shell command
Sometimes you may want to print an arbitrary string. There are many ways to get
it wrong and only few that can handle every nastiness.
@@ -4228,7 +4313,7 @@ done when adding elements to the list.
As internal lists shall not be passed to the shell, there is no example for it.
-11.3.4. Quoting guideline
+12.3.4. Quoting guideline
There are many possible sources of wrongly quoted variables. This section lists
some of the commonly known ones.
@@ -4293,7 +4378,7 @@ some of the commonly known ones.
line the arguments of the echo(1) command from the first line. To avoid
this, write ${i:Q}"".
-11.3.5. Workaround for a bug in BSD Make
+12.3.5. Workaround for a bug in BSD Make
The pkgsrc bmake program does not handle the following assignment correctly. In
case _othervar_ contains a ``-'' character, one of the closing braces is
@@ -4304,18 +4389,18 @@ VAR:= ${VAR:N${_othervar_:C/-//}}
For a more complex code snippet and a workaround, see the package regress/
make-quoting, testcase bug1.
-Chapter 12. PLIST issues
+Chapter 13. PLIST issues
Table of Contents
-12.1. RCS ID
-12.2. Semi-automatic PLIST generation
-12.3. Tweaking output of make print-PLIST
-12.4. Variable substitution in PLIST
-12.5. Man page compression
-12.6. Changing PLIST source with PLIST_SRC
-12.7. Platform-specific and differing PLISTs
-12.8. Sharing directories between packages
+13.1. RCS ID
+13.2. Semi-automatic PLIST generation
+13.3. Tweaking output of make print-PLIST
+13.4. Variable substitution in PLIST
+13.5. Man page compression
+13.6. Changing PLIST source with PLIST_SRC
+13.7. Platform-specific and differing PLISTs
+13.8. Sharing directories between packages
The PLIST file contains a package's "packing list", i.e. a list of files that
belong to the package (relative to the ${PREFIX} directory it's been installed
@@ -4323,22 +4408,22 @@ in) plus some additional statements - see the pkg_create(1) man page for a full
list. This chapter addresses some issues that need attention when dealing with
the PLIST file (or files, see below!).
-12.1. RCS ID
+13.1. RCS ID
Be sure to add a RCS ID line as the first thing in any PLIST file you write:
@comment $NetBSD$
-12.2. Semi-automatic PLIST generation
+13.2. Semi-automatic PLIST generation
You can use the make print-PLIST command to output a PLIST that matches any new
-files since the package was extracted. See Section 16.17, "Other helpful
+files since the package was extracted. See Section 17.17, "Other helpful
targets" for more information on this target.
-12.3. Tweaking output of make print-PLIST
+13.3. Tweaking output of make print-PLIST
-If you have used any of the *-dirs packages, as explained in Section 12.8,
+If you have used any of the *-dirs packages, as explained in Section 13.8,
"Sharing directories between packages", you may have noticed that make
print-PLIST outputs a set of @comments instead of real @dirrm lines. You can
also do this for specific directories and files, so that the results of that
@@ -4361,7 +4446,7 @@ converted to @comments:
PRINT_PLIST_AWK+= /^@dirrm share\/specific/ { print "@comment " $$0; next; }
-12.4. Variable substitution in PLIST
+13.4. Variable substitution in PLIST
A number of variables are substituted automatically in PLISTs when a package is
installed on a system. This includes the following variables:
@@ -4397,14 +4482,14 @@ bsd.pkg.mk (and search for PLIST_SUBST).
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
-MESSAGE_SUBST (see Section 10.5, "Optional files"):
+MESSAGE_SUBST (see Section 11.5, "Optional files"):
PLIST_SUBST+= SOMEVAR="somevalue"
This replaces all occurrences of "${SOMEVAR}" in the PLIST with "somevalue".
-12.5. Man page compression
+13.5. Man page compression
Man pages should be installed in compressed form if MANZ is set (in
bsd.own.mk), and uncompressed otherwise. To handle this in the PLIST file, the
@@ -4412,14 +4497,14 @@ suffix ".gz" is appended/removed automatically for man pages according to MANZ
and MANCOMPRESSED being set or not, see above for details. This modification of
the PLIST file is done on a copy of it, not PLIST itself.
-12.6. Changing PLIST source with PLIST_SRC
+13.6. Changing PLIST source with PLIST_SRC
To use one or more files as source for the PLIST used in generating the binary
package, set the variable PLIST_SRC to the names of that file(s). The files are
later concatenated using cat(1), and the order of things is important. The
default for PLIST_SRC is ${PKGDIR}/PLIST.
-12.7. Platform-specific and differing PLISTs
+13.7. Platform-specific and differing PLISTs
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
@@ -4435,7 +4520,7 @@ following files:
* PLIST.common_end
-12.8. Sharing directories between packages
+13.8. Sharing directories between packages
A "shared directory" is a directory where multiple (and unrelated) packages
install files. These directories are problematic because you have to add
@@ -4485,20 +4570,20 @@ Note that even if your package is using $X11BASE, it must not depend on the
*-x11-dirs packages. Just specify the name without that part and pkgsrc (in
particular, mk/dirs.mk) will take care of it.
-Chapter 13. Buildlink methodology
+Chapter 14. Buildlink methodology
Table of Contents
-13.1. Converting packages to use buildlink3
-13.2. Writing buildlink3.mk files
+14.1. Converting packages to use buildlink3
+14.2. Writing buildlink3.mk files
- 13.2.1. Anatomy of a buildlink3.mk file
- 13.2.2. Updating BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files
+ 14.2.1. Anatomy of a buildlink3.mk file
+ 14.2.2. Updating BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files
-13.3. Writing builtin.mk files
+14.3. Writing builtin.mk files
- 13.3.1. Anatomy of a builtin.mk file
- 13.3.2. Global preferences for native or pkgsrc software
+ 14.3.1. Anatomy of a builtin.mk file
+ 14.3.2. Global preferences for native or pkgsrc software
Buildlink is a framework in pkgsrc that controls what headers and libraries are
seen by a package's configure and build processes. This is implemented in a two
@@ -4519,7 +4604,7 @@ note that the normal system header and library paths, e.g. /usr/include, /usr/
lib, etc., are always searched -- buildlink3 is designed to insulate the
package build from non-system-supplied software.
-13.1. Converting packages to use buildlink3
+14.1. Converting packages to use buildlink3
The process of converting packages to use the buildlink3 framework
("bl3ifying") is fairly straightforward. The things to keep in mind are:
@@ -4585,7 +4670,7 @@ issues:
The comments in those buildlink3.mk files provide a more complete description
of how to use them properly.
-13.2. Writing buildlink3.mk files
+14.2. Writing buildlink3.mk files
A package's buildlink3.mk file is included by Makefiles to indicate the need to
compile and link against header files and libraries provided by the package. A
@@ -4601,7 +4686,7 @@ following command will generate a good starting point for buildlink3.mk files:
% createbuildlink >buildlink3.mk
-13.2.1. Anatomy of a buildlink3.mk file
+14.2.1. Anatomy of a buildlink3.mk file
The following real-life example buildlink3.mk is taken from pkgsrc/graphics/
tiff:
@@ -4695,7 +4780,7 @@ dependencies. Including these buildlink3.mk files means that the headers and
libraries for these dependencies are also symlinked into ${BUILDLINK_DIR}
whenever the pkg buildlink3.mk file is included.
-13.2.2. Updating BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files
+14.2.2. Updating BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files
The situation that requires increasing the dependency listed in
BUILDLINK_API_DEPENDS.pkg after a package update is when the API or interface
@@ -4714,7 +4799,7 @@ change. This is needed so that binary packages made using it will require the
correct package dependency and not settle for an older one which will not
contain the necessary shared libraries.
-See Section 18.1.6, "Handling dependencies" for more information about
+See Section 19.1.6, "Handling dependencies" for more information about
dependencies on other packages, including the BUILDLINK_ABI_DEPENDS and
ABI_DEPENDS definitions.
@@ -4726,7 +4811,7 @@ dependencies.
Also it is not needed to set BUILDLINK_ABI_DEPENDS.pkg when it is identical to
BUILDLINK_API_DEPENDS.pkg.
-13.3. Writing builtin.mk files
+14.3. Writing builtin.mk files
Some packages in pkgsrc install headers and libraries that coincide with
headers and libraries present in the base system. Aside from a buildlink3.mk
@@ -4744,7 +4829,7 @@ The only requirements of a builtin.mk file for pkg are:
3. It should be written to allow multiple inclusion. This is very important
and takes careful attention to Makefile coding.
-13.3.1. Anatomy of a builtin.mk file
+14.3.1. Anatomy of a builtin.mk file
The following is the recommended template for builtin.mk files:
@@ -4809,7 +4894,7 @@ the value of USE_BUILTIN.pkg set in the previous section. This typically
includes, e.g., adding additional dependency restrictions and listing
additional files to symlink into ${BUILDLINK_DIR} (via BUILDLINK_FILES.pkg).
-13.3.2. Global preferences for native or pkgsrc software
+14.3.2. Global preferences for native or pkgsrc software
When building packages, it's possible to choose whether to set a global
preference for using either the built-in (native) version or the pkgsrc version
@@ -4829,34 +4914,34 @@ PREFER_NATIVE= getopt skey tcp_wrappers
A package must have a builtin.mk file to be listed in PREFER_NATIVE, otherwise
it is simply ignored in that list.
-Chapter 14. The pkginstall framework
+Chapter 15. The pkginstall framework
Table of Contents
-14.1. Files and directories outside the installation prefix
+15.1. Files and directories outside the installation prefix
- 14.1.1. Directory manipulation
- 14.1.2. File manipulation
+ 15.1.1. Directory manipulation
+ 15.1.2. File manipulation
-14.2. Configuration files
+15.2. Configuration files
- 14.2.1. How PKG_SYSCONFDIR is set
- 14.2.2. Telling the software where configuration files are
- 14.2.3. Patching installations
- 14.2.4. Disabling handling of configuration files
+ 15.2.1. How PKG_SYSCONFDIR is set
+ 15.2.2. Telling the software where configuration files are
+ 15.2.3. Patching installations
+ 15.2.4. Disabling handling of configuration files
-14.3. System startup scripts
+15.3. System startup scripts
- 14.3.1. Disabling handling of system startup scripts
+ 15.3.1. Disabling handling of system startup scripts
-14.4. System users and groups
-14.5. System shells
+15.4. System users and groups
+15.5. System shells
- 14.5.1. Disabling shell registration
+ 15.5.1. Disabling shell registration
-14.6. Fonts
+15.6. Fonts
- 14.6.1. Disabling automatic update of the fonts databases
+ 15.6.1. Disabling automatic update of the fonts databases
This chapter describes the framework known as pkginstall, whose key features
are:
@@ -4885,7 +4970,7 @@ itself could be unavailable). Therefore, the only way to achieve any of the
items described above is by means of the installation scripts, which are
automatically generated by pkginstall.
-14.1. Files and directories outside the installation prefix
+15.1. Files and directories outside the installation prefix
As you already know, the PLIST file holds a list of files and directories that
belong to a package. The names used in it are relative to the installation
@@ -4914,7 +4999,7 @@ scripts to abstract the manipulation of such files and directories based on
variables set in the package's Makefile. The rest of this section describes
these variables.
-14.1.1. Directory manipulation
+15.1.1. Directory manipulation
The following variables can be set to request the creation of directories
anywhere in the file system:
@@ -4936,7 +5021,7 @@ anywhere in the file system:
The difference between the two is exactly the same as their non-PERMS
counterparts.
-14.1.2. File manipulation
+15.1.2. File manipulation
Creating non-empty files outside the installation prefix is tricky because the
PLIST forces all files to be inside it. To overcome this problem, the only
@@ -4966,7 +5051,7 @@ handle files outside the installation prefix:
The difference between the two is exactly the same as their non-PERMS
counterparts.
-14.2. Configuration files
+15.2. Configuration files
Configuration files are special in the sense that they are installed in their
own specific directory, PKG_SYSCONFDIR, and need special treatment during
@@ -4977,7 +5062,7 @@ if and only if they didn't exist before. Similarly, they will not be removed if
they have local modifications. This ensures that administrators never lose any
custom changes they may have made.
-14.2.1. How PKG_SYSCONFDIR is set
+15.2.1. How PKG_SYSCONFDIR is set
As said before, the PKG_SYSCONFDIR variable specifies where configuration files
shall be installed. Its contents are set based upon the following variables:
@@ -5017,9 +5102,9 @@ basically the following:
3. Otherwise, it is set to ${PKG_SYSCONFBASE}.
It is worth mentioning that ${PKG_SYSCONFDIR} is automatically added to
-OWN_DIRS. See Section 14.1.1, "Directory manipulation" what this means.
+OWN_DIRS. See Section 15.1.1, "Directory manipulation" what this means.
-14.2.2. Telling the software where configuration files are
+15.2.2. Telling the software where configuration files are
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
@@ -5033,7 +5118,7 @@ Note that this specifies where the package has to look for its configuration
files, not where they will be originally installed (although the difference is
never explicit, unfortunately).
-14.2.3. Patching installations
+15.2.3. Patching installations
As said before, pkginstall automatically handles configuration files. This
means that the packages themselves must not touch the contents of $
@@ -5050,7 +5135,7 @@ Once the required configuration files are in place (i.e., under the examples
hierarchy), the pkginstall framework can use them as master copies during the
package installation to update what is in ${PKG_SYSCONFDIR}. To achieve this,
the variables CONF_FILES and CONF_FILES_PERMS are used. Check out
-Section 14.1.2, "File manipulation" for information about their syntax and
+Section 15.1.2, "File manipulation" for information about their syntax and
their purpose. Here is an example, taken from the mail/mutt package:
EGDIR= ${PREFIX}/share/doc/mutt/samples
@@ -5059,16 +5144,16 @@ CONF_FILES= ${EGDIR}/Muttrc ${PKG_SYSCONFDIR}/Muttrc
Note that the EGDIR variable is specific to that package and has no meaning
outside it.
-14.2.4. Disabling handling of configuration files
+15.2.4. Disabling handling of configuration files
The automatic copying of config files can be toggled by setting the environment
variable PKG_CONFIG prior to package installation.
-14.3. System startup scripts
+15.3. System startup scripts
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 Section 14.1, "Files and directories
+Therefore, the same rules described in Section 15.1, "Files and directories
outside the installation prefix" apply, and the same solutions can be used.
However, pkginstall provides a special mechanism to handle these files.
@@ -5096,14 +5181,14 @@ automated fashion:
3. Add code to the installation scripts to copy the startup script from the
examples hierarchy into the system-wide startup scripts directory.
-14.3.1. Disabling handling of system startup scripts
+15.3.1. Disabling handling of system startup scripts
The automatic copying of config files can be toggled by setting the environment
variable PKG_RCD_SCRIPTS prior to package installation. Note that the scripts
will be always copied inside the examples hierarchy, ${PREFIX}/share/examples/
rc.d/, no matter what the value of this variable is.
-14.4. System users and groups
+15.4. System users and groups
If a package needs to create special users and/or groups during installation,
it can do so by using the pkginstall framework.
@@ -5132,7 +5217,7 @@ before which the users and groups are created. In this case, the numeric UIDs
and GIDs of the created users and groups are automatically hardcoded into the
final installation scripts.
-14.5. System shells
+15.5. System shells
Packages that install system shells should register them in the shell database,
/etc/shells, to make things easier to the administrator. This must be done from
@@ -5146,12 +5231,12 @@ shells/zsh:
PKG_SHELL= ${PREFIX}/bin/zsh
-14.5.1. Disabling shell registration
+15.5.1. Disabling shell registration
The automatic registration of shell interpreters can be disabled by the
administrator by setting the PKG_REGISTER_SHELLS environment variable to NO.
-14.6. Fonts
+15.6. Fonts
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
@@ -5167,18 +5252,18 @@ example, taken from fonts/dbz-ttf:
FONTS_DIRS.ttf= ${PREFIX}/lib/X11/fonts/TTF
-14.6.1. Disabling automatic update of the fonts databases
+15.6.1. Disabling automatic update of the fonts databases
The automatic update of fonts databases can be disabled by the administrator by
setting the PKG_UPDATE_FONTS_DB environment variable to NO.
-Chapter 15. Options handling
+Chapter 16. Options handling
Table of Contents
-15.1. Global default options
-15.2. Converting packages to use bsd.options.mk
-15.3. Option Names
+16.1. Global default options
+16.2. Converting packages to use bsd.options.mk
+16.3. Option Names
Many packages have the ability to be built to support different sets of
features. bsd.options.mk is a framework in pkgsrc that provides generic
@@ -5187,13 +5272,13 @@ can be built. It's possible for the user to specify exactly which sets of
options will be built into a package or to allow a set of global default
options apply.
-15.1. Global default options
+16.1. Global default options
Global default options are listed in PKG_DEFAULT_OPTIONS, which is a list of
the options that should be built into every package if that option is
supported. This variable should be set in mk.conf.
-15.2. Converting packages to use bsd.options.mk
+16.2. Converting packages to use bsd.options.mk
The following example shows how bsd.options.mk should be used by the
hypothetical ``wibble'' package, either in the package Makefile, or in a file,
@@ -5311,7 +5396,7 @@ PKG_OPTIONS:
.if !empty(PKG_OPTIONS:Moption)
-15.3. Option Names
+16.3. Option Names
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
@@ -5332,33 +5417,33 @@ description. The description should be a whole sentence (starting with an
uppercase letter and ending with a period) that describes what enabling the
option does. E. g. "Enable ispell support." The file is sorted by option names.
-Chapter 16. The build process
+Chapter 17. The build process
Table of Contents
-16.1. Introduction
-16.2. Program location
-16.3. Directories used during the build process
-16.4. Running a phase
-16.5. The fetch phase
-
- 16.5.1. What to fetch and where to get it from
- 16.5.2. How are the files fetched?
-
-16.6. The checksum phase
-16.7. The extract phase
-16.8. The patch phase
-16.9. The tools phase
-16.10. The wrapper phase
-16.11. The configure phase
-16.12. The build phase
-16.13. The test phase
-16.14. The install phase
-16.15. The package phase
-16.16. Cleaning up
-16.17. Other helpful targets
-
-16.1. Introduction
+17.1. Introduction
+17.2. Program location
+17.3. Directories used during the build process
+17.4. Running a phase
+17.5. The fetch phase
+
+ 17.5.1. What to fetch and where to get it from
+ 17.5.2. How are the files fetched?
+
+17.6. The checksum phase
+17.7. The extract phase
+17.8. The patch phase
+17.9. The tools phase
+17.10. The wrapper phase
+17.11. The configure phase
+17.12. The build phase
+17.13. The test phase
+17.14. The install phase
+17.15. The package phase
+17.16. Cleaning up
+17.17. Other helpful targets
+
+17.1. Introduction
This chapter gives a detailed description on how a package is built. Building a
package is separated into different phases (for example fetch, build, install),
@@ -5380,7 +5465,7 @@ To get more details about what is happening at each step, you can set the
PKG_VERBOSE variable, or the PATCH_DEBUG variable if you are just interested in
more details about the patch step.
-16.2. Program location
+17.2. Program location
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
@@ -5390,7 +5475,7 @@ The automatic variable PREFIX indicates where all files of the final program
shall be installed. It is usually set to LOCALBASE (/usr/pkg), or CROSSBASE for
pkgs in the cross category. The value of PREFIX needs to be put into the
various places in the program's source where paths to these files are encoded.
-See Section 10.3, "patches/*" and Section 18.3.1, "Shared libraries - libtool"
+See Section 11.3, "patches/*" and Section 19.3.1, "Shared libraries - libtool"
for more details.
When choosing which of these variables to use, follow the following rules:
@@ -5458,7 +5543,7 @@ When choosing which of these variables to use, follow the following rules:
the exception that manual pages go into ${PREFIX}/man, not ${PREFIX}/share/
man.
-16.3. Directories used during the build process
+17.3. Directories used during the build process
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
@@ -5497,7 +5582,7 @@ WRKSRC
it's the only directory entry that isn't hidden. This variable may be
changed by a package Makefile.
-16.4. Running a phase
+17.4. Running a phase
You can run a particular phase by typing make phase, where phase is the name of
the phase. This will automatically run all phases that are required for this
@@ -5505,13 +5590,13 @@ phase. The default phase is build, that is, when you run make without
parameters in a package directory, the package will be built, but not
installed.
-16.5. The fetch phase
+17.5. The fetch phase
The first step in building a package is to fetch the distribution files
(distfiles) from the sites that are providing them. This is the task of the
fetch phase.
-16.5.1. What to fetch and where to get it from
+17.5.1. What to fetch and where to get it from
In simple cases, MASTER_SITES defines all URLs from where the distfile, whose
name is derived from the DISTNAME variable, is fetched. The more complicated
@@ -5590,7 +5675,7 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=project_name/}
Note the trailing slash after the subdirectory name.
-16.5.2. How are the files fetched?
+17.5.2. How are the files fetched?
The fetch phase makes sure that all the distfiles exist in a local directory
(DISTDIR, which can be set by the pkgsrc user). If the files do not exist, they
@@ -5610,7 +5695,7 @@ target to mirror the distfiles, if they are freely distributable. Packages
setting NO_SRC_ON_FTP (usually to "${RESTRICTED}") will not have their
distfiles mirrored.
-16.6. The checksum phase
+17.6. The checksum phase
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,
@@ -5618,7 +5703,7 @@ the build is aborted. This is to ensure the same distfile is used for building,
and that the distfile wasn't changed, e.g. by some malign force, deliberately
changed distfiles on the master distribution site or network lossage.
-16.7. The extract phase
+17.7. The extract phase
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.
@@ -5651,25 +5736,25 @@ file that is going to be extracted.
And if that still does not suffice, you can override the do-extract target in
the package Makefile.
-16.8. The patch phase
+17.8. The patch phase
After extraction, all the patches named by the PATCHFILES, those present in the
patches subdirectory of the package as well as in $LOCALPATCHES/$PKGPATH (e.g.
/usr/local/patches/graphics/png) are applied. Patchfiles ending in .Z or .gz
are uncompressed before they are applied, files ending in .orig or .rej are
ignored. Any special options to patch(1) can be handed in PATCH_DIST_ARGS. See
-Section 10.3, "patches/*" for more details.
+Section 11.3, "patches/*" for more details.
By default patch(1) 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 patches that don't apply cleanly may
end up being applied in the wrong place, and cause severe harm there.
-16.9. The tools phase
+17.9. The tools phase
-This is covered in Chapter 17, Tools needed for building or running.
+This is covered in Chapter 18, Tools needed for building or running.
-16.10. The wrapper phase
+17.10. The wrapper phase
This phase creates wrapper programs for the compilers and linkers. The
following variables can be used to tweak the wrappers.
@@ -5699,7 +5784,7 @@ WRAPPER_TRANSFORM_CMDS
A list of transformation commands. [TODO: investigate further]
-16.11. The configure phase
+17.11. The configure phase
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
@@ -5732,7 +5817,7 @@ variable.
If there is no configure step at all, set NO_CONFIGURE to "yes".
-16.12. The build phase
+17.12. The build phase
For building a package, a rough equivalent of the following code is executed.
@@ -5756,11 +5841,11 @@ BUILD_TARGET defaults to "all".
If there is no build step at all, set NO_BUILD to "yes".
-16.13. The test phase
+17.13. The test phase
[TODO]
-16.14. The install phase
+17.14. The install phase
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.
@@ -5848,7 +5933,7 @@ INSTALLATION_DIRS
In the rare cases that a package shouldn't install anything, set NO_INSTALL to
"yes". This is mostly relevant for packages in the regress category.
-16.15. The package phase
+17.15. The package phase
Once the install stage has completed, a binary package of the installed files
can be built. These binary packages can be used for quick installation without
@@ -5862,13 +5947,13 @@ If there should be no binary package, set NO_PACKAGE to "yes". This should only
be used in rare cases, like when a package definitely is only usable on the
machine where it is built and even then, a binary package can be useful.
-16.16. Cleaning up
+17.16. Cleaning up
Once you're finished with a package, you can clean the work directory by
running make clean. If you want to clean the work directories of all
dependencies too, use make clean-depends.
-16.17. Other helpful targets
+17.17. Other helpful targets
pre/post-*
@@ -6117,14 +6202,14 @@ print-PLIST
file access times, be sure to add these files manually to your PLIST, as
the "find -newer" command used by this target won't catch them!
- See Section 12.3, "Tweaking output of make print-PLIST" for more
+ See Section 13.3, "Tweaking output of make print-PLIST" for more
information on this target.
bulk-package
Used to do bulk builds. If an appropriate binary package already exists, no
action is taken. If not, this target will compile, install and package it
- (and its depends, if PKG_DEPENDS is set properly. See Section 6.3.1,
+ (and its depends, if PKG_DEPENDS is set properly. See Section 7.3.1,
"Configuration"). After creating the binary package, the sources, the
just-installed package and its required packages are removed, preserving
free disk space.
@@ -6149,14 +6234,14 @@ bulk-install
Beware that this target may deinstall all packages installed on a system!
-Chapter 17. Tools needed for building or running
+Chapter 18. Tools needed for building or running
Table of Contents
-17.1. Tools for pkgsrc builds
-17.2. Tools needed by packages
-17.3. Tools provided by platforms
-17.4. Questions regarding the tools
+18.1. Tools for pkgsrc builds
+18.2. Tools needed by packages
+18.3. Tools provided by platforms
+18.4. Questions regarding the tools
The USE_TOOLS definition is used both internally by pkgsrc and also for
individual packages to define what commands are needed for building a package
@@ -6177,7 +6262,7 @@ package may need GNU awk, bison (instead of yacc) or a better sed.
The tools used by a package can be listed by running make show-tools.
-17.1. Tools for pkgsrc builds
+18.1. Tools for pkgsrc builds
The default set of tools used by pkgsrc is defined in bsd.pkg.mk. This includes
standard Unix tools, such as: cat, awk, chmod, test, and so on. These can be
@@ -6186,7 +6271,7 @@ seen by running: make show-var VARNAME=USE_TOOLS.
If a package needs a specific program to build then the USE_TOOLS variable can
be used to define the tools needed.
-17.2. Tools needed by packages
+18.2. Tools needed by packages
In the following examples, the :pkgsrc means to use the pkgsrc version and not
the native version for a build dependency. And the :run means that it is used
@@ -6204,7 +6289,7 @@ could be "/bin/bash" on Linux systems.
If you always need a pkgsrc version of the tool at run-time, then just use
DEPENDS instead.
-17.3. Tools provided by platforms
+18.3. Tools provided by platforms
When improving or porting pkgsrc to a new platform, have a look at (or create)
the corresponding platform specific make file fragment under pkgsrc/mk/tools/
@@ -6218,107 +6303,107 @@ TOOLS_PLATFORM.bzcat?= /usr/bin/bzip2 -cd
TOOLS_PLATFORM.true?= true # shell builtin
-17.4. Questions regarding the tools
+18.4. Questions regarding the tools
-17.4.1. How do I add a new tool?
-17.4.2. How do I get a list of all available tools?
-17.4.3. How can I get a list of all the tools that a package is using while
+18.4.1. How do I add a new tool?
+18.4.2. How do I get a list of all available tools?
+18.4.3. How can I get a list of all the tools that a package is using while
being built? I want to know whether it uses sed or not.
-17.4.1. How do I add a new tool?
+18.4.1. How do I add a new tool?
TODO
-17.4.2. How do I get a list of all available tools?
+18.4.2. How do I get a list of all available tools?
TODO
-17.4.3. How can I get a list of all the tools that a package is using while
+18.4.3. How can I get a list of all the tools that a package is using while
being built? I want to know whether it uses sed or not.
Currently, you can't. (TODO: But I want to be able to do it.)
-Chapter 18. Making your package work
+Chapter 19. Making your package work
Table of Contents
-18.1. General operation
-
- 18.1.1. Portability of packages
- 18.1.2. How to pull in user-settable variables from mk.conf
- 18.1.3. User interaction
- 18.1.4. Handling licenses
- 18.1.5. Restricted packages
- 18.1.6. Handling dependencies
- 18.1.7. Handling conflicts with other packages
- 18.1.8. Packages that cannot or should not be built
- 18.1.9. Packages which should not be deleted, once installed
- 18.1.10. Handling packages with security problems
- 18.1.11. How to handle incrementing versions when fixing an existing
+19.1. General operation
+
+ 19.1.1. Portability of packages
+ 19.1.2. How to pull in user-settable variables from mk.conf
+ 19.1.3. User interaction
+ 19.1.4. Handling licenses
+ 19.1.5. Restricted packages
+ 19.1.6. Handling dependencies
+ 19.1.7. Handling conflicts with other packages
+ 19.1.8. Packages that cannot or should not be built
+ 19.1.9. Packages which should not be deleted, once installed
+ 19.1.10. Handling packages with security problems
+ 19.1.11. How to handle incrementing versions when fixing an existing
package
- 18.1.12. Substituting variable text in the package files (the SUBST
+ 19.1.12. Substituting variable text in the package files (the SUBST
framework)
-18.2. Fixing problems in the fetch phase
+19.2. Fixing problems in the fetch phase
- 18.2.1. Packages whose distfiles aren't available for plain downloading
- 18.2.2. How to handle modified distfiles with the 'old' name
+ 19.2.1. Packages whose distfiles aren't available for plain downloading
+ 19.2.2. How to handle modified distfiles with the 'old' name
-18.3. Fixing problems in the configure phase
+19.3. Fixing problems in the configure phase
- 18.3.1. Shared libraries - libtool
- 18.3.2. Using libtool on GNU packages that already support libtool
- 18.3.3. GNU Autoconf/Automake
+ 19.3.1. Shared libraries - libtool
+ 19.3.2. Using libtool on GNU packages that already support libtool
+ 19.3.3. GNU Autoconf/Automake
-18.4. Programming languages
+19.4. Programming languages
- 18.4.1. C, C++, and Fortran
- 18.4.2. Java
- 18.4.3. Packages containing perl scripts
- 18.4.4. Other programming languages
+ 19.4.1. C, C++, and Fortran
+ 19.4.2. Java
+ 19.4.3. Packages containing perl scripts
+ 19.4.4. Other programming languages
-18.5. Fixing problems in the build phase
+19.5. Fixing problems in the build phase
- 18.5.1. Compiling C and C++ code conditionally
- 18.5.2. How to handle compiler bugs
- 18.5.3. Undefined reference to "..."
- 18.5.4. Running out of memory
+ 19.5.1. Compiling C and C++ code conditionally
+ 19.5.2. How to handle compiler bugs
+ 19.5.3. Undefined reference to "..."
+ 19.5.4. Running out of memory
-18.6. Fixing problems in the install phase
+19.6. Fixing problems in the install phase
- 18.6.1. Creating needed directories
- 18.6.2. Where to install documentation
- 18.6.3. Installing highscore files
- 18.6.4. Adding DESTDIR support to packages
- 18.6.5. Packages with hardcoded paths to other interpreters
- 18.6.6. Packages installing perl modules
- 18.6.7. Packages installing info files
- 18.6.8. Packages installing man pages
- 18.6.9. Packages installing GConf2 data files
- 18.6.10. Packages installing scrollkeeper data files
- 18.6.11. Packages installing X11 fonts
- 18.6.12. Packages installing GTK2 modules
- 18.6.13. Packages installing SGML or XML data
- 18.6.14. Packages installing extensions to the MIME database
- 18.6.15. Packages using intltool
- 18.6.16. Packages installing startup scripts
- 18.6.17. Packages installing TeX modules
- 18.6.18. Packages supporting running binaries in emulation
- 18.6.19. Packages installing hicolor theme icons
- 18.6.20. Packages installing desktop files
+ 19.6.1. Creating needed directories
+ 19.6.2. Where to install documentation
+ 19.6.3. Installing highscore files
+ 19.6.4. Adding DESTDIR support to packages
+ 19.6.5. Packages with hardcoded paths to other interpreters
+ 19.6.6. Packages installing perl modules
+ 19.6.7. Packages installing info files
+ 19.6.8. Packages installing man pages
+ 19.6.9. Packages installing GConf2 data files
+ 19.6.10. Packages installing scrollkeeper data files
+ 19.6.11. Packages installing X11 fonts
+ 19.6.12. Packages installing GTK2 modules
+ 19.6.13. Packages installing SGML or XML data
+ 19.6.14. Packages installing extensions to the MIME database
+ 19.6.15. Packages using intltool
+ 19.6.16. Packages installing startup scripts
+ 19.6.17. Packages installing TeX modules
+ 19.6.18. Packages supporting running binaries in emulation
+ 19.6.19. Packages installing hicolor theme icons
+ 19.6.20. Packages installing desktop files
-18.7. Marking packages as having problems
+19.7. Marking packages as having problems
-18.1. General operation
+19.1. General operation
-18.1.1. Portability of packages
+19.1.1. Portability of packages
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. This chapter mentions some particular details you should pay
attention to while working on pkgsrc.
-18.1.2. How to pull in user-settable variables from mk.conf
+19.1.2. How to pull in user-settable variables from mk.conf
The pkgsrc user can configure pkgsrc by overriding several variables in the
file pointed to by MAKECONF, which is mk.conf by default. When you want to use
@@ -6338,7 +6423,7 @@ Note
Currently there is no exhaustive list of all variables that tells you whether
they can be used at load time or only at run time, but it is in preparation.
-18.1.3. User interaction
+19.1.3. User interaction
Occasionally, packages require interaction from the user, and this can be in a
number of ways:
@@ -6368,7 +6453,7 @@ INTERACTIVE_STAGE= configure install
The user can then decide to skip this package by setting the BATCH variable.
-18.1.4. Handling licenses
+19.1.4. Handling licenses
Authors of software can choose the licence under which software can be copied.
This is due to copyright law, and reasons for license choices are outside the
@@ -6446,7 +6531,7 @@ Another problem with such usage is that it does not enable a user to tell
pkgsrc to proceed for a single package without also telling pkgsrc to proceed
for all packages with that tag.
-18.1.5. Restricted packages
+19.1.5. Restricted packages
Some licenses restrict how software may be re-distributed. Because a license
tag is required unless the package is Free or Open Source, all packages with
@@ -6502,13 +6587,13 @@ Please note that the use of NO_PACKAGE, IGNORE, NO_CDROM, or other generic make
variables to denote restrictions is deprecated, because they unconditionally
prevent users from generating binary packages!
-18.1.6. Handling dependencies
+19.1.6. Handling dependencies
Your package may depend on some other package being present - and there are
various ways of expressing this dependency. pkgsrc supports the BUILD_DEPENDS
and DEPENDS definitions, the USE_TOOLS definition, as well as dependencies via
buildlink3.mk, which is the preferred way to handle dependencies, and which
-uses the variables named above. See Chapter 13, Buildlink methodology for more
+uses the variables named above. See Chapter 14, Buildlink methodology for more
information.
The basic difference between the two variables is as follows: The DEPENDS
@@ -6597,7 +6682,7 @@ version numbers recognized by pkg_info(1).
systems that may have different versions of binary packages installed.
For security fixes, please update the package vulnerabilities file. See
- Section 18.1.10, "Handling packages with security problems" for more
+ Section 19.1.10, "Handling packages with security problems" for more
information.
4. If your package needs some executable to be able to run correctly and if
@@ -6616,7 +6701,7 @@ distribution files to DISTFILES, so they will be extracted automatically. See
the print/ghostscript package for an example. (It relies on the jpeg sources
being present in source form during the build.)
-18.1.7. Handling conflicts with other packages
+19.1.7. Handling conflicts with other packages
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 as
@@ -6640,7 +6725,7 @@ Packages will automatically conflict with other packages with the name prefix
and a different version string. "Xaw3d-1.5" e.g. will automatically conflict
with the older version "Xaw3d-1.3".
-18.1.8. Packages that cannot or should not be built
+19.1.8. Packages that cannot or should not be built
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
@@ -6661,7 +6746,7 @@ functionality already provided by the system), set PKG_SKIP_REASON to a
descriptive message. If the package should fail because some preconditions are
not met, set PKG_FAIL_REASON to a descriptive message.
-18.1.9. Packages which should not be deleted, once installed
+19.1.9. Packages which should not be deleted, once installed
To ensure that a package may not be deleted, once it has been installed, the
PKG_PRESERVE definition should be set in the package Makefile. This will be
@@ -6669,7 +6754,7 @@ carried into any binary package that is made from this pkgsrc entry. A
"preserved" package will not be deleted using pkg_delete(1) unless the "-f"
option is used.
-18.1.10. Handling packages with security problems
+19.1.10. Handling packages with security problems
When a vulnerability is found, this should be noted in localsrc/security/
advisories/pkg-vulnerabilities, and after committing that file, use make upload
@@ -6685,7 +6770,7 @@ submit a pullup request!
Binary packages already on ftp.NetBSD.org will be handled semi-automatically by
a weekly cron job.
-18.1.11. How to handle incrementing versions when fixing an existing package
+19.1.11. How to handle incrementing versions when fixing an existing package
When making fixes to an existing package it can be useful to change the version
number in PKGNAME. To avoid conflicting with future versions by the original
@@ -6734,7 +6819,7 @@ Examples of changes that do merit an increase to PKGREVISION include:
PKGREVISION must also be incremented when dependencies have ABI changes.
-18.1.12. Substituting variable text in the package files (the SUBST framework)
+19.1.12. Substituting variable text in the package files (the SUBST framework)
When you want to replace the same text in multiple files or when the
replacement text varies, patches alone cannot help. This is where the SUBST
@@ -6785,9 +6870,9 @@ blocks look uniform.
There are some more variables, but they are so seldomly used that they are only
documented in the mk/subst.mk file.
-18.2. Fixing problems in the fetch phase
+19.2. Fixing problems in the fetch phase
-18.2.1. Packages whose distfiles aren't available for plain downloading
+19.2.1. Packages whose distfiles aren't available for plain downloading
If you need to download from a dynamic URL you can set DYNAMIC_MASTER_SITES and
a make fetch will call files/getsite.sh with the name of each file to download
@@ -6804,7 +6889,7 @@ FETCH_MESSAGE+= " "${DISTFILES:Q}
FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"."
-18.2.2. How to handle modified distfiles with the 'old' name
+19.2.2. How to handle modified distfiles with the 'old' name
Sometimes authors of a software package make some modifications after the
software was released, and they put up a new distfile without changing the
@@ -6816,7 +6901,7 @@ in. Please mention that the distfiles were compared and what was found in your
commit message. Then, the correct way to work around this is to set DIST_SUBDIR
to a unique directory name, usually based on PKGNAME_NOREV. All DISTFILES and
PATCHFILES for this package will be put in that subdirectory of the local
-distfiles directory. (See Section 18.1.11, "How to handle incrementing versions
+distfiles directory. (See Section 19.1.11, "How to handle incrementing versions
when fixing an existing package" for more details.) In case this happens more
often, PKGNAME can be used (thus including the nbX suffix) or a date stamp can
be appended, like ${PKGNAME_NOREV}-YYYYMMDD. Do not forget regenerating the
@@ -6826,9 +6911,9 @@ Furthermore, a mail to the package's authors seems appropriate telling them
that changing distfiles after releases without changing the file names is not
good practice.
-18.3. Fixing problems in the configure phase
+19.3. Fixing problems in the configure phase
-18.3.1. Shared libraries - libtool
+19.3.1. Shared libraries - libtool
pkgsrc supports many different machines, with different object formats like
a.out and ELF, and varying abilities to do shared library and dynamic loading
@@ -6931,7 +7016,7 @@ Here's how to use libtool in a package in seven simple steps:
7. In your PLIST, include only the .la file (this is a change from previous
behaviour).
-18.3.2. Using libtool on GNU packages that already support libtool
+19.3.2. Using libtool on GNU packages that already support libtool
Add USE_LIBTOOL=yes to the package Makefile. This will override the package's
own libtool in most cases. For older libtool using packages, libtool is made by
@@ -6965,7 +7050,7 @@ in some circumstances. Some of the more common errors are:
The function lt_dlinit() should be called and the macro
LTDL_SET_PRELOADED_SYMBOLS included in executables.
-18.3.3. GNU Autoconf/Automake
+19.3.3. GNU Autoconf/Automake
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
@@ -7004,13 +7089,13 @@ automake sequence. This is prevented by touching various files in the configure
stage. If this causes problems with your package you can set AUTOMAKE_OVERRIDE=
NO in the package Makefile.
-18.4. Programming languages
+19.4. Programming languages
-18.4.1. C, C++, and Fortran
+19.4.1. C, C++, and Fortran
Compilers for the C, C++, and Fortran languages comes with the NetBSD base
system. By default, pkgsrc assumes that a package is written in C and will hide
-all other compilers (via the wrapper framework, see Chapter 13, Buildlink
+all other compilers (via the wrapper framework, see Chapter 14, Buildlink
methodology).
To declare which language's compiler a package needs, set the USE_LANGUAGES
@@ -7018,7 +7103,7 @@ variable. Allowed values currently are "c", "c++", and "fortran" (and any
combination). The default is "c". Packages using GNU configure scripts, even if
written in C++, usually need a C compiler for the configure phase.
-18.4.2. Java
+19.4.2. Java
If a program is written in Java, use the Java framework in pkgsrc. The package
must include ../../mk/java-vm.mk. This Makefile fragment provides the following
@@ -7033,7 +7118,7 @@ variables:
implementation, "1.4" insists on versions 1.4 or above, and "1.5" only
accepts versions 1.5 or above. This variable is not set by default.
-18.4.3. Packages containing perl scripts
+19.4.3. Packages containing perl scripts
If your package contains interpreted perl scripts, add "perl" to the USE_TOOLS
variable and set REPLACE_PERL to ensure that the proper interpreter path is
@@ -7044,16 +7129,16 @@ full path to the perl executable.
If a particular version of perl is needed, set the PERL5_REQD variable to the
version number. The default is "5.0".
-See Section 18.6.6, "Packages installing perl modules" for information about
+See Section 19.6.6, "Packages installing perl modules" for information about
handling perl modules.
-18.4.4. Other programming languages
+19.4.4. Other programming languages
Currently, there is no special handling for other languages in pkgsrc. If a
compiler package provides a buildlink3.mk file, include that, otherwise just
add a (build) dependency on the appropriate compiler package.
-18.5. Fixing problems in the build phase
+19.5. Fixing problems in the build phase
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
@@ -7061,7 +7146,7 @@ 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.
-18.5.1. Compiling C and C++ code conditionally
+19.5.1. Compiling C and C++ code conditionally
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
@@ -7078,7 +7163,7 @@ the compiler that is used. For example, if you want to conditionally compile
code on Solaris, don't use __sun__, as the SunPro compiler does not define it.
Use __sun instead.
-18.5.1.1. C preprocessor macros to identify the operating system
+19.5.1.1. C preprocessor macros to identify the operating system
To distinguish between 4.4 BSD-derived systems and the rest of the world, you
should use the following code.
@@ -7102,20 +7187,20 @@ NetBSD __NetBSD__
OpenBSD __OpenBSD__
Solaris sun, __sun
-18.5.1.2. C preprocessor macros to identify the hardware architecture
+19.5.1.2. C preprocessor macros to identify the hardware architecture
i386 i386, __i386, __i386__
MIPS __mips
SPARC sparc, __sparc
-18.5.1.3. C preprocessor macros to identify the compiler
+19.5.1.3. C preprocessor macros to identify the compiler
GCC __GNUC__ (major version), __GNUC_MINOR__
MIPSpro _COMPILER_VERSION (0x741 for MIPSpro 7.41)
SunPro __SUNPRO_C (0x570 for Sun C 5.7)
SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8)
-18.5.2. How to handle compiler bugs
+19.5.2. How to handle compiler bugs
Some source files trigger bugs in the compiler, based on combinations of
compiler version and architecture and almost always relation to optimisation
@@ -7126,7 +7211,7 @@ Typically, a workaround involves testing the MACHINE_ARCH and compiler version,
disabling optimisation for that combination of file, MACHINE_ARCH and compiler,
and documenting it in pkgsrc/doc/HACKS. See that file for a number of examples.
-18.5.3. Undefined reference to "..."
+19.5.3. Undefined reference to "..."
This error message often means that a package did not link to a shared library
it needs. The following functions are known to cause this error message over
@@ -7153,7 +7238,7 @@ and over.
To fix these linker errors, it is often sufficient to say LIBS.OperatingSystem+
= -lfoo to the package Makefile and then say bmake clean; bmake.
-18.5.3.1. Special issue: The SunPro compiler
+19.5.3.1. Special issue: The SunPro compiler
When you are using the SunPro compiler, there is another possibility. That
compiler cannot handle the following code:
@@ -7175,7 +7260,7 @@ It generates the code for inline_func even if that function is never used. This
code then refers to extern_func, which can usually not be resolved. To solve
this problem you can try to tell the package to disable inlining of functions.
-18.5.4. Running out of memory
+19.5.4. Running out of memory
Sometimes packages fail to build because the compiler runs into an operating
system specific soft limit. With the UNLIMIT_RESOURCES variable pkgsrc can be
@@ -7184,9 +7269,9 @@ told to unlimit the resources. Currently, the allowed values are "datasize" and
builtin ulimit command to raise the maximum data segment size or maximum stack
size of a process, respectively, to their hard limits.
-18.6. Fixing problems in the install phase
+19.6. Fixing problems in the install phase
-18.6.1. Creating needed directories
+19.6.1. Creating needed directories
The BSD-compatible install supplied with some operating systems cannot create
more than one directory at a time. As such, you should call ${INSTALL_*_DIR}
@@ -7199,7 +7284,7 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
You can also just append "dir1 dir2" to the INSTALLATION_DIRS variable, which
will automatically do the right thing.
-18.6.2. Where to install documentation
+19.6.2. Where to install documentation
In general, documentation should be installed into ${PREFIX}/share/doc/$
{PKGBASE} or ${PREFIX}/share/doc/${PKGNAME} (the latter includes the version
@@ -7220,7 +7305,7 @@ then, no additional subdirectory level is allowed in this case. This is usually
achieved by using "--with-html-dir=${PREFIX}/share/doc". ${PREFIX}/share/
gtk-doc is preferred though.)
-18.6.3. Installing highscore files
+19.6.3. Installing highscore files
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
@@ -7235,7 +7320,7 @@ SETGIDGAME=YES will set all the other variables accordingly.
A package should therefor never hard code file ownership or access permissions
but rely on INSTALL_GAME and INSTALL_GAME_DATA to set these correctly.
-18.6.4. Adding DESTDIR support to packages
+19.6.4. Adding DESTDIR support to packages
* All installation operations have to be prefixed with ${DESTDIR}.
@@ -7248,7 +7333,7 @@ but rely on INSTALL_GAME and INSTALL_GAME_DATA to set these correctly.
* In general, packages should support UNPRIVILEGED to be able to use DESTDIR.
-18.6.5. Packages with hardcoded paths to other interpreters
+19.6.5. Packages with hardcoded paths to other interpreters
Your package may also contain scripts with hardcoded paths to other
interpreters besides (or as well as) perl. To correct the full pathname to the
@@ -7266,7 +7351,7 @@ Note
Before March 2006, these variables were called _REPLACE.* and _REPLACE_FILES.*.
-18.6.6. Packages installing perl modules
+19.6.6. Packages installing perl modules
Makefiles of packages providing perl5 modules should include the Makefile
fragment ../../lang/perl5/module.mk. It provides a do-configure target for the
@@ -7287,7 +7372,7 @@ three locations in which perl5 modules may be installed, and may be used by
perl5 packages that don't have a packlist. These three variables are also
substituted for in the PLIST.
-18.6.7. Packages installing info files
+19.6.7. Packages installing info files
Some packages install info files or use the "makeinfo" or "install-info"
commands. INFO_FILES should be defined in the package Makefile so that INSTALL
@@ -7322,7 +7407,7 @@ message. The script overriding makeinfo logs a message and according to the
value of TEXINFO_REQD either runs the appropriate makeinfo command or exit on
error.
-18.6.8. Packages installing man pages
+19.6.8. Packages installing man pages
All packages that install manual pages should install them into the same
directory, so that there is one common place to look for them. In pkgsrc, this
@@ -7347,10 +7432,10 @@ Packages that use GNU_CONFIGURE but do not use --mandir, can set
CONFIGURE_HAS_MANDIR to "no". Or if the ./configure script uses a non-standard
use of --mandir, you can set GNU_CONFIGURE_MANDIR as needed.
-See Section 12.5, "Man page compression" for information on installation of
+See Section 13.5, "Man page compression" for information on installation of
compressed manual pages.
-18.6.9. Packages installing GConf2 data files
+19.6.9. Packages installing GConf2 data files
If a package installs .schemas or .entries files, used by GConf2, you need to
take some extra steps to make sure they get registered in the database:
@@ -7366,7 +7451,7 @@ take some extra steps to make sure they get registered in the database:
manually patch the package.
3. Check the PLIST and remove any entries under the etc/gconf directory, as
- they will be handled automatically. See Section 8.13, "How do I change the
+ they will be handled automatically. See Section 9.13, "How do I change the
location of configuration files?" for more information.
4. Define the GCONF2_SCHEMAS variable in your Makefile with a list of all
@@ -7377,7 +7462,7 @@ take some extra steps to make sure they get registered in the database:
.entries files installed by the package, if any. Names must not contain any
directories in them.
-18.6.10. Packages installing scrollkeeper data files
+19.6.10. Packages installing scrollkeeper data files
If a package installs .omf files, used by scrollkeeper, you need to take some
extra steps to make sure they get registered in the database:
@@ -7393,7 +7478,7 @@ extra steps to make sure they get registered in the database:
3. Remove the share/omf directory from the PLIST. It will be handled by
scrollkeeper.
-18.6.11. Packages installing X11 fonts
+19.6.11. Packages installing X11 fonts
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
@@ -7407,7 +7492,7 @@ Note that you should not create new directories for fonts; instead use the
standard ones to avoid that the user needs to manually configure his X server
to find them.
-18.6.12. Packages installing GTK2 modules
+19.6.12. Packages installing GTK2 modules
If a package installs GTK2 immodules or loaders, you need to take some extra
steps to get them registered in the GTK2 database properly:
@@ -7430,7 +7515,7 @@ steps to get them registered in the GTK2 database properly:
5. Check the PLIST and remove any entries under the libdata/gtk-2.0 directory,
as they will be handled automatically.
-18.6.13. Packages installing SGML or XML data
+19.6.13. Packages installing SGML or XML data
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
@@ -7456,7 +7541,7 @@ extra steps:
(specifically, arguments recognized by the 'add' action). Note that you
will normally not use this variable.
-18.6.14. Packages installing extensions to the MIME database
+19.6.14. Packages installing extensions to the MIME database
If a package provides extensions to the MIME database by installing .xml files
inside ${PREFIX}/share/mime/packages, you need to take some extra steps to
@@ -7477,7 +7562,7 @@ ensure that the database is kept consistent with respect to these new files:
3. Remove any share/mime/* directories from the PLIST. They will be handled by
the shared-mime-info package.
-18.6.15. Packages using intltool
+19.6.15. Packages using intltool
If a package uses intltool during its build, add intltool to the USE_TOOLS,
which forces it to use the intltool package provided by pkgsrc, instead of the
@@ -7487,7 +7572,7 @@ This tracks intltool's build-time dependencies and uses the latest available
version; this way, the package benefits of any bug fixes that may have appeared
since it was released.
-18.6.16. Packages installing startup scripts
+19.6.16. Packages installing startup scripts
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
@@ -7495,7 +7580,7 @@ PKG_RCD_SCRIPTS=YES in mk.conf. This option will copy the scripts into /etc/
rc.d when a package is installed, and it will automatically remove the scripts
when the package is deinstalled.
-18.6.17. Packages installing TeX modules
+19.6.17. Packages installing TeX modules
If a package installs TeX packages into the texmf tree, the ls-R database of
the tree needs to be updated.
@@ -7521,7 +7606,7 @@ into PKG_LOCALTEXMFPREFIX, not PKG_TEXMFPREFIX.
3. Make sure that none of ls-R databases are included in PLIST, as they will
be removed only by the teTeX-bin package.
-18.6.18. Packages supporting running binaries in emulation
+19.6.18. Packages supporting running binaries in emulation
There are some packages that provide libraries and executables for running
binaries from a one operating system on a different one (if the latter supports
@@ -7535,7 +7620,7 @@ linker. Since the standard dynamic linker is run, this fails for emulation
packages, because the libraries used by the emulation are not in the standard
directories.
-18.6.19. Packages installing hicolor theme icons
+19.6.19. Packages installing hicolor theme icons
If a package installs images under the share/icons/hicolor and/or updates the
share/icons/hicolor/icon-theme.cache database, you need to take some extra
@@ -7552,7 +7637,7 @@ that the cache database is rebuilt:
The best way to verify that the PLIST is correct with respect to the last two
points is to regenerate it using make print-PLIST.
-18.6.20. Packages installing desktop files
+19.6.20. Packages installing desktop files
If a package installs .desktop files under share/applications and these include
MIME information, you need to take extra steps to ensure that they are
@@ -7566,7 +7651,7 @@ registered into the MIME database:
The best way to verify that the PLIST is correct with respect to the last point
is to regenerate it using make print-PLIST.
-18.7. Marking packages as having problems
+19.7. Marking packages as having problems
In some cases one does not have the time to solve a problem immediately. There
are currently two ways to declare that one knows that a package has problems.
@@ -7586,7 +7671,7 @@ are currently two ways to declare that one knows that a package has problems.
Both types of packages are removed from pkgsrc in irregular intervals.
-Chapter 19. Debugging
+Chapter 20. Debugging
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
@@ -7624,7 +7709,7 @@ what was explained in the previous sections, only with some debugging aids.
that shouldn't be, especially during the build phase. mkpatches, patchdiff
and pkgvi are from the pkgtools/pkgdiff package.
- * Look at the Makefile, fix if necessary; see Section 10.1, "Makefile".
+ * Look at the Makefile, fix if necessary; see Section 11.1, "Makefile".
* Generate a PLIST:
@@ -7665,33 +7750,33 @@ what was explained in the previous sections, only with some debugging aids.
# pkglint
- * Submit (or commit, if you have cvs access); see Chapter 20, Submitting and
+ * Submit (or commit, if you have cvs access); see Chapter 21, Submitting and
Committing.
-Chapter 20. Submitting and Committing
+Chapter 21. Submitting and Committing
Table of Contents
-20.1. Submitting binary packages
-20.2. Submitting source packages (for non-NetBSD-developers)
-20.3. General notes when adding, updating, or removing packages
-20.4. Committing: Importing a package into CVS
-20.5. Updating a package to a newer version
-20.6. Moving a package in pkgsrc
+21.1. Submitting binary packages
+21.2. Submitting source packages (for non-NetBSD-developers)
+21.3. General notes when adding, updating, or removing packages
+21.4. Committing: Importing a package into CVS
+21.5. Updating a package to a newer version
+21.6. Moving a package in pkgsrc
-20.1. Submitting binary packages
+21.1. Submitting binary packages
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 protect our users! You're still free to put up your
home-made binary packages and tell the world where to get them. NetBSD
developers doing bulk builds and wanting to upload them please see
-Section 6.3.8, "Uploading results of a bulk build".
+Section 7.3.8, "Uploading results of a bulk build".
-20.2. Submitting source packages (for non-NetBSD-developers)
+21.2. Submitting source packages (for non-NetBSD-developers)
First, check that your package is complete, compiles and runs well; see
-Chapter 19, Debugging and the rest of this document. Next, generate an
+Chapter 20, Debugging and the rest of this document. Next, generate an
uuencoded gzipped tar(1) archive that contains all files that make up the
package. Finally, send this package to the pkgsrc bug tracking system, either
with the send-pr(1) command, or if you don't have that, go to the web page
@@ -7711,7 +7796,7 @@ Alternatively, you can also import new packages into pkgsrc-wip ("pkgsrc
work-in-progress"); see the homepage at http://pkgsrc-wip.sourceforge.net/ for
details.
-20.3. General notes when adding, updating, or removing packages
+21.3. General notes when adding, updating, or removing packages
Please note all package additions, updates, moves, and removals in pkgsrc/doc/
CHANGES-YYYY. It's very important to keep this file up to date and conforming
@@ -7735,7 +7820,7 @@ or package moves or removals, set the CTYPE variable on the command line to
your local login name is not the same as your NetBSD login name. Don't forget
to commit the changes to pkgsrc/doc/CHANGES-YYYY!
-20.4. Committing: Importing a package into CVS
+21.4. Committing: Importing a package into CVS
This section is only of interest for pkgsrc developers with write access to the
pkgsrc repository. Please remember that cvs imports files relative to the
@@ -7757,7 +7842,7 @@ so people reading the mailing lists know what the package is/does.
For new packages, "cvs import" is preferred to "cvs add" because the former
gets everything with a single command, and provides a consistent tag.
-20.5. Updating a package to a newer version
+21.5. Updating a package to a newer version
Please always put a concise, appropriate and relevant summary of the changes
between old and new versions into the commit log when updating a package. There
@@ -7782,7 +7867,7 @@ which pkgsrc is used. Please use your judgement about what should go into
pkgsrc, and bear in mind that stability is to be preferred above new and
possibly untested features.
-20.6. Moving a package in pkgsrc
+21.6. Moving a package in pkgsrc
1. Make a copy of the directory somewhere else.
@@ -7818,57 +7903,57 @@ possibly untested features.
(and any packages from step 5, of course).
-Chapter 21. Frequently Asked Questions
+Chapter 22. Frequently Asked Questions
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, and if you still don't have the answer, ask on the
pkgsrc-users mailing list.
-21.1. What is the difference between MAKEFLAGS, .MAKEFLAGS and MAKE_FLAGS?
-21.2. What is the difference between MAKE, GMAKE and MAKE_PROGRAM?
-21.3. What is the difference between CC, PKG_CC and PKGSRC_COMPILER?
-21.4. What is the difference between BUILDLINK_LDFLAGS, BUILDLINK_LDADD and
+22.1. What is the difference between MAKEFLAGS, .MAKEFLAGS and MAKE_FLAGS?
+22.2. What is the difference between MAKE, GMAKE and MAKE_PROGRAM?
+22.3. What is the difference between CC, PKG_CC and PKGSRC_COMPILER?
+22.4. What is the difference between BUILDLINK_LDFLAGS, BUILDLINK_LDADD and
BUILDLINK_LIBS?
-21.5. Why does make show-var VARNAME=BUILDLINK_PREFIX.foo say it's empty?
-21.6. What does ${MASTER_SITE_SOURCEFORGE:=package/} mean? I don't understand
+22.5. Why does make show-var VARNAME=BUILDLINK_PREFIX.foo say it's empty?
+22.6. What does ${MASTER_SITE_SOURCEFORGE:=package/} mean? I don't understand
the := inside it.
-21.7. Which mailing lists are there for package developers?
-21.8. Where is the pkgsrc documentation?
-21.9. I have a little time to kill. What shall I do?
+22.7. Which mailing lists are there for package developers?
+22.8. Where is the pkgsrc documentation?
+22.9. I have a little time to kill. What shall I do?
-21.1. What is the difference between MAKEFLAGS, .MAKEFLAGS and MAKE_FLAGS?
+22.1. What is the difference between MAKEFLAGS, .MAKEFLAGS and MAKE_FLAGS?
MAKEFLAGS are the flags passed to the pkgsrc-internal invocations of make
(1), while MAKE_FLAGS are the flags that are passed to the MAKE_PROGRAM
when building the package. [FIXME: What is .MAKEFLAGS for?]
-21.2. What is the difference between MAKE, GMAKE and MAKE_PROGRAM?
+22.2. What is the difference between MAKE, GMAKE and MAKE_PROGRAM?
MAKE is the path to the make(1) program that is used in the pkgsrc
infrastructure. GMAKE is the path to GNU Make, but you need to say
USE_TOOLS+=gmake to use that. MAKE_PROGRAM is the path to the Make
program that is used for building the package.
-21.3. What is the difference between CC, PKG_CC and PKGSRC_COMPILER?
+22.3. What is the difference between CC, PKG_CC and PKGSRC_COMPILER?
CC is the path to the real C compiler, which can be configured by the
pkgsrc user. PKG_CC is the path to the compiler wrapper. PKGSRC_COMPILER
is not a path to a compiler, but the type of compiler that should be
used. See mk/compiler.mk for more information about the latter variable.
-21.4. What is the difference between BUILDLINK_LDFLAGS, BUILDLINK_LDADD and
+22.4. What is the difference between BUILDLINK_LDFLAGS, BUILDLINK_LDADD and
BUILDLINK_LIBS?
[FIXME]
-21.5. Why does make show-var VARNAME=BUILDLINK_PREFIX.foo say it's empty?
+22.5. Why does make show-var VARNAME=BUILDLINK_PREFIX.foo say it's empty?
For optimization reasons, some variables are only available in the
"wrapper" phase and later. To "simulate" the wrapper phase, append
PKG_PHASE=wrapper to the above command.
-21.6. What does ${MASTER_SITE_SOURCEFORGE:=package/} mean? I don't understand
+22.6. What does ${MASTER_SITE_SOURCEFORGE:=package/} mean? I don't understand
the := inside it.
The := is not really an assignment operator, like you might expect at
@@ -7878,7 +7963,7 @@ pkgsrc-users mailing list.
old_string is the empty string and new_string is package/. That's where
the : and the = fall together.
-21.7. Which mailing lists are there for package developers?
+22.7. Which mailing lists are there for package developers?
tech-pkg
@@ -7895,7 +7980,7 @@ pkgsrc-users mailing list.
Please do not report your bugs here directly; use one of the other
mailing lists.
-21.8. Where is the pkgsrc documentation?
+22.8. Where is the pkgsrc documentation?
There are many places where you can find documentation about pkgsrc:
@@ -7929,7 +8014,7 @@ pkgsrc-users mailing list.
others can find your questions later (see above). To be sure that the
developer in charge reads the mail, you may CC him or her.
-21.9. I have a little time to kill. What shall I do?
+22.9. I have a little time to kill. What shall I do?
This is not really an FAQ yet, but here's the answer anyway.
@@ -7944,14 +8029,14 @@ pkgsrc-users mailing list.
* Review packages for which review was requested on the pkgsrc-wip
review mailing list.
-Chapter 22. GNOME packaging and porting
+Chapter 23. GNOME packaging and porting
Table of Contents
-22.1. Meta packages
-22.2. Packaging a GNOME application
-22.3. Updating GNOME to a newer version
-22.4. Patching guidelines
+23.1. Meta packages
+23.2. Packaging a GNOME application
+23.3. Updating GNOME to a newer version
+23.4. Patching guidelines
Quoting GNOME's web site:
@@ -7985,7 +8070,7 @@ willing to learn new exciting stuff, please jump straight to the pending work
list! There is still a long way to go to get a fully-functional GNOME desktop
under NetBSD and we need your help to achieve it!
-22.1. Meta packages
+23.1. Meta packages
pkgsrc includes three GNOME-related meta packages:
@@ -8014,7 +8099,7 @@ updates: a package may depend on other packages listed before it but not on any
listed after it. It is very important to keep this order to ease updates so...
do not change it to alphabetical sorting!
-22.2. Packaging a GNOME application
+23.2. Packaging a GNOME application
Almost all GNOME applications are written in C and use a common set of tools as
their build system. Things get different with the new bindings to other
@@ -8069,30 +8154,30 @@ directories or files. For each of them, the appropriate solution is given.
After applying the solution be sure to regenerate the package's file list with
make print-PLIST and ensure it is correct.
-Table 22.1. PLIST handling for GNOME packages
+Table 23.1. PLIST handling for GNOME packages
+-----------------------------------------------------------------------------+
| If the package... | Then... |
|-------------------------------------------+---------------------------------|
-| |See Section 18.6.10, "Packages |
+| |See Section 19.6.10, "Packages |
|Installs OMF files under share/omf. |installing scrollkeeper data |
| |files". |
|-------------------------------------------+---------------------------------|
-|Installs icons under the share/icons/ |See Section 18.6.19, "Packages |
+|Installs icons under the share/icons/ |See Section 19.6.19, "Packages |
|hicolor hierarchy or updates share/icons/ |installing hicolor theme icons". |
|hicolor/icon-theme.cache. | |
|-------------------------------------------+---------------------------------|
-| |See Section 18.6.14, "Packages |
+| |See Section 19.6.14, "Packages |
|Installs files under share/mime/packages. |installing extensions to the MIME|
| |database". |
|-------------------------------------------+---------------------------------|
-|Installs .desktop files under share/ |See Section 18.6.20, "Packages |
+|Installs .desktop files under share/ |See Section 19.6.20, "Packages |
|applications and these include MIME |installing desktop files". |
|information. | |
+-----------------------------------------------------------------------------+
-22.3. Updating GNOME to a newer version
+23.3. Updating GNOME to a newer version
When seeing GNOME as a whole, there are two kinds of updates:
@@ -8169,12 +8254,12 @@ In order to update the GNOME components in pkgsrc to a new stable release
package updates and all the corresponding changes to the doc/CHANGES-<YEAR>
and pkgsrc/doc/TODO files.
-22.4. Patching guidelines
+23.4. Patching guidelines
GNOME is a very big component in pkgsrc which approaches 100 packages. Please,
it is very important that you always, always, always feed back any portability
fixes you do to a GNOME package to the mainstream developers (see
-Section 10.3.5, "Feedback to the author"). This is the only way to get their
+Section 11.3.5, "Feedback to the author"). This is the only way to get their
attention on portability issues and to ensure that future versions can be built
out-of-the box on NetBSD. The less custom patches in pkgsrc, the easier further
updates are. Those developers in charge of issuing major GNOME updates will be
@@ -8191,7 +8276,7 @@ Also, please avoid using preprocessor magic to fix portability issues. While
the FreeBSD GNOME people are doing a great job in porting GNOME to their
operating system, the official GNOME sources are now plagued by conditionals
that check for __FreeBSD__ and similar macros. This hurts portability. Please
-see our patching guidelines (Section 10.3.4, "Patching guidelines") for more
+see our patching guidelines (Section 11.3.4, "Patching guidelines") for more
details.
Part III. The pkgsrc infrastructure internals
@@ -8202,67 +8287,67 @@ maintainer should not need anything from this part.
Table of Contents
-23. Design of the pkgsrc infrastructure
+24. Design of the pkgsrc infrastructure
- 23.1. The meaning of variable definitions
- 23.2. Avoiding problems before they arise
- 23.3. Variable evaluation
+ 24.1. The meaning of variable definitions
+ 24.2. Avoiding problems before they arise
+ 24.3. Variable evaluation
- 23.3.1. At load time
- 23.3.2. At runtime
+ 24.3.1. At load time
+ 24.3.2. At runtime
- 23.4. How can variables be specified?
- 23.5. Designing interfaces for Makefile fragments
+ 24.4. How can variables be specified?
+ 24.5. Designing interfaces for Makefile fragments
- 23.5.1. Procedures with parameters
- 23.5.2. Actions taken on behalf of parameters
+ 24.5.1. Procedures with parameters
+ 24.5.2. Actions taken on behalf of parameters
- 23.6. The order in which files are loaded
+ 24.6. The order in which files are loaded
- 23.6.1. The order in bsd.prefs.mk
- 23.6.2. The order in bsd.pkg.mk
+ 24.6.1. The order in bsd.prefs.mk
+ 24.6.2. The order in bsd.pkg.mk
-24. Regression tests
+25. Regression tests
- 24.1. The regression tests framework
- 24.2. Running the regression tests
- 24.3. Adding a new regression test
+ 25.1. The regression tests framework
+ 25.2. Running the regression tests
+ 25.3. Adding a new regression test
- 24.3.1. Overridable functions
- 24.3.2. Helper functions
+ 25.3.1. Overridable functions
+ 25.3.2. Helper functions
-25. Porting pkgsrc
+26. Porting pkgsrc
- 25.1. Porting pkgsrc to a new operating system
- 25.2. Adding support for a new compiler
+ 26.1. Porting pkgsrc to a new operating system
+ 26.2. Adding support for a new compiler
-Chapter 23. Design of the pkgsrc infrastructure
+Chapter 24. Design of the pkgsrc infrastructure
Table of Contents
-23.1. The meaning of variable definitions
-23.2. Avoiding problems before they arise
-23.3. Variable evaluation
+24.1. The meaning of variable definitions
+24.2. Avoiding problems before they arise
+24.3. Variable evaluation
- 23.3.1. At load time
- 23.3.2. At runtime
+ 24.3.1. At load time
+ 24.3.2. At runtime
-23.4. How can variables be specified?
-23.5. Designing interfaces for Makefile fragments
+24.4. How can variables be specified?
+24.5. Designing interfaces for Makefile fragments
- 23.5.1. Procedures with parameters
- 23.5.2. Actions taken on behalf of parameters
+ 24.5.1. Procedures with parameters
+ 24.5.2. Actions taken on behalf of parameters
-23.6. The order in which files are loaded
+24.6. The order in which files are loaded
- 23.6.1. The order in bsd.prefs.mk
- 23.6.2. The order in bsd.pkg.mk
+ 24.6.1. The order in bsd.prefs.mk
+ 24.6.2. The order in bsd.pkg.mk
The pkgsrc infrastructure consists of many small Makefile fragments. Each such
fragment needs a properly specified interface. This chapter explains how such
an interface looks like.
-23.1. The meaning of variable definitions
+24.1. The meaning of variable definitions
Whenever a variable is defined in the pkgsrc infrastructure, the location and
the way of definition provide much information about the intended use of that
@@ -8289,7 +8374,7 @@ Note
These conventions are currently not applied consistently to the complete pkgsrc
infrastructure.
-23.2. Avoiding problems before they arise
+24.2. Avoiding problems before they arise
All variables that contain lists of things should default to being empty. Two
examples that do not follow this rule are USE_LANGUAGES and DISTFILES. These
@@ -8306,9 +8391,9 @@ package Makefiles. Similarly for USE_LANGUAGES, but in this case the default
value ("c") is so short that it doesn't stand out. Nevertheless it is mentioned
in many files.
-23.3. Variable evaluation
+24.3. Variable evaluation
-23.3.1. At load time
+24.3.1. At load time
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
@@ -8344,25 +8429,25 @@ paragraph, the -Wall is appended to the CFLAGS, but this addition will not
appear in CONFIGURE_ARGS. In actual code, the three paragraphs from above
typically occur in completely unrelated files.
-23.3.2. At runtime
+24.3.2. At runtime
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.
-23.4. How can variables be specified?
+24.4. How can variables be specified?
There are many ways in which the definition and use of a variable can be
restricted in order to detect bugs and violations of the (mostly unwritten)
policies. See the pkglint developer's documentation for further details.
-23.5. Designing interfaces for Makefile fragments
+24.5. Designing interfaces for Makefile fragments
Most of the .mk 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.
-23.5.1. Procedures with parameters
+24.5.1. Procedures with parameters
In a traditional imperative programming language some of the .mk files could be
described as procedures. They take some input parameters and?after inclusion?
@@ -8389,7 +8474,7 @@ Examples for procedures are mk/bsd.options.mk and mk/buildlink3/bsd.builtin.mk.
To express that the parameters are evaluated at load time, they should be
assigned using the := operator, which should be used only for this purpose.
-23.5.2. Actions taken on behalf of parameters
+24.5.2. Actions taken on behalf of parameters
Action files take some input parameters and may define runtime variables. They
shall not define loadtime variables. There are action files that are included
@@ -8398,7 +8483,7 @@ explicitly.
An example for action files is mk/subst.mk.
-23.6. The order in which files are loaded
+24.6. The order in which files are loaded
Package Makefiles usually consist of a set of variable definitions, and include
the file ../../mk/bsd.pkg.mk in the very last line. Before that, they may also
@@ -8410,7 +8495,7 @@ the files are loaded matters.
This section describes at which point the various files are loaded and gives
reasons for that order.
-23.6.1. The order in bsd.prefs.mk
+24.6.1. The order in bsd.prefs.mk
The very first action in bsd.prefs.mk is to define some essential variables
like OPSYS, OS_VERSION and MACHINE_ARCH.
@@ -8430,7 +8515,7 @@ As the last steps, some essential variables from the wrapper and the package
system flavor are loaded, as well as the variables that have been cached in
earlier phases of a package build.
-23.6.2. The order in bsd.pkg.mk
+24.6.2. The order in bsd.pkg.mk
First, bsd.prefs.mk is loaded.
@@ -8457,16 +8542,16 @@ execution, though the actual order should not matter.
At last, some more files are included that don't set any interesting variables
but rather just define make targets to be executed.
-Chapter 24. Regression tests
+Chapter 25. Regression tests
Table of Contents
-24.1. The regression tests framework
-24.2. Running the regression tests
-24.3. Adding a new regression test
+25.1. The regression tests framework
+25.2. Running the regression tests
+25.3. Adding a new regression test
- 24.3.1. Overridable functions
- 24.3.2. Helper functions
+ 25.3.1. Overridable functions
+ 25.3.2. Helper functions
The pkgsrc infrastructure consists of a large codebase, and there are many
corners where every little bit of a file is well thought out, making pkgsrc
@@ -8475,22 +8560,22 @@ changes from breaking anything, a suite of regression tests should go along
with every important part of the pkgsrc infrastructure. This chapter describes
how regression tests work in pkgsrc and how you can add new tests.
-24.1. The regression tests framework
+25.1. The regression tests framework
-24.2. Running the regression tests
+25.2. Running the regression tests
You first need to install the pkgtools/pkg_regress package, which provides the
pkg_regress command. Then you can simply run that command, which will run all
tests in the regress category.
-24.3. Adding a new regression test
+25.3. Adding a new regression test
Every directory in the regress category that contains a file called spec is
considered a regression test. This file is a shell program that is included by
the pkg_regress command. The following functions can be overridden to suit your
needs.
-24.3.1. Overridable functions
+25.3.1. Overridable functions
These functions do not take any parameters. They are all called in "set -e"
mode, so you should be careful to check the exitcodes of any commands you run
@@ -8518,7 +8603,7 @@ do_cleanup()
This function cleans everything up after the test has been run. By default
it does nothing.
-24.3.2. Helper functions
+25.3.2. Helper functions
exit_status(expected)
@@ -8537,18 +8622,18 @@ output_prohibit(regex...)
() does not match the extended regular expression. If any of the regular
expressions matches, the test will fail.
-Chapter 25. Porting pkgsrc
+Chapter 26. Porting pkgsrc
Table of Contents
-25.1. Porting pkgsrc to a new operating system
-25.2. Adding support for a new compiler
+26.1. Porting pkgsrc to a new operating system
+26.2. Adding support for a new compiler
The pkgsrc system has already been ported to many operating systems, hardware
architectures and compilers. This chapter explains the necessary steps to make
pkgsrc even more portable.
-25.1. Porting pkgsrc to a new operating system
+26.1. Porting pkgsrc to a new operating system
To port pkgsrc to a new operating system (called MyOS in this example), you
need to touch the following files:
@@ -8595,7 +8680,7 @@ mk/tools/tools.MyOS.mk
Now, you should be able to build some basic packages, like lang/perl5, shells/
bash.
-25.2. Adding support for a new compiler
+26.2. Adding support for a new compiler
TODO
@@ -8672,7 +8757,7 @@ Create the directory where the package lives, plus any auxiliary directories:
# cd bison
# mkdir patches
-Create Makefile, DESCR and PLIST (see Chapter 10, Package components - files,
+Create Makefile, DESCR and PLIST (see Chapter 11, Package components - files,
directories and contents) then continue with fetching the distfile:
# make fetch