diff options
author | wiz <wiz@pkgsrc.org> | 2010-12-28 18:47:52 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2010-12-28 18:47:52 +0000 |
commit | ca996f34aba22feef30102cd7a0105388d9b8f6a (patch) | |
tree | 916e643659b9b55681e502af17a3424f6d042a47 | |
parent | fa1669ce0cb6565ea6e6dd8872d6cb85c110a457 (diff) | |
download | pkgsrc-ca996f34aba22feef30102cd7a0105388d9b8f6a.tar.gz |
regen
-rw-r--r-- | doc/pkgsrc.html | 2668 | ||||
-rw-r--r-- | doc/pkgsrc.txt | 146 |
2 files changed, 1394 insertions, 1420 deletions
diff --git a/doc/pkgsrc.html b/doc/pkgsrc.html index 46d1bdd0113..569559cd659 100644 --- a/doc/pkgsrc.html +++ b/doc/pkgsrc.html @@ -7,7 +7,7 @@ <meta name="generator" content="DocBook XSL Stylesheets VX.X.X"> <meta name="description" content="pkgsrc is a centralized package management system for Unix-like operating systems. This guide provides information for users and developers of pkgsrc. It covers installation of binary and source packages, creation of binary and source packages and a high-level overview about the infrastructure."> </head> -<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en"> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" title="The pkgsrc guide"> <div class="titlepage"> <div> <div><h1 class="title"> @@ -32,7 +32,7 @@ </div></div> <div><p class="copyright">Copyright © 1994-2007 The NetBSD Foundation, Inc</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"> +<div><div class="abstract" title="Abstract"> <p class="title"><b>Abstract</b></p> <p>pkgsrc is a centralized package management system for Unix-like operating systems. This guide provides information for @@ -65,8 +65,7 @@ <dt><span class="sect1"><a href="#getting-first">2.1. Getting pkgsrc for the first time</a></span></dt> <dd><dl> <dt><span class="sect2"><a href="#getting-via-tar">2.1.1. As tar file</a></span></dt> -<dt><span class="sect2"><a href="#getting-via-sup">2.1.2. Via SUP</a></span></dt> -<dt><span class="sect2"><a href="#getting-via-cvs">2.1.3. Via anonymous CVS</a></span></dt> +<dt><span class="sect2"><a href="#getting-via-cvs">2.1.2. Via anonymous CVS</a></span></dt> </dl></dd> <dt><span class="sect1"><a href="#uptodate">2.2. Keeping pkgsrc up-to-date</a></span></dt> <dd><dl> @@ -117,8 +116,8 @@ <dt><span class="sect1"><a href="#conf.compiler">5.4. Selecting and configuring the compiler</a></span></dt> <dd><dl> <dt><span class="sect2"><a href="#selecting-the-compiler">5.4.1. Selecting the compiler</a></span></dt> -<dt><span class="sect2"><a href="#conf.cflags">5.4.2. Additional flags to the compiler (CFLAGS)</a></span></dt> -<dt><span class="sect2"><a href="#conf.ldflags">5.4.3. Additional flags to the linker (LDFLAGS)</a></span></dt> +<dt><span class="sect2"><a href="#conf.cflags">5.4.2. Additional flags to the compiler (<code class="varname">CFLAGS</code>)</a></span></dt> +<dt><span class="sect2"><a href="#conf.ldflags">5.4.3. Additional flags to the linker (<code class="varname">LDFLAGS</code>)</a></span></dt> </dl></dd> <dt><span class="sect1"><a href="#developer-advanced-settings">5.5. Developer/advanced settings</a></span></dt> <dt><span class="sect1"><a href="#selecting-build-options">5.6. Selecting Build Options</a></span></dt> @@ -154,8 +153,8 @@ builds)</a></span></dt> </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 ${LOCALBASE}</a></span></dt> -<dt><span class="sect1"><a href="#files.varbase">8.2. File system layout in ${VARBASE}</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></dd> <dt><span class="chapter"><a href="#faq">9. Frequently Asked Questions</a></span></dt> <dd><dl> @@ -166,17 +165,17 @@ builds)</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 make fetch to do passive FTP?</a></span></dt> +<dt><span class="sect1"><a href="#passive-ftp">9.8. How do I tell <span class="command"><strong>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 Don't know how to make -/usr/share/tmac/tmac.andoc mean?</a></span></dt> -<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does Could not find bsd.own.mk mean?</a></span></dt> +<dt><span class="sect1"><a href="#tmac.andoc-missing">9.10. What does <span class="quote">“<span class="quote">Don't know how to make +/usr/share/tmac/tmac.andoc</span>”</span> mean?</a></span></dt> +<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does <span class="quote">“<span class="quote">Could not find bsd.own.mk</span>”</span> 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 CFLAGS?</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 Makefile appears to contain unresolved cvs/rcs/??? merge conflicts mean?</a></span></dt> +<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.17. What does <span class="quote">“<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>”</span> 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> @@ -194,8 +193,8 @@ builds)</a></span></dt> </dl></dd> <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">11.1. Makefile</a></span></dt> -<dt><span class="sect1"><a href="#components.distinfo">11.2. distinfo</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">11.3.1. Structure of a single patch file</a></span></dt> @@ -211,13 +210,13 @@ builds)</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">11.6. work*</a></span></dt> -<dt><span class="sect1"><a href="#files-dir">11.7. files/*</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">12. Programming in Makefiles</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">12.1. Caveats</a></span></dt> -<dt><span class="sect1"><a href="#makefile.variables">12.2. Makefile variables</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> @@ -231,25 +230,25 @@ builds)</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">13.1. RCS ID</a></span></dt> -<dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic PLIST generation</a></span></dt> -<dt><span class="sect1"><a href="#print-PLIST">13.3. Tweaking output of make print-PLIST</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 class="command"><strong>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 PLIST_SRC</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">14. Buildlink methodology</a></span></dt> <dd><dl> <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 buildlink3.mk files</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">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 BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files</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">14.3. Writing builtin.mk 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">14.3.1. Anatomy of a builtin.mk file</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> @@ -262,7 +261,7 @@ builds)</a></span></dt> </dl></dd> <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">15.2.1. How PKG_SYSCONFDIR is set</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> @@ -278,7 +277,7 @@ builds)</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">16.1. Global default options</a></span></dt> -<dt><span class="sect1"><a href="#converting-to-options">16.2. Converting packages to use bsd.options.mk</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> <dt><span class="sect1"><a href="#option-build">16.4. Determining the options of dependencies</a></span></dt> </dl></dd> @@ -288,21 +287,21 @@ builds)</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 fetch 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 checksum phase</a></span></dt> -<dt><span class="sect1"><a href="#build.extract">17.7. The extract phase</a></span></dt> -<dt><span class="sect1"><a href="#build.patch">17.8. The patch phase</a></span></dt> -<dt><span class="sect1"><a href="#build.tools">17.9. The tools phase</a></span></dt> -<dt><span class="sect1"><a href="#build.wrapper">17.10. The wrapper phase</a></span></dt> -<dt><span class="sect1"><a href="#build.configure">17.11. The configure phase</a></span></dt> -<dt><span class="sect1"><a href="#build.build">17.12. The build phase</a></span></dt> -<dt><span class="sect1"><a href="#build.test">17.13. The test phase</a></span></dt> -<dt><span class="sect1"><a href="#build.install">17.14. The install phase</a></span></dt> -<dt><span class="sect1"><a href="#build.package">17.15. The package phase</a></span></dt> +<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> @@ -318,7 +317,7 @@ builds)</a></span></dt> <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 ???</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> @@ -330,12 +329,12 @@ builds)</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 fetch phase</a></span></dt> +<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 configure phase</a></span></dt> +<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> @@ -348,14 +347,14 @@ builds)</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 build phase</a></span></dt> +<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 ...</a></span></dt> +<dt><span class="sect2"><a href="#undefined-reference">19.5.3. Undefined reference to <span class="quote">“<span class="quote">...</span>”</span></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 install phase</a></span></dt> +<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> @@ -420,8 +419,8 @@ builds)</a></span></dt> </dl></dd> <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">24.6.1. The order in bsd.prefs.mk</a></span></dt> -<dt><span class="sect2"><a href="#infr.order.pkg">24.6.2. The order in bsd.pkg.mk</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">25. Regression tests</a></span></dt> @@ -447,7 +446,7 @@ builds)</a></span></dt> <dt><span class="sect2"><a href="#example-Makefile">A.1.1. Makefile</a></span></dt> <dt><span class="sect2"><a href="#example-descr">A.1.2. DESCR</a></span></dt> <dt><span class="sect2"><a href="#example-plist">A.1.3. PLIST</a></span></dt> -<dt><span class="sect2"><a href="#checking-package-with-pkglint">A.1.4. Checking a package with pkglint</a></span></dt> +<dt><span class="sect2"><a href="#checking-package-with-pkglint">A.1.4. Checking a package with <span class="command"><strong>pkglint</strong></span></a></span></dt> </dl></dd> <dt><span class="sect1"><a href="#steps-for-b-i-p">A.2. Steps for building, installing, packaging</a></span></dt> </dl></dd> @@ -458,12 +457,12 @@ builds)</a></span></dt> </dl></dd> <dt><span class="appendix"><a href="#ftp-layout">C. Directory layout of the pkgsrc FTP server</a></span></dt> <dd><dl> -<dt><span class="sect1"><a href="#ftp-distfiles">C.1. distfiles: The distributed source files</a></span></dt> -<dt><span class="sect1"><a href="#ftp-misc">C.2. misc: Miscellaneous things</a></span></dt> -<dt><span class="sect1"><a href="#ftp-packages">C.3. packages: Binary packages</a></span></dt> -<dt><span class="sect1"><a href="#ftp-reports">C.4. reports: Bulk build reports</a></span></dt> -<dt><span class="sect1"><a href="#ftp-source">C.5. current, -pkgsrc-20xxQy: +<dt><span class="sect1"><a href="#ftp-distfiles">C.1. <code class="filename">distfiles</code>: The distributed source files</a></span></dt> +<dt><span class="sect1"><a href="#ftp-misc">C.2. <code class="filename">misc</code>: Miscellaneous things</a></span></dt> +<dt><span class="sect1"><a href="#ftp-packages">C.3. <code class="filename">packages</code>: Binary packages</a></span></dt> +<dt><span class="sect1"><a href="#ftp-reports">C.4. <code class="filename">reports</code>: Bulk build reports</a></span></dt> +<dt><span class="sect1"><a href="#ftp-source">C.5. <code class="filename">current</code>, +<code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>: source packages</a></span></dt> </dl></dd> <dt><span class="appendix"><a href="#editing">D. Editing guidelines for the pkgsrc guide</a></span></dt> @@ -484,7 +483,7 @@ source packages</a></span></dt> </dt> </dl> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 1. What is pkgsrc?"> <div class="titlepage"><div><div><h2 class="title"> <a name="introduction"></a>Chapter 1. What is pkgsrc?</h2></div></div></div> <div class="toc"> @@ -501,7 +500,7 @@ source packages</a></span></dt> <dt><span class="sect1"><a href="#typography">1.4. Typography</a></span></dt> </dl> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="1.1. Introduction"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="introduction-section"></a>1.1. Introduction</h2></div></div></div> <p>There is a lot of software freely available for Unix-based @@ -513,71 +512,71 @@ to handle binary packages, so that not every user has to build the packages for himself, which is a time-costly task.</p> <p>pkgsrc currently contains several thousand packages, including:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/apache/README.html" target="_top"><code class="filename">www/apache</code></a> - The Apache +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/apache/README.html" target="_top"><code class="filename">www/apache</code></a> - The Apache web server</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/firefox/README.html" target="_top"><code class="filename">www/firefox</code></a> - The Firefox +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/firefox/README.html" target="_top"><code class="filename">www/firefox</code></a> - The Firefox web browser</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome/README.html" target="_top"><code class="filename">meta-pkgs/gnome</code></a> - The GNOME +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome/README.html" target="_top"><code class="filename">meta-pkgs/gnome</code></a> - The GNOME Desktop Environment</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/kde3/README.html" target="_top"><code class="filename">meta-pkgs/kde3</code></a> - The K +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/kde3/README.html" target="_top"><code class="filename">meta-pkgs/kde3</code></a> - The K Desktop Environment</p></li> </ul></div> <p>...just to name a few.</p> <p>pkgsrc has built-in support for handling varying dependencies, such as pthreads and X11, and extended features such as IPv6 support on a range of platforms.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="1.1.1. Why pkgsrc?"> <div class="titlepage"><div><div><h3 class="title"> <a name="why-pkgsrc"></a>1.1.1. Why pkgsrc?</h3></div></div></div> <p> pkgsrc provides the following key features: </p> -<div class="itemizedlist"><ul type="disc"> -<li><p>Easy building of software from source as well as the creation +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>Easy building of software from source as well as the creation and installation of binary packages. The source and latest patches are retrieved from a master or mirror download site, checksum verified, then built on your system. Support for binary-only distributions is available for both native platforms and NetBSD emulated platforms.</p></li> -<li><p>All packages are installed in a consistent directory tree, +<li class="listitem"><p>All packages are installed in a consistent directory tree, including binaries, libraries, man pages and other documentation.</p></li> -<li><p>Package dependencies, including when performing package updates, +<li class="listitem"><p>Package dependencies, including when performing package updates, are handled automatically. The configuration files of various packages are handled automatically during updates, so local changes are preserved.</p></li> -<li><p>Like NetBSD, pkgsrc is designed with portability in mind and +<li class="listitem"><p>Like NetBSD, pkgsrc is designed with portability in mind and consists of highly portable code. This allows the greatest speed of development when porting to new a platform. This portability also ensures that pkgsrc is <span class="emphasis"><em>consistent across all platforms</em></span>.</p></li> -<li><p>The installation prefix, acceptable software licenses, +<li class="listitem"><p>The installation prefix, acceptable software licenses, international encryption requirements and build-time options for a large number of packages are all set in a simple, central configuration file.</p></li> -<li><p>The entire source (not including the distribution files) is +<li class="listitem"><p>The entire source (not including the distribution files) is freely available under a BSD license, so you may extend and adapt pkgsrc to your needs. Support for local packages and patches is available right out of the box, so you can configure it specifically for your environment.</p></li> </ul></div> <p>The following principles are basic to pkgsrc:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>“<span class="quote">It should only work if it's right.</span>” +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><span class="quote">“<span class="quote">It should only work if it's right.</span>”</span> — 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>“<span class="quote">If it works, it should work everywhere</span>” +<li class="listitem"><p><span class="quote">“<span class="quote">If it works, it should work everywhere</span>”</span> — 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> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="1.1.2. Supported platforms"> <div class="titlepage"><div><div><h3 class="title"> <a name="intro.platforms"></a>1.1.2. Supported platforms</h3></div></div></div> <p>pkgsrc consists of both a source distribution and a binary @@ -657,13 +656,17 @@ minutes!</p> <td><a class="ulink" href="http://www.hp.com/products1/unix/" target="_top">HP-UX</a></td> <td align="center">Apr 2007</td> </tr> +<tr> +<td><a class="ulink" href="http://www.haiku-os.org/" target="_top">Haiku</a></td> +<td align="center">Sep 2010</td> +</tr> </tbody> </table></div> </div> <br class="table-break"> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="1.2. Overview"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="overview"></a>1.2. Overview</h2></div></div></div> <p>This document is divided into three parts. The first, @@ -680,11 +683,11 @@ minutes!</p> <p>This document is available in various formats: <span class="simplelist"><a class="ulink" href="index.html" target="_top">HTML</a>, <a class="ulink" href="pkgsrc.pdf" target="_top">PDF</a>, <a class="ulink" href="pkgsrc.ps" target="_top">PS</a>, <a class="ulink" href="pkgsrc.txt" target="_top">TXT</a></span>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="1.3. Terminology"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="terminology"></a>1.3. Terminology</h2></div></div></div> -<p>There has been a lot of talk about “<span class="quote">ports</span>”, - “<span class="quote">packages</span>”, etc. so far. Here is a description of all the +<p>There has been a lot of talk about <span class="quote">“<span class="quote">ports</span>”</span>, + <span class="quote">“<span class="quote">packages</span>”</span>, etc. so far. Here is a description of all the terminology used within this document.</p> <div class="variablelist"><dl> <dt><span class="term">Package</span></dt> @@ -694,7 +697,7 @@ minutes!</p> pkgsrc. Packages are traditionally stored under <code class="filename">/usr/pkgsrc</code>.</p></dd> <dt><span class="term">The NetBSD package system</span></dt> -<dd><p>This is the former name of “<span class="quote">pkgsrc</span>”. It +<dd><p>This is the former name of <span class="quote">“<span class="quote">pkgsrc</span>”</span>. It is part of the NetBSD operating system and can be bootstrapped to run on non-NetBSD operating systems as well. It handles building (compiling), installing, and removing of @@ -711,7 +714,7 @@ minutes!</p> <dt><span class="term">Port</span></dt> <dd><p>This is the term used by FreeBSD and OpenBSD people for what we call a package. - In NetBSD terminology, “<span class="quote">port</span>” refers to a different + In NetBSD terminology, <span class="quote">“<span class="quote">port</span>”</span> refers to a different architecture.</p></dd> <dt><span class="term">Precompiled/binary package</span></dt> <dd> @@ -722,7 +725,7 @@ minutes!</p> recompile. Packages are usually generated in <code class="filename">/usr/pkgsrc/packages</code>; there is also an archive on <a class="ulink" href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/" target="_top">ftp.NetBSD.org</a>.</p> -<p>Sometimes, this is referred to by the term “<span class="quote">package</span>” too, +<p>Sometimes, this is referred to by the term <span class="quote">“<span class="quote">package</span>”</span> too, especially in the context of precompiled packages.</p> </dd> <dt><span class="term">Program</span></dt> @@ -730,7 +733,7 @@ minutes!</p> constructed from all the files in the distfile by the actions defined in the corresponding package.</p></dd> </dl></div> -<div class="sect2" lang="en"> +<div class="sect2" title="1.3.1. Roles involved in pkgsrc"> <div class="titlepage"><div><div><h3 class="title"> <a name="term.roles"></a>1.3.1. Roles involved in pkgsrc</h3></div></div></div> <div class="variablelist"><dl> @@ -739,8 +742,8 @@ minutes!</p> <p>The pkgsrc users are people who use the packages provided by pkgsrc. Typically they are system administrators. The people using the - software that is inside the packages (maybe called “<span class="quote">end - users</span>”) are not covered by the pkgsrc guide.</p> + software that is inside the packages (maybe called <span class="quote">“<span class="quote">end + users</span>”</span>) are not covered by the pkgsrc guide.</p> <p>There are two kinds of pkgsrc users: Some only want to install pre-built binary packages. Others build the pkgsrc packages from source, either for installing them directly or for @@ -758,17 +761,17 @@ minutes!</p> </dl></div> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="1.4. Typography"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="typography"></a>1.4. Typography</h2></div></div></div> <p>When giving examples for commands, shell prompts are used to show if the command should/can be issued as root, or if - “<span class="quote">normal</span>” user privileges are sufficient. We use a + <span class="quote">“<span class="quote">normal</span>”</span> user privileges are sufficient. We use a <code class="prompt">#</code> for root's shell prompt, and a <code class="prompt">%</code> for users' shell prompt, assuming they use the C-shell or tcsh.</p> </div> </div> -<div class="part" lang="en"> +<div class="part" title="Part I. The pkgsrc user's guide"> <div class="titlepage"><div><div><h1 class="title"> <a name="users-guide"></a>Part I. The pkgsrc user's guide</h1></div></div></div> <div class="toc"> @@ -779,8 +782,7 @@ minutes!</p> <dt><span class="sect1"><a href="#getting-first">2.1. Getting pkgsrc for the first time</a></span></dt> <dd><dl> <dt><span class="sect2"><a href="#getting-via-tar">2.1.1. As tar file</a></span></dt> -<dt><span class="sect2"><a href="#getting-via-sup">2.1.2. Via SUP</a></span></dt> -<dt><span class="sect2"><a href="#getting-via-cvs">2.1.3. Via anonymous CVS</a></span></dt> +<dt><span class="sect2"><a href="#getting-via-cvs">2.1.2. Via anonymous CVS</a></span></dt> </dl></dd> <dt><span class="sect1"><a href="#uptodate">2.2. Keeping pkgsrc up-to-date</a></span></dt> <dd><dl> @@ -831,8 +833,8 @@ minutes!</p> <dt><span class="sect1"><a href="#conf.compiler">5.4. Selecting and configuring the compiler</a></span></dt> <dd><dl> <dt><span class="sect2"><a href="#selecting-the-compiler">5.4.1. Selecting the compiler</a></span></dt> -<dt><span class="sect2"><a href="#conf.cflags">5.4.2. Additional flags to the compiler (CFLAGS)</a></span></dt> -<dt><span class="sect2"><a href="#conf.ldflags">5.4.3. Additional flags to the linker (LDFLAGS)</a></span></dt> +<dt><span class="sect2"><a href="#conf.cflags">5.4.2. Additional flags to the compiler (<code class="varname">CFLAGS</code>)</a></span></dt> +<dt><span class="sect2"><a href="#conf.ldflags">5.4.3. Additional flags to the linker (<code class="varname">LDFLAGS</code>)</a></span></dt> </dl></dd> <dt><span class="sect1"><a href="#developer-advanced-settings">5.5. Developer/advanced settings</a></span></dt> <dt><span class="sect1"><a href="#selecting-build-options">5.6. Selecting Build Options</a></span></dt> @@ -868,8 +870,8 @@ builds)</a></span></dt> </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 ${LOCALBASE}</a></span></dt> -<dt><span class="sect1"><a href="#files.varbase">8.2. File system layout in ${VARBASE}</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></dd> <dt><span class="chapter"><a href="#faq">9. Frequently Asked Questions</a></span></dt> <dd><dl> @@ -880,21 +882,21 @@ builds)</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 make fetch to do passive FTP?</a></span></dt> +<dt><span class="sect1"><a href="#passive-ftp">9.8. How do I tell <span class="command"><strong>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 Don't know how to make -/usr/share/tmac/tmac.andoc mean?</a></span></dt> -<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does Could not find bsd.own.mk mean?</a></span></dt> +<dt><span class="sect1"><a href="#tmac.andoc-missing">9.10. What does <span class="quote">“<span class="quote">Don't know how to make +/usr/share/tmac/tmac.andoc</span>”</span> mean?</a></span></dt> +<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does <span class="quote">“<span class="quote">Could not find bsd.own.mk</span>”</span> 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 CFLAGS?</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 Makefile appears to contain unresolved cvs/rcs/??? merge conflicts mean?</a></span></dt> +<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.17. What does <span class="quote">“<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>”</span> mean?</a></span></dt> </dl></dd> </dl> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 2. Where to get pkgsrc and how to keep it up-to-date"> <div class="titlepage"><div><div><h2 class="title"> <a name="getting"></a>Chapter 2. Where to get pkgsrc and how to keep it up-to-date</h2></div></div></div> <div class="toc"> @@ -903,8 +905,7 @@ builds)</a></span></dt> <dt><span class="sect1"><a href="#getting-first">2.1. Getting pkgsrc for the first time</a></span></dt> <dd><dl> <dt><span class="sect2"><a href="#getting-via-tar">2.1.1. As tar file</a></span></dt> -<dt><span class="sect2"><a href="#getting-via-sup">2.1.2. Via SUP</a></span></dt> -<dt><span class="sect2"><a href="#getting-via-cvs">2.1.3. Via anonymous CVS</a></span></dt> +<dt><span class="sect2"><a href="#getting-via-cvs">2.1.2. Via anonymous CVS</a></span></dt> </dl></dd> <dt><span class="sect1"><a href="#uptodate">2.2. Keeping pkgsrc up-to-date</a></span></dt> <dd><dl> @@ -921,7 +922,7 @@ your filesystem, provided that the pathname does not contain white-space or other characters that are interpreted specially by the shell and some other programs. A safe bet is to use only letters, digits, underscores and dashes.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="2.1. Getting pkgsrc for the first time"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="getting-first"></a>2.1. Getting pkgsrc for the first time</h2></div></div></div> <p>Before you download any pkgsrc files, you should decide @@ -932,9 +933,9 @@ and dashes.</p> from the year and the quarter, for example <code class="literal">2009Q1</code>.</p> <p>The second step is to decide <span class="emphasis"><em>how</em></span> you - want to download pkgsrc. You can get it as a tar file, via SUP, - or via CVS. All three ways are described here.</p> -<div class="sect2" lang="en"> + want to download pkgsrc. You can get it as a tar file or via CVS. + Both ways are described here.</p> +<div class="sect2" title="2.1.1. As tar file"> <div class="titlepage"><div><div><h3 class="title"> <a name="getting-via-tar"></a>2.1.1. As tar file</h3></div></div></div> <p>The primary download location for all pkgsrc files is @@ -951,7 +952,7 @@ and dashes.</p> <code class="prompt">$</code> <strong class="userinput"><code>ftp ftp://ftp.NetBSD.org/pub/pkgsrc/<em class="replaceable"><code>pkgsrc-20xxQy</code></em>/<em class="replaceable"><code>pkgsrc-20xxQy</code></em>.tar.gz</code></strong></pre> <p>Where <em class="replaceable"><code>pkgsrc-20xxQy</code></em> is the stable branch to be downloaded, for example, - “<span class="quote">pkgsrc-2009Q1</span>”.</p> + <span class="quote">“<span class="quote">pkgsrc-2009Q1</span>”</span>.</p> <p>Then, extract it with:</p> <pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>tar -xzf <em class="replaceable"><code>pkgsrc-20xxQy</code></em>.tar.gz -C /usr</code></strong></pre> <p>This will create the directory <code class="filename">pkgsrc/</code> @@ -960,79 +961,59 @@ and dashes.</p> <p>To download pkgsrc-current, run:</p> <pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>ftp ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc.tar.gz</code></strong></pre> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="2.1.2. Via anonymous CVS"> <div class="titlepage"><div><div><h3 class="title"> -<a name="getting-via-sup"></a>2.1.2. Via SUP</h3></div></div></div> -<p>As an alternative to the tar file, you can get pkgsrc via - the Software Update Protocol, SUP. To do so, make sure your - supfile has a line - -</p> -<pre class="programlisting"> -release=pkgsrc +<a name="getting-via-cvs"></a>2.1.2. Via anonymous CVS</h3></div></div></div> +<p>To fetch a specific pkgsrc stable branch, run:</p> +<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>cd /usr && cvs -q -z3 -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -r <em class="replaceable"><code>pkgsrc-20xxQy</code></em> -P pkgsrc</code></strong> </pre> -<p> - - in it, see the examples in - <code class="filename">/usr/share/examples/supfiles</code>, and that the - <code class="filename">/usr/pkgsrc</code> directory exists. Then, simply - run:</p> -<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>sup -v <em class="replaceable"><code>/path/to/your/supfile</code></em></code></strong>.</pre> -</div> -<div class="sect2" lang="en"> -<div class="titlepage"><div><div><h3 class="title"> -<a name="getting-via-cvs"></a>2.1.3. Via anonymous CVS</h3></div></div></div> -<p>To do an initial (full) checkout of pkgsrc, you first - have to set some environment variables. For the C-Shell, - type:</p> -<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>setenv CVSROOT anoncvs@anoncvs.NetBSD.org:/cvsroot</code></strong> -<code class="prompt">%</code> <strong class="userinput"><code>setenv CVS_RSH ssh</code></strong> +<p>Where <em class="replaceable"><code>pkgsrc-20xxQy</code></em> is the stable + branch to be checked out, for example, <span class="quote">“<span class="quote">pkgsrc-2009Q1</span>”</span></p> +<p>This will create the directory <code class="filename">pkgsrc/</code> + in your <code class="filename">/usr/</code> directory and all the package source + will be stored under <code class="filename">/usr/pkgsrc/</code>.</p> +<p>To fetch the pkgsrc current branch, run:</p> +<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>cd /usr && cvs -q -z3 -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P pkgsrc</code></strong> </pre> -<p>Or, the same for the bourne shell:</p> -<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>export CVSROOT="anoncvs@anoncvs.NetBSD.org:/cvsroot"</code></strong> -<code class="prompt">$</code> <strong class="userinput"><code>export CVS_RSH="ssh"</code></strong> +<p>Refer to <a class="ulink" href="http://NetBSD.org/FIXME" target="_top">list of available CVS mirrors</a> to choose faster one.</p> +<p>If you get error messages from <code class="literal">rsh</code>, you need to set CVS_RSH variable. E.g.:</p> +<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>cd /usr && env CVS_RSH=ssh cvs -q -z3 -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P pkgsrc</code></strong> </pre> -<p>By default, CVS doesn't do things like most people would - expect it to do. But there is a - way to convince CVS, by creating a file called - <code class="filename">.cvsrc</code> in your home directory and saving - the following lines to it. This file will save you lots of - headache and some bug reports, so we strongly recommend it. You - can find an explanation of this file in the CVS - documentation.</p> +<p>Refer to documentation on your command shell how to set CVS_RSH=ssh permanently. + For Bourne shells, you can set it in your <code class="filename">.profile</code> + or better globally in <code class="filename">/etc/profile</code>:</p> +<pre class="programlisting"> +# set CVS remote shell command +CVS_RSH=ssh +export CVS_RSH +</pre> +<p>By default, CVS doesn't do things like most people would expect it to do. + But there is a way to convince CVS, by creating a file called <code class="filename">.cvsrc</code> + in your home directory and saving the following lines to it. + This file will save you lots of headache and some bug reports, so we strongly recommend it. + You can find an explanation of this file in the CVS documentation.</p> <pre class="programlisting"> # recommended CVS configuration file from the pkgsrc guide +cvs -q -z3 checkout -P update -dP -release -d diff -upN -cvs -q -z3 rdiff -u +release -d </pre> -<p>To fetch a specific pkgsrc stable branch from scratch, run:</p> -<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>cd /usr</code></strong> -<code class="prompt">$</code> <strong class="userinput"><code>cvs checkout -r <em class="replaceable"><code>pkgsrc-20xxQy</code></em> -P pkgsrc</code></strong></pre> -<p>Where <em class="replaceable"><code>pkgsrc-20xxQy</code></em> is the stable - branch to be checked out, for example, “<span class="quote">pkgsrc-2009Q1</span>”</p> -<p>This will create the directory <code class="filename">pkgsrc/</code> - in your <code class="filename">/usr/</code> directory and all the package source - will be stored under <code class="filename">/usr/pkgsrc/</code>.</p> -<p>To fetch the pkgsrc current branch, run:</p> -<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>cd /usr</code></strong> -<code class="prompt">$</code> <strong class="userinput"><code>cvs checkout -P pkgsrc</code></strong></pre> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="2.2. Keeping pkgsrc up-to-date"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="uptodate"></a>2.2. Keeping pkgsrc up-to-date</h2></div></div></div> <p>The preferred way to keep pkgsrc up-to-date is via CVS (which also works if you have first installed it via a tar file). It saves bandwidth and hard disk activity, compared to downloading the tar file again.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="2.2.1. Via tar files"> <div class="titlepage"><div><div><h3 class="title"> <a name="uptodate-tar"></a>2.2.1. Via tar files</h3></div></div></div> -<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Warning</h3> <p>When updating from a tar file, you first need to completely remove the old pkgsrc directory. Otherwise those @@ -1053,7 +1034,7 @@ rdiff -u changes to the files in the pkgsrc directory. Remove the pkgsrc directory and extract the new tar file. Done.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="2.2.2. Via CVS"> <div class="titlepage"><div><div><h3 class="title"> <a name="uptodate-cvs"></a>2.2.2. Via CVS</h3></div></div></div> <p>To update pkgsrc via CVS, make sure the environment @@ -1061,18 +1042,18 @@ rdiff -u change to the <code class="filename">pkgsrc</code> directory and run cvs:</p> <pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>cd /usr/pkgsrc</code></strong> <code class="prompt">$</code> <strong class="userinput"><code>cvs update -dP</code></strong></pre> -<div class="sect3" lang="en"> +<div class="sect3" title="2.2.2.1. Switching between different pkgsrc branches"> <div class="titlepage"><div><div><h4 class="title"> <a name="uptodate-cvs-switch"></a>2.2.2.1. Switching between different pkgsrc branches</h4></div></div></div> <p>When updating pkgsrc, the CVS program keeps track of the branch you selected. But if you, for whatever reason, want to switch from the stable branch to the current one, you can do it - by adding the option “<span class="quote">-A</span>” after the - “<span class="quote">update</span>” keyword. To switch from the current branch + by adding the option <span class="quote">“<span class="quote">-A</span>”</span> after the + <span class="quote">“<span class="quote">update</span>”</span> keyword. To switch from the current branch back to the stable branch, add the - “<span class="quote">-rpkgsrc-2009Q3</span>” option.</p> + <span class="quote">“<span class="quote">-rpkgsrc-2009Q3</span>”</span> option.</p> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="2.2.2.2. What happens to my changes when updating?"> <div class="titlepage"><div><div><h4 class="title"> <a name="uptodate-cvs-changes"></a>2.2.2.2. What happens to my changes when updating?</h4></div></div></div> <p>When you update pkgsrc, the CVS program will only touch @@ -1081,12 +1062,12 @@ rdiff -u unmodified. If you change files that are managed by CVS, later updates will try to merge your changes with those that have been done by others. See the CVS manual, chapter - “<span class="quote">update</span>” for details.</p> + <span class="quote">“<span class="quote">update</span>”</span> for details.</p> </div> </div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 3. Using pkgsrc on systems other than NetBSD"> <div class="titlepage"><div><div><h2 class="title"> <a name="platforms"></a>Chapter 3. Using pkgsrc on systems other than NetBSD</h2></div></div></div> <div class="toc"> @@ -1106,12 +1087,12 @@ rdiff -u </dl></dd> </dl> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="3.1. Binary distribution"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="binarydist"></a>3.1. Binary distribution</h2></div></div></div> <p>See <a class="xref" href="#using-pkg" title="4.1. Using binary packages">Section 4.1, “Using binary packages”</a>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="3.2. Bootstrapping pkgsrc"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="bootstrapping-pkgsrc"></a>3.2. Bootstrapping pkgsrc</h2></div></div></div> <p>Installing the bootstrap kit from source should be as simple as:</p> @@ -1129,19 +1110,19 @@ rdiff -u directory where pkgsrc will do its internal bookkeeping. However, these can also be set using command-line arguments.</p> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>The bootstrap installs a <span class="command"><strong>bmake</strong></span> tool. Use this <span class="command"><strong>bmake</strong></span> when building via pkgsrc. For examples in this guide, use <span class="command"><strong>bmake</strong></span> - instead of “<span class="quote">make</span>”.</p> + instead of <span class="quote">“<span class="quote">make</span>”</span>.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="3.3. Platform-specific notes"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="platform-specific-notes"></a>3.3. Platform-specific notes</h2></div></div></div> <p>Here are some platform-specific notes you should be aware of.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="3.3.1. Darwin (Mac OS X)"> <div class="titlepage"><div><div><h3 class="title"> <a name="darwin"></a>3.3.1. Darwin (Mac OS X)</h3></div></div></div> <p>Darwin 5.x and up are supported. Before you start, you @@ -1152,20 +1133,20 @@ rdiff -u package included with the Developer Tools) if you intend to build packages that use the X11 Window System.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="3.3.2. FreeBSD"> <div class="titlepage"><div><div><h3 class="title"> <a name="freebsd"></a>3.3.2. FreeBSD</h3></div></div></div> <p>FreeBSD 4.7 and 5.0 have been tested and are supported, other versions may work.</p> <p>Care should be taken so that the tools that this kit installs do not conflict with the FreeBSD userland tools. There are several steps:</p> -<div class="orderedlist"><ol type="1"> -<li><p>FreeBSD stores its ports pkg database in +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>FreeBSD stores its ports pkg database in <code class="filename">/var/db/pkg</code>. It is therefore recommended that you choose a different location (e.g. <code class="filename">/usr/pkgdb</code>) by using the --pkgdbdir option to the bootstrap script.</p></li> -<li> +<li class="listitem"> <p>If you do not intend to use the FreeBSD ports tools, it's probably a good idea to move them out of the way to avoid confusion, e.g.</p> <pre class="screen"> @@ -1176,12 +1157,12 @@ rdiff -u <code class="prompt">#</code> <strong class="userinput"><code>mv pkg_info pkg_info.orig</code></strong> </pre> </li> -<li><p>An example <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> file will be placed in +<li class="listitem"><p>An example <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> file will be placed in <code class="filename">/etc/mk.conf.example</code> file when you use the bootstrap script.</p></li> </ol></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="3.3.3. Interix"> <div class="titlepage"><div><div><h3 class="title"> <a name="interix"></a>3.3.3. Interix</h3></div></div></div> <p>Interix is a POSIX-compatible subsystem for the Windows NT kernel, @@ -1193,18 +1174,21 @@ rdiff -u are not officially supported. (The main difference in 3.0/3.1 is lack of pthreads, but other parts of libc may also be lacking.)</p> <p>Services for Unix Applications (aka SUA) is an integrated component - of Windows Server 2003 R2 and Windows Vista. As of this writing, SUA's + of Windows Server 2003 R2 (5.2), Windows Vista and Windows Server 2008 + (6.0), Windows 7 and Windows Server 2008 R2 (6.1). As of this writing, + SUA's Interix 6.0 (32bit) subsystem has been tested. 6.0 (64bit) and 6.1 + (both 32bit and 64bit) may work. Interix 5.x subsystem has not yet been tested with pkgsrc.</p> -<div class="sect3" lang="en"> +<div class="sect3" title="3.3.3.1. When installing Interix/SFU"> <div class="titlepage"><div><div><h4 class="title"> <a name="platform.interix-sfu-install"></a>3.3.3.1. When installing Interix/SFU</h4></div></div></div> <p>At an absolute minimum, the following packages must be installed from the Windows Services for Unix 3.5 distribution in order to use pkgsrc:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>Utilities -> Base Utilities</p></li> -<li><p>Interix GNU Components -> (all)</p></li> -<li><p>Remote Connectivity</p></li> -<li><p>Interix SDK</p></li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>Utilities -> Base Utilities</p></li> +<li class="listitem"><p>Interix GNU Components -> (all)</p></li> +<li class="listitem"><p>Remote Connectivity</p></li> +<li class="listitem"><p>Interix SDK</p></li> </ul></div> <p>When using pkgsrc on Interix, DO NOT install the Utilities subcomponent "UNIX Perl". That is Perl 5.6 without shared module support, installed to @@ -1236,22 +1220,22 @@ rdiff -u risk if applications are often run as a user in the Administrators group!)</p> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="3.3.3.2. What to do if Interix/SFU is already installed"> <div class="titlepage"><div><div><h4 class="title"> <a name="platform.interix-sfu-postinstall"></a>3.3.3.2. What to do if Interix/SFU is already installed</h4></div></div></div> <p>If SFU is already installed and you wish to alter these settings to work with pkgsrc, note the following things.</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>To uninstall UNIX Perl, use Add/Remove Programs, select Microsoft +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>To uninstall UNIX Perl, use Add/Remove Programs, select Microsoft Windows Services for UNIX, then click Change. In the installer, choose Add or Remove, then uncheck Utilities->UNIX Perl.</p></li> -<li> +<li class="listitem"> <p>To enable case-sensitivity for the file system, run REGEDIT.EXE, and change the following registry key:</p> <p>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel</p> <p>Set the DWORD value "obcaseinsensitive" to 0; then reboot.</p> </li> -<li> +<li class="listitem"> <p>To enable setuid binaries (optional), run REGEDIT.EXE, and change the following registry key:</p> <p>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Services for UNIX</p> @@ -1259,7 +1243,7 @@ rdiff -u </li> </ul></div> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="3.3.3.3. Important notes for using pkgsrc"> <div class="titlepage"><div><div><h4 class="title"> <a name="platform.interix-notes"></a>3.3.3.3. Important notes for using pkgsrc</h4></div></div></div> <p>The package manager (either the pkgsrc "su" user, or the user @@ -1282,14 +1266,14 @@ rdiff -u interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi: </pre> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="3.3.3.4. Limitations of the Interix platform"> <div class="titlepage"><div><div><h4 class="title"> <a name="platform.interix-limits"></a>3.3.3.4. Limitations of the Interix platform</h4></div></div></div> <p>Though Interix suffices as a familiar and flexible substitute for a full Unix-like platform, it has some drawbacks that should be noted for those desiring to make the most of Interix.</p> -<div class="itemizedlist"><ul type="disc"> -<li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"> <p><span class="strong"><strong>X11:</strong></span></p> <p>Interix comes with the standard set of X11R6 client libraries, and can run X11 based applications, but it does @@ -1301,7 +1285,7 @@ interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi: and the free X11 server included with <a class="ulink" href="http://x.cygwin.com/" target="_top">Cygwin</a>.</p> </li> -<li> +<li class="listitem"> <p><span class="strong"><strong>X11 acceleration:</strong></span></p> <p>Because Interix runs in a completely different NT subsystem from Win32 applications, it does not currently support various X11 @@ -1310,7 +1294,7 @@ interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi: reasonably fast, but full motion video and other graphics intensive applications may require a faster-than-expected CPU.</p> </li> -<li> +<li class="listitem"> <p><span class="strong"><strong>Audio:</strong></span></p> <p>Interix has no native support for audio output. For audio support, pkgsrc uses the <span class="command"><strong>esound</strong></span> client/server @@ -1321,7 +1305,7 @@ interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi: <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/emulators/cygwin_esound/README.html" target="_top"><code class="filename">emulators/cygwin_esound</code></a> package must also be installed.</p> </li> -<li> +<li class="listitem"> <p><span class="strong"><strong>CD/DVDs, USB, and SCSI:</strong></span></p> <p>Direct device access is not currently supported in Interix, so it is not currently possible to access CD/DVD drives, USB devices, @@ -1329,7 +1313,7 @@ interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi: this makes it impossible to use Interix directly for CD/DVD burning.</p> </li> -<li> +<li class="listitem"> <p><span class="strong"><strong>Tape drives:</strong></span></p> <p>Due to the same limitations as for CD-ROMs and SCSI devices, tape drives are also not directly accessible in Interix. However, @@ -1339,7 +1323,7 @@ interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi: </li> </ul></div> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="3.3.3.5. Known issues for pkgsrc on Interix"> <div class="titlepage"><div><div><h4 class="title"> <a name="platform.interix-knownissues"></a>3.3.3.5. Known issues for pkgsrc on Interix</h4></div></div></div> <p>It is not necessary, in general, to have a "root" user on the @@ -1358,7 +1342,7 @@ interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi: </pre> </div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="3.3.4. IRIX"> <div class="titlepage"><div><div><h3 class="title"> <a name="irix"></a>3.3.4. IRIX</h3></div></div></div> <p>You will need a working C compiler, either gcc or SGI's MIPS and MIPSpro @@ -1403,7 +1387,7 @@ PKGSRC_COMPILER= mipspro <code class="filename">/usr/freeware/bin</code>), and (important) pass the '--preserve-path' flag.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="3.3.5. Linux"> <div class="titlepage"><div><div><h3 class="title"> <a name="linux"></a>3.3.5. Linux</h3></div></div></div> <p>Some versions of Linux (for example Debian GNU/Linux) need @@ -1419,7 +1403,7 @@ PKGSRC_COMPILER= mipspro env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \ ac_cv___attribute__=yes ./bootstrap </pre> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>icc 8.1 needs the `-i-static' argument instead of -static-libcxa.</p> </div> @@ -1453,19 +1437,19 @@ ICCBASE= /opt/icc dependency on the icc libraries until this is fixed in libtool.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="3.3.6. OpenBSD"> <div class="titlepage"><div><div><h3 class="title"> <a name="openbsd"></a>3.3.6. OpenBSD</h3></div></div></div> <p>OpenBSD 3.0 and 3.2 are tested and supported.</p> <p>Care should be taken so that the tools that this kit installs do not conflict with the OpenBSD userland tools. There are several steps:</p> -<div class="orderedlist"><ol type="1"> -<li><p>OpenBSD stores its ports pkg database in +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>OpenBSD stores its ports pkg database in <code class="filename">/var/db/pkg</code>. It is therefore recommended that you choose a different location (e.g. <code class="filename">/usr/pkgdb</code>) by using the --pkgdbdir option to the bootstrap script.</p></li> -<li> +<li class="listitem"> <p>If you do not intend to use the OpenBSD ports tools, it's probably a good idea to move them out of the way to avoid confusion, e.g.</p> <pre class="screen"> @@ -1476,7 +1460,7 @@ ICCBASE= /opt/icc <code class="prompt">#</code> <strong class="userinput"><code>mv pkg_info pkg_info.orig</code></strong> </pre> </li> -<li> +<li class="listitem"> <p>An example <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> file will be placed in <code class="filename">/etc/mk.conf.example</code> file when you use the bootstrap script. OpenBSD's make program uses @@ -1493,7 +1477,7 @@ ICCBASE= /opt/icc </li> </ol></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="3.3.7. Solaris"> <div class="titlepage"><div><div><h3 class="title"> <a name="solaris"></a>3.3.7. Solaris</h3></div></div></div> <p>Solaris 2.6 through 9 are supported on both x86 and sparc. @@ -1501,12 +1485,12 @@ ICCBASE= /opt/icc Sun WorkShop 5 have been tested.</p> <p>The following packages are required on Solaris 8 for the bootstrap process and to build packages.</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>SUNWsprot</p></li> -<li><p>SUNWarc</p></li> -<li><p>SUNWbtool</p></li> -<li><p>SUNWtoo</p></li> -<li><p>SUNWlibm</p></li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>SUNWsprot</p></li> +<li class="listitem"><p>SUNWarc</p></li> +<li class="listitem"><p>SUNWbtool</p></li> +<li class="listitem"><p>SUNWtoo</p></li> +<li class="listitem"><p>SUNWlibm</p></li> </ul></div> <p>Please note that the use of GNU binutils on Solaris is <span class="emphasis"><em>not</em></span> supported, as of June 2006.</p> @@ -1514,7 +1498,7 @@ ICCBASE= /opt/icc your $prefix are in your <code class="varname">PATH</code>. This includes <code class="filename">/usr/ccs/{bin,lib}</code> and e.g. <code class="filename">/usr/pkg/{bin,sbin}</code>.</p> -<div class="sect3" lang="en"> +<div class="sect3" title="3.3.7.1. If you are using gcc"> <div class="titlepage"><div><div><h4 class="title"> <a name="solaris-gcc-note"></a>3.3.7.1. If you are using gcc</h4></div></div></div> <p>It makes life much simpler if you only use the same gcc consistently @@ -1525,19 +1509,19 @@ ICCBASE= /opt/icc package, then remove gcc used during bootstrapping.</p> <p>Binary packages of gcc can be found through <a class="ulink" href="http://www.sunfreeware.com/" target="_top">http://www.sunfreeware.com/</a>.</p> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="3.3.7.2. If you are using Sun WorkShop"> <div class="titlepage"><div><div><h4 class="title"> <a name="solaris-sun-workshop-note"></a>3.3.7.2. If you are using Sun WorkShop</h4></div></div></div> <p>You will need at least the following packages installed (from WorkShop 5.0)</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>SPROcc +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>SPROcc - Sun WorkShop Compiler C 5.0</p></li> -<li><p>SPROcpl +<li class="listitem"><p>SPROcpl - Sun WorkShop Compiler C++ 5.0</p></li> -<li><p>SPROild +<li class="listitem"><p>SPROild - Sun WorkShop Incremental Linker</p></li> -<li><p>SPROlang +<li class="listitem"><p>SPROlang - Sun WorkShop Compilers common components</p></li> </ul></div> <p>You should set the following variables in your @@ -1548,14 +1532,14 @@ CXX= CC CPP= cc -E CXXCPP= CC -E </pre> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>The <code class="varname">CPP</code> setting might break some packages that use the C preprocessor for processing things other than C source code.</p> </div> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="3.3.7.3. Building 64-bit binaries with SunPro"> <div class="titlepage"><div><div><h4 class="title"> <a name="solaris-sunpro-64"></a>3.3.7.3. Building 64-bit binaries with SunPro</h4></div></div></div> <p>To build 64-bit packages, you just need to have the @@ -1564,14 +1548,14 @@ CXXCPP= CC -E PKGSRC_COMPILER= sunpro ABI= 64 </pre> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>This setting has been tested for the SPARC architecture. Intel and AMD machines need some more work.</p> </div> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="3.3.7.4. Common problems"> <div class="titlepage"><div><div><h4 class="title"> <a name="plat.sunos.problems"></a>3.3.7.4. Common problems</h4></div></div></div> <p>Sometimes, when using <span class="command"><strong>libtool</strong></span>, @@ -1588,7 +1572,7 @@ WRAPPER_SHELL= ${LOCALBASE}/bin/bash </div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 4. Using pkgsrc"> <div class="titlepage"><div><div><h2 class="title"> <a name="using"></a>Chapter 4. Using pkgsrc</h2></div></div></div> <div class="toc"> @@ -1615,26 +1599,26 @@ WRAPPER_SHELL= ${LOCALBASE}/bin/bash </div> <p>Basically, there are two ways of using pkgsrc. The first is to only install the package tools and to use binary packages -that someone else has prepared. This is the “<span class="quote">pkg</span>” -in pkgsrc. The second way is to install the “<span class="quote">src</span>” +that someone else has prepared. This is the <span class="quote">“<span class="quote">pkg</span>”</span> +in pkgsrc. The second way is to install the <span class="quote">“<span class="quote">src</span>”</span> of pkgsrc, too. Then you are able to build your own packages, and you can still use binary packages from someone else.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="4.1. Using binary packages"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="using-pkg"></a>4.1. Using binary packages</h2></div></div></div> <p>On the <a class="ulink" href="ftp://ftp.NetBSD.org/" target="_top">ftp.NetBSD.org</a> server and its mirrors, there are collections of binary packages, ready to be installed. These binary packages have been built using the default settings for the directories, that is:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="filename">/usr/pkg</code> for <code class="varname">LOCALBASE</code>, where most of the files are installed,</p></li> -<li><p><code class="filename">/usr/pkg/etc</code> for configuration files,</p></li> -<li><p><code class="filename">/var</code> for <code class="varname">VARBASE</code>, where those files are installed that may change after installation.</p></li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="filename">/usr/pkg</code> for <code class="varname">LOCALBASE</code>, where most of the files are installed,</p></li> +<li class="listitem"><p><code class="filename">/usr/pkg/etc</code> for configuration files,</p></li> +<li class="listitem"><p><code class="filename">/var</code> for <code class="varname">VARBASE</code>, where those files are installed that may change after installation.</p></li> </ul></div> <p>If you cannot use these directories for whatever reasons (maybe because you're not root), you cannot use these binary packages, but have to build the packages yourself, which is explained in <a class="xref" href="#bootstrapping-pkgsrc" title="3.2. Bootstrapping pkgsrc">Section 3.2, “Bootstrapping pkgsrc”</a>.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="4.1.1. Finding binary packages"> <div class="titlepage"><div><div><h3 class="title"> <a name="finding-binary-packages"></a>4.1.1. Finding binary packages</h3></div></div></div> <p>To install binary packages, you first need to know from where @@ -1644,7 +1628,7 @@ and you can still use binary packages from someone else.</p> platforms. First, select your operating system. (Ignore the directories with version numbers attached to it, they just exist for legacy reasons.) Then, select your hardware architecture, and in the - third step, the OS version and the “<span class="quote">version</span>” of pkgsrc.</p> + third step, the OS version and the <span class="quote">“<span class="quote">version</span>”</span> of pkgsrc.</p> <p>In this directory, you often find a file called <code class="filename">bootstrap.tar.gz</code> which contains the package management tools. If the file is missing, it is likely that your @@ -1654,18 +1638,14 @@ and you can still use binary packages from someone else.</p> for managing binary packages) and <code class="filename">/var/db/pkg</code> (the database of installed packages).</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="4.1.2. Installing binary packages"> <div class="titlepage"><div><div><h3 class="title"> <a name="installing-binary-packages"></a>4.1.2. Installing binary packages</h3></div></div></div> <p>In the directory from the last section, there is a subdirectory called <code class="filename">All</code>, which contains all the binary packages that are available for the platform, excluding those that may not be distributed via FTP or CDROM (depending on which - medium you are using). There may be an extra directory for packages - that have vulnerabilities and therefore are considered insecure to install - without checking the implications first. This method has been replaced by - setting CHECK_VULNERABILITIES=yes in pkg_install.conf so pkg_add will - complain about vulnerabilities, instead.</p> + medium you are using).</p> <p>To install packages directly from an FTP or HTTP server, run the following commands in a Bourne-compatible shell (be sure to <span class="command"><strong>su</strong></span> to root first):</p> @@ -1689,12 +1669,16 @@ and you can still use binary packages from someone else.</p> <p>Note that any prerequisite packages needed to run the package in question will be installed, too, assuming they are present where you install from.</p> +<p>Adding packages might install vulnerable packages. + Thus you should run <span class="command"><strong>pkg_admin audit</strong></span> + regularly, especially after installing new packages, and verify + that the vulnerabilities are acceptable for your configuration.</p> <p>After you've installed packages, be sure to have <code class="filename">/usr/pkg/bin</code> and <code class="filename">/usr/pkg/sbin</code> in your <code class="varname">PATH</code> so you can actually start the just installed program.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="4.1.3. Deinstalling packages"> <div class="titlepage"><div><div><h3 class="title"> <a name="using.pkg_delete"></a>4.1.3. Deinstalling packages</h3></div></div></div> <p>To deinstall a package, it does not matter whether it was @@ -1720,13 +1704,13 @@ and you can still use binary packages from someone else.</p> will remove jpeg and all the packages that used it; this allows upgrading the jpeg package.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="4.1.4. Getting information about installed packages"> <div class="titlepage"><div><div><h3 class="title"> <a name="using.pkg_info"></a>4.1.4. Getting information about installed packages</h3></div></div></div> <p>The <span class="command"><strong>pkg_info</strong></span> shows information about installed packages or binary package files.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="4.1.5. Checking for security vulnerabilities in installed packages"> <div class="titlepage"><div><div><h3 class="title"> <a name="vulnerabilities"></a>4.1.5. Checking for security vulnerabilities in installed packages</h3></div></div></div> <p> @@ -1777,12 +1761,12 @@ and you can still use binary packages from someone else.</p> <p> </p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="4.1.6. Finding if newer versions of your installed packages are in pkgsrc"> <div class="titlepage"><div><div><h3 class="title"> <a name="pkg_versions"></a>4.1.6. Finding if newer versions of your installed packages are in pkgsrc</h3></div></div></div> <p> Install <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/lintpkgsrc/README.html" target="_top"><code class="filename">pkgtools/lintpkgsrc</code></a> and run - <span class="command"><strong>lintpkgsrc</strong></span> with the “<span class="quote">-i</span>” + <span class="command"><strong>lintpkgsrc</strong></span> with the <span class="quote">“<span class="quote">-i</span>”</span> argument to check if your packages are up-to-date, e.g. </p> <pre class="screen"> @@ -1794,13 +1778,13 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00 package on your system and rebuild any dependencies. </p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="4.1.7. Other administrative functions"> <div class="titlepage"><div><div><h3 class="title"> <a name="using.pkg_admin"></a>4.1.7. Other administrative functions</h3></div></div></div> <p>The <span class="command"><strong>pkg_admin</strong></span> executes various administrative functions on the package system.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="4.1.8. A word of warning"> <div class="titlepage"><div><div><h3 class="title"> <a name="a-word-of-warning"></a>4.1.8. A word of warning</h3></div></div></div> <p>Please pay very careful attention to the warnings @@ -1816,7 +1800,7 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00 involved.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="4.2. Building packages from source"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="building-packages-from-source"></a>4.2. Building packages from source</h2></div></div></div> <p>After obtaining pkgsrc, the <code class="filename">pkgsrc</code> @@ -1834,17 +1818,17 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00 <p>The rest of this chapter assumes that the package is already in pkgsrc. If it is not, see <a class="xref" href="#developers-guide" title="Part II. The pkgsrc developer's guide">Part II, “The pkgsrc developer's guide”</a> for instructions how to create your own packages.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="4.2.1. Requirements"> <div class="titlepage"><div><div><h3 class="title"> <a name="requirements"></a>4.2.1. Requirements</h3></div></div></div> <p>To build packages from source, you need a working C compiler. On NetBSD, you need to install the - “<span class="quote">comp</span>” and the “<span class="quote">text</span>” distribution + <span class="quote">“<span class="quote">comp</span>”</span> and the <span class="quote">“<span class="quote">text</span>”</span> distribution sets. If you want to build X11-related packages, the - “<span class="quote">xbase</span>” and “<span class="quote">xcomp</span>” distribution + <span class="quote">“<span class="quote">xbase</span>”</span> and <span class="quote">“<span class="quote">xcomp</span>”</span> distribution sets are required, too.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="4.2.2. Fetching distfiles"> <div class="titlepage"><div><div><h3 class="title"> <a name="fetching-distfiles"></a>4.2.2. Fetching distfiles</h3></div></div></div> <p>The first step for building a package is downloading the @@ -1894,7 +1878,7 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00 also choose to download the files manually. </p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="4.2.3. How to build and install"> <div class="titlepage"><div><div><h3 class="title"> <a name="how-to-build-and-install"></a>4.2.3. How to build and install</h3></div></div></div> <p> @@ -1903,11 +1887,11 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00 computer, and how many other packages the software depends on and their compile time. </p> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>If using bootstrap or pkgsrc on a non-NetBSD system, use the pkgsrc <span class="command"><strong>bmake</strong></span> command instead of - “<span class="quote">make</span>” in the examples in this guide.</p> + <span class="quote">“<span class="quote">make</span>”</span> in the examples in this guide.</p> </div> <p>For example, type</p> <pre class="screen"> @@ -1973,21 +1957,21 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00 as <code class="varname">LOCALBASE</code> can be set in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> to save having to remember to set them each time you want to use pkgsrc.</p> -<p>Occasionally, people want to “<span class="quote">look under the - covers</span>” to see what is going on when a package is building +<p>Occasionally, people want to <span class="quote">“<span class="quote">look under the + covers</span>”</span> to see what is going on when a package is building or being installed. This may be for debugging purposes, or out of simple curiosity. A number of utility values have been added to help with this.</p> -<div class="orderedlist"><ol type="1"> -<li> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> <p>If you invoke the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> command with <code class="varname">PKG_DEBUG_LEVEL=2</code>, then a huge amount of information will be displayed. For example,</p> <pre class="screen"><strong class="userinput"><code>make patch PKG_DEBUG_LEVEL=2</code></strong></pre> <p>will show all the commands that are invoked, up to and - including the “<span class="quote">patch</span>” stage.</p> + including the <span class="quote">“<span class="quote">patch</span>”</span> stage.</p> </li> -<li> +<li class="listitem"> <p>If you want to know the value of a certain <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> definition, then the <code class="varname">VARNAME</code> definition should be used, in conjunction with the show-var @@ -2025,7 +2009,7 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00 </div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 5. Configuring pkgsrc"> <div class="titlepage"><div><div><h2 class="title"> <a name="configuring"></a>Chapter 5. Configuring pkgsrc</h2></div></div></div> <div class="toc"> @@ -2037,8 +2021,8 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00 <dt><span class="sect1"><a href="#conf.compiler">5.4. Selecting and configuring the compiler</a></span></dt> <dd><dl> <dt><span class="sect2"><a href="#selecting-the-compiler">5.4.1. Selecting the compiler</a></span></dt> -<dt><span class="sect2"><a href="#conf.cflags">5.4.2. Additional flags to the compiler (CFLAGS)</a></span></dt> -<dt><span class="sect2"><a href="#conf.ldflags">5.4.3. Additional flags to the linker (LDFLAGS)</a></span></dt> +<dt><span class="sect2"><a href="#conf.cflags">5.4.2. Additional flags to the compiler (<code class="varname">CFLAGS</code>)</a></span></dt> +<dt><span class="sect2"><a href="#conf.ldflags">5.4.3. Additional flags to the linker (<code class="varname">LDFLAGS</code>)</a></span></dt> </dl></dd> <dt><span class="sect1"><a href="#developer-advanced-settings">5.5. Developer/advanced settings</a></span></dt> <dt><span class="sect1"><a href="#selecting-build-options">5.6. Selecting Build Options</a></span></dt> @@ -2061,7 +2045,7 @@ is done by setting variables in this file. Note that you can define all kinds of variables, and no special error checking (for example for spelling mistakes) takes place, so you have to try it out to see if it works.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="5.1. General configuration"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="general-configuration"></a>5.1. General configuration</h2></div></div></div> <p>In this section, you can find some variables that apply to all @@ -2069,29 +2053,29 @@ works.</p> configured by the user is available in <code class="filename">mk/defaults/mk.conf</code>, together with some comments that describe each variable's intent.</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">LOCALBASE</code>: Where +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">LOCALBASE</code>: Where packages will be installed. The default is <code class="filename">/usr/pkg</code>. Do not mix binary packages with different <code class="varname">LOCALBASE</code>s!</p></li> -<li><p><code class="varname">CROSSBASE</code>: Where - “<span class="quote">cross</span>” category packages will be +<li class="listitem"><p><code class="varname">CROSSBASE</code>: Where + <span class="quote">“<span class="quote">cross</span>”</span> category packages will be installed. The default is <code class="filename">${LOCALBASE}/cross</code>.</p></li> -<li><p><code class="varname">X11BASE</code>: Where +<li class="listitem"><p><code class="varname">X11BASE</code>: Where X11 is installed on the system. The default is <code class="filename">/usr/X11R6</code>.</p></li> -<li><p><code class="varname">DISTDIR</code>: Where to store the +<li class="listitem"><p><code class="varname">DISTDIR</code>: Where to store the downloaded copies of the original source distributions used for building pkgsrc packages. The default is <code class="filename">${PKGSRCDIR}/distfiles</code>.</p></li> -<li><p><code class="varname">PKG_DBDIR</code>: Where the +<li class="listitem"><p><code class="varname">PKG_DBDIR</code>: Where the database about installed packages is stored. The default is <code class="filename">/var/db/pkg</code>.</p></li> -<li><p><code class="varname">MASTER_SITE_OVERRIDE</code>: +<li class="listitem"><p><code class="varname">MASTER_SITE_OVERRIDE</code>: If set, override the packages' <code class="varname">MASTER_SITES</code> with this value.</p></li> -<li><p><code class="varname">MASTER_SITE_BACKUP</code>: +<li class="listitem"><p><code class="varname">MASTER_SITE_BACKUP</code>: Backup location(s) for distribution files and patch files if not found locally or in <code class="filename">${MASTER_SITES}</code> or @@ -2100,12 +2084,12 @@ works.</p> <code class="filename">ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/${DIST_SUBDIR}/</code> and <code class="filename">ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/</code>.</p></li> -<li><p><code class="varname">BINPKG_SITES</code>: +<li class="listitem"><p><code class="varname">BINPKG_SITES</code>: List of sites carrying binary pkgs. <em class="replaceable"><code>rel</code></em> and <em class="replaceable"><code>arch</code></em> are replaced with OS - release (“<span class="quote">2.0</span>”, etc.) and architecture - (“<span class="quote">mipsel</span>”, etc.).</p></li> -<li><p><code class="varname">ACCEPTABLE_LICENSES</code>: + release (<span class="quote">“<span class="quote">2.0</span>”</span>, etc.) and architecture + (<span class="quote">“<span class="quote">mipsel</span>”</span>, etc.).</p></li> +<li class="listitem"><p><code class="varname">ACCEPTABLE_LICENSES</code>: List of acceptable licenses. License names are case-sensitive. Whenever you try to build a package whose license is not in this list, you will get an error message. If the license condition is @@ -2113,16 +2097,16 @@ works.</p> instructions on how to change this variable.</p></li> </ul></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="5.2. Variables affecting the build process"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="variables-affecting-build"></a>5.2. Variables affecting the build process</h2></div></div></div> <p>XXX </p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">PACKAGES</code>: The top level +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">PACKAGES</code>: The top level directory for the binary packages. The default is <code class="filename">${PKGSRCDIR}/packages</code>.</p></li> -<li><p><code class="varname">WRKOBJDIR</code>: +<li class="listitem"><p><code class="varname">WRKOBJDIR</code>: The top level directory where, if defined, the separate working directories will get created, and symbolically linked to from <code class="filename">${WRKDIR}</code> (see below). @@ -2134,35 +2118,35 @@ works.</p> — 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>: +<li class="listitem"><p><code class="varname">LOCALPATCHES</code>: Directory for local patches that aren't part of pkgsrc. See <a class="xref" href="#components.patches" title="11.3. patches/*">Section 11.3, “patches/*”</a> for more information.</p></li> -<li><p><code class="varname">PKGMAKECONF</code>: Location of +<li class="listitem"><p><code class="varname">PKGMAKECONF</code>: Location of the <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> file used by a package's BSD-style Makefile. If this is not set, <code class="varname">MAKECONF</code> is set to <code class="filename">/dev/null</code> to avoid picking up settings used by builds in <code class="filename">/usr/src</code>.</p></li> -<li><p><code class="varname">DEPENDS_TARGET</code>: +<li class="listitem"><p><code class="varname">DEPENDS_TARGET</code>: By default, dependencies are only installed, and no binary package is created for them. You can set this variable to <code class="literal">package</code> to automatically create binary packages after installing dependencies.</p></li> </ul></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="5.3. Variables affecting the installation process"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="variables-affecting-installation"></a>5.3. Variables affecting the installation process</h2></div></div></div> <p>A growing number of packages support installation into a subdirectory of <code class="varname">WRKDIR</code>. This allows a package to be built, before the actual filesystem is touched. DESTDIR support exists in two variations:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>Basic DESTDIR support means that the package +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>Basic DESTDIR support means that the package installation and packaging is still run as root.</p></li> -<li><p>Full DESTDIR support can run the complete build, +<li class="listitem"><p>Full DESTDIR support can run the complete build, installation and packaging as normal user. Root privileges are only needed to add packages.</p></li> </ul></div> @@ -2227,10 +2211,10 @@ uid=1000(myusername) gid=100(users) groups=100(users),0(wheel) </p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="5.4. Selecting and configuring the compiler"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="conf.compiler"></a>5.4. Selecting and configuring the compiler</h2></div></div></div> -<div class="sect2" lang="en"> +<div class="sect2" title="5.4.1. Selecting the compiler"> <div class="titlepage"><div><div><h3 class="title"> <a name="selecting-the-compiler"></a>5.4.1. Selecting the compiler</h3></div></div></div> <p>By default, pkgsrc will use GCC to build packages. This may be @@ -2241,29 +2225,29 @@ uid=1000(myusername) gid=100(users) groups=100(users),0(wheel) <p>This is a list of values specifying the chain of compilers to invoke when building packages. Valid values are:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">distcc</code>: +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">distcc</code>: distributed C/C++ (chainable)</p></li> -<li><p><code class="varname">ccache</code>: +<li class="listitem"><p><code class="varname">ccache</code>: compiler cache (chainable)</p></li> -<li><p><code class="varname">gcc</code>: +<li class="listitem"><p><code class="varname">gcc</code>: GNU C/C++ Compiler</p></li> -<li><p><code class="varname">mipspro</code>: +<li class="listitem"><p><code class="varname">mipspro</code>: Silicon Graphics, Inc. MIPSpro (n32/n64)</p></li> -<li><p><code class="varname">mipspro</code>: +<li class="listitem"><p><code class="varname">mipspro</code>: Silicon Graphics, Inc. MIPSpro (o32)</p></li> -<li><p><code class="varname">sunpro</code>: +<li class="listitem"><p><code class="varname">sunpro</code>: Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio</p></li> </ul></div> <p>The default is - “<span class="quote"><code class="varname">gcc</code></span>”. You can use + <span class="quote">“<span class="quote"><code class="varname">gcc</code></span>”</span>. You can use <code class="varname">ccache</code> and/or <code class="varname">distcc</code> with an appropriate <code class="varname">PKGSRC_COMPILER</code> setting, - e.g. “<span class="quote"><code class="varname">ccache gcc</code></span>”. This + e.g. <span class="quote">“<span class="quote"><code class="varname">ccache gcc</code></span>”</span>. This variable should always be terminated with a value for a real compiler. Note that only one real compiler - should be listed (e.g. “<span class="quote"><code class="varname">sunpro gcc</code></span>” + should be listed (e.g. <span class="quote">“<span class="quote"><code class="varname">sunpro gcc</code></span>”</span> is not allowed).</p> </dd> <dt><span class="term"><code class="varname">GCC_REQD</code>:</span></dt> @@ -2273,7 +2257,7 @@ uid=1000(myusername) gid=100(users) groups=100(users),0(wheel) install one of the GCC packages to use instead.</p></dd> </dl></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="5.4.2. Additional flags to the compiler (CFLAGS)"> <div class="titlepage"><div><div><h3 class="title"> <a name="conf.cflags"></a>5.4.2. Additional flags to the compiler (<code class="varname">CFLAGS</code>)</h3></div></div></div> <p>If you wish to set the <code class="varname">CFLAGS</code> variable, @@ -2283,14 +2267,13 @@ uid=1000(myusername) gid=100(users) groups=100(users),0(wheel) CFLAGS+= -your -flags </pre> <p>Using <code class="varname">CFLAGS=</code> (i.e. without the - “<span class="quote">+</span>”) may lead to problems with packages that + <span class="quote">“<span class="quote">+</span>”</span>) may lead to problems with packages that need to add their own flags. You may want to take a look at the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/devel/cpuflags/README.html" target="_top"><code class="filename">devel/cpuflags</code></a> - package if you're interested in optimization for the current - CPU. Setting <code class="varname">USE_CPUFLAGS</code> to yes in - <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> will cause pkgsrc to automatically use cpuflags.</p> + package if you're interested in optimization specifically + for the current CPU. </p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="5.4.3. Additional flags to the linker (LDFLAGS)"> <div class="titlepage"><div><div><h3 class="title"> <a name="conf.ldflags"></a>5.4.3. Additional flags to the linker (<code class="varname">LDFLAGS</code>)</h3></div></div></div> <p>If you want to pass flags to the linker, both in the configure @@ -2308,26 +2291,26 @@ LDFLAGS+= -your -linkerflags </pre> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="5.5. Developer/advanced settings"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="developer-advanced-settings"></a>5.5. Developer/advanced settings</h2></div></div></div> <p>XXX </p> -<div class="itemizedlist"><ul type="disc"> -<li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"> <p><code class="varname">PKG_DEVELOPER</code>: Run some sanity checks that package developers want: </p> -<div class="itemizedlist"><ul type="circle"> -<li><p>make sure patches apply with zero +<div class="itemizedlist"><ul class="itemizedlist" type="circle"> +<li class="listitem"><p>make sure patches apply with zero fuzz</p></li> -<li><p>run check-shlibs to see that all +<li class="listitem"><p>run check-shlibs to see that all binaries will find their shared libs.</p></li> </ul></div> <p> </p> </li> -<li><p><code class="varname">PKG_DEBUG_LEVEL</code>: The level +<li class="listitem"><p><code class="varname">PKG_DEBUG_LEVEL</code>: The level of debugging output which is displayed whilst making and installing the package. The default value for this is 0, which will not display the commands as they are executed @@ -2340,7 +2323,7 @@ LDFLAGS+= -your -linkerflags <p> </p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="5.6. Selecting Build Options"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="selecting-build-options"></a>5.6. Selecting Build Options</h2></div></div></div> <p>Some packages have build time options, usually to select @@ -2370,7 +2353,7 @@ LDFLAGS+= -your -linkerflags <code class="varname">PKG_OPTIONS.<em class="replaceable"><code>pkgbase</code></em></code>, which can be used to select or disable options specifically for package <em class="replaceable"><code>pkgbase</code></em>. Options listed in - these variables are selected, options preceded by “<span class="quote">-</span>” + these variables are selected, options preceded by <span class="quote">“<span class="quote">-</span>”</span> are disabled. A few examples:</p> <pre class="screen"> <code class="prompt">$</code> <span class="command"><strong>grep "PKG.*OPTION" <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a></strong></span> @@ -2384,13 +2367,13 @@ PKG_OPTIONS.apache= suexec </pre> <p>The following settings are consulted in the order given, and the last setting that selects or disables an option is used:</p> -<div class="orderedlist"><ol type="1"> -<li><p>the default options as suggested by the package +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>the default options as suggested by the package maintainer</p></li> -<li><p>the options implied by the settings of legacy +<li class="listitem"><p>the options implied by the settings of legacy variables (see below)</p></li> -<li><p><code class="varname">PKG_DEFAULT_OPTIONS</code></p></li> -<li><p><code class="varname">PKG_OPTIONS.<em class="replaceable"><code>pkgbase</code></em></code></p></li> +<li class="listitem"><p><code class="varname">PKG_DEFAULT_OPTIONS</code></p></li> +<li class="listitem"><p><code class="varname">PKG_OPTIONS.<em class="replaceable"><code>pkgbase</code></em></code></p></li> </ol></div> <p>For groups of mutually exclusive options, the last option selected is used, all others are automatically disabled. If an @@ -2411,7 +2394,7 @@ PKG_OPTIONS.apache= suexec </pre> eventually.</p> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 6. Creating binary packages"> <div class="titlepage"><div><div><h2 class="title"> <a name="binary"></a>Chapter 6. Creating binary packages</h2></div></div></div> <div class="toc"> @@ -2421,7 +2404,7 @@ PKG_OPTIONS.apache= suexec </pre> <dt><span class="sect1"><a href="#settings-for-creationg-of-binary-packages">6.2. Settings for creation of binary packages</a></span></dt> </dl> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="6.1. Building a single binary package"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="building-a-single-binary-package"></a>6.1. Building a single binary package</h2></div></div></div> <p>Once you have built and installed a package, you can create @@ -2447,13 +2430,13 @@ PKG_OPTIONS.apache= suexec </pre> <p>See <a class="xref" 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="sect1" title="6.2. Settings for creation of binary packages"> <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 class="xref" href="#build.helpful-targets" title="17.17. Other helpful targets">Section 17.17, “Other helpful targets”</a>.</p> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 7. Creating binary packages for everything in pkgsrc (bulk builds)"> <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> @@ -2488,31 +2471,31 @@ 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="sect1" title="7.1. Think first, build later"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"> <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 +<div class="itemizedlist"><ul class="itemizedlist" type="circle"> +<li class="listitem"><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 +<li class="listitem"><p>Packages on ftp.NetBSD.org should only be created from the stable branches (like 2009Q1), 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 +<li class="listitem"><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 +<li class="listitem"><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 @@ -2524,35 +2507,35 @@ deinstall packages in <code class="filename">/usr/pkg</code> (or whatever that you don't need any package during the build.</p></li> </ul></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="7.2. Requirements of a bulk build"> <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> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>10 GB for the distfiles (read-write, remote, temporary)</p></li> +<li class="listitem"><p>10 GB for the binary packages (read-write, remote, permanent)</p></li> +<li class="listitem"><p>400 MB for the pkgsrc tree (read-only, remote, permanent)</p></li> +<li class="listitem"><p>5 GB for <code class="filename">LOCALBASE</code> (read-write, local, temporary for pbulk, permanent for old-bulk)</p></li> +<li class="listitem"><p>5 GB for the log files (read-write, remote, permanent)</p></li> +<li class="listitem"><p>5 GB for temporary files (read-write, local, temporary)</p></li> </ul></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="7.3. Running an old-style bulk build"> <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="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>There are two ways of doing a bulk build. The old-style -one and the new-style “<span class="quote">pbulk</span>”. The latter is the recommended +one and the new-style <span class="quote">“<span class="quote">pbulk</span>”</span>. The latter is the recommended way.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="7.3.1. Configuration"> <div class="titlepage"><div><div><h3 class="title"> <a name="binary.configuration"></a>7.3.1. Configuration</h3></div></div></div> -<div class="sect3" lang="en"> +<div class="sect3" title="7.3.1.1. build.conf"> <div class="titlepage"><div><div><h4 class="title"> <a name="binary.bulk.build.conf"></a>7.3.1.1. <code class="filename">build.conf</code> </h4></div></div></div> @@ -2566,7 +2549,7 @@ way.</p> <code class="filename">build.conf</code> and edit it, following the comments in that file.</p> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="7.3.1.2. mk.conf"> <div class="titlepage"><div><div><h4 class="title"> <a name="binary.mk.conf"></a>7.3.1.2. <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> </h4></div></div></div> @@ -2590,41 +2573,42 @@ SKIP_LICENSE_CHECK= yes can be found at the top lines of the file <code class="filename">mk/bulk/bsd.bulk-pkg.mk</code>. The most useful options of these are briefly described here.</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>If you are on a slow machine, you may want to +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>If you are on a slow machine, you may want to set <code class="varname">USE_BULK_BROKEN_CHECK</code> to - “<span class="quote">no</span>”.</p></li> -<li><p>If you are doing bulk builds from a read-only + <span class="quote">“<span class="quote">no</span>”</span>.</p></li> +<li class="listitem"><p>If you are doing bulk builds from a read-only copy of pkgsrc, you have to set <code class="varname">BULKFILESDIR</code> to the directory where all log files are created. Otherwise the log files are created in the pkgsrc directory.</p></li> -<li><p>Another important variable is +<li class="listitem"><p>Another important variable is <code class="varname">BULK_PREREQ</code>, which is a list of packages that should be always available while building other packages.</p></li> </ul></div> <p>Some other options are scattered in the pkgsrc infrastructure:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">ALLOW_VULNERABLE_PACKAGES</code> - should be set to <code class="literal">yes</code>. The purpose of the bulk - builds is creating binary packages, no matter if they are - vulnerable or not. Leaving this variable unset would prevent the bulk - build system from even trying to build them, so possible - building errors would not show up.</p></li> -<li><p><code class="varname">CHECK_FILES</code> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">ALLOW_VULNERABLE_PACKAGES</code> + should be set to <code class="literal">yes</code>. The purpose of the + bulk builds is creating binary packages, no matter if they + are vulnerable or not. Leaving this variable unset would + prevent the bulk build system from even trying to build + them, so possible building errors would not show + up.</p></li> +<li class="listitem"><p><code class="varname">CHECK_FILES</code> (<code class="filename">pkgsrc/mk/check/check-files.mk</code>) can be set to - “<span class="quote">yes</span>” to check that the installed set of files + <span class="quote">“<span class="quote">yes</span>”</span> to check that the installed set of files matches the <code class="filename">PLIST</code>.</p></li> -<li><p><code class="varname">CHECK_INTERPRETER</code> +<li class="listitem"><p><code class="varname">CHECK_INTERPRETER</code> (<code class="filename">pkgsrc/mk/check/check-interpreter.mk</code>) can be set to - “<span class="quote">yes</span>” to check that the installed - “<span class="quote">#!</span>”-scripts will find their + <span class="quote">“<span class="quote">yes</span>”</span> to check that the installed + <span class="quote">“<span class="quote">#!</span>”</span>-scripts will find their interpreter.</p></li> -<li><p><code class="varname">PKGSRC_RUN_TEST</code> can be - set to “<span class="quote"><code class="literal">yes</code></span>” to run each +<li class="listitem"><p><code class="varname">PKGSRC_RUN_TEST</code> can be + set to <span class="quote">“<span class="quote"><code class="literal">yes</code></span>”</span> to run each package's self-test before installing it. Note that some - packages make heavy use of “<span class="quote">good</span>” random + packages make heavy use of <span class="quote">“<span class="quote">good</span>”</span> random numbers, so you need to assure that the machine on which you are doing the bulk builds is not completely idle. Otherwise some test programs will seem to hang, while they are just @@ -2632,7 +2616,7 @@ SKIP_LICENSE_CHECK= yes available.</p></li> </ul></div> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="7.3.1.3. pre-build.local"> <div class="titlepage"><div><div><h4 class="title"> <a name="pre-build.local"></a>7.3.1.3. <code class="filename">pre-build.local</code> </h4></div></div></div> @@ -2650,7 +2634,7 @@ SKIP_LICENSE_CHECK= yes which requires nearly 3 GB of disk space.</p> </div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="7.3.2. Other environmental considerations"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -2675,12 +2659,12 @@ fi via ssh after the bulk build is finished or if the machine gets rebooted or crashes. You have been warned! :)</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="7.3.3. Operation"> <div class="titlepage"><div><div><h3 class="title"> <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;"> +<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Warning</h3> <p>During the bulk build, <span class="emphasis"><em>all packages, their configuration files and some more files from @@ -2705,7 +2689,7 @@ fi <code class="varname">FTP</code> in the <code class="filename">build.conf</code> file.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="7.3.4. What it does"> <div class="titlepage"><div><div><h3 class="title"> <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> @@ -2715,7 +2699,7 @@ fi cleans out any broken distfiles, and removes all packages installed.</p></dd> <dt><span class="term">2. the bulk build</span></dt> -<dd><p>This is basically “<span class="quote">make bulk-package</span>” with +<dd><p>This is basically <span class="quote">“<span class="quote">make bulk-package</span>”</span> with an optimised order in which packages will be built. Packages that don't require other packages will be built first, and packages with many dependencies will @@ -2737,15 +2721,15 @@ fi they can be used to debug these broken package builds later.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="7.3.5. Disk space requirements"> <div class="titlepage"><div><div><h3 class="title"> <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"> -<li><p>10 GB - distfiles (NFS ok)</p></li> -<li><p>8 GB - full set of all binaries (NFS ok)</p></li> -<li><p>5 GB - temp space for compiling (local disk recommended)</p></li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>10 GB - distfiles (NFS ok)</p></li> +<li class="listitem"><p>8 GB - full set of all binaries (NFS ok)</p></li> +<li class="listitem"><p>5 GB - temp space for compiling (local disk recommended)</p></li> </ul></div> <p>Note that all pkgs will be de-installed as soon as they are turned into a binary package, and that sources are removed, @@ -2754,7 +2738,7 @@ fi be installed via <a class="citerefentry" 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> instead of building again, so there are no cycles wasted by recompiling.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="7.3.6. Setting up a sandbox for chrooted builds"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -2777,42 +2761,42 @@ fi distribution DESTDIR=/usr/sandbox</strong></span> in <code class="filename">/usr/src/etc</code>, be sure the following items are present and properly configured:</p> -<div class="procedure"><ol type="1"> -<li> +<div class="procedure"><ol class="procedure" type="1"> +<li class="step" title="Step 1"> <p>Kernel</p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>cp /netbsd /usr/sandbox</code></strong></pre> </li> -<li> +<li class="step" title="Step 2"> <p><code class="filename">/dev/*</code></p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>cd /usr/sandbox/dev ; sh MAKEDEV all</code></strong></pre> </li> -<li> +<li class="step" title="Step 3"> <p><code class="filename">/etc/resolv.conf</code> (for <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/security/smtpd/README.html" target="_top"><code class="filename">security/smtpd</code></a> and mail):</p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>cp /etc/resolv.conf /usr/sandbox/etc</code></strong></pre> </li> -<li> +<li class="step" title="Step 4"> <p>Working(!) mail config (hostname, sendmail.cf):</p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>cp /etc/mail/sendmail.cf /usr/sandbox/etc/mail</code></strong></pre> </li> -<li> +<li class="step" title="Step 5"> <p><code class="filename">/etc/localtime</code> (for <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/security/smtpd/README.html" target="_top"><code class="filename">security/smtpd</code></a>):</p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>ln -sf /usr/share/zoneinfo/UTC /usr/sandbox/etc/localtime</code></strong></pre> </li> -<li> +<li class="step" title="Step 6"> <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> <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> -<li> +<li class="step" title="Step 7"> <p>Create <code class="filename">/var/db/pkg</code> (not part of default install):</p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>mkdir /usr/sandbox/var/db/pkg</code></strong></pre> </li> -<li> +<li class="step" title="Step 8"> <p>Create <code class="filename">/usr/pkg</code> (not part of default install):</p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>mkdir /usr/sandbox/usr/pkg</code></strong></pre> </li> -<li> +<li class="step" title="Step 9"> <p>Checkout pkgsrc via cvs into <code class="filename">/usr/sandbox/usr/pkgsrc</code>:</p> <pre class="screen"> @@ -2822,12 +2806,12 @@ fi <p>Do not mount/link this to the copy of your pkgsrc tree you do development in, as this will likely cause problems!</p> </li> -<li><p>Make +<li class="step" title="Step 10"><p>Make <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 class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, see <a class="xref" href="#binary.mk.conf" title="7.3.1.2. ???">Section 7.3.1.2, “???”</a>.</p></li> -<li><p>Adjust <code class="filename">mk/bulk/build.conf</code> to suit your needs.</p></li> +<li class="step" title="Step 11"><p>Edit <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, see <a class="xref" href="#binary.mk.conf" title="7.3.1.2. mk.conf">Section 7.3.1.2, “<code class="filename">mk.conf</code>”</a>.</p></li> +<li class="step" title="Step 12"><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 the build with the following steps:</p> @@ -2841,7 +2825,7 @@ fi <code class="filename">/usr/sandbox/usr/pkgsrc/packages</code> (wherever that points/mounts to/from).</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="7.3.7. Building a partial set of packages"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -2849,11 +2833,11 @@ fi may be used to build a subset of the packages contained in pkgsrc. By setting <code class="varname">SPECIFIC_PKGS</code> in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, the variables</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>SITE_SPECIFIC_PKGS</p></li> -<li><p>HOST_SPECIFIC_PKGS</p></li> -<li><p>GROUP_SPECIFIC_PKGS</p></li> -<li><p>USER_SPECIFIC_PKGS</p></li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>SITE_SPECIFIC_PKGS</p></li> +<li class="listitem"><p>HOST_SPECIFIC_PKGS</p></li> +<li class="listitem"><p>GROUP_SPECIFIC_PKGS</p></li> +<li class="listitem"><p>USER_SPECIFIC_PKGS</p></li> </ul></div> <p>will define the set of packages which should be built. The bulk build code will also include any packages which are @@ -2864,7 +2848,7 @@ fi needed for your site available without the overhead of building extra packages that are not needed.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="7.3.8. Uploading results of a bulk build"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -2924,6 +2908,7 @@ chroot-<code class="prompt">#</code> <strong class="userinput"><code>exit</code> <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?du+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">du</span>(1)</span></a> on the FTP server to monitor progress of the upload. The upload script will take care of not uploading restricted packages.</p> +<p>After the upload has ended, first thing is to revoke ssh access:</p> <pre class="screen">nbftp% <strong class="userinput"><code>vi ~/.ssh/authorized_keys</code></strong> Gdd:x! </pre> <p>Use whatever is needed to remove the key you've entered @@ -2938,15 +2923,15 @@ nbftp% <strong class="userinput"><code>chmod 755 .</code></strong> </pre> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="7.4. Running a pbulk-style bulk build"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="bulk.pbulk"></a>7.4. Running a pbulk-style bulk build</h2></div></div></div> <p>Running a pbulk-style bulk build works roughly as follows:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>First, build the pbulk infrastructure in a fresh pkgsrc location.</p></li> -<li><p>Then, build each of the packages from a clean installation directory using the infrastructure.</p></li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>First, build the pbulk infrastructure in a fresh pkgsrc location.</p></li> +<li class="listitem"><p>Then, build each of the packages from a clean installation directory using the infrastructure.</p></li> </ul></div> -<div class="sect2" lang="en"> +<div class="sect2" title="7.4.1. Preparation"> <div class="titlepage"><div><div><h3 class="title"> <a name="bulk.pbulk.prepare"></a>7.4.1. Preparation</h3></div></div></div> <p>First, you need to create a pkgsrc installation for the pbulk infrastructure. No matter on which platform you are (even on NetBSD), you should bootstrap into its own directory. Let's take the directory <code class="filename">/usr/pbulk</code> or <code class="filename">$HOME/pbulk</code> for it. This installation will be bootstrapped and all the tools that are required for the bulk build will be installed there.</p> @@ -2956,12 +2941,12 @@ $ <strong class="userinput"><code>./bootstrap/bootstrap --prefix=/usr/pbulk --va $ <strong class="userinput"><code>rm -rf /tmp/pbulk-bootstrap</code></strong> </pre> <p>Now the basic environment for the pbulk infrastructure is installed. The specific tools are still missing. This is a good time to edit the pkgsrc configuration file <code class="filename">/usr/pbulk/etc/mk.conf</code> to fit your needs. Typical things you might set now are:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="literal"><code class="varname">PKG_DEVELOPER</code>=yes</code>, to enable many consistency checks,</p></li> -<li><p><code class="literal"><code class="varname">WRKOBJDIR</code>=/tmp/pbulk-outer</code>, to keep <code class="filename">/usr/pkgsrc</code> free from any modifications,</p></li> -<li><p><code class="literal"><code class="varname">DISTDIR</code>=/distfiles</code>, to have only one directory in which all distfiles (for the infrastructure and for the actual packages) are downloaded,</p></li> -<li><p><code class="literal"><code class="varname">ACCEPTABLE_LICENSES</code>+=...</code>, to select some licenses additional to the usual Free/Open Source licenses that are acceptable to you,</p></li> -<li><p><code class="literal"><code class="varname">SKIP_LICENSE_CHECK</code>=yes</code>, to bypass the license checks.</p></li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="literal"><code class="varname">PKG_DEVELOPER</code>=yes</code>, to enable many consistency checks,</p></li> +<li class="listitem"><p><code class="literal"><code class="varname">WRKOBJDIR</code>=/tmp/pbulk-outer</code>, to keep <code class="filename">/usr/pkgsrc</code> free from any modifications,</p></li> +<li class="listitem"><p><code class="literal"><code class="varname">DISTDIR</code>=/distfiles</code>, to have only one directory in which all distfiles (for the infrastructure and for the actual packages) are downloaded,</p></li> +<li class="listitem"><p><code class="literal"><code class="varname">ACCEPTABLE_LICENSES</code>+=...</code>, to select some licenses additional to the usual Free/Open Source licenses that are acceptable to you,</p></li> +<li class="listitem"><p><code class="literal"><code class="varname">SKIP_LICENSE_CHECK</code>=yes</code>, to bypass the license checks.</p></li> </ul></div> <p>Now you are ready to build the rest of the pbulk infrastructure.</p> <pre class="screen"> @@ -2971,14 +2956,14 @@ $ <strong class="userinput"><code>rm -rf /tmp/pbulk-outer</code></strong> </pre> <p>Now the pbulk infrastructure is built and installed. It still needs to be configured, and after some more preparation, we will be able to start the real bulk build.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="7.4.2. Configuration"> <div class="titlepage"><div><div><h3 class="title"> <a name="bulk.pbulk.conf"></a>7.4.2. Configuration</h3></div></div></div> <p>TODO; see pkgsrc/doc/HOWTO-pbulk for more information.</p> <p>TODO: continue writing</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="7.5. Creating a multiple CD-ROM packages collection"> <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 @@ -2989,7 +2974,7 @@ $ <strong class="userinput"><code>rm -rf /tmp/pbulk-outer</code></strong> <span class="command"><strong>cdpack</strong></span> 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.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="7.5.1. Example of cdpack"> <div class="titlepage"><div><div><h3 class="title"> <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) @@ -3024,14 +3009,14 @@ $ <strong class="userinput"><code>rm -rf /tmp/pbulk-outer</code></strong> </div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 8. Directory layout of the installed files"> <div class="titlepage"><div><div><h2 class="title"> <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">8.1. File system layout in ${LOCALBASE}</a></span></dt> -<dt><span class="sect1"><a href="#files.varbase">8.2. File system layout in ${VARBASE}</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 @@ -3061,24 +3046,24 @@ PKG_DBDIR= ${HOME}/pkg/var/db/pkg </pre> <p>What these four directories are for, and what they look like is explained below.</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">LOCALBASE</code> corresponds to the +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">LOCALBASE</code> corresponds to the <code class="filename">/usr</code> directory in the base system. It is the -“<span class="quote">main</span>” directory where the files are installed and contains +<span class="quote">“<span class="quote">main</span>”</span> directory where the files are installed and contains the well-known subdirectories like <code class="filename">bin</code>, <code class="filename">include</code>, <code class="filename">lib</code>, <code class="filename">share</code> and <code class="filename">sbin</code>.</p></li> -<li><p><code class="varname">VARBASE</code> corresponds to +<li class="listitem"><p><code class="varname">VARBASE</code> corresponds to <code class="filename">/var</code> in the base system. Some programs (especially games, network daemons) need write access to it during normal operation.</p></li> -<li><p><code class="varname">PKG_SYSCONFDIR</code> corresponds to +<li class="listitem"><p><code class="varname">PKG_SYSCONFDIR</code> corresponds to <code class="filename">/etc</code> in the base system. It contains configuration files of the packages, as well as pkgsrc's <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> itself.</p></li> </ul></div> -<div class="sect1" lang="en"> +<div class="sect1" title="8.1. File system layout in ${LOCALBASE}"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="files.localbase"></a>8.1. File system layout in <code class="literal">${LOCALBASE}</code> </h2></div></div></div> @@ -3144,7 +3129,7 @@ that may be modified after installation.</p></dd> </dl></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="8.2. File system layout in ${VARBASE}"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="files.varbase"></a>8.2. File system layout in <code class="literal">${VARBASE}</code> </h2></div></div></div> @@ -3165,7 +3150,7 @@ currently running.</p></dd> </dl></div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 9. Frequently Asked Questions"> <div class="titlepage"><div><div><h2 class="title"> <a name="faq"></a>Chapter 9. Frequently Asked Questions</h2></div></div></div> <div class="toc"> @@ -3178,28 +3163,28 @@ currently running.</p></dd> <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 make fetch to do passive FTP?</a></span></dt> +<dt><span class="sect1"><a href="#passive-ftp">9.8. How do I tell <span class="command"><strong>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 Don't know how to make -/usr/share/tmac/tmac.andoc mean?</a></span></dt> -<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does Could not find bsd.own.mk mean?</a></span></dt> +<dt><span class="sect1"><a href="#tmac.andoc-missing">9.10. What does <span class="quote">“<span class="quote">Don't know how to make +/usr/share/tmac/tmac.andoc</span>”</span> mean?</a></span></dt> +<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does <span class="quote">“<span class="quote">Could not find bsd.own.mk</span>”</span> 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 CFLAGS?</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 Makefile appears to contain unresolved cvs/rcs/??? merge conflicts mean?</a></span></dt> +<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.17. What does <span class="quote">“<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>”</span> mean?</a></span></dt> </dl> </div> <p>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.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="9.1. Are there any mailing lists for pkg-related discussion?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-users" target="_top">pkgsrc-users</a>: +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-users" target="_top">pkgsrc-users</a>: This is a general purpose list for most issues regarding pkgsrc, regardless of platform, e.g. soliciting user help for pkgsrc configuration, unexpected build failures, using @@ -3208,10 +3193,10 @@ it contains items for both pkgsrc users and developers.</p> proposals for changes that impact the pkgsrc user community, e.g. major infrastructure changes, new features, package removals, etc., may also be posted.</p></li> -<li><p><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bulk" target="_top">pkgsrc-bulk</a>: +<li class="listitem"><p><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bulk" target="_top">pkgsrc-bulk</a>: A list where the results of pkgsrc bulk builds are sent and discussed.</p></li> -<li><p><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-changes" target="_top">pkgsrc-changes</a>: +<li class="listitem"><p><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-changes" target="_top">pkgsrc-changes</a>: This list is for those who are interested in getting a commit message for every change committed to pkgsrc. It is also available in digest form, meaning one daily message @@ -3225,14 +3210,14 @@ it contains items for both pkgsrc users and developers.</p> <p>Archives for all these mailing lists are available from <a class="ulink" href="http://mail-index.NetBSD.org/" target="_top">http://mail-index.NetBSD.org/</a>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.2. Where's the pkgviews documentation?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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="sect1" title="9.3. Utilities for package management (pkgtools)"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -3241,83 +3226,81 @@ section attempts only to make the reader aware of the utilities and when they might be useful, and not to duplicate the documentation that comes with each package.</p> <p>Utilities used by pkgsrc (automatically installed when needed):</p> -<div class="itemizedlist"><ul type="disc"><li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/x11-links/README.html" target="_top"><code class="filename">pkgtools/x11-links</code></a>: +<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/x11-links/README.html" target="_top"><code class="filename">pkgtools/x11-links</code></a>: Symlinks for use by buildlink.</p></li></ul></div> <p>OS tool augmentation (automatically installed when needed):</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/digest/README.html" target="_top"><code class="filename">pkgtools/digest</code></a>: +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/digest/README.html" target="_top"><code class="filename">pkgtools/digest</code></a>: Calculates various kinds of checksums (including SHA1).</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/libnbcompat/README.html" target="_top"><code class="filename">pkgtools/libnbcompat</code></a>: +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/libnbcompat/README.html" target="_top"><code class="filename">pkgtools/libnbcompat</code></a>: Compatibility library for pkgsrc tools.</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/mtree/README.html" target="_top"><code class="filename">pkgtools/mtree</code></a>: Installed on +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/mtree/README.html" target="_top"><code class="filename">pkgtools/mtree</code></a>: Installed on non-BSD systems due to lack of native mtree.</p></li> -<li><p><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>: +<li class="listitem"><p><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>: Up-to-date replacement for <code class="filename">/usr/sbin/pkg_install</code>, or for use on operating systems where pkg_install is not present.</p></li> </ul></div> <p>Utilities used by pkgsrc (not automatically installed):</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_tarup/README.html" target="_top"><code class="filename">pkgtools/pkg_tarup</code></a>: +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_tarup/README.html" target="_top"><code class="filename">pkgtools/pkg_tarup</code></a>: Create a binary package from an already-installed package. Used by <span class="command"><strong>make replace</strong></span> to save the old package.</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/dfdisk/README.html" target="_top"><code class="filename">pkgtools/dfdisk</code></a>: +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/dfdisk/README.html" target="_top"><code class="filename">pkgtools/dfdisk</code></a>: Adds extra functionality to pkgsrc, allowing it to fetch distfiles from multiple locations. It currently supports the following methods: multiple CD-ROMs and network FTP/HTTP connections.</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/xpkgwedge/README.html" target="_top"><code class="filename">pkgtools/xpkgwedge</code></a>: Put X11 +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/xpkgwedge/README.html" target="_top"><code class="filename">pkgtools/xpkgwedge</code></a>: Put X11 packages someplace else (enabled by default).</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/devel/cpuflags/README.html" target="_top"><code class="filename">devel/cpuflags</code></a>: Determine +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/devel/cpuflags/README.html" target="_top"><code class="filename">devel/cpuflags</code></a>: Determine the best compiler flags to optimise code for your current - CPU and compiler. Setting <code class="varname">USE_CPUFLAGS</code> to - yes in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> will cause pkgsrc to automatically use - cpuflags. </p></li> + CPU and compiler. </p></li> </ul></div> <p>Utilities for keeping track of installed packages, being up to date, etc:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_chk/README.html" target="_top"><code class="filename">pkgtools/pkg_chk</code></a>: Reports on +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_chk/README.html" target="_top"><code class="filename">pkgtools/pkg_chk</code></a>: Reports on packages whose installed versions do not match the latest pkgsrc entries.</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdep/README.html" target="_top"><code class="filename">pkgtools/pkgdep</code></a>: Makes +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdep/README.html" target="_top"><code class="filename">pkgtools/pkgdep</code></a>: Makes dependency graphs of packages, to aid in choosing a strategy for updating.</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdepgraph/README.html" target="_top"><code class="filename">pkgtools/pkgdepgraph</code></a>: Makes +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdepgraph/README.html" target="_top"><code class="filename">pkgtools/pkgdepgraph</code></a>: Makes graphs from the output of <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdep/README.html" target="_top"><code class="filename">pkgtools/pkgdep</code></a> (uses graphviz).</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>: The +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>: The pkglint(1) program checks a pkgsrc entry for errors.</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/lintpkgsrc/README.html" target="_top"><code class="filename">pkgtools/lintpkgsrc</code></a>: The lintpkgsrc(1) program +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/lintpkgsrc/README.html" target="_top"><code class="filename">pkgtools/lintpkgsrc</code></a>: The lintpkgsrc(1) program does various checks on the complete pkgsrc system.</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgsurvey/README.html" target="_top"><code class="filename">pkgtools/pkgsurvey</code></a>: Report what +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgsurvey/README.html" target="_top"><code class="filename">pkgtools/pkgsurvey</code></a>: Report what packages you have installed.</p></li> </ul></div> <p>Utilities for people maintaining or creating individual packages:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdiff/README.html" target="_top"><code class="filename">pkgtools/pkgdiff</code></a>: Automate +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdiff/README.html" target="_top"><code class="filename">pkgtools/pkgdiff</code></a>: Automate making and maintaining patches for a package (includes pkgdiff, pkgvi, mkpatches, etc.).</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/rpm2pkg/README.html" target="_top"><code class="filename">pkgtools/rpm2pkg</code></a>, +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/rpm2pkg/README.html" target="_top"><code class="filename">pkgtools/rpm2pkg</code></a>, <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/url2pkg/README.html" target="_top"><code class="filename">pkgtools/url2pkg</code></a>: Aids in converting to pkgsrc.</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/gensolpkg/README.html" target="_top"><code class="filename">pkgtools/gensolpkg</code></a>: Convert +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/gensolpkg/README.html" target="_top"><code class="filename">pkgtools/gensolpkg</code></a>: Convert pkgsrc to a Solaris package.</p></li> </ul></div> <p>Utilities for people maintaining pkgsrc (or: more obscure pkg utilities)</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_comp/README.html" target="_top"><code class="filename">pkgtools/pkg_comp</code></a>: Build +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_comp/README.html" target="_top"><code class="filename">pkgtools/pkg_comp</code></a>: Build packages in a chrooted area.</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/libkver/README.html" target="_top"><code class="filename">pkgtools/libkver</code></a>: Spoof +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/libkver/README.html" target="_top"><code class="filename">pkgtools/libkver</code></a>: Spoof kernel version for chrooted cross builds.</p></li> </ul></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.4. How to use pkgsrc as non-root"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 “<span class="quote">yes</span>”; this +you need to set <code class="varname">UNPRIVILEGED</code> to <span class="quote">“<span class="quote">yes</span>”</span>; this will turn on unprivileged mode and set multiple related variables to allow installation of packages as non-root.</p> <p>In case the defaults are not enough, you may want to tune some other @@ -3327,13 +3310,13 @@ them by setting <code class="varname">UNPRIVILEGED_USER</code> and <code class="varname">UNPRIVILEGED_GROUP</code> respectively.</p> <p>As regards bootstrapping, please note that the <span class="command"><strong>bootstrap</strong></span> script will ease non-root configuration when -given the “<span class="quote">--ignore-user-check</span>” flag, as it will choose and +given the <span class="quote">“<span class="quote">--ignore-user-check</span>”</span> flag, as it will choose and use multiple default directories under <code class="filename">~/pkg</code> as the installation targets. These directories can be overridden by the -“<span class="quote">--prefix</span>” flag provided by the script, as well as some others +<span class="quote">“<span class="quote">--prefix</span>”</span> flag provided by the script, as well as some others that allow finer tuning of the tree layout.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.5. How to resume transfers when fetching distfiles?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -3357,7 +3340,7 @@ like:</p> FETCH_USING= wget </pre> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.6. How can I install/use modular X.org from pkgsrc?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -3367,20 +3350,20 @@ you will have to add the following line into <pre class="programlisting"> X11_TYPE=modular </pre> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>The DragonFly operating system defaults to using modular X.org from pkgsrc. </p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.7. How to fetch files from behind a firewall"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 form of a URL, e.g. in Amdahl, the machine -“<span class="quote">orpheus.amdahl.com</span>” is one of the firewalls, and it uses +<span class="quote">“<span class="quote">orpheus.amdahl.com</span>”</span> is one of the firewalls, and it uses port 80 as the proxy port number. So the proxy environment variables are:</p> <pre class="programlisting"> @@ -3388,15 +3371,15 @@ ftp_proxy=ftp://orpheus.amdahl.com:80/ http_proxy=http://orpheus.amdahl.com:80/ </pre> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.8. How do I tell make fetch to do passive FTP?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="passive-ftp"></a>9.8. How do I tell <span class="command"><strong>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> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="filename">${LOCALBASE}/bin/ftp</code></p></li> -<li><p><code class="filename">/usr/bin/ftp</code></p></li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="filename">${LOCALBASE}/bin/ftp</code></p></li> +<li class="listitem"><p><code class="filename">/usr/bin/ftp</code></p></li> </ul></div> <p>On a default NetBSD installation, this will be <code class="filename">/usr/bin/ftp</code>, which automatically tries passive @@ -3408,7 +3391,7 @@ refuses to do passive. For the other tools, add the following to your <code class="filename">/usr/bin/ftp</code> from falling back to active transfers.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.9. How to fetch all distfiles at once"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -3440,23 +3423,23 @@ directly by running:</p> by running:</p> <pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>make fetch NO_SKIP=yes</code></strong></pre> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.10. What does “Don't know how to make /usr/share/tmac/tmac.andoc” mean?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="tmac.andoc-missing"></a>9.10. What does “<span class="quote">Don't know how to make -/usr/share/tmac/tmac.andoc</span>” mean?</h2></div></div></div> +<a name="tmac.andoc-missing"></a>9.10. What does <span class="quote">“<span class="quote">Don't know how to make +/usr/share/tmac/tmac.andoc</span>”</span> 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 <code class="filename">/usr/share/tmac/tmac.andoc</code>? This indicates that -you don't have installed the “<span class="quote">text</span>” set (nroff, ...) from +you don't have installed the <span class="quote">“<span class="quote">text</span>”</span> set (nroff, ...) from the NetBSD base distribution on your machine. It is recommended to do that to format man pages.</p> <p>In the case of 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 can get away with setting <code class="varname">NOMAN=YES</code> either in the environment or in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.11. What does “Could not find bsd.own.mk” mean?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="bsd.own.mk-missing"></a>9.11. What does “<span class="quote">Could not find bsd.own.mk</span>” mean?</h2></div></div></div> +<a name="bsd.own.mk-missing"></a>9.11. What does <span class="quote">“<span class="quote">Could not find bsd.own.mk</span>”</span> 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> @@ -3466,7 +3449,7 @@ extracting it in <code class="filename">/</code>:</p> the one that corresponds to your release (determine via <span class="command"><strong>uname -r</strong></span>).</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.12. Using 'sudo' with pkgsrc"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -3484,7 +3467,7 @@ SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c .endif </pre> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.13. How do I change the location of configuration files?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -3506,7 +3489,7 @@ package you would like to modify, that is, the contents of <p>Note that after changing these settings, you must rebuild and reinstall any affected packages.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.14. Automated security checks"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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, @@ -3517,29 +3500,29 @@ been included in pkgsrc. The database can be downloaded automatically, and a security audit of all packages installed on a system can take place. To do this, refer to the following two tools (installed as part of 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):</p> -<div class="orderedlist"><ol type="1"> -<li> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> <p><span class="command"><strong>pkg_admin fetch-pkg-vulnerabilities</strong></span>, an easy way to download a list of the security vulnerabilities information. This list is kept up to date by the NetBSD security officer and the NetBSD packages team, and is distributed from the NetBSD ftp server:</p> <p><a class="ulink" href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities" target="_top">ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities</a></p> </li> -<li><p><span class="command"><strong>pkg_admin audit</strong></span>, an easy way to audit the - current machine, checking each vulnerability which is known. If a +<li class="listitem"><p><span class="command"><strong>pkg_admin audit</strong></span>, an easy way to audit the + current machine, checking each known vulnerability. If a vulnerable package is installed, it will be shown by output to stdout, including a description of the type of vulnerability, and a URL containing more information.</p></li> </ol></div> <p>Use of these tools is strongly recommended! After -“<span class="quote">pkg_install</span>” is installed, please read +<span class="quote">“<span class="quote">pkg_install</span>”</span> is installed, please read the package's message, which you can get by running <strong class="userinput"><code>pkg_info -D pkg_install</code></strong>.</p> <p>If this package is installed, pkgsrc builds will use it to perform a security check before building any package. See <a class="xref" href="#variables-affecting-build" title="5.2. Variables affecting the build process">Section 5.2, “Variables affecting the build process”</a> for ways to control this check.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.15. Why do some packages ignore my CFLAGS?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -3556,35 +3539,35 @@ check.</p> directory and then inspect any <code class="filename">Makefile</code> and <code class="filename">Makefile.in</code> for whether they define <code class="varname">CFLAGS</code> explicitly. Usually you can remove - these lines. But be aware that some “<span class="quote">smart</span>” + these lines. But be aware that some <span class="quote">“<span class="quote">smart</span>”</span> programmers write so bad code that it only works for the specific combination of <code class="varname">CFLAGS</code> they have chosen.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.16. A package does not build. What shall I do?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 +<div class="procedure"><ol class="procedure" type="1"> +<li class="step" title="Step 1"><p>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. Since pkgsrc is one large system, not a collection of many small systems, there are sometimes changes that only work when the whole pkgsrc tree is updated.</p></li> -<li><p>Make sure that you don't have any CVS conflicts. - Search for “<span class="quote"><<<<<<</span>” or - “<span class="quote">>>>>>></span>” in all your pkgsrc +<li class="step" title="Step 2"><p>Make sure that you don't have any CVS conflicts. + Search for <span class="quote">“<span class="quote"><<<<<<</span>”</span> or + <span class="quote">“<span class="quote">>>>>>></span>”</span> in all your pkgsrc files.</p></li> -<li><p>Make sure that you don't have old copies of the packages +<li class="step" title="Step 3"><p>Make sure that you don't have old copies of the packages extracted. Run <span class="command"><strong>make clean clean-depends</strong></span> to verify this.</p></li> -<li><p>If the problem still exists, write a mail to the +<li class="step" title="Step 4"><p>If the problem still exists, write a mail to the <code class="literal">pkgsrc-users</code> mailing list.</p></li> </ol></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="9.17. What does “Makefile appears to contain unresolved cvs/rcs/??? merge conflicts” mean?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="faq.rcs-conflicts"></a>9.17. What does “<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>” mean?</h2></div></div></div> +<a name="faq.rcs-conflicts"></a>9.17. What does <span class="quote">“<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>”</span> 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 @@ -3597,13 +3580,13 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u </div> </div> </div> -<div class="part" lang="en"> +<div class="part" title="Part II. The pkgsrc developer's guide"> <div class="titlepage"><div><div><h1 class="title"> <a name="developers-guide"></a>Part II. The pkgsrc developer's guide</h1></div></div></div> -<div class="partintro" lang="en"> +<div class="partintro" title="The pkgsrc developer's guide"> <div></div> <p>This part of the book deals with creating and - modifying packages. It starts with a “<span class="quote">HOWTO</span>”-like + modifying packages. It starts with a <span class="quote">“<span class="quote">HOWTO</span>”</span>-like guide on creating a new package. The remaining chapters are more like a reference manual for pkgsrc.</p> <div class="toc"> @@ -3622,8 +3605,8 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u </dl></dd> <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">11.1. Makefile</a></span></dt> -<dt><span class="sect1"><a href="#components.distinfo">11.2. distinfo</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">11.3.1. Structure of a single patch file</a></span></dt> @@ -3639,13 +3622,13 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u <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">11.6. work*</a></span></dt> -<dt><span class="sect1"><a href="#files-dir">11.7. files/*</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">12. Programming in Makefiles</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">12.1. Caveats</a></span></dt> -<dt><span class="sect1"><a href="#makefile.variables">12.2. Makefile variables</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> @@ -3659,25 +3642,25 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u <dt><span class="chapter"><a href="#plist">13. PLIST issues</a></span></dt> <dd><dl> <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 PLIST generation</a></span></dt> -<dt><span class="sect1"><a href="#print-PLIST">13.3. Tweaking output of make print-PLIST</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 class="command"><strong>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 PLIST_SRC</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">14. Buildlink methodology</a></span></dt> <dd><dl> <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 buildlink3.mk files</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">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 BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files</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">14.3. Writing builtin.mk 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">14.3.1. Anatomy of a builtin.mk file</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> @@ -3690,7 +3673,7 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u </dl></dd> <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">15.2.1. How PKG_SYSCONFDIR is set</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> @@ -3706,7 +3689,7 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u <dt><span class="chapter"><a href="#options">16. Options handling</a></span></dt> <dd><dl> <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 bsd.options.mk</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> <dt><span class="sect1"><a href="#option-build">16.4. Determining the options of dependencies</a></span></dt> </dl></dd> @@ -3716,21 +3699,21 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u <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 fetch 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 checksum phase</a></span></dt> -<dt><span class="sect1"><a href="#build.extract">17.7. The extract phase</a></span></dt> -<dt><span class="sect1"><a href="#build.patch">17.8. The patch phase</a></span></dt> -<dt><span class="sect1"><a href="#build.tools">17.9. The tools phase</a></span></dt> -<dt><span class="sect1"><a href="#build.wrapper">17.10. The wrapper phase</a></span></dt> -<dt><span class="sect1"><a href="#build.configure">17.11. The configure phase</a></span></dt> -<dt><span class="sect1"><a href="#build.build">17.12. The build phase</a></span></dt> -<dt><span class="sect1"><a href="#build.test">17.13. The test phase</a></span></dt> -<dt><span class="sect1"><a href="#build.install">17.14. The install phase</a></span></dt> -<dt><span class="sect1"><a href="#build.package">17.15. The package phase</a></span></dt> +<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> @@ -3746,7 +3729,7 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u <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 ???</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> @@ -3758,12 +3741,12 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u <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 fetch phase</a></span></dt> +<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 configure phase</a></span></dt> +<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> @@ -3776,14 +3759,14 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u <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 build phase</a></span></dt> +<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 ...</a></span></dt> +<dt><span class="sect2"><a href="#undefined-reference">19.5.3. Undefined reference to <span class="quote">“<span class="quote">...</span>”</span></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 install phase</a></span></dt> +<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> @@ -3831,7 +3814,7 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u </dl> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 10. Creating a new pkgsrc package from scratch"> <div class="titlepage"><div><div><h2 class="title"> <a name="creating"></a>Chapter 10. Creating a new pkgsrc package from scratch</h2></div></div></div> <div class="toc"> @@ -3851,21 +3834,21 @@ anymore, you can remove that file and run <span class="command"><strong>cvs -q u most likely have a URL from where you can download the source code. Starting with this URL, creating a package involves only a few steps.</p> -<div class="procedure"><ol type="1"> -<li><p>First, install the packages <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/url2pkg/README.html" target="_top"><code class="filename">pkgtools/url2pkg</code></a> and <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>.</p></li> -<li><p>Then, choose one of the top-level directories as the +<div class="procedure"><ol class="procedure" type="1"> +<li class="step" title="Step 1"><p>First, install the packages <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/url2pkg/README.html" target="_top"><code class="filename">pkgtools/url2pkg</code></a> and <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>.</p></li> +<li class="step" title="Step 2"><p>Then, choose one of the top-level directories as the category in which you want to place your package. You can also create a directory of your own (maybe called <code class="filename">local</code>). In that category directory, create another directory for your package and change into it.</p></li> -<li><p>Run the program <span class="command"><strong>url2pkg</strong></span>, which will ask +<li class="step" title="Step 3"><p>Run the program <span class="command"><strong>url2pkg</strong></span>, which will ask you for a URL. Enter the URL of the distribution file (in most cases a <code class="filename">.tar.gz</code> file) and watch how the basic ingredients of your package are created automatically. The distribution file is extracted automatically to fill in some details in the <code class="filename">Makefile</code> that would otherwise have to be done manually.</p></li> -<li> +<li class="step" title="Step 4"> <p>Examine the extracted files to determine the dependencies of your package. Ideally, this is mentioned in some <code class="filename">README</code> file, but things may differ. For each of @@ -3894,70 +3877,70 @@ DEPENDS+= screen>=4.0:../../misc/screen .include "../../mk/bsd.pkg.mk" </pre> </li> -<li><p>Run <span class="command"><strong>pkglint</strong></span> to see what things still need -to be done to make your package a “<span class="quote">good</span>” one. If you don't +<li class="step" title="Step 5"><p>Run <span class="command"><strong>pkglint</strong></span> to see what things still need +to be done to make your package a <span class="quote">“<span class="quote">good</span>”</span> one. If you don't know what pkglint's warnings want to tell you, try <span class="command"><strong>pkglint --explain</strong></span> or <span class="command"><strong>pkglint -e</strong></span>, which outputs additional explanations.</p></li> -<li><p>In many cases the package is not yet ready to build. You can +<li class="step" title="Step 6"><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 class="xref" href="#creating.common" title="10.1. Common types of packages">Section 10.1, “Common types of packages”</a>. After you have followed the instructions over there, you can hopefully continue here.</p></li> -<li><p>Run <span class="command"><strong>bmake clean</strong></span> to clean the working +<li class="step" title="Step 7"><p>Run <span class="command"><strong>bmake clean</strong></span> to clean the working directory from the extracted files. Besides these files, a lot of cache 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 class="command"><strong>bmake</strong></span> to build the package. For +<li class="step" title="Step 8"><p>Now, run <span class="command"><strong>bmake</strong></span> to build the package. For the various things that can go wrong in this phase, consult <a class="xref" 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 +<li class="step" title="Step 9"><p>When the package builds fine, the next step is to install the package. Run <span class="command"><strong>bmake install</strong></span> and hope that everything works.</p></li> -<li><p>Up to now, the file <code class="filename">PLIST</code>, which +<li class="step" title="Step 10"><p>Up to now, the file <code class="filename">PLIST</code>, which contains a list of the files that are installed by the package, is nearly empty. Run <span class="command"><strong>bmake print-PLIST >PLIST</strong></span> to generate a probably correct list. Check the file using your preferred text editor to see if the list of files looks plausible.</p></li> -<li><p>Run <span class="command"><strong>pkglint</strong></span> again to see if the generated +<li class="step" title="Step 11"><p>Run <span class="command"><strong>pkglint</strong></span> again to see if the generated <code class="filename">PLIST</code> contains garbage or not.</p></li> -<li><p>When you ran <span class="command"><strong>bmake install</strong></span>, the package +<li class="step" title="Step 12"><p>When you ran <span class="command"><strong>bmake install</strong></span>, the package has been registered in the database of installed files, but with an empty list of files. To fix this, run <span class="command"><strong>bmake deinstall</strong></span> and <span class="command"><strong>bmake install</strong></span> again. Now the package is registered with the list of files from <code class="filename">PLIST</code>.</p></li> -<li><p>Run <span class="command"><strong>bmake package</strong></span> to create a binary +<li class="step" title="Step 13"><p>Run <span class="command"><strong>bmake package</strong></span> to create a binary package from the set of installed files.</p></li> </ol></div> -<div class="sect1" lang="en"> +<div class="sect1" title="10.1. Common types of packages"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="creating.common"></a>10.1. Common types of packages</h2></div></div></div> -<div class="sect2" lang="en"> +<div class="sect2" title="10.1.1. Perl modules"> <div class="titlepage"><div><div><h3 class="title"> <a name="creating.perl-module"></a>10.1.1. Perl modules</h3></div></div></div> <p>Simple Perl modules are handled automatically by <span class="command"><strong>url2pkg</strong></span>, including dependencies.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="10.1.2. KDE applications"> <div class="titlepage"><div><div><h3 class="title"> <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> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="10.1.3. Python modules and programs"> <div class="titlepage"><div><div><h3 class="title"> <a name="creating.python-module"></a>10.1.3. Python modules and programs</h3></div></div></div> <p>Python modules and programs packages are easily created using a set of predefined variables.</p> -<p>Most Python packages use either “<span class="quote">distutils</span>” or -easy-setup (“<span class="quote">eggs</span>”). -If the software uses “<span class="quote">distutils</span>”, set the -<code class="varname">PYDISTUTILSPKG</code> variable to “<span class="quote">yes</span>” so +<p>Most Python packages use either <span class="quote">“<span class="quote">distutils</span>”</span> or +easy-setup (<span class="quote">“<span class="quote">eggs</span>”</span>). +If the software uses <span class="quote">“<span class="quote">distutils</span>”</span>, set the +<code class="varname">PYDISTUTILSPKG</code> variable to <span class="quote">“<span class="quote">yes</span>”</span> so pkgsrc will make use of this framework. -“<span class="quote">distutils</span>” uses a script called <code class="filename">setup.py</code>, -if the “<span class="quote">distutils</span>” driver is not called +<span class="quote">“<span class="quote">distutils</span>”</span> uses a script called <code class="filename">setup.py</code>, +if the <span class="quote">“<span class="quote">distutils</span>”</span> driver is not called <code class="filename">setup.py</code>, set the <code class="varname">PYSETUP</code> variable to the name of the script.</p> <p> @@ -3971,21 +3954,21 @@ PYTHON_VERSIONS_ACCEPTED= 25 24 </pre> <p> If the packaged software is a Python module, include -“<span class="quote"><code class="filename">../../lang/python/extension.mk</code></span>”. +<span class="quote">“<span class="quote"><code class="filename">../../lang/python/extension.mk</code></span>”</span>. In this case, the package directory should be called -“<span class="quote">py-software</span>” and <code class="varname">PKGNAME</code> should be set to -“<span class="quote">${PYPKGPREFIX}-${DISTNAME}</span>”, e.g. +<span class="quote">“<span class="quote">py-software</span>”</span> and <code class="varname">PKGNAME</code> should be set to +<span class="quote">“<span class="quote">${PYPKGPREFIX}-${DISTNAME}</span>”</span>, e.g. </p> <pre class="programlisting"> DISTNAME= foopymodule-1.2.10 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} </pre> <p>If it is an application, also include -“<span class="quote"><code class="filename">../../lang/python/application.mk</code></span>” -before “<span class="quote">extension.mk</span>”.</p> +<span class="quote">“<span class="quote"><code class="filename">../../lang/python/application.mk</code></span>”</span> +before <span class="quote">“<span class="quote">extension.mk</span>”</span>.</p> <p>If the packaged software, either it is an application or a module, is egg-aware, you only need to include -“<span class="quote"><code class="filename">../../lang/python/egg.mk</code></span>”.</p> +<span class="quote">“<span class="quote"><code class="filename">../../lang/python/egg.mk</code></span>”</span>.</p> <p>In order to correctly set the path to the Python interpreter, use the <code class="varname">REPLACE_PYTHON</code> variable and set it to the list of files that must be corrected. For example : @@ -3995,19 +3978,19 @@ REPLACE_PYTHON= ${WRKSRC}/*.py </pre> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="10.2. Examples"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="creating.examples"></a>10.2. Examples</h2></div></div></div> -<div class="sect2" lang="en"> +<div class="sect2" title="10.2.1. How the www/nvu package came into pkgsrc"> <div class="titlepage"><div><div><h3 class="title"> <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="sect3" title="10.2.1.1. The initial package"> <div class="titlepage"><div><div><h4 class="title"> <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 “<span class="quote">nvu</span>” package has not yet been imported into +that the <span class="quote">“<span class="quote">nvu</span>”</span> package has not yet been imported into pkgsrc. As the description says it has to do with the web, the obvious -choice for the category is “<span class="quote">www</span>”.</p> +choice for the category is <span class="quote">“<span class="quote">www</span>”</span>.</p> <pre class="programlisting"> <code class="prompt">$</code> mkdir www/nvu <code class="prompt">$</code> cd www/nvu @@ -4019,7 +4002,7 @@ I fed that URL to the <span class="command"><strong>url2pkg</strong></span> prog </pre> <p>My editor popped up, and I added a <code class="varname">PKGNAME</code> line below the <code class="varname">DISTNAME</code> line, as the package name should -not have the word “<span class="quote">sources</span>” in it. I also filled in the +not have the word <span class="quote">“<span class="quote">sources</span>”</span> in it. I also filled in the <code class="varname">MAINTAINER</code>, <code class="varname">HOMEPAGE</code> and <code class="varname">COMMENT</code> fields. Then the package <code class="filename">Makefile</code> looked like that:</p> @@ -4064,7 +4047,7 @@ Remember to correct CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done! Good luck! (See pkgsrc/doc/pkgsrc.txt for some more help :-) </pre> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="10.2.1.2. Fixing all kinds of problems to make the package work"> <div class="titlepage"><div><div><h4 class="title"> <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 @@ -4089,9 +4072,9 @@ WARNING: Please add USE_TOOLS+=perl to the package Makefile. </pre> <p>That worked quite well. So I opened the package Makefile in my editor, and since it already has a <code class="varname">USE_TOOLS</code> line, I -just appended “<span class="quote">perl</span>” to it. Since the dependencies of the +just appended <span class="quote">“<span class="quote">perl</span>”</span> to it. Since the dependencies of the package have changed now, and since a perl wrapper is automatically -installed in the “<span class="quote">tools</span>” phase, I need to build the package +installed in the <span class="quote">“<span class="quote">tools</span>”</span> phase, I need to build the package from scratch.</p> <pre class="programlisting"> <code class="prompt">$</code> bmake clean @@ -4102,7 +4085,7 @@ from scratch.</p> GNU Make. You will not be able to build Mozilla without GNU Make. [...] </pre> -<p>So I added “<span class="quote">gmake</span>” to the +<p>So I added <span class="quote">“<span class="quote">gmake</span>”</span> to the <code class="varname">USE_TOOLS</code> line and tried again (from scratch).</p> <pre class="programlisting"> [...] @@ -4127,7 +4110,7 @@ one result, which is very good. But there is one pitfall with GNOME packages. Before GNOME 2 had been released, there were already many GNOME 1 packages in pkgsrc. To be able to continue to use these packages, the GNOME 2 packages were imported as separate packages, and -their names usually have a “<span class="quote">2</span>” appended. So I checked +their names usually have a <span class="quote">“<span class="quote">2</span>”</span> appended. So I checked whether this was the case here, and indeed it was.</p> <p>Since the GTK2 package has a <code class="filename">buildlink3.mk</code> file, adding the dependency is very easy. I just inserted an @@ -4152,8 +4135,8 @@ checking for GTK - version >= 1.2.0... no configure: error: Test for GTK failed. [...] </pre> -<p>In this particular case, the assumption that “<span class="quote">every package -prefers GNOME 2</span>” had been wrong. The first of the lines above +<p>In this particular case, the assumption that <span class="quote">“<span class="quote">every package +prefers GNOME 2</span>”</span> had been wrong. The first of the lines above told me that this package really wanted to have the GNOME 1 version of GTK. If the package had looked for GTK2, it would have looked for <span class="command"><strong>pkg-config</strong></span> instead of <span class="command"><strong>gtk-config</strong></span>. @@ -4200,7 +4183,7 @@ which patch files were relevant for this issue and copied them to the patches so that they applied cleanly and retried again. This time, everything worked.</p> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="10.2.1.3. Installing the package"> <div class="titlepage"><div><div><h4 class="title"> <a name="creating.nvu.inst"></a>10.2.1.3. Installing the package</h4></div></div></div> <pre class="programlisting"> @@ -4214,14 +4197,14 @@ everything worked.</p> </div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 11. Package components - files, directories and contents"> <div class="titlepage"><div><div><h2 class="title"> <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">11.1. Makefile</a></span></dt> -<dt><span class="sect1"><a href="#components.distinfo">11.2. distinfo</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">11.3.1. Structure of a single patch file</a></span></dt> @@ -4237,14 +4220,14 @@ everything worked.</p> <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">11.6. work*</a></span></dt> -<dt><span class="sect1"><a href="#files-dir">11.7. files/*</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 files involved which are described in the following sections.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="11.1. Makefile"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="components.Makefile"></a>11.1. <code class="filename">Makefile</code> </h2></div></div></div> @@ -4259,11 +4242,11 @@ sections.</p> should appear exactly in the order given here. The order and grouping of the variables is mostly historical and has no further meaning.</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">DISTNAME</code> is the basename of the +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">DISTNAME</code> is the basename of the distribution file to be downloaded from the package's website.</p></li> -<li><p><code class="varname">PKGNAME</code> is the name of the +<li class="listitem"><p><code class="varname">PKGNAME</code> is the name of the package, as used by pkgsrc. You only need to provide it if <code class="varname">DISTNAME</code> (which is the default) is not a good name for the package in pkgsrc. Usually it is the pkgsrc @@ -4272,7 +4255,7 @@ sections.</p> <code class="varname">^[A-Za-z0-9][A-Za-z0-9-_.+]*$</code>, that is, it starts with a letter or digit, and contains only letters, digits, dashes, underscores, dots and plus signs.</p></li> -<li><p><code class="varname">SVR4_PKGNAME</code> is the name of +<li class="listitem"><p><code class="varname">SVR4_PKGNAME</code> is the name of the package file to create if the <code class="varname">PKGNAME</code> isn't unique on a SVR4 system. The default is <code class="varname">PKGNAME</code>, which may be shortened when you use @@ -4281,7 +4264,7 @@ sections.</p> does not produce an unique package name on a SVR4 system. The length of <code class="varname">SVR4_PKGNAME</code> is limited to 5 characters.</p></li> -<li> +<li class="listitem"> <p><code class="varname">CATEGORIES</code> is a list of categories which the package fits in. You can choose any of the top-level directories of pkgsrc for it.</p> @@ -4299,31 +4282,31 @@ comms fonts math pkgtools www converters games mbone print x11 </pre> </li> -<li><p><code class="varname">MASTER_SITES</code>, +<li class="listitem"><p><code class="varname">MASTER_SITES</code>, <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 class="xref" href="#build.fetch" title="17.5. The fetch phase">Section 17.5, “The fetch phase”</a>.</p></li> + <a class="xref" href="#build.fetch" title="17.5. The fetch phase">Section 17.5, “The <span class="emphasis"><em>fetch</em></span> phase”</a>.</p></li> </ul></div> <p>The second section contains information about separately downloaded patches, if any. </p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">PATCHFILES:</code> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">PATCHFILES:</code> Name(s) of additional files that contain distribution patches. There is no default. pkgsrc will look for them at <code class="varname">PATCH_SITES</code>. They will automatically be uncompressed before patching if the names end with <code class="filename">.gz</code> or <code class="filename">.Z</code>.</p></li> -<li><p><code class="varname">PATCH_SITES</code>: +<li class="listitem"><p><code class="varname">PATCH_SITES</code>: Primary location(s) for distribution patch files (see <code class="varname">PATCHFILES</code> below) if not found locally.</p></li> </ul></div> <p>The third section contains the following variables. </p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">MAINTAINER</code> is the email +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">MAINTAINER</code> is the email address of the person who feels responsible for this package, and who is most likely to look at problems or questions regarding this package which have been reported with <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?send-pr+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">send-pr</span>(1)</span></a>. @@ -4333,21 +4316,21 @@ converters games mbone print x11 to yourself. If you really can't maintain the package for future updates, set it to <code class="email"><<a class="email" href="mailto:pkgsrc-users@NetBSD.org">pkgsrc-users@NetBSD.org</a>></code>.</p></li> -<li><p><code class="varname">OWNER</code> should be used instead +<li class="listitem"><p><code class="varname">OWNER</code> should be used instead of <code class="varname">MAINTAINER</code> when you do not want other developers to update or change the package without contacting you first. A package Makefile should contain one of <code class="varname">MAINTAINER</code> or <code class="varname">OWNER</code>, but not both. </p></li> -<li><p><code class="varname">HOMEPAGE</code> is a URL where users can +<li class="listitem"><p><code class="varname">HOMEPAGE</code> is a URL where users can find more information about the package.</p></li> -<li><p><code class="varname">COMMENT</code> is a one-line +<li class="listitem"><p><code class="varname">COMMENT</code> is a one-line description of the package (should not include the package name).</p></li> </ul></div> <p>Other variables that affect the build: </p> -<div class="itemizedlist"><ul type="disc"><li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> <p><code class="varname">WRKSRC</code>: The directory where the interesting distribution files of the package are found. The default is <code class="filename">${WRKDIR}/${DISTNAME}</code>, which @@ -4379,18 +4362,18 @@ converters games mbone print x11 <code class="filename">work.sparc</code>.</p> </li></ul></div> <p>Please pay attention to the following gotchas:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>Add <code class="varname">MANCOMPRESSED</code> if man pages are +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>Add <code class="varname">MANCOMPRESSED</code> if man pages are installed in compressed form by the package. For packages using BSD-style makefiles which honor MANZ, there is <code class="varname">MANCOMPRESSED_IF_MANZ</code>.</p></li> -<li><p>Replace <code class="filename">/usr/local</code> with - “<span class="quote">${PREFIX}</span>” in all files (see patches, +<li class="listitem"><p>Replace <code class="filename">/usr/local</code> with + <span class="quote">“<span class="quote">${PREFIX}</span>”</span> in all files (see patches, below).</p></li> -<li><p>If the package installs any info files, see <a class="xref" href="#faq.info-files" title="19.6.7. Packages installing info files">Section 19.6.7, “Packages installing info files”</a>.</p></li> +<li class="listitem"><p>If the package installs any info files, see <a class="xref" href="#faq.info-files" title="19.6.7. Packages installing info files">Section 19.6.7, “Packages installing info files”</a>.</p></li> </ul></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="11.2. distinfo"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="components.distinfo"></a>11.2. <code class="filename">distinfo</code> </h2></div></div></div> @@ -4408,12 +4391,12 @@ converters games mbone print x11 <span class="command"><strong>make makedistinfo</strong></span> or <span class="command"><strong>make mdi</strong></span> command.</p> <p>Some packages have different sets of distfiles depending on - the platform, for example <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/navigator/README.html" target="_top"><code class="filename">www/navigator</code></a>). These are kept in the same + the platform, for example <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/lang/openjdk7/README.html" target="_top"><code class="filename">lang/openjdk7</code></a>. These are kept in the same <code class="filename">distinfo</code> file and care should be taken when upgrading such a package to ensure distfile information is not lost.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="11.3. patches/*"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -4425,7 +4408,7 @@ converters games mbone print x11 extracting them, in <a class="ulink" href="http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_03" target="_top">alphabetic order</a>, so <code class="filename">patch-aa</code> is applied before <code class="filename">patch-ab</code>, etc.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="11.3.1. Structure of a single patch file"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -4440,13 +4423,13 @@ converters games mbone print x11 empty for aesthetic reasons. After that, there should be a comment for each change that the patch does. There are a number of standard cases:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>Patches that replace the <code class="literal">==</code> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>Patches that replace the <code class="literal">==</code> operator for <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?test+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">test</span>(1)</span></a> with <code class="literal">=</code> in shell scripts are so common that they don't need a comment at all.</p></li> -<li><p>Patches for commonly known vulnerabilities should +<li class="listitem"><p>Patches for commonly known vulnerabilities should mention the vulnerability ID (CAN, CVE).</p></li> -<li><p>Patches that change source code should mention the +<li class="listitem"><p>Patches that change source code should mention the platform and other environment (for example, the compiler) that the patch is needed for.</p></li> </ul></div> @@ -4456,7 +4439,7 @@ converters games mbone print x11 since we generally want that they accept our patches, so we have less work in the future.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="11.3.2. Creating patch files"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -4477,7 +4460,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 class="command"><strong>make - makepatchsum</strong></span> command, see <a class="xref" href="#components.distinfo" title="11.2. distinfo">Section 11.2, “distinfo”</a>.</p> + makepatchsum</strong></span> command, see <a class="xref" href="#components.distinfo" title="11.2. distinfo">Section 11.2, “<code class="filename">distinfo</code>”</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 @@ -4487,7 +4470,7 @@ converters games mbone print x11 <p>The file names of the patch files are usually of the form <code class="filename">patch-<em class="replaceable"><code>[a-z][a-z]</code></em></code>.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="11.3.3. Sources where the patch files come from"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -4504,7 +4487,7 @@ PATCHDIR= ${.CURDIR}/../xemacs/patches committed into pkgsrc, they can be kept outside the pkgsrc tree in the <code class="filename">$LOCALPATCHES</code> directory. The directory tree there is expected to have the same - “<span class="quote">category/package</span>” structure as pkgsrc, and + <span class="quote">“<span class="quote">category/package</span>”</span> structure as pkgsrc, and patches are expected to be stored inside these dirs (also known as <code class="filename">$LOCALPATCHES/$PKGPATH</code>). For example, if you want to keep a private patch for @@ -4514,7 +4497,7 @@ PATCHDIR= ${.CURDIR}/../xemacs/patches and <span class="emphasis"><em>they are applied after pkgsrc patches are applied</em></span>.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="11.3.4. Patching guidelines"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -4628,7 +4611,7 @@ monitor_file(...) collected from our experience in pkgsrc work, so they are possibly helpful when creating patches too.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="11.3.5. Feedback to the author"> <div class="titlepage"><div><div><h3 class="title"> <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> @@ -4649,7 +4632,7 @@ monitor_file(...) <p>Support the idea of free software!</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="11.4. Other mandatory files"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="other-mandatory-files"></a>11.4. Other mandatory files</h2></div></div></div> <div class="variablelist"><dl> @@ -4667,10 +4650,10 @@ monitor_file(...) information.</p></dd> </dl></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="11.5. Optional files"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="components.optional"></a>11.5. Optional files</h2></div></div></div> -<div class="sect2" lang="en"> +<div class="sect2" title="11.5.1. Files affecting the binary package"> <div class="titlepage"><div><div><h3 class="title"> <a name="components.optional.bin"></a>11.5.1. Files affecting the binary package</h3></div></div></div> <div class="variablelist"><dl> @@ -4701,7 +4684,7 @@ monitor_file(...) <pre class="programlisting"> MESSAGE_SUBST+= SOMEVAR="somevalue" </pre> -<p>replaces "${SOMEVAR}" with “<span class="quote">somevalue</span>” in +<p>replaces "${SOMEVAR}" with <span class="quote">“<span class="quote">somevalue</span>”</span> in <code class="filename">MESSAGE</code>. By default, substitution is performed for <code class="varname">PKGNAME</code>, <code class="varname">PKGBASE</code>, <code class="varname">PREFIX</code>, @@ -4720,7 +4703,7 @@ MESSAGE_SUBST+= SOMEVAR="somevalue" alternatives framework.</p></dd> </dl></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="11.5.2. Files affecting the build process"> <div class="titlepage"><div><div><h3 class="title"> <a name="components.optional.build"></a>11.5.2. Files affecting the build process</h3></div></div></div> <div class="variablelist"><dl> @@ -4749,7 +4732,7 @@ MESSAGE_SUBST+= SOMEVAR="somevalue" <code class="filename">Makefile</code>.</p></dd> </dl></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="11.5.3. Files affecting nothing at all"> <div class="titlepage"><div><div><h3 class="title"> <a name="components.optional.none"></a>11.5.3. Files affecting nothing at all</h3></div></div></div> <div class="variablelist"><dl> @@ -4764,7 +4747,7 @@ MESSAGE_SUBST+= SOMEVAR="somevalue" </dl></div> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="11.6. work*"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="work-dir"></a>11.6. <code class="filename">work*</code> </h2></div></div></div> @@ -4778,14 +4761,14 @@ MESSAGE_SUBST+= SOMEVAR="somevalue" or <code class="filename">${.CURDIR}/work.${MACHINE_ARCH}</code> if <code class="varname">OBJMACHINE</code> is set.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="11.7. files/*"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 a <span class="command"><strong>${CP}</strong></span> command in the - “<span class="quote">pre-configure</span>” target to achieve + <span class="quote">“<span class="quote">pre-configure</span>”</span> target to achieve this. Alternatively, you could simply diff the file against <code class="filename">/dev/null</code> and use the patch mechanism to manage the creation of this file.</p> @@ -4798,14 +4781,14 @@ FILESDIR=${.CURDIR}/../xemacs/files </pre> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 12. Programming in Makefiles"> <div class="titlepage"><div><div><h2 class="title"> <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">12.1. Caveats</a></span></dt> -<dt><span class="sect1"><a href="#makefile.variables">12.2. Makefile variables</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> @@ -4831,10 +4814,10 @@ FILESDIR=${.CURDIR}/../xemacs/files <p>This chapter describes some patterns, that appear quite often in <code class="filename">Makefile</code>s, including the pitfalls that come along with them.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="12.1. Caveats"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="makefile.style"></a>12.1. Caveats</h2></div></div></div> -<div class="itemizedlist"><ul type="disc"><li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> <p>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 might occur an error @@ -4864,7 +4847,7 @@ correct: when one of the commands fails (like <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?false+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">false</span>(1)</span></a> above).</p> </li></ul></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="12.2. Makefile variables"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -4902,50 +4885,50 @@ correct: of whitespace.</p> <p>There are several types of variables that should be handled differently. Strings and two types of lists.</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><span class="emphasis"><em>Strings</em></span> can contain arbitrary +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><span class="emphasis"><em>Strings</em></span> can contain arbitrary characters. Nevertheless, you should restrict yourself to only using printable characters. Examples are <code class="varname">PREFIX</code> and <code class="varname">COMMENT</code>.</p></li> -<li><p><span class="emphasis"><em>Internal lists</em></span> are lists that +<li class="listitem"><p><span class="emphasis"><em>Internal lists</em></span> are lists that are never exported to any shell command. Their elements are separated by whitespace. Therefore, the elements themselves cannot have embedded whitespace. Any other characters are allowed. Internal lists can be used in <span class="command"><strong>.for</strong></span> loops. Examples are <code class="varname">DEPENDS</code> and <code class="varname">BUILD_DEPENDS</code>.</p></li> -<li><p><span class="emphasis"><em>External lists</em></span> are lists that +<li class="listitem"><p><span class="emphasis"><em>External lists</em></span> are lists that may be exported to a shell command. Their elements can contain any characters, including whitespace. That's why they cannot be used in <span class="command"><strong>.for</strong></span> loops. Examples are <code class="varname">DISTFILES</code> and <code class="varname">MASTER_SITES</code>.</p></li> </ul></div> -<div class="sect2" lang="en"> +<div class="sect2" title="12.2.1. Naming conventions"> <div class="titlepage"><div><div><h3 class="title"> <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 +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>All variable names starting with an underscore are reserved for use by the pkgsrc infrastructure. They shall not be used by package <code class="filename">Makefile</code>s.</p></li> -<li><p>In <span class="command"><strong>.for</strong></span> loops you should use +<li class="listitem"><p>In <span class="command"><strong>.for</strong></span> loops you should use lowercase variable names for the iteration variables.</p></li> -<li><p>All list variables should have a ``plural'' +<li class="listitem"><p>All list variables should have a ``plural'' name, e.g. <code class="varname">PKG_OPTIONS</code> or <code class="varname">DISTFILES</code>.</p></li> </ul></div> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="12.3. Code snippets"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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="sect2" title="12.3.1. Adding things to a list"> <div class="titlepage"><div><div><h3 class="title"> <a name="adding-to-list"></a>12.3.1. Adding things to a list</h3></div></div></div> <pre class="programlisting"> @@ -4966,7 +4949,7 @@ EXT_LIST+= ${ANOTHER_EXT_LIST} # 4 are sure that all entries are correctly interpreted in both lists.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="12.3.2. Converting an internal list into an external list"> <div class="titlepage"><div><div><h3 class="title"> <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"> @@ -4981,7 +4964,7 @@ EXT_LIST+= ${i:Q}"" are unquoted they must be quoted here. The reason for appending <code class="varname">""</code> is explained below.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="12.3.3. Passing variables to a shell command"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -5025,13 +5008,13 @@ all: <p>As internal lists shall not be passed to the shell, there is no example for it.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="12.3.4. Quoting guideline"> <div class="titlepage"><div><div><h3 class="title"> <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"> -<li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"> <p>Whenever you use the value of a list, think about what happens to leading or trailing whitespace. If the list is a well-formed shell expression, you can apply the @@ -5062,7 +5045,7 @@ all: echo x${CONFIGURE_ARGS}x # properly trimmed </pre> </li> -<li><p>The example above contains one bug: The +<li class="listitem"><p>The example above contains one bug: The <code class="varname">${PREFIX}</code> is a properly quoted shell expression, but there is the C compiler after it, which also expects a properly quoted string (this time in C syntax). The @@ -5073,7 +5056,7 @@ all: string literal. You cannot use the <code class="varname">:Q</code> operator for it, as this operator only works for the shell.</p></li> -<li> +<li class="listitem"> <p>Whenever a variable can be empty, the <code class="varname">:Q</code> operator can have surprising results. Here are two completely different cases which can be solved with the @@ -5108,7 +5091,7 @@ for_test: </li> </ul></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="12.3.5. Workaround for a bug in BSD Make"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -5124,31 +5107,31 @@ VAR:= ${VAR:N${_othervar_:C/-//}} </div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 13. PLIST issues"> <div class="titlepage"><div><div><h2 class="title"> <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">13.1. RCS ID</a></span></dt> -<dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic PLIST generation</a></span></dt> -<dt><span class="sect1"><a href="#print-PLIST">13.3. Tweaking output of make print-PLIST</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 class="command"><strong>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 PLIST_SRC</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 - “<span class="quote">packing list</span>”, i.e. a list of files that belong to + <span class="quote">“<span class="quote">packing list</span>”</span>, i.e. a list of files that belong to the package (relative to the <code class="filename">${PREFIX}</code> directory it's been installed in) plus some additional statements - see the <a class="citerefentry" 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> man page for a full list. This chapter addresses some issues that need attention when dealing with the <code class="filename">PLIST</code> file (or files, see below!).</p> -<div class="sect1" lang="en"> +<div class="sect1" title="13.1. RCS ID"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -5157,7 +5140,7 @@ VAR:= ${VAR:N${_othervar_:C/-//}} @comment $NetBSD$ </pre> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="13.2. Semi-automatic PLIST generation"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 class="command"><strong>make print-PLIST</strong></span> command @@ -5165,7 +5148,7 @@ VAR:= ${VAR:N${_othervar_:C/-//}} was extracted. See <a class="xref" href="#build.helpful-targets" title="17.17. Other helpful targets">Section 17.17, “Other helpful targets”</a> for more information on this target.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="13.3. Tweaking output of make print-PLIST"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="print-PLIST"></a>13.3. Tweaking output of <span class="command"><strong>make print-PLIST</strong></span> </h2></div></div></div> @@ -5194,7 +5177,7 @@ PRINT_PLIST_AWK+= /^libdata\/foo/ { next; } PRINT_PLIST_AWK+= /^@dirrm share\/specific/ { print "@comment " $$0; next; } </pre> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="13.4. Variable substitution in PLIST"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="plist.misc"></a>13.4. Variable substitution in PLIST</h2></div></div></div> <p>A number of variables are substituted automatically in @@ -5208,16 +5191,16 @@ PRINT_PLIST_AWK+= /^@dirrm share\/specific/ { print "@comment " $$0; next; pathnames where they install their files. To handle this case, PLIST will be preprocessed before actually used, and the symbol - “<span class="quote"><code class="varname">${MACHINE_ARCH}</code></span>” will be + <span class="quote">“<span class="quote"><code class="varname">${MACHINE_ARCH}</code></span>”</span> will be replaced by what <span class="command"><strong>uname -p</strong></span> gives. The same is done if the string <code class="varname">${MACHINE_GNU_ARCH}</code> is embedded in PLIST somewhere - use this on packages that have GNU autoconf-created configure scripts.</p> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Legacy note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Legacy note</h3> <p>There used to be a symbol - “<span class="quote"><code class="varname">$ARCH</code></span>” that + <span class="quote">“<span class="quote"><code class="varname">$ARCH</code></span>”</span> that was replaced by the output of <span class="command"><strong>uname -m</strong></span>, but that's no longer supported and has been removed.</p> @@ -5229,10 +5212,10 @@ PRINT_PLIST_AWK+= /^@dirrm share\/specific/ { print "@comment " $$0; next; into some paths. To do this, use these variables in the <code class="filename">PLIST</code>: </p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">${OPSYS}</code> - output of “<span class="quote"><span class="command"><strong>uname -s</strong></span></span>”</p></li> -<li><p><code class="varname">${LOWER_OPSYS}</code> - lowercase common name (eg. “<span class="quote">solaris</span>”)</p></li> -<li><p><code class="varname">${OS_VERSION}</code> - “<span class="quote"><span class="command"><strong>uname -r</strong></span></span>”</p></li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">${OPSYS}</code> - output of <span class="quote">“<span class="quote"><span class="command"><strong>uname -s</strong></span></span>”</span></p></li> +<li class="listitem"><p><code class="varname">${LOWER_OPSYS}</code> - lowercase common name (eg. <span class="quote">“<span class="quote">solaris</span>”</span>)</p></li> +<li class="listitem"><p><code class="varname">${OS_VERSION}</code> - <span class="quote">“<span class="quote"><span class="command"><strong>uname -r</strong></span></span>”</span></p></li> </ul></div> </dd> </dl></div> @@ -5245,19 +5228,19 @@ PRINT_PLIST_AWK+= /^@dirrm share\/specific/ { print "@comment " $$0; next; <pre class="programlisting"> PLIST_SUBST+= SOMEVAR="somevalue" </pre> -<p>This replaces all occurrences of “<span class="quote">${SOMEVAR}</span>” +<p>This replaces all occurrences of <span class="quote">“<span class="quote">${SOMEVAR}</span>”</span> in the <code class="filename">PLIST</code> with - “<span class="quote">somevalue</span>”.</p> + <span class="quote">“<span class="quote">somevalue</span>”</span>.</p> <p>The <code class="varname">PLIST_VARS</code> variable can be used to simplify the common case of conditionally including some <code class="filename">PLIST</code> entries. It can be done by adding <code class="literal"><code class="varname">PLIST_VARS</code>+=foo</code> and setting the corresponding <code class="varname">PLIST.foo</code> variable to <code class="literal">yes</code> if the entry should be included. - This will substitute “<span class="quote"><code class="varname">${PLIST.foo}</code></span>” + This will substitute <span class="quote">“<span class="quote"><code class="varname">${PLIST.foo}</code></span>”</span> in the <code class="filename">PLIST</code> with either - “<span class="quote"><code class="literal">""</code></span>” or - “<span class="quote"><code class="literal">"@comment "</code></span>”. + <span class="quote">“<span class="quote"><code class="literal">""</code></span>”</span> or + <span class="quote">“<span class="quote"><code class="literal">"@comment "</code></span>”</span>. For example, in <code class="filename">Makefile</code>:</p> <pre class="programlisting"> PLIST_VARS+= foo @@ -5276,20 +5259,20 @@ ${PLIST.foo}share/bar/foo.data ${PLIST.foo}@dirrm share/bar </pre> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="13.5. Man page compression"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 - <code class="filename">PLIST</code> file, the suffix “<span class="quote">.gz</span>” is + <code class="filename">PLIST</code> file, the suffix <span class="quote">“<span class="quote">.gz</span>”</span> is appended/removed automatically for man pages according to <code class="varname">MANZ</code> and <code class="varname">MANCOMPRESSED</code> being set or not, see above for details. This modification of the <code class="filename">PLIST</code> file is done on a copy of it, not <code class="filename">PLIST</code> itself.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="13.6. Changing PLIST source with PLIST_SRC"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="using-PLIST_SRC"></a>13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code> </h2></div></div></div> @@ -5300,24 +5283,24 @@ ${PLIST.foo}@dirrm share/bar important. The default for <code class="varname">PLIST_SRC</code> is <code class="filename">${PKGDIR}/PLIST</code>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="13.7. Platform-specific and differing PLISTs"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="filename">PLIST.common</code></p></li> -<li><p><code class="filename">PLIST.${OPSYS}</code></p></li> -<li><p><code class="filename">PLIST.${MACHINE_ARCH}</code></p></li> -<li><p><code class="filename">PLIST.${OPSYS}-${MACHINE_ARCH}</code></p></li> -<li><p><code class="filename">PLIST.common_end</code></p></li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="filename">PLIST.common</code></p></li> +<li class="listitem"><p><code class="filename">PLIST.${OPSYS}</code></p></li> +<li class="listitem"><p><code class="filename">PLIST.${MACHINE_ARCH}</code></p></li> +<li class="listitem"><p><code class="filename">PLIST.${OPSYS}-${MACHINE_ARCH}</code></p></li> +<li class="listitem"><p><code class="filename">PLIST.common_end</code></p></li> </ul></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="13.8. Sharing directories between packages"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="faq.common-dirs"></a>13.8. Sharing directories between packages</h2></div></div></div> -<p>A “<span class="quote">shared directory</span>” is a directory where +<p>A <span class="quote">“<span class="quote">shared directory</span>”</span> is a directory where multiple (and unrelated) packages install files. These directories were problematic because you had to add special tricks in the PLIST to conditionally remove them, or have some @@ -5337,21 +5320,21 @@ ${PLIST.foo}@dirrm share/bar </p> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 14. Buildlink methodology"> <div class="titlepage"><div><div><h2 class="title"> <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">14.1. Converting packages to use buildlink3</a></span></dt> -<dt><span class="sect1"><a href="#creating-buildlink3.mk">14.2. Writing buildlink3.mk files</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">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 BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files</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">14.3. Writing builtin.mk 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">14.3.1. Anatomy of a builtin.mk file</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> @@ -5359,11 +5342,11 @@ ${PLIST.foo}@dirrm share/bar <p>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 step process:</p> -<div class="orderedlist"><ol type="1"> -<li><p>Symlink headers and libraries for dependencies into +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Symlink headers and libraries for dependencies into <code class="varname">BUILDLINK_DIR</code>, which by default is a subdirectory of <code class="varname">WRKDIR</code>.</p></li> -<li><p>Create wrapper scripts that are used in place of the normal compiler +<li class="listitem"><p>Create wrapper scripts that are used in place of the normal compiler tools that translate <code class="option">-I${LOCALBASE}/include</code> and <code class="option">-L${LOCALBASE}/lib</code> into references to <code class="varname">BUILDLINK_DIR</code>. The wrapper scripts also make @@ -5378,25 +5361,25 @@ ${PLIST.foo}@dirrm share/bar <code class="filename">/usr/lib</code>, etc., are always searched -- buildlink3 is designed to insulate the package build from non-system-supplied software.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="14.1. Converting packages to use buildlink3"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 (“<span class="quote">bl3ifying</span>”) is fairly straightforward. + framework (<span class="quote">“<span class="quote">bl3ifying</span>”</span>) is fairly straightforward. The things to keep in mind are:</p> -<div class="orderedlist"><ol type="1"> -<li><p>Ensure that the build always calls the wrapper scripts +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Ensure that the build always calls the wrapper scripts instead of the actual toolchain. Some packages are tricky, and the only way to know for sure is the check <code class="filename">${WRKDIR}/.work.log</code> to see if the wrappers are being invoked.</p></li> -<li><p>Don't override <code class="varname">PREFIX</code> from within +<li class="listitem"><p>Don't override <code class="varname">PREFIX</code> from within the package Makefile, e.g. Java VMs, standalone shells, etc., because the code to symlink files into <code class="filename">${BUILDLINK_DIR}</code> looks for files - relative to “<span class="quote">pkg_info -qp <em class="replaceable"><code>pkgname</code></em></span>”. + relative to <span class="quote">“<span class="quote">pkg_info -qp <em class="replaceable"><code>pkgname</code></em></span>”</span>. </p></li> -<li><p>Remember that <span class="emphasis"><em>only</em></span> the +<li class="listitem"><p>Remember that <span class="emphasis"><em>only</em></span> the <code class="filename">buildlink3.mk</code> files that you list in a package's Makefile are added as dependencies for that package. </p></li> @@ -5420,34 +5403,34 @@ BUILDLINK_API_DEPENDS.foo+= foo>=1.1.0 <p>There are several <code class="filename">buildlink3.mk</code> files in <code class="filename">pkgsrc/mk</code> that handle special package issues:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="filename">bdb.buildlink3.mk</code> chooses either +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="filename">bdb.buildlink3.mk</code> chooses either the native or a pkgsrc Berkeley DB implementation based on the values of <code class="varname">BDB_ACCEPTED</code> and <code class="varname">BDB_DEFAULT</code>.</p></li> -<li><p><code class="filename">curses.buildlink3.mk</code>: If the system +<li class="listitem"><p><code class="filename">curses.buildlink3.mk</code>: If the system comes with neither Curses nor NCurses, this will take care to install the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/devel/ncurses/README.html" target="_top"><code class="filename">devel/ncurses</code></a> package.</p></li> -<li><p><code class="filename">krb5.buildlink3.mk</code> uses the value +<li class="listitem"><p><code class="filename">krb5.buildlink3.mk</code> uses the value of <code class="varname">KRB5_ACCEPTED</code> to choose between adding a dependency on Heimdal or MIT-krb5 for packages that require a Kerberos 5 implementation.</p></li> -<li><p><code class="filename">motif.buildlink3.mk</code> checks for a +<li class="listitem"><p><code class="filename">motif.buildlink3.mk</code> checks for a system-provided Motif installation or adds a dependency on <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/x11/lesstif/README.html" target="_top"><code class="filename">x11/lesstif</code></a> or <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/x11/openmotif/README.html" target="_top"><code class="filename">x11/openmotif</code></a>. The user can set - <code class="varname">MOTIF_TYPE</code> to “<span class="quote">dt</span>”, - “<span class="quote">lesstif</span>”, or “<span class="quote">openmotif</span>” to choose + <code class="varname">MOTIF_TYPE</code> to <span class="quote">“<span class="quote">dt</span>”</span>, + <span class="quote">“<span class="quote">lesstif</span>”</span>, or <span class="quote">“<span class="quote">openmotif</span>”</span> to choose which Motif version will be used.</p></li> -<li><p><code class="filename">oss.buildlink3.mk</code> defines several +<li class="listitem"><p><code class="filename">oss.buildlink3.mk</code> defines several variables that may be used by packages that use the Open Sound System (OSS) API.</p></li> -<li><p><code class="filename">pgsql.buildlink3.mk</code> will accept +<li class="listitem"><p><code class="filename">pgsql.buildlink3.mk</code> will accept either Postgres 8.0, 8.1, or 8.2, whichever is found installed. See the file for more information.</p></li> -<li><p><code class="filename">pthread.buildlink3.mk</code> uses the value of +<li class="listitem"><p><code class="filename">pthread.buildlink3.mk</code> uses the value of <code class="varname">PTHREAD_OPTS</code> and checks for native pthreads or adds a dependency on <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/devel/pth/README.html" target="_top"><code class="filename">devel/pth</code></a> as needed.</p></li> -<li><p><code class="filename">xaw.buildlink3.mk</code> uses the value of +<li class="listitem"><p><code class="filename">xaw.buildlink3.mk</code> uses the value of <code class="varname">XAW_TYPE</code> to choose a particular Athena widgets library.</p></li> </ul></div> @@ -5455,7 +5438,7 @@ BUILDLINK_API_DEPENDS.foo+= foo>=1.1.0 files provide a more complete description of how to use them properly.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="14.2. Writing buildlink3.mk files"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="creating-buildlink3.mk"></a>14.2. Writing <code class="filename">buildlink3.mk</code> files</h2></div></div></div> <a name="buildlink3.mk"></a><p>A package's <code class="filename">buildlink3.mk</code> file is @@ -5475,7 +5458,7 @@ BUILDLINK_API_DEPENDS.foo+= foo>=1.1.0 <code class="prompt">%</code> <strong class="userinput"><code>cd pkgsrc/<em class="replaceable"><code>category</code></em>/<em class="replaceable"><code>pkgdir</code></em> <code class="prompt">%</code> createbuildlink >buildlink3.mk</code></strong> </pre> -<div class="sect2" lang="en"> +<div class="sect2" title="14.2.1. Anatomy of a buildlink3.mk file"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -5506,8 +5489,8 @@ BUILDLINK_TREE+= -tiff <p>The main section is protected from multiple inclusion and controls how the dependency on <em class="replaceable"><code>pkg</code></em> is added. Several important variables are set in the section:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> is the actual dependency recorded in the installed package; this should always be set using <span class="command"><strong>+=</strong></span> to ensure that @@ -5515,30 +5498,30 @@ BUILDLINK_TREE+= -tiff variable should be set to the first version of the package that had an API change. </p></li> -<li><p><code class="varname">BUILDLINK_PKGSRCDIR.<em class="replaceable"><code>pkg</code></em></code> +<li class="listitem"><p><code class="varname">BUILDLINK_PKGSRCDIR.<em class="replaceable"><code>pkg</code></em></code> is the location of the <em class="replaceable"><code>pkg</code></em> pkgsrc directory.</p></li> -<li><p><code class="varname">BUILDLINK_DEPMETHOD.<em class="replaceable"><code>pkg</code></em></code> +<li class="listitem"><p><code class="varname">BUILDLINK_DEPMETHOD.<em class="replaceable"><code>pkg</code></em></code> (not shown above) controls whether we use <code class="varname">BUILD_DEPENDS</code> or <code class="varname">DEPENDS</code> to add the dependency on <em class="replaceable"><code>pkg</code></em>. The build dependency is selected by setting <code class="varname">BUILDLINK_DEPMETHOD.<em class="replaceable"><code>pkg</code></em></code> - to “<span class="quote">build</span>”. By default, the full dependency is + to <span class="quote">“<span class="quote">build</span>”</span>. By default, the full dependency is used.</p></li> -<li><p><code class="varname">BUILDLINK_INCDIRS.<em class="replaceable"><code>pkg</code></em></code> +<li class="listitem"><p><code class="varname">BUILDLINK_INCDIRS.<em class="replaceable"><code>pkg</code></em></code> and <code class="varname">BUILDLINK_LIBDIRS.<em class="replaceable"><code>pkg</code></em></code> (not shown above) are lists of subdirectories of <code class="filename">${BUILDLINK_PREFIX.<em class="replaceable"><code>pkg</code></em>}</code> to add to the header and library search paths. These - default to “<span class="quote">include</span>” and “<span class="quote">lib</span>” + default to <span class="quote">“<span class="quote">include</span>”</span> and <span class="quote">“<span class="quote">lib</span>”</span> respectively.</p></li> -<li><p><code class="varname">BUILDLINK_CPPFLAGS.<em class="replaceable"><code>pkg</code></em></code> +<li class="listitem"><p><code class="varname">BUILDLINK_CPPFLAGS.<em class="replaceable"><code>pkg</code></em></code> (not shown above) is the list of preprocessor flags to add to <code class="varname">CPPFLAGS</code>, which are passed on to the - configure and build phases. The “<span class="quote">-I</span>” option + configure and build phases. The <span class="quote">“<span class="quote">-I</span>”</span> option should be avoided and instead be handled using <code class="varname">BUILDLINK_INCDIRS.<em class="replaceable"><code>pkg</code></em></code> as above.</p></li> @@ -5548,14 +5531,14 @@ BUILDLINK_TREE+= -tiff control which package files are symlinked into <code class="filename">${BUILDLINK_DIR}</code> and how their names are transformed during the symlinking:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">BUILDLINK_FILES.<em class="replaceable"><code>pkg</code></em></code> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">BUILDLINK_FILES.<em class="replaceable"><code>pkg</code></em></code> (not shown above) is a shell glob pattern relative to <code class="filename">${BUILDLINK_PREFIX.<em class="replaceable"><code>pkg</code></em>}</code> to be symlinked into <code class="filename">${BUILDLINK_DIR}</code>, e.g. <code class="filename">include/*.h</code>.</p></li> -<li><p><code class="varname">BUILDLINK_FILES_CMD.<em class="replaceable"><code>pkg</code></em></code> +<li class="listitem"><p><code class="varname">BUILDLINK_FILES_CMD.<em class="replaceable"><code>pkg</code></em></code> (not shown above) is a shell pipeline that outputs to stdout a list of files relative to <code class="filename">${BUILDLINK_PREFIX.<em class="replaceable"><code>pkg</code></em>}</code>. @@ -5564,7 +5547,7 @@ BUILDLINK_TREE+= -tiff this takes the <code class="filename">+CONTENTS</code> of a <em class="replaceable"><code>pkg</code></em> and filters it through <code class="varname">${BUILDLINK_CONTENTS_FILTER.<em class="replaceable"><code>pkg</code></em>}</code>.</p></li> -<li><p><code class="varname">BUILDLINK_CONTENTS_FILTER.<em class="replaceable"><code>pkg</code></em></code> +<li class="listitem"><p><code class="varname">BUILDLINK_CONTENTS_FILTER.<em class="replaceable"><code>pkg</code></em></code> (not shown above) is a filter command that filters <code class="filename">+CONTENTS</code> input into a list of files relative to @@ -5576,7 +5559,7 @@ BUILDLINK_TREE+= -tiff <code class="filename">+CONTENTS</code>, and for pkgviews packages, it outputs any libtool archives in <code class="filename">lib</code> directories.</p></li> -<li><p><code class="varname">BUILDLINK_FNAME_TRANSFORM.<em class="replaceable"><code>pkg</code></em></code> +<li class="listitem"><p><code class="varname">BUILDLINK_FNAME_TRANSFORM.<em class="replaceable"><code>pkg</code></em></code> (not shown above) is a list of sed arguments used to transform the name of the source filename into a destination filename, e.g. <span class="command"><strong>-e @@ -5594,7 +5577,7 @@ BUILDLINK_TREE+= -tiff file is included. Dependencies are only added for directly include <code class="filename">buildlink3.mk</code> files.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="14.2.2. Updating BUILDLINK_API_DEPENDS.pkg in buildlink3.mk files"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -5636,7 +5619,7 @@ BUILDLINK_TREE+= -tiff <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code>. </p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="14.3. Writing builtin.mk files"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -5648,20 +5631,20 @@ BUILDLINK_TREE+= -tiff appropriate.</p> <p>The only requirements of a builtin.mk file for <em class="replaceable"><code>pkg</code></em> are:</p> -<div class="orderedlist"><ol type="1"> -<li><p>It should set +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>It should set <code class="varname">USE_BUILTIN.<em class="replaceable"><code>pkg</code></em></code> - to either “<span class="quote">yes</span>” or “<span class="quote">no</span>” + to either <span class="quote">“<span class="quote">yes</span>”</span> or <span class="quote">“<span class="quote">no</span>”</span> after it is included.</p></li> -<li><p>It should <span class="emphasis"><em>not</em></span> override any +<li class="listitem"><p>It should <span class="emphasis"><em>not</em></span> override any <code class="varname">USE_BUILTIN.<em class="replaceable"><code>pkg</code></em></code> which is already set before the <code class="filename">builtin.mk</code> file is included.</p></li> -<li><p>It should be written to allow multiple inclusion. This +<li class="listitem"><p>It should be written to allow multiple inclusion. This is <span class="emphasis"><em>very</em></span> important and takes careful attention to <code class="filename">Makefile</code> coding.</p></li> </ol></div> -<div class="sect2" lang="en"> +<div class="sect2" title="14.3.1. Anatomy of a builtin.mk file"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -5708,7 +5691,7 @@ CHECK_BUILTIN.foo?= no depending on if <em class="replaceable"><code>pkg</code></em> really exists in the base system. This should not be a base system software with similar functionality to <em class="replaceable"><code>pkg</code></em>; - it should only be “<span class="quote">yes</span>” if the actual package is + it should only be <span class="quote">“<span class="quote">yes</span>”</span> if the actual package is included as part of the base system. This variable is only used internally within the <code class="filename">builtin.mk</code> file.</p> @@ -5717,7 +5700,7 @@ CHECK_BUILTIN.foo?= no to the version of <em class="replaceable"><code>pkg</code></em> in the base system if it exists (if <code class="varname">IS_BUILTIN.<em class="replaceable"><code>pkg</code></em></code> - is “<span class="quote">yes</span>”). This variable is only used internally + is <span class="quote">“<span class="quote">yes</span>”</span>). This variable is only used internally within the <code class="filename">builtin.mk</code> file.</p> <p>The third section sets <code class="varname">USE_BUILTIN.<em class="replaceable"><code>pkg</code></em></code> @@ -5734,9 +5717,9 @@ CHECK_BUILTIN.foo?= no <span class="emphasis"><em>must</em></span> be set to the correct value by the end of the <code class="filename">builtin.mk</code> file. Note that <code class="varname">USE_BUILTIN.<em class="replaceable"><code>pkg</code></em></code> - may be “<span class="quote">yes</span>” even if + may be <span class="quote">“<span class="quote">yes</span>”</span> even if <code class="varname">IS_BUILTIN.<em class="replaceable"><code>pkg</code></em></code> - is “<span class="quote">no</span>” because we may make the determination + is <span class="quote">“<span class="quote">no</span>”</span> because we may make the determination that the built-in version of the software is similar enough to be used as a replacement.</p> <p>The last section is guarded by @@ -5748,7 +5731,7 @@ CHECK_BUILTIN.foo?= no files to symlink into <code class="filename">${BUILDLINK_DIR}</code> (via <code class="varname">BUILDLINK_FILES.<em class="replaceable"><code>pkg</code></em></code>).</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="14.3.2. Global preferences for native or pkgsrc software"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -5757,7 +5740,7 @@ CHECK_BUILTIN.foo?= no dependency. This is controlled by setting <code class="varname">PREFER_PKGSRC</code> and <code class="varname">PREFER_NATIVE</code>. These variables take values - of either “<span class="quote">yes</span>”, “<span class="quote">no</span>”, or a list of + of either <span class="quote">“<span class="quote">yes</span>”</span>, <span class="quote">“<span class="quote">no</span>”</span>, or a list of packages. <code class="varname">PREFER_PKGSRC</code> tells pkgsrc to use the pkgsrc versions of software, while <code class="varname">PREFER_NATIVE</code> tells pkgsrc to use the @@ -5781,7 +5764,7 @@ PREFER_NATIVE= getopt skey tcp_wrappers </div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 15. The pkginstall framework"> <div class="titlepage"><div><div><h2 class="title"> <a name="pkginstall"></a>Chapter 15. The pkginstall framework</h2></div></div></div> <div class="toc"> @@ -5794,7 +5777,7 @@ PREFER_NATIVE= getopt skey tcp_wrappers </dl></dd> <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">15.2.1. How PKG_SYSCONFDIR is set</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> @@ -5810,15 +5793,15 @@ PREFER_NATIVE= getopt skey tcp_wrappers </div> <p>This chapter describes the framework known as <code class="literal">pkginstall</code>, whose key features are:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>Generic installation and manipulation of directories and files +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>Generic installation and manipulation of directories and files outside the pkgsrc-handled tree, <code class="varname">LOCALBASE</code>.</p></li> -<li><p>Automatic handling of configuration files during installation, +<li class="listitem"><p>Automatic handling of configuration files during installation, provided that packages are correctly designed.</p></li> -<li><p>Generation and installation of system startup scripts.</p></li> -<li><p>Registration of system users and groups.</p></li> -<li><p>Registration of system shells.</p></li> -<li><p>Automatic updating of fonts databases.</p></li> +<li class="listitem"><p>Generation and installation of system startup scripts.</p></li> +<li class="listitem"><p>Registration of system users and groups.</p></li> +<li class="listitem"><p>Registration of system shells.</p></li> +<li class="listitem"><p>Automatic updating of fonts databases.</p></li> </ul></div> <p>The following sections inspect each of the above points in detail.</p> <p>You may be thinking that many of the things described here could be @@ -5829,7 +5812,7 @@ using binary packages could not benefit from it at all (as the code 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.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="15.1. Files and directories outside the installation prefix"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -5862,19 +5845,19 @@ provides generic scripts to abstract the manipulation of such files and directories based on variables set in the package's <code class="filename">Makefile</code>. The rest of this section describes these variables.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="15.1.1. Directory manipulation"> <div class="titlepage"><div><div><h3 class="title"> <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"> -<li><p><code class="varname">MAKE_DIRS</code> and <code class="varname">OWN_DIRS</code> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">MAKE_DIRS</code> and <code class="varname">OWN_DIRS</code> contain a list of directories that should be created and should attempt to be destroyed by the installation scripts. The difference between the two is that the latter prompts the administrator to remove any directories that may be left after deinstallation (because they were not empty), while the former does not.</p></li> -<li> +<li class="listitem"> <p><code class="varname">MAKE_DIRS_PERMS</code> and <code class="varname">OWN_DIRS_PERMS</code> contain a list of tuples describing which directories should be created and should attempt to be destroyed @@ -5889,7 +5872,7 @@ MAKE_DIRS_PERMS+= ${VARBASE}/foo/private ${ROOT_USER} ${ROOT_GROUP} 0700 </li> </ul></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="15.1.2. File manipulation"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -5901,8 +5884,8 @@ generated by pkginstall). We will call the former the <span class="emphasis"><e file</em></span> in the following paragraphs, which describe the variables that can be used to automatically and consistently handle files outside the installation prefix:</p> -<div class="itemizedlist"><ul type="disc"> -<li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"> <p><code class="varname">CONF_FILES</code> and <code class="varname">SUPPORT_FILES</code> are pairs of master and target files. During installation time, the master file is copied to the target one @@ -5914,7 +5897,7 @@ installation prefix:</p> deinstallation (because they were not empty), while the former does not.</p> </li> -<li> +<li class="listitem"> <p><code class="varname">CONF_FILES_PERMS</code> and <code class="varname">SUPPORT_FILES_PERMS</code> contain tuples describing master files as well as their target locations. For each of them, it also @@ -5929,7 +5912,7 @@ SUPPORT_FILES_PERMS+= ${PREFIX}/share/somefile ${VARBASE}/somefile ${ROOT_USER} </ul></div> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="15.2. Configuration files"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -5941,19 +5924,19 @@ inside <code class="varname">PKG_SYSCONFDIR</code>) during installation <span cl and only if</em></span> 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.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="15.2.1. How PKG_SYSCONFDIR is set"> <div class="titlepage"><div><div><h3 class="title"> <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> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">PKG_SYSCONFBASE</code>: The configuration's root +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">PKG_SYSCONFBASE</code>: The configuration's root directory. Defaults to <code class="filename">${PREFIX}/etc</code> although it may be overridden by the user to point to his preferred location (e.g., <code class="filename">/etc</code>, <code class="filename">/etc/pkg</code>, etc.). Packages must not use it directly.</p></li> -<li> +<li class="listitem"> <p><code class="varname">PKG_SYSCONFSUBDIR</code>: A subdirectory of <code class="varname">PKG_SYSCONFBASE</code> under which the configuration files for the package being built shall be installed. The definition of this @@ -5966,12 +5949,12 @@ set based upon the following variables:</p> <code class="varname">PKG_SYSCONFBASE</code>. This should be set in the package Makefile.</p> </li> -<li><p><code class="varname">PKG_SYSCONFVAR</code>: Specifies the name of the +<li class="listitem"><p><code class="varname">PKG_SYSCONFVAR</code>: Specifies the name of the variable that holds this package's configuration directory (if different from <code class="varname">PKG_SYSCONFBASE</code>). It defaults to <code class="varname">PKGBASE</code>'s value, and is always prefixed with <code class="literal">PKG_SYSCONFDIR</code>.</p></li> -<li><p><code class="varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</code>: Holds the +<li class="listitem"><p><code class="varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</code>: Holds the directory where the configuration files for the package identified by <code class="varname">PKG_SYSCONFVAR</code>'s shall be placed.</p></li> </ul></div> @@ -5980,14 +5963,14 @@ set based upon the following variables:</p> variable that can be used within a package to refer to its configuration directory. The algorithm used to set its value is basically the following:</p> -<div class="orderedlist"><ol type="1"> -<li><p>If <code class="varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</code> is set, +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>If <code class="varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</code> is set, its value is used.</p></li> -<li><p>If the previous variable is not defined but +<li class="listitem"><p>If the previous variable is not defined but <code class="varname">PKG_SYSCONFSUBDIR</code> is set in the package's <code class="filename">Makefile</code>, the resulting value is <code class="filename">${PKG_SYSCONFBASE}/${PKG_SYSCONFSUBDIR}</code>.</p></li> -<li><p>Otherwise, it is set to +<li class="listitem"><p>Otherwise, it is set to <code class="filename">${PKG_SYSCONFBASE}</code>.</p></li> </ol></div> <p>It is worth mentioning that <code class="filename">${PKG_SYSCONFDIR}</code> is @@ -5995,7 +5978,7 @@ automatically added to <code class="filename">OWN_DIRS</code>. See <a class="xr subdirectories of <code class="filename">${PKG_SYSCONFDIR}</code>, they still have to be created with OWN_DIRS or MAKE_DIRS.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="15.2.2. Telling the software where configuration files are"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -6012,7 +5995,7 @@ for</em></span> its configuration files, not where they will be originally installed (although the difference is never explicit, unfortunately).</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="15.2.3. Patching installations"> <div class="titlepage"><div><div><h3 class="title"> <a name="conf-files-patching"></a>15.2.3. Patching installations</h3></div></div></div> <p>As said before, pkginstall automatically handles configuration files. @@ -6041,7 +6024,7 @@ CONF_FILES= ${EGDIR}/Muttrc ${PKG_SYSCONFDIR}/Muttrc <p>Note that the <code class="varname">EGDIR</code> variable is specific to that package and has no meaning outside it.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="15.2.4. Disabling handling of configuration files"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -6049,7 +6032,7 @@ environment variable <code class="varname">PKG_CONFIG</code> prior to package installation.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="15.3. System startup scripts"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -6059,12 +6042,12 @@ 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 to:</p> -<div class="orderedlist"><ol type="1"> -<li><p>Store the script inside <code class="filename">${FILESDIR}</code>, with +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Store the script inside <code class="filename">${FILESDIR}</code>, with the <code class="literal">.sh</code> suffix appended. Considering the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/print/cups/README.html" target="_top"><code class="filename">print/cups</code></a> package as an example, it has a <code class="filename">cupsd.sh</code> in its files directory.</p></li> -<li> +<li class="listitem"> <p>Tell pkginstall to handle it, appending the name of the script, without its extension, to the <code class="varname">RCD_SCRIPTS</code> variable. Continuing the previous example:</p> @@ -6075,19 +6058,19 @@ RCD_SCRIPTS+= cupsd </ol></div> <p>Once this is done, pkginstall will do the following steps for each script in an automated fashion:</p> -<div class="orderedlist"><ol type="1"> -<li><p>Process the file found in the files directory applying all the +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Process the file found in the files directory applying all the substitutions described in the <code class="filename">FILES_SUBST</code> variable.</p></li> -<li><p>Copy the script from the files directory to the examples +<li class="listitem"><p>Copy the script from the files directory to the examples hierarchy, <code class="filename">${PREFIX}/share/examples/rc.d/</code>. Note that this master file must be explicitly registered in the <code class="filename">PLIST</code>.</p></li> -<li><p>Add code to the installation scripts to copy the startup script +<li class="listitem"><p>Add code to the installation scripts to copy the startup script from the examples hierarchy into the system-wide startup scripts directory.</p></li> </ol></div> -<div class="sect2" lang="en"> +<div class="sect2" title="15.3.1. Disabling handling of system startup scripts"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -6097,7 +6080,7 @@ examples hierarchy, <code class="filename">${PREFIX}/share/examples/rc.d/</code> matter what the value of this variable is.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="15.4. System users and groups"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -6134,7 +6117,7 @@ indicate the phase 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.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="15.5. System shells"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="shells"></a>15.5. System shells</h2></div></div></div> <p>Packages that install system shells should register them in the shell @@ -6149,7 +6132,7 @@ following example, taken from <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/p <pre class="programlisting"> PKG_SHELL= ${PREFIX}/bin/zsh </pre> -<div class="sect2" lang="en"> +<div class="sect2" title="15.5.1. Disabling shell registration"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -6157,7 +6140,7 @@ the administrator by setting the <code class="filename">PKG_REGISTER_SHELLS</cod environment variable to <code class="literal">NO</code>.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="15.6. Fonts"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="fonts"></a>15.6. Fonts</h2></div></div></div> <p>Packages that install X11 fonts should update the database files @@ -6166,8 +6149,8 @@ accomplished within the pkginstall framework.</p> <p>When a package installs X11 fonts, it must list the directories in which fonts are installed in the <code class="varname">FONTS_DIRS.<em class="replaceable"><code>type</code></em></code> variables, -where <em class="replaceable"><code>type</code></em> can be one of “<span class="quote">ttf</span>”, -“<span class="quote">type1</span>” or “<span class="quote">x11</span>”. This will add hooks to the +where <em class="replaceable"><code>type</code></em> can be one of <span class="quote">“<span class="quote">ttf</span>”</span>, +<span class="quote">“<span class="quote">type1</span>”</span> or <span class="quote">“<span class="quote">x11</span>”</span>. This will add hooks to the installation scripts to run the appropriate commands to update the fonts database files within each of those directories. For convenience, if the directory path is relative, it is taken to be relative to the package's @@ -6175,7 +6158,7 @@ installation prefix. Consider the following example, taken from <a href="ftp:// <pre class="programlisting"> FONTS_DIRS.ttf= ${PREFIX}/lib/X11/fonts/TTF </pre> -<div class="sect2" lang="en"> +<div class="sect2" title="15.6.1. Disabling automatic update of the fonts databases"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -6184,14 +6167,14 @@ environment variable to <code class="literal">NO</code>.</p> </div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 16. Options handling"> <div class="titlepage"><div><div><h2 class="title"> <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">16.1. Global default options</a></span></dt> -<dt><span class="sect1"><a href="#converting-to-options">16.2. Converting packages to use bsd.options.mk</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> <dt><span class="sect1"><a href="#option-build">16.4. Determining the options of dependencies</a></span></dt> </dl> @@ -6230,7 +6213,7 @@ included, and the amount of work.</p> <p>A further consideration is licensing. Non-free parts, or parts that depend on non-free dependencies (especially plugins) should almost always be split if feasible.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="16.1. Global default options"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="global-default-options"></a>16.1. Global default options</h2></div></div></div> <p>Global default options are listed in @@ -6238,7 +6221,7 @@ almost always be split if feasible.</p> that should be built into every package if that option is supported. This variable should be set in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="16.2. Converting packages to use bsd.options.mk"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="converting-to-options"></a>16.2. Converting packages to use <code class="filename">bsd.options.mk</code> </h2></div></div></div> @@ -6298,16 +6281,16 @@ CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap-client} <p>The first section contains the information about which build options are supported by the package, and any default options settings if needed.</p> -<div class="orderedlist"><ol type="1"> -<li><p><code class="varname">PKG_OPTIONS_VAR</code> is the name of the +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p><code class="varname">PKG_OPTIONS_VAR</code> is the name of the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> variable that the user can set to override the default options. It should be set to PKG_OPTIONS.<em class="replaceable"><code>pkgbase</code></em>. Do not set it to PKG_OPTIONS.${PKGBASE}, since <code class="varname">PKGBASE</code> is not defined at the point where the options are processed.</p></li> -<li><p><code class="varname">PKG_SUPPORTED_OPTIONS</code> is a list of +<li class="listitem"><p><code class="varname">PKG_SUPPORTED_OPTIONS</code> is a list of build options supported by the package.</p></li> -<li><p><code class="varname">PKG_OPTIONS_OPTIONAL_GROUPS</code> is a +<li class="listitem"><p><code class="varname">PKG_OPTIONS_OPTIONAL_GROUPS</code> is a list of names of groups of mutually exclusive options. The options in each group are listed in <code class="varname">PKG_OPTIONS_GROUP.<em class="replaceable"><code>groupname</code></em></code>. @@ -6315,40 +6298,40 @@ The most specific setting of any option from the group takes precedence over all other options in the group. Options from the groups will be automatically added to <code class="varname">PKG_SUPPORTED_OPTIONS</code>.</p></li> -<li><p><code class="varname">PKG_OPTIONS_REQUIRED_GROUPS</code> is like +<li class="listitem"><p><code class="varname">PKG_OPTIONS_REQUIRED_GROUPS</code> is like <code class="varname">PKG_OPTIONS_OPTIONAL_GROUPS</code>, but building the packages will fail if no option from the group is selected.</p></li> -<li><p><code class="varname">PKG_OPTIONS_NONEMPTY_SETS</code> is a list +<li class="listitem"><p><code class="varname">PKG_OPTIONS_NONEMPTY_SETS</code> is a list of names of sets of options. At least one option from each set must be selected. The options in each set are listed in <code class="varname">PKG_OPTIONS_SET.<em class="replaceable"><code>setname</code></em></code>. Options from the sets will be automatically added to <code class="varname">PKG_SUPPORTED_OPTIONS</code>. Building the package will fail if no option from the set is selected.</p></li> -<li><p><code class="varname">PKG_SUGGESTED_OPTIONS</code> is a list of +<li class="listitem"><p><code class="varname">PKG_SUGGESTED_OPTIONS</code> is a list of build options which are enabled by default.</p></li> -<li><p><code class="varname">PKG_OPTIONS_LEGACY_VARS</code> is a list +<li class="listitem"><p><code class="varname">PKG_OPTIONS_LEGACY_VARS</code> is a list of -“<span class="quote"><em class="replaceable"><code>USE_VARIABLE</code></em>:<em class="replaceable"><code>option</code></em></span>” +<span class="quote">“<span class="quote"><em class="replaceable"><code>USE_VARIABLE</code></em>:<em class="replaceable"><code>option</code></em></span>”</span> pairs that map legacy <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> variables to their option counterparts. Pairs should be added with -“<span class="quote">+=</span>” to keep the listing of global legacy variables. A +<span class="quote">“<span class="quote">+=</span>”</span> to keep the listing of global legacy variables. A warning will be issued if the user uses a legacy variable.</p></li> -<li><p><code class="varname">PKG_OPTIONS_LEGACY_OPTS</code> is a list +<li class="listitem"><p><code class="varname">PKG_OPTIONS_LEGACY_OPTS</code> is a list of -“<span class="quote"><em class="replaceable"><code>old-option</code></em>:<em class="replaceable"><code>new-option</code></em></span>” +<span class="quote">“<span class="quote"><em class="replaceable"><code>old-option</code></em>:<em class="replaceable"><code>new-option</code></em></span>”</span> pairs that map options that have been renamed to their new -counterparts. Pairs should be added with “<span class="quote">+=</span>” to keep +counterparts. Pairs should be added with <span class="quote">“<span class="quote">+=</span>”</span> to keep the listing of global legacy options. A warning will be issued if the user uses a legacy option.</p></li> -<li><p><code class="varname">PKG_LEGACY_OPTIONS</code> is a list of +<li class="listitem"><p><code class="varname">PKG_LEGACY_OPTIONS</code> is a list of options implied by deprecated variables used. This can be used for cases that neither <code class="varname">PKG_OPTIONS_LEGACY_VARS</code> nor <code class="varname">PKG_OPTIONS_LEGACY_OPTS</code> can handle, e. g. when <code class="varname">PKG_OPTIONS_VAR</code> is renamed.</p></li> -<li><p><code class="varname">PKG_OPTIONS_DEPRECATED_WARNINGS</code> is +<li class="listitem"><p><code class="varname">PKG_OPTIONS_DEPRECATED_WARNINGS</code> is a list of warnings about deprecated variables or options used, and what to use instead.</p></li> </ol></div> @@ -6377,7 +6360,7 @@ whether it is listed in <code class="varname">PKG_OPTIONS</code>:</p> .if !empty(PKG_OPTIONS:M<em class="replaceable"><code>option</code></em>) </pre> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="16.3. Option Names"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="option-names"></a>16.3. Option Names</h2></div></div></div> <p>Options that enable similar features in different packages (like @@ -6391,17 +6374,17 @@ optional feature, should use a name prefixed with <code class="varname"><em class="replaceable"><code>pkgname</code></em>-</code>.</p> <p>If a group of related packages share an optional feature specific to that group, prefix it with the name of the -“<span class="quote">main</span>” package +<span class="quote">“<span class="quote">main</span>”</span> package (e. g. <code class="varname">djbware-errno-hack</code>).</p> <p>For new options, add a line to <code class="filename">mk/defaults/options.description</code>. Lines have two fields, separated by tab. The first field is the option name, the second its 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. “<span class="quote">Enable ispell -support.</span>” The file is sorted by option names.</p> +describes what enabling the option does. E. g. <span class="quote">“<span class="quote">Enable ispell +support.</span>”</span> The file is sorted by option names.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="16.4. Determining the options of dependencies"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="option-build"></a>16.4. Determining the options of dependencies</h2></div></div></div> <p>When writing <a class="link" href="#buildlink3.mk"><code class="filename">buildlink3.mk</code></a> files, it is often necessary to list @@ -6425,7 +6408,7 @@ file. See the file <code class="filename">pkg-build-options.mk</code> for more details.</p> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 17. The build process"> <div class="titlepage"><div><div><h2 class="title"> <a name="build"></a>Chapter 17. The build process</h2></div></div></div> <div class="toc"> @@ -6435,26 +6418,26 @@ details.</p> <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 fetch 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 checksum phase</a></span></dt> -<dt><span class="sect1"><a href="#build.extract">17.7. The extract phase</a></span></dt> -<dt><span class="sect1"><a href="#build.patch">17.8. The patch phase</a></span></dt> -<dt><span class="sect1"><a href="#build.tools">17.9. The tools phase</a></span></dt> -<dt><span class="sect1"><a href="#build.wrapper">17.10. The wrapper phase</a></span></dt> -<dt><span class="sect1"><a href="#build.configure">17.11. The configure phase</a></span></dt> -<dt><span class="sect1"><a href="#build.build">17.12. The build phase</a></span></dt> -<dt><span class="sect1"><a href="#build.test">17.13. The test phase</a></span></dt> -<dt><span class="sect1"><a href="#build.install">17.14. The install phase</a></span></dt> -<dt><span class="sect1"><a href="#build.package">17.15. The package phase</a></span></dt> +<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="sect1" title="17.1. Introduction"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="build.intro"></a>17.1. Introduction</h2></div></div></div> <p>This chapter gives a detailed description on how a package is @@ -6481,7 +6464,7 @@ details.</p> <code class="varname">PATCH_DEBUG</code> variable if you are just interested in more details about the <span class="emphasis"><em>patch</em></span> step.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.2. Program location"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -6497,24 +6480,24 @@ details.</p> these files are encoded. See <a class="xref" href="#components.patches" title="11.3. patches/*">Section 11.3, “patches/*”</a> and <a class="xref" href="#fixes.libtool" title="19.3.1. Shared libraries - libtool">Section 19.3.1, “Shared libraries - libtool”</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"> -<li><p><code class="varname">PREFIX</code> always points to the location +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">PREFIX</code> always points to the location where the current pkg will be installed. When referring to a pkg's own installation path, use - “<span class="quote">${PREFIX}</span>”.</p></li> -<li><p><code class="varname">LOCALBASE</code> is where all non-X11 pkgs + <span class="quote">“<span class="quote">${PREFIX}</span>”</span>.</p></li> +<li class="listitem"><p><code class="varname">LOCALBASE</code> is where all non-X11 pkgs are installed. If you need to construct a -I or -L argument to the compiler to find includes and libraries installed by - another non-X11 pkg, use “<span class="quote">${LOCALBASE}</span>”. The name + another non-X11 pkg, use <span class="quote">“<span class="quote">${LOCALBASE}</span>”</span>. The name <code class="varname">LOCALBASE</code> stems from FreeBSD, which installed all packages in <code class="filename">/usr/local</code>. As pkgsrc leaves <code class="filename">/usr/local</code> for the system administrator, this variable is a misnomer.</p></li> -<li><p><code class="varname">X11BASE</code> is where the actual X11 +<li class="listitem"><p><code class="varname">X11BASE</code> is where the actual X11 distribution (from xsrc, etc.) is installed. When looking for <span class="emphasis"><em>standard</em></span> X11 includes (not those - installed by a package), use “<span class="quote">${X11BASE}</span>”.</p></li> -<li> + installed by a package), use <span class="quote">“<span class="quote">${X11BASE}</span>”</span>.</p></li> +<li class="listitem"> <p>X11-based packages are special in that they may be installed in either <code class="varname">X11BASE</code> or <code class="varname">LOCALBASE</code>.</p> @@ -6540,22 +6523,22 @@ details.</p> <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/xpkgwedge/README.html" target="_top"><code class="filename">pkgtools/xpkgwedge</code></a> package is enabled by default.</p> </li> -<li><p><code class="varname">X11PREFIX</code> should be used to refer to +<li class="listitem"><p><code class="varname">X11PREFIX</code> should be used to refer to the installed location of an X11 package. <code class="varname">X11PREFIX</code> will be set to <code class="varname">X11BASE</code> if xpkgwedge is not installed, and to <code class="varname">LOCALBASE</code> if xpkgwedge is installed.</p></li> -<li> +<li class="listitem"> <p>If xpkgwedge is installed, it is possible to have some packages installed in <code class="varname">X11BASE</code> and some in <code class="varname">LOCALBASE</code>. To determine the prefix of an installed package, the <code class="varname">EVAL_PREFIX</code> definition can be used. It takes pairs in the format - “<span class="quote">DIRNAME=<package></span>”, and the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> + <span class="quote">“<span class="quote">DIRNAME=<package></span>”</span>, and the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> variable <code class="varname">DIRNAME</code> will be set to the prefix of the installed package <package>, or - “<span class="quote">${X11PREFIX}</span>” if the package is not + <span class="quote">“<span class="quote">${X11PREFIX}</span>”</span> if the package is not installed.</p> <p>This is best illustrated by example.</p> <p>The following lines are taken from @@ -6576,13 +6559,13 @@ GTKDIR_DEFAULT= ${LOCALBASE} to the first definition in the <code class="varname">EVAL_PREFIX</code> pair.</p> </li> -<li><p>Within <code class="filename">${PREFIX}</code>, packages should +<li class="listitem"><p>Within <code class="filename">${PREFIX}</code>, packages should install files according to <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?hier+7+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>, with the exception that manual pages go into <code class="filename">${PREFIX}/man</code>, not <code class="filename">${PREFIX}/share/man</code>.</p></li> </ul></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.3. Directories used during the build process"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="build.builddirs"></a>17.3. Directories used during the build process</h2></div></div></div> <p>When building a package, various directories are used to store @@ -6627,7 +6610,7 @@ GTKDIR_DEFAULT= ${LOCALBASE} <code class="varname">CREATE_WRKDIR_SYMLINK</code> should be set to <span class="emphasis"><em>no</em></span>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.4. Running a phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="build.running"></a>17.4. Running a phase</h2></div></div></div> <p>You can run a particular phase by typing <span class="command"><strong>make @@ -6637,14 +6620,14 @@ GTKDIR_DEFAULT= ${LOCALBASE} run <span class="command"><strong>make</strong></span> without parameters in a package directory, the package will be built, but not installed.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.5. The fetch phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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="sect2" title="17.5.1. What to fetch and where to get it from"> <div class="titlepage"><div><div><h3 class="title"> <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> @@ -6743,7 +6726,7 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=project_name/} <p>Note the trailing slash after the subdirectory name.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="17.5.2. How are the files fetched?"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -6773,11 +6756,11 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} <span class="emphasis"><em>mirror-distfiles</em></span> target to mirror the distfiles, if they are freely distributable. Packages setting <code class="varname">NO_SRC_ON_FTP</code> (usually to - “<span class="quote">${RESTRICTED}</span>”) will not have their distfiles + <span class="quote">“<span class="quote">${RESTRICTED}</span>”</span>) will not have their distfiles mirrored.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.6. The checksum phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -6788,7 +6771,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} malign force, deliberately changed distfiles on the master distribution site or network lossage.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.7. The extract phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -6828,7 +6811,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} <code class="varname">do-extract</code> target in the package Makefile.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.8. The patch phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -6849,13 +6832,13 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} may end up being applied in the wrong place, and cause severe harm there.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.9. The tools phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 class="xref" 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="sect1" title="17.10. The wrapper phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -6893,7 +6876,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} investigate further]</p></dd> </dl></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.11. The configure phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -6905,9 +6888,9 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} files, Makefiles, etc.</p> <p>If the package contains a configure script, this can be invoked by setting <code class="varname">HAS_CONFIGURE</code> to - “<span class="quote">yes</span>”. If the configure script is a GNU autoconf + <span class="quote">“<span class="quote">yes</span>”</span>. If the configure script is a GNU autoconf script, you should set <code class="varname">GNU_CONFIGURE</code> to - “<span class="quote">yes</span>” instead. What happens in the + <span class="quote">“<span class="quote">yes</span>”</span> instead. What happens in the <span class="emphasis"><em>configure</em></span> phase is roughly:</p> <pre class="programlisting"> .for d in ${CONFIGURE_DIRS} @@ -6917,37 +6900,37 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} .endfor </pre> <p><code class="varname">CONFIGURE_DIRS</code> (default: - “<span class="quote">.</span>”) is a list of pathnames relative to + <span class="quote">“<span class="quote">.</span>”</span>) is a list of pathnames relative to <code class="varname">WRKSRC</code>. In each of these directories, the configure script is run with the environment <code class="varname">CONFIGURE_ENV</code> and arguments <code class="varname">CONFIGURE_ARGS</code>. The variables <code class="varname">CONFIGURE_ENV</code>, <code class="varname">CONFIGURE_SCRIPT</code> (default: - “<span class="quote">./configure</span>”) and + <span class="quote">“<span class="quote">./configure</span>”</span>) and <code class="varname">CONFIGURE_ARGS</code> may all be changed by the package.</p> <p>If the program uses an <code class="filename">Imakefile</code> for configuration, the appropriate steps can be invoked by setting <code class="varname">USE_IMAKE</code> to - “<span class="quote">yes</span>”. (If you only want the package installed in + <span class="quote">“<span class="quote">yes</span>”</span>. (If you only want the package installed in <code class="varname">${X11PREFIX}</code> but xmkmf not being run, set <code class="varname">USE_X11BASE</code> instead.) You can add variables to xmkmf's environment by adding them to the <code class="varname">SCRIPTS_ENV</code> variable.</p> <p>If the program uses <code class="filename">cmake</code> for configuration, the appropriate steps can be invoked by - setting <code class="varname">USE_CMAKE</code> to “<span class="quote">yes</span>”. + setting <code class="varname">USE_CMAKE</code> to <span class="quote">“<span class="quote">yes</span>”</span>. You can add variables to cmake's environment by adding them to the <code class="varname">CONFIGURE_ENV</code> variable and arguments to cmake by adding them to the <code class="varname">CMAKE_ARGS</code> variable. The top directory argument is given by the <code class="varname">CMAKE_ARG_PATH</code> variable, that defaults to - “<span class="quote">.</span>” (relative to <code class="varname">CONFIGURE_DIRS</code>)</p> + <span class="quote">“<span class="quote">.</span>”</span> (relative to <code class="varname">CONFIGURE_DIRS</code>)</p> <p>If there is no configure step at all, set - <code class="varname">NO_CONFIGURE</code> to “<span class="quote">yes</span>”.</p> + <code class="varname">NO_CONFIGURE</code> to <span class="quote">“<span class="quote">yes</span>”</span>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.12. The build phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -6963,7 +6946,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} .endfor </pre> <p><code class="varname">BUILD_DIRS</code> (default: - “<span class="quote">.</span>”) is a list of pathnames relative to + <span class="quote">“<span class="quote">.</span>”</span>) is a list of pathnames relative to <code class="varname">WRKSRC</code>. In each of these directories, <code class="varname">MAKE_PROGRAM</code> is run with the environment <code class="varname">MAKE_ENV</code> and arguments @@ -6974,20 +6957,20 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} <code class="varname">BUILD_TARGET</code> may all be changed by the package.</p> <p>The default value of <code class="varname">MAKE_PROGRAM</code> is - “<span class="quote">gmake</span>” if <code class="varname">USE_TOOLS</code> contains - “<span class="quote">gmake</span>”, “<span class="quote">make</span>” otherwise. The + <span class="quote">“<span class="quote">gmake</span>”</span> if <code class="varname">USE_TOOLS</code> contains + <span class="quote">“<span class="quote">gmake</span>”</span>, <span class="quote">“<span class="quote">make</span>”</span> otherwise. The default value of <code class="varname">MAKE_FILE</code> is - “<span class="quote">Makefile</span>”, and <code class="varname">BUILD_TARGET</code> - defaults to “<span class="quote">all</span>”.</p> + <span class="quote">“<span class="quote">Makefile</span>”</span>, and <code class="varname">BUILD_TARGET</code> + defaults to <span class="quote">“<span class="quote">all</span>”</span>.</p> <p>If there is no build step at all, set - <code class="varname">NO_BUILD</code> to “<span class="quote">yes</span>”.</p> + <code class="varname">NO_BUILD</code> to <span class="quote">“<span class="quote">yes</span>”</span>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.13. The test phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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="sect1" title="17.14. The install phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -7011,8 +6994,8 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} <span class="emphasis"><em>build</em></span> phase. <code class="varname">INSTALL_DIRS</code> defaults to <code class="varname">BUILD_DIRS</code>. <code class="varname">INSTALL_TARGET</code> - is “<span class="quote">install</span>” by default, plus - “<span class="quote">install.man</span>” if <code class="varname">USE_IMAKE</code> is + is <span class="quote">“<span class="quote">install</span>”</span> by default, plus + <span class="quote">“<span class="quote">install.man</span>”</span> if <code class="varname">USE_IMAKE</code> is defined and <code class="varname">NO_INSTALL_MANPAGES</code> is not defined.</p> <p>In the <span class="emphasis"><em>install</em></span> phase, the following @@ -7068,11 +7051,11 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} </p></dd> </dl></div> <p>In the rare cases that a package shouldn't install anything, - set <code class="varname">NO_INSTALL</code> to “<span class="quote">yes</span>”. This is + set <code class="varname">NO_INSTALL</code> to <span class="quote">“<span class="quote">yes</span>”</span>. This is mostly relevant for packages in the <code class="filename">regress</code> category.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.15. The package phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -7087,7 +7070,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} variable. <code class="varname">PACKAGES</code> defaults to <code class="filename">pkgsrc/packages</code>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.16. Cleaning up"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -7095,14 +7078,14 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} to clean the work directories of all dependencies too, use <span class="command"><strong>make clean-depends</strong></span>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="17.17. Other helpful targets"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 previous section, two auxiliary targets exist with - “<span class="quote">pre-</span>” and “<span class="quote">post-</span>” used as a + <span class="quote">“<span class="quote">pre-</span>”</span> and <span class="quote">“<span class="quote">post-</span>”</span> used as a prefix for the main target's name. These targets are invoked before and after the main target is called, allowing extra configuration or installation steps be @@ -7122,12 +7105,12 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} <p>If you did a <span class="command"><strong>make install</strong></span> and you noticed some file was not installed properly, you can repeat the installation with this target, which will - ignore the “<span class="quote">already installed</span>” flag.</p> + ignore the <span class="quote">“<span class="quote">already installed</span>”</span> flag.</p> <p>This is the default value of <code class="varname">DEPENDS_TARGET</code> except in the case of <span class="command"><strong>make update</strong></span> and <span class="command"><strong>make package</strong></span>, where the defaults are - “<span class="quote">package</span>” and “<span class="quote">update</span>”, + <span class="quote">“<span class="quote">package</span>”</span> and <span class="quote">“<span class="quote">update</span>”</span>, respectively.</p> </dd> <dt><span class="term">deinstall</span></dt> @@ -7147,7 +7130,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} DEINSTALLDEPENDS=1</strong></span> is done in <code class="filename">pkgsrc/x11/kde</code>, this is likely to remove whole KDE. Works by adding - “<span class="quote">-R</span>” to the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?pkg_delete+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">pkg_delete</span>(1)</span></a> + <span class="quote">“<span class="quote">-R</span>”</span> to the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?pkg_delete+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">pkg_delete</span>(1)</span></a> command line.</p></dd> </dl></div> </dd> @@ -7172,7 +7155,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} <span class="command"><strong>make install</strong></span> (or whatever <code class="varname">UPDATE_TARGET</code> is set to) for these packages.</p> -<p>You can use the “<span class="quote">update</span>” target to +<p>You can use the <span class="quote">“<span class="quote">update</span>”</span> target to resume package updating in case a previous <span class="command"><strong>make update</strong></span> was interrupted for some reason. However, in this case, make sure you don't call @@ -7196,18 +7179,18 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} <dd><p>Install target to recursively use for the updated package and the dependent packages. Defaults to <code class="varname">DEPENDS_TARGET</code> if - set, “<span class="quote">install</span>” otherwise for + set, <span class="quote">“<span class="quote">install</span>”</span> otherwise for <span class="command"><strong>make update</strong></span>. Other good - targets are “<span class="quote">package</span>” or - “<span class="quote">bin-install</span>”. Do not set this to - “<span class="quote">update</span>” or you will get stuck in an + targets are <span class="quote">“<span class="quote">package</span>”</span> or + <span class="quote">“<span class="quote">bin-install</span>”</span>. Do not set this to + <span class="quote">“<span class="quote">update</span>”</span> or you will get stuck in an endless loop!</p></dd> <dt><span class="term"><code class="varname">NOCLEAN</code></span></dt> <dd><p>Don't clean up after updating. Useful if you want to leave the work sources of the updated packages around for inspection or other purposes. Be sure you eventually clean up the source tree - (see the “<span class="quote">clean-update</span>” target below) + (see the <span class="quote">“<span class="quote">clean-update</span>”</span> target below) or you may run into troubles with old source code still lying around on your next <span class="command"><strong>make</strong></span> or <span class="command"><strong>make @@ -7216,13 +7199,13 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} <dd><p>Deinstall each package before installing (making <code class="varname">DEPENDS_TARGET</code>). This may be necessary if the - “<span class="quote">clean-update</span>” target (see below) was + <span class="quote">“<span class="quote">clean-update</span>”</span> target (see below) was called after interrupting a running <span class="command"><strong>make update</strong></span>.</p></dd> <dt><span class="term"><code class="varname">DEPENDS_TARGET</code></span></dt> <dd><p>Allows you to disable recursion and hardcode the target for packages. The default is - “<span class="quote">update</span>” for the update target, + <span class="quote">“<span class="quote">update</span>”</span> for the update target, facilitating a recursive update of prerequisite packages. Only set <code class="varname">DEPENDS_TARGET</code> if you want to @@ -7348,7 +7331,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} readme</strong></span>.</p></dd> <dt><span class="term">cdrom-readme</span></dt> <dd><p>This is very much the same as the - “<span class="quote">readme</span>” target (see above), but is to be + <span class="quote">“<span class="quote">readme</span>”</span> target (see above), but is to be used when generating a pkgsrc tree to be written to a CD-ROM. This target also produces <code class="filename">README.html</code> files, and can be made @@ -7378,7 +7361,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} intended to be used by people who may wish to upgrade many packages on a single host, and can be invoked from the top-level pkgsrc Makefile by using the - “<span class="quote">show-host-specific-pkgs</span>” target.</p></dd> + <span class="quote">“<span class="quote">show-host-specific-pkgs</span>”</span> target.</p></dd> <dt><span class="term">show-installed-depends</span></dt> <dd><p>This target shows which installed packages match the current package's <code class="varname">DEPENDS</code>. Useful @@ -7391,7 +7374,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} if <code class="varname">PKG_DEVELOPER</code> is set in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p></dd> <dt><span class="term">print-PLIST</span></dt> <dd> -<p>After a “<span class="quote">make install</span>” from a new or +<p>After a <span class="quote">“<span class="quote">make install</span>”</span> from a new or upgraded pkg, this prints out an attempt to generate a new <code class="filename">PLIST</code> from a <span class="command"><strong>find -newer work/.extract_done</strong></span>. An attempt is made @@ -7404,10 +7387,10 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} <p>If the package installs files via <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?tar+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span></a> or other methods that don't update file access times, be sure to add these files manually to your - <code class="filename">PLIST</code>, as the “<span class="quote">find - -newer</span>” command used by this target won't catch + <code class="filename">PLIST</code>, as the <span class="quote">“<span class="quote">find + -newer</span>”</span> command used by this target won't catch them!</p> -<p>See <a class="xref" href="#print-PLIST" title="13.3. Tweaking output of make print-PLIST">Section 13.3, “Tweaking output of make print-PLIST”</a> for more +<p>See <a class="xref" href="#print-PLIST" title="13.3. Tweaking output of make print-PLIST">Section 13.3, “Tweaking output of <span class="command"><strong>make print-PLIST</strong></span>”</a> for more information on this target.</p> </dd> <dt><span class="term">bulk-package</span></dt> @@ -7431,13 +7414,13 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} <span class="command"><strong>make bulk-package</strong></span> will be executed, but the installed binary won't be removed.</p> <p>A binary package is considered - “<span class="quote">up-to-date</span>” to be installed via + <span class="quote">“<span class="quote">up-to-date</span>”</span> to be installed via <a class="citerefentry" 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> if:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>None of the package's files +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>None of the package's files (<code class="filename">Makefile</code>, ...) were modified since it was built.</p></li> -<li><p>None of the package's required (binary) +<li class="listitem"><p>None of the package's required (binary) packages were modified since it was built.</p></li> </ul></div> <p><span class="emphasis"><em>Beware that this target may deinstall @@ -7446,7 +7429,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} </dl></div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 18. Tools needed for building or running"> <div class="titlepage"><div><div><h2 class="title"> <a name="tools"></a>Chapter 18. Tools needed for building or running</h2></div></div></div> <div class="toc"> @@ -7477,7 +7460,7 @@ For example, a package may need GNU awk, bison (instead of yacc) or a better sed.</p> <p>The tools used by a package can be listed by running <span class="command"><strong>make show-tools</strong></span>.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="18.1. Tools for pkgsrc builds"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -7490,7 +7473,7 @@ These can be seen by running: then the <code class="varname">USE_TOOLS</code> variable can be used to define the tools needed.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="18.2. Tools needed by packages"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -7507,13 +7490,13 @@ USE_TOOLS+= gmake perl:run pkg-config <p>When using the tools framework, a <code class="varname">TOOLS_PATH.foo</code> variable is defined which contains the full path to the appropriate tool. For example, -<code class="varname">TOOLS_PATH.bash</code> could be “<span class="quote">/bin/bash</span>” +<code class="varname">TOOLS_PATH.bash</code> could be <span class="quote">“<span class="quote">/bin/bash</span>”</span> on Linux systems.</p> <p>If you always need a pkgsrc version of the tool at run-time, then just use <code class="varname">DEPENDS</code> instead. </p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="18.3. Tools provided by platforms"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -7530,11 +7513,11 @@ TOOLS_PLATFORM.bzcat?= /usr/bin/bzip2 -cd TOOLS_PLATFORM.true?= true # shell builtin </pre> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="18.4. Questions regarding the tools"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="tools.questions"></a>18.4. Questions regarding the tools</h2></div></div></div> -<div class="qandaset"> -<dl> +<div class="qandaset" title="Frequently Asked Questions"> +<a name="id1168230185607"></a><dl> <dt>18.4.1. <a href="#tools.new">How do I add a new tool?</a> </dt> <dt>18.4.2. <a href="#tools.listall">How do I get a list of all available @@ -7545,12 +7528,13 @@ TOOLS_PLATFORM.true?= true # shell builtin uses sed or not.</a> </dt> </dl> -<table border="0" summary="Q and A Set"> +<table border="0" width="100%" summary="Q and A Set"> <col align="left" width="1%"> +<col> <tbody> -<tr class="question"> +<tr class="question" title="18.4.1."> <td align="left" valign="top"> -<a name="tools.new"></a><a name="id52055318"></a><p><b>18.4.1.</b></p> +<a name="tools.new"></a><a name="id1168230185611"></a><p><b>18.4.1.</b></p> </td> <td align="left" valign="top"><p>How do I add a new tool?</p></td> </tr> @@ -7558,9 +7542,9 @@ TOOLS_PLATFORM.true?= true # shell builtin <td align="left" valign="top"></td> <td align="left" valign="top"><p>TODO</p></td> </tr> -<tr class="question"> +<tr class="question" title="18.4.2."> <td align="left" valign="top"> -<a name="tools.listall"></a><a name="id52055326"></a><p><b>18.4.2.</b></p> +<a name="tools.listall"></a><a name="id1168230185620"></a><p><b>18.4.2.</b></p> </td> <td align="left" valign="top"><p>How do I get a list of all available tools?</p></td> @@ -7569,9 +7553,9 @@ TOOLS_PLATFORM.true?= true # shell builtin <td align="left" valign="top"></td> <td align="left" valign="top"><p>TODO</p></td> </tr> -<tr class="question"> +<tr class="question" title="18.4.3."> <td align="left" valign="top"> -<a name="tools.used"></a><a name="id52055335"></a><p><b>18.4.3.</b></p> +<a name="tools.used"></a><a name="id1168230185628"></a><p><b>18.4.3.</b></p> </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 @@ -7587,7 +7571,7 @@ TOOLS_PLATFORM.true?= true # shell builtin </div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 19. Making your package work"> <div class="titlepage"><div><div><h2 class="title"> <a name="fixes"></a>Chapter 19. Making your package work</h2></div></div></div> <div class="toc"> @@ -7596,7 +7580,7 @@ TOOLS_PLATFORM.true?= true # shell builtin <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 ???</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> @@ -7608,12 +7592,12 @@ TOOLS_PLATFORM.true?= true # shell builtin <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 fetch phase</a></span></dt> +<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 configure phase</a></span></dt> +<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> @@ -7626,14 +7610,14 @@ TOOLS_PLATFORM.true?= true # shell builtin <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 build phase</a></span></dt> +<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 ...</a></span></dt> +<dt><span class="sect2"><a href="#undefined-reference">19.5.3. Undefined reference to <span class="quote">“<span class="quote">...</span>”</span></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 install phase</a></span></dt> +<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> @@ -7660,10 +7644,10 @@ TOOLS_PLATFORM.true?= true # shell builtin <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="sect1" title="19.1. General operation"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="general-operation"></a>19.1. General operation</h2></div></div></div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.1. Portability of packages"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -7672,7 +7656,7 @@ TOOLS_PLATFORM.true?= true # shell builtin chapter mentions some particular details you should pay attention to while working on pkgsrc.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.2. How to pull in user-settable variables from mk.conf"> <div class="titlepage"><div><div><h3 class="title"> <a name="pulling-vars-from-etc-mk.conf"></a>19.1.2. How to pull in user-settable variables from <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> </h3></div></div></div> @@ -7693,27 +7677,27 @@ TOOLS_PLATFORM.true?= true # shell builtin in dependency lines (of the form <code class="literal">target: dependencies</code>) the variables are expanded at load time.</p> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>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.</p> </div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.3. User interaction"> <div class="titlepage"><div><div><h3 class="title"> <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"> -<li><p>When fetching the distfiles, some packages require user +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>When fetching the distfiles, some packages require user interaction such as entering username/password or accepting a license on a web page.</p></li> -<li><p>When extracting the distfiles, some packages may ask for +<li class="listitem"><p>When extracting the distfiles, some packages may ask for passwords.</p></li> -<li><p>help to configure the package before it is built</p></li> -<li><p>help during the build process</p></li> -<li><p>help during the installation of a package</p></li> +<li class="listitem"><p>help to configure the package before it is built</p></li> +<li class="listitem"><p>help during the build process</p></li> +<li class="listitem"><p>help during the installation of a package</p></li> </ul></div> <p>The <code class="varname">INTERACTIVE_STAGE</code> definition is provided to notify the pkgsrc mechanism of an interactive stage @@ -7729,7 +7713,7 @@ INTERACTIVE_STAGE= configure install <p>The user can then decide to skip this package by setting the <code class="varname">BATCH</code> variable.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.4. Handling licenses"> <div class="titlepage"><div><div><h3 class="title"> <a name="handling-licenses"></a>19.1.4. Handling licenses</h3></div></div></div> <p>Authors of software can choose the licence under which @@ -7828,7 +7812,7 @@ ACCEPTABLE_LICENSES+=xv-license without also telling pkgsrc to proceed for all packages with that tag.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.5. Restricted packages"> <div class="titlepage"><div><div><h3 class="title"> <a name="restricted-packages"></a>19.1.5. Restricted packages</h3></div></div></div> <p>Some licenses restrict how software may be re-distributed. @@ -7851,8 +7835,8 @@ ACCEPTABLE_LICENSES+=xv-license <p>In order to encode these restrictions, the package system defines five make variables that can be set to note these restrictions:</p> -<div class="itemizedlist"><ul type="disc"> -<li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"> <p><code class="varname">RESTRICTED</code></p> <p>This variable should be set whenever a restriction exists (regardless of its kind). Set this variable to a @@ -7861,28 +7845,28 @@ ACCEPTABLE_LICENSES+=xv-license will have to read the license, and perhaps seek advice of counsel.</p> </li> -<li> +<li class="listitem"> <p><code class="varname">NO_BIN_ON_CDROM</code></p> <p>Binaries may not be placed on CD-ROM containing other binary packages, for which a distribution charge may be made. In this case, set this variable to <code class="varname">${RESTRICTED}</code>.</p> </li> -<li> +<li class="listitem"> <p><code class="varname">NO_BIN_ON_FTP</code></p> <p>Binaries may not made available on the Internet without charge. In this case, set this variable to <code class="varname">${RESTRICTED}</code>. If this variable is set, binary packages will not be included on ftp.NetBSD.org.</p> </li> -<li> +<li class="listitem"> <p><code class="varname">NO_SRC_ON_CDROM</code></p> <p>Distfiles may not be placed on CD-ROM, together with other distfiles, for which a fee may be charged. In this case, set this variable to <code class="varname">${RESTRICTED}</code>. </p> </li> -<li> +<li class="listitem"> <p><code class="varname">NO_SRC_ON_FTP</code></p> <p>Distfiles may not made available via FTP at no charge. In this case, set this variable to @@ -7891,7 +7875,7 @@ ACCEPTABLE_LICENSES+=xv-license </li> </ul></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.6. Handling dependencies"> <div class="titlepage"><div><div><h3 class="title"> <a name="dependencies"></a>19.1.6. Handling dependencies</h3></div></div></div> <p>Your package may depend on some other package being present @@ -7916,11 +7900,11 @@ ACCEPTABLE_LICENSES+=xv-license <pre class="programlisting"> <pre-req-package-name>:../../<category>/<pre-req-package> </pre> -<p>Please note that the “<span class="quote">pre-req-package-name</span>” +<p>Please note that the <span class="quote">“<span class="quote">pre-req-package-name</span>”</span> may include any of the wildcard version numbers recognized by <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?pkg_info+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">pkg_info</span>(1)</span></a>.</p> -<div class="orderedlist"><ol type="1"> -<li> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> <p>If your package needs another package's binaries or libraries to build or run, and if that package has a <code class="filename">buildlink3.mk</code> file available, use it:</p> @@ -7928,7 +7912,7 @@ ACCEPTABLE_LICENSES+=xv-license .include "../../graphics/jpeg/buildlink3.mk" </pre> </li> -<li> +<li class="listitem"> <p>If your package needs to use another package to build itself and there is no <code class="filename">buildlink3.mk</code> file available, use the <code class="varname">BUILD_DEPENDS</code> @@ -7937,7 +7921,7 @@ ACCEPTABLE_LICENSES+=xv-license BUILD_DEPENDS+= autoconf-2.13:../../devel/autoconf </pre> </li> -<li> +<li class="listitem"> <p>If your package needs a library with which to link and again there is no <code class="filename">buildlink3.mk</code> file available, this is specified using the @@ -7954,10 +7938,10 @@ DEPENDS+= xpm-[0-9]*:../../graphics/xpm installing the binary package and any package which matches the pattern will be used. Wildcard dependencies should be used with care.</p> -<p>The “<span class="quote">-[0-9]*</span>” should be used instead of - “<span class="quote">-*</span>” to avoid potentially ambiguous matches - such as “<span class="quote">tk-postgresql</span>” matching a - “<span class="quote">tk-*</span>” <code class="varname">DEPENDS</code>.</p> +<p>The <span class="quote">“<span class="quote">-[0-9]*</span>”</span> should be used instead of + <span class="quote">“<span class="quote">-*</span>”</span> to avoid potentially ambiguous matches + such as <span class="quote">“<span class="quote">tk-postgresql</span>”</span> matching a + <span class="quote">“<span class="quote">tk-*</span>”</span> <code class="varname">DEPENDS</code>.</p> <p>Wildcards can also be used to specify that a package will only build against a certain minimum version of a pre-requisite:</p> @@ -8001,7 +7985,7 @@ ABI_DEPENDS+= tiff>=3.6.1:../../graphics/tiff vulnerabilities file. See <a class="xref" href="#security-handling" title="19.1.10. Handling packages with security problems">Section 19.1.10, “Handling packages with security problems”</a> for more information.</p> </li> -<li> +<li class="listitem"> <p>If your package needs some executable to be able to run correctly and if there's no <code class="filename">buildlink3.mk</code> file, this is specified @@ -8023,7 +8007,7 @@ DEPENDS+= teTeX-[0-9]*:../../print/teTeX (It relies on the jpeg sources being present in source form during the build.)</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.7. Handling conflicts with other packages"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8046,10 +8030,10 @@ CONFLICTS= Xaw3d-[0-9]* </pre> <p>Packages will automatically conflict with other packages with the name prefix and a different version - string. “<span class="quote">Xaw3d-1.5</span>” e.g. will automatically - conflict with the older version “<span class="quote">Xaw3d-1.3</span>”.</p> + string. <span class="quote">“<span class="quote">Xaw3d-1.5</span>”</span> e.g. will automatically + conflict with the older version <span class="quote">“<span class="quote">Xaw3d-1.3</span>”</span>.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.8. Packages that cannot or should not be built"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8067,7 +8051,7 @@ CONFLICTS= Xaw3d-[0-9]* backwards compatible with other versions of the OS, and should be uploaded to a version specific directory on the FTP server. Mark these packages by setting <code class="varname">OSVERSION_SPECIFIC</code> to - “<span class="quote">yes</span>”. This variable is not currently used by any of + <span class="quote">“<span class="quote">yes</span>”</span>. This variable is not currently used by any of the package system internals, but may be used in the future.</p> <p>If the package should be skipped (for example, because it @@ -8077,18 +8061,18 @@ CONFLICTS= Xaw3d-[0-9]* set <code class="varname">PKG_FAIL_REASON</code> to a descriptive message.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.9. Packages which should not be deleted, once installed"> <div class="titlepage"><div><div><h3 class="title"> <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 binary package that is made from this pkgsrc entry. A - “<span class="quote">preserved</span>” package will + <span class="quote">“<span class="quote">preserved</span>”</span> package will not be deleted using <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?pkg_delete+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">pkg_delete</span>(1)</span></a> unless the - “<span class="quote">-f</span>” option is used.</p> + <span class="quote">“<span class="quote">-f</span>”</span> option is used.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.10. Handling packages with security problems"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8104,23 +8088,23 @@ CONFLICTS= Xaw3d-[0-9]* <p>Binary packages already on ftp.NetBSD.org will be handled semi-automatically by a weekly cron job.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.11. How to handle incrementing versions when fixing an existing package"> <div class="titlepage"><div><div><h3 class="title"> <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 - “<span class="quote">nb1</span>”, “<span class="quote">nb2</span>”, ... suffix can be used + <span class="quote">“<span class="quote">nb1</span>”</span>, <span class="quote">“<span class="quote">nb2</span>”</span>, ... suffix can be used on package versions by setting <code class="varname">PKGREVISION=1</code> - (2, ...). The “<span class="quote">nb</span>” is treated like a - “<span class="quote">.</span>” by the package tools. e.g.</p> + (2, ...). The <span class="quote">“<span class="quote">nb</span>”</span> is treated like a + <span class="quote">“<span class="quote">.</span>”</span> by the package tools. e.g.</p> <pre class="programlisting"> DISTNAME= foo-17.42 PKGREVISION= 9 </pre> <p>will result in a <code class="varname">PKGNAME</code> of - “<span class="quote">foo-17.42nb9</span>”. If you want to use the original - value of <code class="varname">PKGNAME</code> without the “<span class="quote">nbX</span>” + <span class="quote">“<span class="quote">foo-17.42nb9</span>”</span>. If you want to use the original + value of <code class="varname">PKGNAME</code> without the <span class="quote">“<span class="quote">nbX</span>”</span> suffix, e.g. for setting <code class="varname">DIST_SUBDIR</code>, use <code class="varname">PKGNAME_NOREV</code>.</p> <p>When a new release of the package is released, the @@ -8140,32 +8124,32 @@ DISTNAME= foo-17.43 <code class="varname">PKGREVISION</code> is appropriate. Examples of changes that do not merit increasing <code class="varname">PKGREVISION</code> are:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>Changing <code class="varname">HOMEPAGE</code>, +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>Changing <code class="varname">HOMEPAGE</code>, <code class="varname">MAINTAINER</code>, <code class="varname">OWNER</code>, or comments in Makefile.</p></li> -<li><p> +<li class="listitem"><p> Changing build variables if the resulting binary package is the same.</p></li> -<li><p> +<li class="listitem"><p> Changing <code class="filename">DESCR</code>.</p></li> -<li><p> +<li class="listitem"><p> Adding <code class="varname">PKG_OPTIONS</code> if the default options don't change.</p></li> </ul></div> <p>Examples of changes that do merit an increase to <code class="varname">PKGREVISION</code> include:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p> Security fixes</p></li> -<li><p> +<li class="listitem"><p> Changes or additions to a patch file</p></li> -<li><p> +<li class="listitem"><p> Changes to the <code class="filename">PLIST</code></p></li> -<li><p>A dependency is changed or renamed.</p></li> +<li class="listitem"><p>A dependency is changed or renamed.</p></li> </ul></div> <p>PKGREVISION must also be incremented when dependencies have ABI changes.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.1.12. Substituting variable text in the package files (the SUBST framework)"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8225,10 +8209,10 @@ SUBST_SED.fix-paths+= -e 's,"/var/log,"${VARBASE}/log,g' <code class="filename">mk/subst.mk</code> file.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="19.2. Fixing problems in the fetch phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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="sect2" title="19.2.1. Packages whose distfiles aren't available for plain downloading"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8249,7 +8233,7 @@ FETCH_MESSAGE+= " "${DISTFILES:Q} FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"." </pre> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.2.2. How to handle modified distfiles with the 'old' name"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8282,10 +8266,10 @@ FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"." changing the file names is not good practice.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="19.3. Fixing problems in the configure phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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="sect2" title="19.3.1. Shared libraries - libtool"> <div class="titlepage"><div><div><h3 class="title"> <a name="fixes.libtool"></a>19.3.1. Shared libraries - libtool</h3></div></div></div> <p>pkgsrc supports many different machines, with different @@ -8296,24 +8280,24 @@ FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"." pretty annoying especially if you don't have all the machines at your hand to test things. The <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/devel/libtool/README.html" target="_top"><code class="filename">devel/libtool</code></a> pkg - can help here, as it just “<span class="quote">knows</span>” how to build + can help here, as it just <span class="quote">“<span class="quote">knows</span>”</span> how to build both static and dynamic libraries from a set of source files, thus being platform-independent.</p> <p>Here's how to use libtool in a package in seven simple steps:</p> -<div class="orderedlist"><ol type="1"> -<li><p>Add <code class="varname">USE_LIBTOOL=yes</code> to the package +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Add <code class="varname">USE_LIBTOOL=yes</code> to the package Makefile.</p></li> -<li><p>For library objects, use “<span class="quote">${LIBTOOL} --mode=compile - ${CC}</span>” in place of “<span class="quote">${CC}</span>”. You could even +<li class="listitem"><p>For library objects, use <span class="quote">“<span class="quote">${LIBTOOL} --mode=compile + ${CC}</span>”</span> in place of <span class="quote">“<span class="quote">${CC}</span>”</span>. You could even add it to the definition of <code class="varname">CC</code>, if only libraries are being built in a given Makefile. This one command will build both PIC and non-PIC library objects, so you need not have separate shared and non-shared library rules.</p></li> -<li> +<li class="listitem"> <p>For the linking of the library, remove any - “<span class="quote">ar</span>”, “<span class="quote">ranlib</span>”, and “<span class="quote">ld - -Bshareable</span>” commands, and instead use:</p> + <span class="quote">“<span class="quote">ar</span>”</span>, <span class="quote">“<span class="quote">ranlib</span>”</span>, and <span class="quote">“<span class="quote">ld + -Bshareable</span>”</span> commands, and instead use:</p> <pre class="programlisting"> ${LIBTOOL} --mode=link \ ${CC} -o ${.TARGET:.a=.la} \ @@ -8329,7 +8313,7 @@ ${LIBTOOL} --mode=link \ <code class="filename">.a</code>, <code class="filename">.so.major.minor</code>, and ELF symlinks (if necessary) in the build directory. Be sure to include - “<span class="quote">-version-info</span>”, especially when major and + <span class="quote">“<span class="quote">-version-info</span>”</span>, especially when major and minor are zero, as libtool will otherwise strip off the shared library version.</p> <p>From the libtool manual:</p> @@ -8351,37 +8335,37 @@ AGE' to `CURRENT'. If two libraries have identical CURRENT and AGE numbers, then the dynamic linker chooses the library with the greater REVISION number. </pre> -<p>The “<span class="quote">-release</span>” option will produce +<p>The <span class="quote">“<span class="quote">-release</span>”</span> option will produce different results for a.out and ELF (excluding symlinks) in only one case. An ELF library of the form - “<span class="quote">libfoo-release.so.<span class="emphasis"><em>x</em></span>.<span class="emphasis"><em>y</em></span></span>” + <span class="quote">“<span class="quote">libfoo-release.so.<span class="emphasis"><em>x</em></span>.<span class="emphasis"><em>y</em></span></span>”</span> will have a symlink of - “<span class="quote">libfoo.so.<span class="emphasis"><em>x</em></span>.<span class="emphasis"><em>y</em></span></span>” + <span class="quote">“<span class="quote">libfoo.so.<span class="emphasis"><em>x</em></span>.<span class="emphasis"><em>y</em></span></span>”</span> on an a.out platform. This is handled automatically.</p> -<p>The “<span class="quote">-rpath argument</span>” is the install +<p>The <span class="quote">“<span class="quote">-rpath argument</span>”</span> is the install directory of the library being built.</p> <p>In the <code class="filename">PLIST</code>, include only the <code class="filename">.la</code> file, the other files will be added automatically.</p> </li> -<li> +<li class="listitem"> <p>When linking shared object (<code class="filename">.so</code>) files, i.e. files that are loaded via <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?dlopen+3+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">dlopen</span>(3)</span></a>, NOT - shared libraries, use “<span class="quote">-module - -avoid-version</span>” to prevent them getting version + shared libraries, use <span class="quote">“<span class="quote">-module + -avoid-version</span>”</span> to prevent them getting version tacked on.</p> <p>The <code class="filename">PLIST</code> file gets the <code class="filename">foo.so</code> entry.</p> </li> -<li> +<li class="listitem"> <p>When linking programs that depend on these libraries <span class="emphasis"><em>before</em></span> they are installed, preface - the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?cc+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">cc</span>(1)</span></a> or <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?ld+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">ld</span>(1)</span></a> line with “<span class="quote">${LIBTOOL} - --mode=link</span>”, and it will find the correct + the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?cc+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">cc</span>(1)</span></a> or <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?ld+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">ld</span>(1)</span></a> line with <span class="quote">“<span class="quote">${LIBTOOL} + --mode=link</span>”</span>, and it will find the correct libraries (static or shared), but please be aware that libtool will not allow you to specify a relative path in - -L (such as “<span class="quote">-L../somelib</span>”), because it + -L (such as <span class="quote">“<span class="quote">-L../somelib</span>”</span>), because it expects you to change that argument to be the <code class="filename">.la</code> file. e.g.</p> <pre class="programlisting"> @@ -8393,10 +8377,10 @@ ${LIBTOOL} --mode=link ${CC} -o <em class="replaceable"><code>someprog</code></e </pre> <p>and it will do the right thing with the libraries.</p> </li> -<li> +<li class="listitem"> <p>When installing libraries, preface the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?install+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">install</span>(1)</span></a> - or <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?cp+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">cp</span>(1)</span></a> command with “<span class="quote">${LIBTOOL} - --mode=install</span>”, and change the library name to + or <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?cp+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">cp</span>(1)</span></a> command with <span class="quote">“<span class="quote">${LIBTOOL} + --mode=install</span>”</span>, and change the library name to <code class="filename">.la</code>. e.g.</p> <pre class="programlisting"> ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${SOMELIB:.a=.la} ${PREFIX}/lib @@ -8405,12 +8389,12 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${SOMELIB:.a=.la} ${PREFIX}/lib shared library, any needed symlinks, and run <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?ldconfig+8+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">ldconfig</span>(8)</span></a>.</p> </li> -<li><p>In your <code class="filename">PLIST</code>, include only +<li class="listitem"><p>In your <code class="filename">PLIST</code>, include only the <code class="filename">.la</code> file (this is a change from previous behaviour).</p></li> </ol></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.3.2. Using libtool on GNU packages that already support libtool"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8421,8 +8405,8 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${SOMELIB:.a=.la} ${PREFIX}/lib configure; find work*/ -name libtool</strong></span>.</p> <p><code class="varname">LIBTOOL_OVERRIDE</code> specifies which libtool scripts, relative to <code class="varname">WRKSRC</code>, to override. By - default, it is set to “<span class="quote">libtool */libtool - */*/libtool</span>”. If this does not match the location of the + default, it is set to <span class="quote">“<span class="quote">libtool */libtool + */*/libtool</span>”</span>. If this does not match the location of the package's libtool script(s), set it as appropriate.</p> <p>If you do not need <code class="filename">*.a</code> static libraries built and installed, then use @@ -8433,25 +8417,25 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${SOMELIB:.a=.la} ${PREFIX}/lib <p>Some packages use libtool incorrectly so that the package may not work or build in some circumstances. Some of the more common errors are:</p> -<div class="itemizedlist"><ul type="disc"> -<li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"> <p>The inclusion of a shared object (-module) as a dependent library in an executable or library. This in itself isn't a problem if one of two things has been done:</p> -<div class="orderedlist"><ol type="1"> -<li><p>The shared object is named correctly, i.e. +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>The shared object is named correctly, i.e. <code class="filename">libfoo.la</code>, not <code class="filename">foo.la</code></p></li> -<li><p>The -dlopen option is used when linking an executable.</p></li> +<li class="listitem"><p>The -dlopen option is used when linking an executable.</p></li> </ol></div> </li> -<li><p>The use of libltdl without the correct calls to initialisation routines. +<li class="listitem"><p>The use of libltdl without the correct calls to initialisation routines. The function lt_dlinit() should be called and the macro <code class="varname">LTDL_SET_PRELOADED_SYMBOLS</code> included in executables.</p></li> </ul></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.3.3. GNU Autoconf/Automake"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8492,10 +8476,10 @@ pre-configure: Makefile.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="19.4. Programming languages"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="programming-languages"></a>19.4. Programming languages</h2></div></div></div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.4.1. C, C++, and Fortran"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8504,40 +8488,40 @@ pre-configure: framework, see <a class="xref" 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 “<span class="quote">c</span>”, “<span class="quote">c++</span>”, and - “<span class="quote">fortran</span>” (and any combination). The default is - “<span class="quote">c</span>”. Packages using GNU configure scripts, even if + currently are <span class="quote">“<span class="quote">c</span>”</span>, <span class="quote">“<span class="quote">c++</span>”</span>, and + <span class="quote">“<span class="quote">fortran</span>”</span> (and any combination). The default is + <span class="quote">“<span class="quote">c</span>”</span>. Packages using GNU configure scripts, even if written in C++, usually need a C compiler for the configure phase.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.4.2. Java"> <div class="titlepage"><div><div><h3 class="title"> <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 provides the following variables:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">USE_JAVA</code> defines if a build +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">USE_JAVA</code> defines if a build dependency on the JDK is added. If - <code class="varname">USE_JAVA</code> is set to “<span class="quote">run</span>”, then + <code class="varname">USE_JAVA</code> is set to <span class="quote">“<span class="quote">run</span>”</span>, then there is only a runtime dependency on the JDK. The default is - “<span class="quote">yes</span>”, which also adds a build dependency on the + <span class="quote">“<span class="quote">yes</span>”</span>, which also adds a build dependency on the JDK.</p></li> -<li><p>Set <code class="varname">USE_JAVA2</code> to declare that +<li class="listitem"><p>Set <code class="varname">USE_JAVA2</code> to declare that a package needs a Java2 implementation. The supported values - are “<span class="quote">yes</span>”, “<span class="quote">1.4</span>”, and - “<span class="quote">1.5</span>”. “<span class="quote">yes</span>” accepts any Java2 - implementation, “<span class="quote">1.4</span>” insists on versions 1.4 or - above, and “<span class="quote">1.5</span>” only accepts versions 1.5 or + are <span class="quote">“<span class="quote">yes</span>”</span>, <span class="quote">“<span class="quote">1.4</span>”</span>, and + <span class="quote">“<span class="quote">1.5</span>”</span>. <span class="quote">“<span class="quote">yes</span>”</span> accepts any Java2 + implementation, <span class="quote">“<span class="quote">1.4</span>”</span> insists on versions 1.4 or + above, and <span class="quote">“<span class="quote">1.5</span>”</span> only accepts versions 1.5 or above. This variable is not set by default.</p></li> </ul></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.4.3. Packages containing perl scripts"> <div class="titlepage"><div><div><h3 class="title"> <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 - “<span class="quote">perl</span>” to the <code class="varname">USE_TOOLS</code> variable + <span class="quote">“<span class="quote">perl</span>”</span> to the <code class="varname">USE_TOOLS</code> variable and set <code class="varname">REPLACE_PERL</code> to ensure that the proper interpreter path is set. <code class="varname">REPLACE_PERL</code> should contain a list of scripts, relative to <code class="varname">WRKSRC</code>, @@ -8546,11 +8530,11 @@ pre-configure: path to the perl executable.</p> <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 “<span class="quote">5.0</span>”.</p> + default is <span class="quote">“<span class="quote">5.0</span>”</span>.</p> <p>See <a class="xref" href="#perl-modules" title="19.6.6. Packages installing perl modules">Section 19.6.6, “Packages installing perl modules”</a> for information about handling perl modules.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.4.4. Other programming languages"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8560,7 +8544,7 @@ pre-configure: package.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="19.5. Fixing problems in the build phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -8569,7 +8553,7 @@ pre-configure: original package author didn't know. To work around this, you can rewrite the source code in most cases so that it does not use the missing functions or provides a replacement function.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="19.5.1. Compiling C and C++ code conditionally"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8589,7 +8573,7 @@ pre-configure: example, if you want to conditionally compile code on Solaris, don't use <code class="varname">__sun__</code>, as the SunPro compiler does not define it. Use <code class="varname">__sun</code> instead.</p> -<div class="sect3" lang="en"> +<div class="sect3" title="19.5.1.1. C preprocessor macros to identify the operating system"> <div class="titlepage"><div><div><h4 class="title"> <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 @@ -8615,7 +8599,7 @@ OpenBSD __OpenBSD__ Solaris sun, __sun </pre> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="19.5.1.2. C preprocessor macros to identify the hardware architecture"> <div class="titlepage"><div><div><h4 class="title"> <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"> @@ -8624,7 +8608,7 @@ MIPS __mips SPARC sparc, __sparc </pre> </div> -<div class="sect3" lang="en"> +<div class="sect3" title="19.5.1.3. C preprocessor macros to identify the compiler"> <div class="titlepage"><div><div><h4 class="title"> <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"> @@ -8635,7 +8619,7 @@ SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8) </pre> </div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.5.2. How to handle compiler bugs"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8650,9 +8634,10 @@ SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8) in <code class="filename">pkgsrc/doc/HACKS</code>. See that file for a number of examples.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.5.3. Undefined reference to “...”"> <div class="titlepage"><div><div><h3 class="title"> -<a name="undefined-reference"></a>19.5.3. Undefined reference to “<span class="quote">...</span>”</h3></div></div></div> +<a name="undefined-reference"></a>19.5.3. Undefined reference to <span class="quote">“<span class="quote">...</span>”</span> +</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> @@ -8712,7 +8697,7 @@ SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8) -l<em class="replaceable"><code>foo</code></em></code> to the package <code class="filename">Makefile</code> and then say <span class="command"><strong>bmake clean; bmake</strong></span>.</p> -<div class="sect3" lang="en"> +<div class="sect3" title="19.5.3.1. Special issue: The SunPro compiler"> <div class="titlepage"><div><div><h4 class="title"> <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 @@ -8738,24 +8723,24 @@ solve this problem you can try to tell the package to disable inlining of functions.</p> </div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.5.4. Running out of memory"> <div class="titlepage"><div><div><h3 class="title"> <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 to unlimit the resources. Currently, the allowed values are - “<span class="quote">datasize</span>” and “<span class="quote">stacksize</span>” (or both). + <span class="quote">“<span class="quote">datasize</span>”</span> and <span class="quote">“<span class="quote">stacksize</span>”</span> (or both). Setting this variable is similar to running the shell builtin <span class="command"><strong>ulimit</strong></span> command to raise the maximum data segment size or maximum stack size of a process, respectively, to their hard limits.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="19.6. Fixing problems in the install phase"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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="sect2" title="19.6.1. Creating needed directories"> <div class="titlepage"><div><div><h3 class="title"> <a name="install-scripts"></a>19.6.1. Creating needed directories</h3></div></div></div> <p>The BSD-compatible <span class="command"><strong>install</strong></span> supplied @@ -8766,12 +8751,12 @@ of functions.</p> ${INSTALL_DATA_DIR} ${PREFIX}/dir1 ${INSTALL_DATA_DIR} ${PREFIX}/dir2 </pre> -<p>You can also just append “<span class="quote"><code class="literal">dir1 - dir2</code></span>” to the +<p>You can also just append <span class="quote">“<span class="quote"><code class="literal">dir1 + dir2</code></span>”</span> to the <code class="varname">INSTALLATION_DIRS</code> variable, which will automatically do the right thing.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.2. Where to install documentation"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8780,7 +8765,7 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2 includes the version number of the package).</p> <p>Many modern packages using GNU autoconf allow to set the directory where HTML documentation is installed with the - “<span class="quote">--with-html-dir</span>” option. Sometimes using this flag + <span class="quote">“<span class="quote">--with-html-dir</span>”</span> option. Sometimes using this flag is needed because otherwise the documentation ends up in <code class="filename">${PREFIX}/share/doc/html</code> or other places.</p> @@ -8796,11 +8781,11 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2 <code class="filename">.devhelp*</code> file must be directly in that directory then, no additional subdirectory level is allowed in this case. This is usually achieved by using - “<span class="quote">--with-html-dir=${PREFIX}/share/doc</span>”. + <span class="quote">“<span class="quote">--with-html-dir=${PREFIX}/share/doc</span>”</span>. <code class="filename">${PREFIX}/share/gtk-doc</code> is preferred though.)</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.3. Installing highscore files"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8821,34 +8806,34 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2 <code class="varname">INSTALL_GAME_DATA</code> to set these correctly.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.4. Adding DESTDIR support to packages"> <div class="titlepage"><div><div><h3 class="title"> <a name="destdir-support"></a>19.6.4. Adding DESTDIR support to packages</h3></div></div></div> <p><code class="varname">DESTDIR</code> support means that a package installs into a staging directory, not the final location of the files. Then a binary package is created which can be used for installation as usual. There are two ways: Either the package must - install as root (“<span class="quote">destdir</span>”) or the package can - install as non-root user (“<span class="quote">user-destdir</span>”).</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">PKG_DESTDIR_SUPPORT</code> has to be - set to “<span class="quote">destdir</span>” or “<span class="quote">user-destdir</span>”. If + install as root (<span class="quote">“<span class="quote">destdir</span>”</span>) or the package can + install as non-root user (<span class="quote">“<span class="quote">user-destdir</span>”</span>).</p> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">PKG_DESTDIR_SUPPORT</code> has to be + set to <span class="quote">“<span class="quote">destdir</span>”</span> or <span class="quote">“<span class="quote">user-destdir</span>”</span>. If bsd.prefs.mk is included in the Makefile, <code class="varname">PKG_DESTDIR_SUPPORT</code> needs to be set before the inclusion.</p></li> -<li><p>All installation operations have to be prefixed with +<li class="listitem"><p>All installation operations have to be prefixed with <code class="filename">${DESTDIR}</code>.</p></li> -<li><p>automake gets this DESTDIR mostly right +<li class="listitem"><p>automake gets this DESTDIR mostly right automatically. Many manual rules and pre/post-install often are incorrect; fix them.</p></li> -<li><p>If files are installed with special owner/group +<li class="listitem"><p>If files are installed with special owner/group use <code class="varname">SPECIAL_PERMS</code>.</p></li> -<li><p>In general, packages should support +<li class="listitem"><p>In general, packages should support <code class="varname">UNPRIVILEGED</code> to be able to use DESTDIR.</p></li> </ul></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.5. Packages with hardcoded paths to other interpreters"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8863,14 +8848,14 @@ REPLACE.tcl.new= ${PREFIX}/bin/tclsh REPLACE_FILES.tcl= # list of tcl scripts which need to be fixed, # relative to ${WRKSRC}, just as in REPLACE_PERL </pre> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>Before March 2006, these variables were called <code class="varname">_REPLACE.*</code> and <code class="varname">_REPLACE_FILES.*</code>.</p> </div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.6. Packages installing perl modules"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8899,30 +8884,30 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist variables are also substituted for in the <code class="filename">PLIST</code>.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.7. Packages installing info files"> <div class="titlepage"><div><div><h3 class="title"> <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 - “<span class="quote">makeinfo</span>” or “<span class="quote">install-info</span>” + <span class="quote">“<span class="quote">makeinfo</span>”</span> or <span class="quote">“<span class="quote">install-info</span>”</span> commands. <code class="varname">INFO_FILES</code> should be defined in the package Makefile so that <code class="filename">INSTALL</code> and <code class="filename">DEINSTALL</code> scripts will be generated to handle registration of the info files in the Info directory - file. The “<span class="quote">install-info</span>” command used for the info + file. The <span class="quote">“<span class="quote">install-info</span>”</span> command used for the info files registration is either provided by the system, or by a special purpose package automatically added as dependency if needed.</p> <p><code class="varname">PKGINFODIR</code> is the directory under <code class="filename">${PREFIX}</code> where info files are primarily located. <code class="varname">PKGINFODIR</code> defaults to - “<span class="quote">info</span>” and can be overridden by the user.</p> + <span class="quote">“<span class="quote">info</span>”</span> and can be overridden by the user.</p> <p>The info files for the package should be listed in the package <code class="filename">PLIST</code>; however any split info files need not be listed.</p> -<p>A package which needs the “<span class="quote">makeinfo</span>” command - at build time must add “<span class="quote">makeinfo</span>” to +<p>A package which needs the <span class="quote">“<span class="quote">makeinfo</span>”</span> command + at build time must add <span class="quote">“<span class="quote">makeinfo</span>”</span> to <code class="varname">USE_TOOLS</code> in its Makefile. If a minimum - version of the “<span class="quote">makeinfo</span>” command is needed it + version of the <span class="quote">“<span class="quote">makeinfo</span>”</span> command is needed it should be noted with the <code class="varname">TEXINFO_REQD</code> variable in the package <code class="filename">Makefile</code>. By default, a minimum version of 3.12 is required. If the system @@ -8946,7 +8931,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist value of <code class="varname">TEXINFO_REQD</code> either runs the appropriate <span class="command"><strong>makeinfo</strong></span> command or exit on error.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.8. Packages installing man pages"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -8955,9 +8940,9 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist <code class="literal">${PREFIX}/${PKGMANDIR}</code>, and this expression should be used in packages. The default for <code class="varname">PKGMANDIR</code> is - “<span class="quote"><code class="filename">man</code></span>”. Another often-used value - is “<span class="quote"><code class="filename">share/man</code></span>”.</p> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> + <span class="quote">“<span class="quote"><code class="filename">man</code></span>”</span>. Another often-used value + is <span class="quote">“<span class="quote"><code class="filename">share/man</code></span>”</span>.</p> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>The support for a custom <code class="varname">PKGMANDIR</code> is far from complete.</p> @@ -8969,76 +8954,76 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist <code class="varname">PKGMANDIR</code> must be used.</p> <p>Packages that are configured with <code class="varname">GNU_CONFIGURE</code> set as - “<span class="quote">yes</span>”, by default will use the + <span class="quote">“<span class="quote">yes</span>”</span>, by default will use the <code class="filename">./configure</code> --mandir switch to set where the man pages should be installed. The path is <code class="varname">GNU_CONFIGURE_MANDIR</code> which defaults to <code class="varname">${PREFIX}/${PKGMANDIR}</code>.</p> <p>Packages that use <code class="varname">GNU_CONFIGURE</code> but do not use --mandir, can set <code class="varname">CONFIGURE_HAS_MANDIR</code> - to “<span class="quote">no</span>”. + to <span class="quote">“<span class="quote">no</span>”</span>. 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 class="xref" href="#manpage-compression" title="13.5. Man page compression">Section 13.5, “Man page compression”</a> for information on installation of compressed manual pages.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.9. Packages installing GConf data files"> <div class="titlepage"><div><div><h3 class="title"> <a name="gconf-data-files"></a>19.6.9. Packages installing GConf 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 GConf, you need to take some extra steps to make sure they get registered in the database:</p> -<div class="orderedlist"><ol type="1"> -<li><p>Include <code class="filename">../../devel/GConf/schemas.mk</code> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Include <code class="filename">../../devel/GConf/schemas.mk</code> instead of its <code class="filename">buildlink3.mk</code> file. This takes care of rebuilding the GConf database at installation and deinstallation time, and tells the package where to install GConf data files using some standard configure arguments. It also disallows any access to the database directly from the package.</p></li> -<li><p>Ensure that the package installs its +<li class="listitem"><p>Ensure that the package installs its <code class="filename">.schemas</code> files under <code class="filename">${PREFIX}/share/gconf/schemas</code>. If they get installed under <code class="filename">${PREFIX}/etc</code>, you will need to manually patch the package.</p></li> -<li><p>Check the PLIST and remove any entries under the etc/gconf +<li class="listitem"><p>Check the PLIST and remove any entries under the etc/gconf directory, as they will be handled automatically. See <a class="xref" href="#faq.conf" title="9.13. How do I change the location of configuration files?">Section 9.13, “How do I change the location of configuration files?”</a> for more information.</p></li> -<li><p>Define the <code class="varname">GCONF_SCHEMAS</code> variable in +<li class="listitem"><p>Define the <code class="varname">GCONF_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 any. Names must not contain any directories in them.</p></li> -<li><p>Define the <code class="varname">GCONF_ENTRIES</code> variable in +<li class="listitem"><p>Define the <code class="varname">GCONF_ENTRIES</code> variable in your <code class="filename">Makefile</code> with a list of all <code class="filename">.entries</code> files installed by the package, if any. Names must not contain any directories in them.</p></li> </ol></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.10. Packages installing scrollkeeper/rarian data files"> <div class="titlepage"><div><div><h3 class="title"> <a name="scrollkeeper-data-files"></a>19.6.10. Packages installing scrollkeeper/rarian data files</h3></div></div></div> <p>If a package installs <code class="filename">.omf</code> files, used by scrollkeeper/rarian, you need to take some extra steps to make sure they get registered in the database:</p> -<div class="orderedlist"><ol type="1"> -<li><p>Include +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Include <code class="filename">../../mk/omf-scrollkeeper.mk</code> instead of rarian's <code class="filename">buildlink3.mk</code> file. This takes care of rebuilding the scrollkeeper database at installation and deinstallation time, and disallows any access to it directly from the package.</p></li> -<li><p>Check the PLIST and remove any entries under the +<li class="listitem"><p>Check the PLIST and remove any entries under the <code class="filename">libdata/scrollkeeper</code> directory, as they will be handled automatically.</p></li> -<li><p>Remove the <code class="filename">share/omf</code> directory from +<li class="listitem"><p>Remove the <code class="filename">share/omf</code> directory from the PLIST. It will be handled by rarian. (<span class="command"><strong>make print-PLIST</strong></span> does this automatically.)</p></li> </ol></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.11. Packages installing X11 fonts"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -9048,70 +9033,70 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist <p>You can list the directories where fonts are installed in the <code class="varname">FONTS_DIRS.<em class="replaceable"><code>type</code></em></code> variables, where <em class="replaceable"><code>type</code></em> can be one of - “<span class="quote">ttf</span>”, “<span class="quote">type1</span>” or “<span class="quote">x11</span>”. + <span class="quote">“<span class="quote">ttf</span>”</span>, <span class="quote">“<span class="quote">type1</span>”</span> or <span class="quote">“<span class="quote">x11</span>”</span>. Also make sure that the database file <code class="filename">fonts.dir</code> is not listed in the PLIST.</p> <p>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.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.12. Packages installing GTK2 modules"> <div class="titlepage"><div><div><h3 class="title"> <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> -<div class="orderedlist"><ol type="1"> -<li><p>Include +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Include <code class="filename">../../x11/gtk2/modules.mk</code> instead of its <code class="filename">buildlink3.mk</code> file. This takes care of rebuilding the database at installation and deinstallation time.</p></li> -<li><p>Set <code class="varname">GTK2_IMMODULES=YES</code> if +<li class="listitem"><p>Set <code class="varname">GTK2_IMMODULES=YES</code> if your package installs GTK2 immodules.</p></li> -<li><p>Set <code class="varname">GTK2_LOADERS=YES</code> if your package installs +<li class="listitem"><p>Set <code class="varname">GTK2_LOADERS=YES</code> if your package installs GTK2 loaders.</p></li> -<li> +<li class="listitem"> <p>Patch the package to not touch any of the GTK2 databases directly. These are:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="filename">libdata/gtk-2.0/gdk-pixbuf.loaders</code></p></li> -<li><p><code class="filename">libdata/gtk-2.0/gtk.immodules</code></p></li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="filename">libdata/gtk-2.0/gdk-pixbuf.loaders</code></p></li> +<li class="listitem"><p><code class="filename">libdata/gtk-2.0/gtk.immodules</code></p></li> </ul></div> </li> -<li><p>Check the <code class="filename">PLIST</code> and remove +<li class="listitem"><p>Check the <code class="filename">PLIST</code> and remove any entries under the <code class="filename">libdata/gtk-2.0</code> directory, as they will be handled automatically.</p></li> </ol></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.13. Packages installing SGML or XML data"> <div class="titlepage"><div><div><h3 class="title"> <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> -<div class="orderedlist"><ol type="1"> -<li><p>Include +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Include <code class="filename">../../textproc/xmlcatmgr/catalogs.mk</code> in your <code class="filename">Makefile</code>, which takes care of registering those files in system-wide catalogs at installation and deinstallation time.</p></li> -<li><p>Set <code class="varname">SGML_CATALOGS</code> to the full path of +<li class="listitem"><p>Set <code class="varname">SGML_CATALOGS</code> to the full path of any SGML catalogs installed by the package.</p></li> -<li><p>Set <code class="varname">XML_CATALOGS</code> to the full path of +<li class="listitem"><p>Set <code class="varname">XML_CATALOGS</code> to the full path of any XML catalogs installed by the package.</p></li> -<li><p>Set <code class="varname">SGML_ENTRIES</code> to individual entries +<li class="listitem"><p>Set <code class="varname">SGML_ENTRIES</code> to individual entries to be added to the SGML catalog. These come in groups of three strings; see xmlcatmgr(1) for more information (specifically, arguments recognized by the 'add' action). Note that you will normally not use this variable.</p></li> -<li><p>Set <code class="varname">XML_ENTRIES</code> to individual entries +<li class="listitem"><p>Set <code class="varname">XML_ENTRIES</code> to individual entries to be added to the XML catalog. These come in groups of three strings; see xmlcatmgr(1) for more information (specifically, arguments recognized by the 'add' action). Note that you will normally not use this variable.</p></li> </ol></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.14. Packages installing extensions to the MIME database"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -9119,8 +9104,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist <code class="filename">${PREFIX}/share/mime/packages</code>, you need to take some extra steps to ensure that the database is kept consistent with respect to these new files:</p> -<div class="orderedlist"><ol type="1"> -<li><p>Include +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Include <code class="filename">../../databases/shared-mime-info/mimedb.mk</code> (avoid using the <code class="filename">buildlink3.mk</code> file from this same directory, which is reserved for inclusion from @@ -9128,7 +9113,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist care of rebuilding the MIME database at installation and deinstallation time, and disallows any access to it directly from the package.</p></li> -<li><p>Check the PLIST and remove any entries under the +<li class="listitem"><p>Check the PLIST and remove any entries under the <code class="filename">share/mime</code> directory, <span class="emphasis"><em>except</em></span> for files saved under <code class="filename">share/mime/packages</code>. The former are @@ -9136,12 +9121,12 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist the update-mime-database program, but the latter are package-dependent and must be removed by the package that installed them in the first place.</p></li> -<li><p>Remove any <code class="filename">share/mime/*</code> directories +<li class="listitem"><p>Remove any <code class="filename">share/mime/*</code> directories from the PLIST. They will be handled by the shared-mime-info package.</p></li> </ol></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.15. Packages using intltool"> <div class="titlepage"><div><div><h3 class="title"> <a name="intltool"></a>19.6.15. Packages using intltool</h3></div></div></div> <p>If a package uses intltool during its build, add @@ -9152,7 +9137,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist latest available version; this way, the package benefits of any bug fixes that may have appeared since it was released.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.16. Packages installing startup scripts"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -9163,25 +9148,25 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist it will automatically remove the scripts when the package is deinstalled.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.17. Packages installing TeX modules"> <div class="titlepage"><div><div><h3 class="title"> <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> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>Except the main TeX packages such as kpathsea, packages should install files into <code class="filename">${PREFIX}/share/texmf-dist</code>, not <code class="filename">${PREFIX}/share/texmf</code>.</p> </div> -<div class="orderedlist"><ol type="1"> -<li><p>Include +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Include <code class="filename">../../print/kpathsea/texmf.mk</code>. This takes care of rebuilding the <code class="filename">ls-R</code> database at installation and deinstallation time.</p></li> -<li> +<li class="listitem"> <p>If your package installs files into a texmf tree other than the one at <code class="filename">${PREFIX}/share/texmf-dist</code>, @@ -9197,12 +9182,12 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist enable/disable font map files for TeX output drivers.</p> </li> -<li><p>Make sure that none of <code class="filename">ls-R</code> +<li class="listitem"><p>Make sure that none of <code class="filename">ls-R</code> databases are included in <code class="filename">PLIST</code>, as they will be removed only by the teTeX-bin package.</p></li> </ol></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.18. Packages supporting running binaries in emulation"> <div class="titlepage"><div><div><h3 class="title"> <a name="emulation-packages"></a>19.6.18. Packages supporting running binaries in emulation</h3></div></div></div> @@ -9219,7 +9204,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist this fails for emulation packages, because the libraries used by the emulation are not in the standard directories.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.19. Packages installing hicolor theme icons"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -9228,12 +9213,12 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist database, you need to take some extra steps to make sure that the shared theme directory is handled appropriately and that the cache database is rebuilt:</p> -<div class="orderedlist"><ol type="1"> -<li><p>Include +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Include <code class="filename">../../graphics/hicolor-icon-theme/buildlink3.mk</code>.</p></li> -<li><p>Check the <code class="filename">PLIST</code> and remove the +<li class="listitem"><p>Check the <code class="filename">PLIST</code> and remove the entry that refers to the theme cache.</p></li> -<li><p>Ensure that the PLIST does not remove the shared icon +<li class="listitem"><p>Ensure that the PLIST does not remove the shared icon directories from the <code class="filename">share/icons/hicolor</code> hierarchy because they will be handled automatically.</p></li> </ol></div> @@ -9241,17 +9226,17 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist respect to the last two points is to regenerate it using <span class="command"><strong>make print-PLIST</strong></span>.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="19.6.20. Packages installing desktop files"> <div class="titlepage"><div><div><h3 class="title"> <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 are registered into the MIME database:</p> -<div class="orderedlist"><ol type="1"> -<li><p>Include +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Include <code class="filename">../../sysutils/desktop-file-utils/desktopdb.mk</code>.</p></li> -<li><p>Check the PLIST and remove the entry that refers to the +<li class="listitem"><p>Check the PLIST and remove the entry that refers to the <code class="filename">share/applications/mimeinfo.cache</code> file. It will be handled automatically.</p></li> </ol></div> @@ -9260,7 +9245,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist print-PLIST</strong></span>.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="19.7. Marking packages as having problems"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -9274,16 +9259,16 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist intervals.</p> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 20. Debugging"> <div class="titlepage"><div><div><h2 class="title"> <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 sections, only with some debugging aids.</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>Be sure to set <code class="varname">PKG_DEVELOPER=yes</code> in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p></li> -<li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>Be sure to set <code class="varname">PKG_DEVELOPER=yes</code> in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p></li> +<li class="listitem"> <p>Install <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/url2pkg/README.html" target="_top"><code class="filename">pkgtools/url2pkg</code></a>, create a directory for a new package, change into it, then run <span class="command"><strong>url2pkg</strong></span>:</p> @@ -9291,13 +9276,13 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist <code class="prompt">%</code> <strong class="userinput"><code>cd /usr/pkgsrc/<em class="replaceable"><code>category</code></em>/<em class="replaceable"><code>examplepkg</code></em></code></strong> <code class="prompt">%</code> <strong class="userinput"><code>url2pkg http://www.example.com/path/to/distfile.tar.gz</code></strong></pre> </li> -<li><p>Edit the <code class="filename">Makefile</code> as requested.</p></li> -<li><p>Fill in the <code class="filename">DESCR</code> file</p></li> -<li><p>Run <span class="command"><strong>make configure</strong></span></p></li> -<li><p>Add any dependencies glimpsed from documentation and the +<li class="listitem"><p>Edit the <code class="filename">Makefile</code> as requested.</p></li> +<li class="listitem"><p>Fill in the <code class="filename">DESCR</code> file</p></li> +<li class="listitem"><p>Run <span class="command"><strong>make configure</strong></span></p></li> +<li class="listitem"><p>Add any dependencies glimpsed from documentation and the configure step to the package's <code class="filename">Makefile</code>.</p></li> -<li> +<li class="listitem"> <p>Make the package compile, doing multiple rounds of</p> <pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>make</code></strong> <code class="prompt">%</code> <strong class="userinput"><code>pkgvi ${WRKSRC}/some/file/that/does/not/compile</code></strong> @@ -9313,9 +9298,9 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist from the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdiff/README.html" target="_top"><code class="filename">pkgtools/pkgdiff</code></a> package.</p> </li> -<li><p>Look at the <code class="filename">Makefile</code>, fix if - necessary; see <a class="xref" href="#components.Makefile" title="11.1. Makefile">Section 11.1, “Makefile”</a>.</p></li> -<li> +<li class="listitem"><p>Look at the <code class="filename">Makefile</code>, fix if + necessary; see <a class="xref" href="#components.Makefile" title="11.1. Makefile">Section 11.1, “<code class="filename">Makefile</code>”</a>.</p></li> +<li class="listitem"> <p>Generate a <code class="filename">PLIST</code>:</p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make install</code></strong> <code class="prompt">#</code> <strong class="userinput"><code>make print-PLIST >PLIST</code></strong> @@ -9328,35 +9313,35 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist <p>If this reveals any files that are missing in <code class="filename">PLIST</code>, add them.</p> </li> -<li> +<li class="listitem"> <p>Now that the <code class="filename">PLIST</code> is OK, install the package again and make a binary package:</p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make reinstall</code></strong> <code class="prompt">#</code> <strong class="userinput"><code>make package</code></strong></pre> </li> -<li> +<li class="listitem"> <p>Delete the installed package:</p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>pkg_delete <em class="replaceable"><code>examplepkg</code></em></code></strong></pre> </li> -<li> +<li class="listitem"> <p>Repeat the above <span class="command"><strong>make print-PLIST</strong></span> command, which shouldn't find anything now:</p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make print-PLIST</code></strong></pre> </li> -<li> +<li class="listitem"> <p>Reinstall the binary package:</p> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>pkg_add .../<em class="replaceable"><code>examplepkg</code></em>.tgz</code></strong></pre> </li> -<li><p>Play with it. Make sure everything works.</p></li> -<li> +<li class="listitem"><p>Play with it. Make sure everything works.</p></li> +<li class="listitem"> <p>Run <span class="command"><strong>pkglint</strong></span> from <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>, and fix the problems it 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 class="xref" href="#submit" title="Chapter 21. Submitting and Committing">Chapter 21, <i>Submitting and Committing</i></a>.</p></li> +<li class="listitem"><p>Submit (or commit, if you have cvs access); see <a class="xref" 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="chapter" title="Chapter 21. Submitting and Committing"> <div class="titlepage"><div><div><h2 class="title"> <a name="submit"></a>Chapter 21. Submitting and Committing</h2></div></div></div> <div class="toc"> @@ -9371,7 +9356,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist <dt><span class="sect1"><a href="#moving-package">21.7. Moving a package in pkgsrc</a></span></dt> </dl> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="21.1. Submitting binary packages"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -9382,7 +9367,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist developers doing bulk builds and wanting to upload them please see <a class="xref" href="#bulk-upload" title="7.3.8. Uploading results of a bulk build">Section 7.3.8, “Uploading results of a bulk build”</a>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="21.2. Submitting source packages (for non-NetBSD-developers)"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -9399,20 +9384,20 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist also available as a substitute for either of the above two tools. </p> <p>In the form of the problem report, the category should be - “<span class="quote">pkg</span>”, the synopsis should include the package name + <span class="quote">“<span class="quote">pkg</span>”</span>, the synopsis should include the package name and version number, and the description field should contain a short description of your package (contents of the COMMENT variable or DESCR file are OK). The uuencoded package data should - go into the “<span class="quote">fix</span>” field.</p> + go into the <span class="quote">“<span class="quote">fix</span>”</span> field.</p> <p>If you want to submit several packages, please send a separate PR for each one, it's easier for us to track things that way.</p> <p>Alternatively, you can also import new packages into - pkgsrc-wip (“<span class="quote">pkgsrc work-in-progress</span>”); see the + pkgsrc-wip (<span class="quote">“<span class="quote">pkgsrc work-in-progress</span>”</span>); see the homepage at <a class="ulink" href="http://pkgsrc-wip.sourceforge.net/" target="_top">http://pkgsrc-wip.sourceforge.net/</a> for details.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="21.3. General notes when adding, updating, or removing packages"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -9451,7 +9436,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist makes the cvs commands use the main repository. </p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="21.4. Committing: Importing a package into CVS"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -9460,35 +9445,35 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist the pathname that you give the <span class="command"><strong>cvs import</strong></span> command is so that it knows where to place the files in the repository. Newly created packages should be - imported with a vendor tag of “<span class="quote">TNF</span>” and a release tag of - “<span class="quote">pkgsrc-base</span>”, e.g:</p> + imported with a vendor tag of <span class="quote">“<span class="quote">TNF</span>”</span> and a release tag of + <span class="quote">“<span class="quote">pkgsrc-base</span>”</span>, e.g:</p> <pre class="programlisting"> <code class="prompt">$</code> cd .../pkgsrc/category/pkgname <code class="prompt">$</code> cvs import pkgsrc/category/pkgname TNF pkgsrc-base </pre> <p>Remember to move the directory from which you imported out of - the way, or cvs will complain the next time you “<span class="quote">cvs - update</span>” your source tree. Also don't forget to add the new + the way, or cvs will complain the next time you <span class="quote">“<span class="quote">cvs + update</span>”</span> your source tree. Also don't forget to add the new package to the category's <code class="filename">Makefile</code>.</p> <p>The commit message of the initial import should include part of the <code class="filename">DESCR</code> file, so people reading the mailing lists know what the package is/does.</p> -<p>For new packages, “<span class="quote">cvs import</span>” is preferred to “<span class="quote">cvs - add</span>” because the former gets everything with a single command, +<p>For new packages, <span class="quote">“<span class="quote">cvs import</span>”</span> is preferred to <span class="quote">“<span class="quote">cvs + add</span>”</span> because the former gets everything with a single command, and provides a consistent tag.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="21.5. Updating a package to a newer version"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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> -<div class="itemizedlist"><ul type="disc"> -<li><p>A URL is volatile, and can change over time. It may go away completely +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>A URL is volatile, and can change over time. It may go away completely or its information may be overwritten by newer information.</p></li> -<li><p>Having the change information between old and new versions in our CVS +<li class="listitem"><p>Having the change information between old and new versions in our CVS repository is very useful for people who use either cvs or anoncvs.</p></li> -<li><p>Having the change information between old and new versions in our CVS +<li class="listitem"><p>Having the change information between old and new versions in our CVS repository is very useful for people who read the pkgsrc-changes mailing list, so that they can make tactical decisions about when to upgrade the package.</p></li> @@ -9501,7 +9486,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist judgement about what should go into pkgsrc, and bear in mind that stability is to be preferred above new and possibly untested features.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="21.6. Renaming a package in pkgsrc"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="renaming-package"></a>21.6. Renaming a package in pkgsrc</h2></div></div></div> <p>Renaming packages is not recommended.</p> @@ -9513,30 +9498,30 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist This may be repeated for multiple renames. The new package would be an exact replacement. </p> -<p>Note that “<span class="quote">successor</span>” in the +<p>Note that <span class="quote">“<span class="quote">successor</span>”</span> in the CHANGES-<em class="replaceable"><code>YYYY</code></em> file doesn't necessarily mean that it <span class="emphasis"><em>supersedes</em></span>, as that successor may not be an exact replacement but is a suggestion for the replaced functionality.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="21.7. Moving a package in pkgsrc"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="moving-package"></a>21.7. Moving a package in pkgsrc</h2></div></div></div> <p>It is preferred that packages are not renamed or moved, but if needed please follow these steps. </p> -<div class="orderedlist"><ol type="1"> -<li><p>Make a copy of the directory somewhere else.</p></li> -<li> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>Make a copy of the directory somewhere else.</p></li> +<li class="listitem"> <p>Remove all CVS dirs.</p> <p>Alternatively to the first two steps you can also do:</p> <pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>cvs -d user@cvs.NetBSD.org:/cvsroot export -D today pkgsrc/category/package</code></strong></pre> <p>and use that for further work.</p> </li> -<li><p>Fix <code class="varname">CATEGORIES</code> and any -<code class="varname">DEPENDS</code> paths that just did “<span class="quote">../package</span>” -instead of “<span class="quote">../../category/package</span>”.</p></li> -<li><p>In the modified package's Makefile, consider setting +<li class="listitem"><p>Fix <code class="varname">CATEGORIES</code> and any +<code class="varname">DEPENDS</code> paths that just did <span class="quote">“<span class="quote">../package</span>”</span> +instead of <span class="quote">“<span class="quote">../../category/package</span>”</span>.</p></li> +<li class="listitem"><p>In the modified package's Makefile, consider setting <code class="varname">PREV_PKGPATH</code> to the previous category/package pathname. The <code class="varname">PREV_PKGPATH</code> can be used by tools for doing an update using pkgsrc building; for example, it can @@ -9547,19 +9532,19 @@ it may have multiple matches, so the tool should also check on the <code class="varname">PKGBASE</code> too. The <code class="varname">PREV_PKGPATH</code> probably has no value unless <code class="varname">SUPERSEDES</code> is not set, i.e. <code class="varname">PKGBASE</code> stays the same. </p></li> -<li><p><span class="command"><strong>cvs import</strong></span> the modified package in the new +<li class="listitem"><p><span class="command"><strong>cvs import</strong></span> the modified package in the new place.</p></li> -<li> +<li class="listitem"> <p>Check if any package depends on it: </p> <pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>cd /usr/pkgsrc</code></strong> <code class="prompt">%</code> <strong class="userinput"><code>grep /package */*/Makefile* */*/buildlink*</code></strong></pre> </li> -<li><p>Fix paths in packages from step 5 to point to new location.</p></li> -<li><p><span class="command"><strong>cvs rm (-f)</strong></span> the package at the old location.</p></li> -<li><p>Remove from <code class="filename">oldcategory/Makefile</code>.</p></li> -<li><p>Add to <code class="filename">newcategory/Makefile</code>.</p></li> -<li> +<li class="listitem"><p>Fix paths in packages from step 5 to point to new location.</p></li> +<li class="listitem"><p><span class="command"><strong>cvs rm (-f)</strong></span> the package at the old location.</p></li> +<li class="listitem"><p>Remove from <code class="filename">oldcategory/Makefile</code>.</p></li> +<li class="listitem"><p>Add to <code class="filename">newcategory/Makefile</code>.</p></li> +<li class="listitem"> <p>Commit the changed and removed files:</p> <pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>cvs commit oldcategory/package oldcategory/Makefile newcategory/Makefile</code></strong></pre> <p>(and any packages from step 5, of course).</p> @@ -9567,7 +9552,7 @@ place.</p></li> </ol></div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 22. Frequently Asked Questions"> <div class="titlepage"><div><div><h2 class="title"> <a name="devfaq"></a>Chapter 22. Frequently Asked Questions</h2></div></div></div> <p>This section contains the answers to questions that may @@ -9575,8 +9560,8 @@ place.</p></li> question answered here, first have a look in the other chapters, and if you still don't have the answer, ask on the <code class="literal">pkgsrc-users</code> mailing list.</p> -<div class="qandaset"> -<dl> +<div class="qandaset" title="Frequently Asked Questions"> +<a name="id1168230172474"></a><dl> <dt>22.1. <a href="#devfaq.makeflags">What is the difference between MAKEFLAGS, .MAKEFLAGS and MAKE_FLAGS?</a> @@ -9613,12 +9598,13 @@ place.</p></li> do?</a> </dt> </dl> -<table border="0" summary="Q and A Set"> +<table border="0" width="100%" summary="Q and A Set"> <col align="left" width="1%"> +<col> <tbody> -<tr class="question"> +<tr class="question" title="22.1."> <td align="left" valign="top"> -<a name="devfaq.makeflags"></a><a name="id52060368"></a><p><b>22.1.</b></p> +<a name="devfaq.makeflags"></a><a name="id1168230172477"></a><p><b>22.1.</b></p> </td> <td align="left" valign="top"><p>What is the difference between <code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and @@ -9632,9 +9618,9 @@ do?</a> the <code class="varname">MAKE_PROGRAM</code> when building the package. [FIXME: What is .MAKEFLAGS for?]</p></td> </tr> -<tr class="question"> +<tr class="question" title="22.2."> <td align="left" valign="top"> -<a name="devfaq.make"></a><a name="id52060403"></a><p><b>22.2.</b></p> +<a name="devfaq.make"></a><a name="id1168230172512"></a><p><b>22.2.</b></p> </td> <td align="left" valign="top"><p>What is the difference between <code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and @@ -9650,9 +9636,9 @@ do?</a> Make program that is used for building the package.</p></td> </tr> -<tr class="question"> +<tr class="question" title="22.3."> <td align="left" valign="top"> -<a name="devfaq.cc"></a><a name="id52060441"></a><p><b>22.3.</b></p> +<a name="devfaq.cc"></a><a name="id1168230172548"></a><p><b>22.3.</b></p> </td> <td align="left" valign="top"><p>What is the difference between <code class="varname">CC</code>, <code class="varname">PKG_CC</code> and @@ -9668,9 +9654,9 @@ do?</a> used. See <code class="filename">mk/compiler.mk</code> for more information about the latter variable.</p></td> </tr> -<tr class="question"> +<tr class="question" title="22.4."> <td align="left" valign="top"> -<a name="devfaq.bl3flags"></a><a name="id52060476"></a><p><b>22.4.</b></p> +<a name="devfaq.bl3flags"></a><a name="id1168230172583"></a><p><b>22.4.</b></p> </td> <td align="left" valign="top"><p>What is the difference between <code class="varname">BUILDLINK_LDFLAGS</code>, @@ -9681,9 +9667,9 @@ do?</a> <td align="left" valign="top"></td> <td align="left" valign="top"><p>[FIXME]</p></td> </tr> -<tr class="question"> +<tr class="question" title="22.5."> <td align="left" valign="top"> -<a name="devfaq.bl3prefix"></a><a name="id52060494"></a><p><b>22.5.</b></p> +<a name="devfaq.bl3prefix"></a><a name="id1168230172601"></a><p><b>22.5.</b></p> </td> <td align="left" valign="top"><p>Why does <span class="command"><strong>make show-var VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span> @@ -9692,14 +9678,14 @@ do?</a> <tr class="answer"> <td align="left" valign="top"></td> <td align="left" valign="top"><p>For optimization reasons, some variables are only - available in the “<span class="quote">wrapper</span>” phase and later. To - “<span class="quote">simulate</span>” the wrapper phase, append + available in the <span class="quote">“<span class="quote">wrapper</span>”</span> phase and later. To + <span class="quote">“<span class="quote">simulate</span>”</span> the wrapper phase, append <span class="command"><strong>PKG_PHASE=wrapper</strong></span> to the above command.</p></td> </tr> -<tr class="question"> +<tr class="question" title="22.6."> <td align="left" valign="top"> -<a name="devfaq.master_sites"></a><a name="id52060521"></a><p><b>22.6.</b></p> +<a name="devfaq.master_sites"></a><a name="id1168230172627"></a><p><b>22.6.</b></p> </td> <td align="left" valign="top"><p>What does <code class="literal">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I @@ -9721,9 +9707,9 @@ do?</a> <code class="literal">:</code> and the <code class="literal">=</code> fall together.</p></td> </tr> -<tr class="question"> +<tr class="question" title="22.7."> <td align="left" valign="top"> -<a name="devfaq.mailinglists"></a><a name="id52060587"></a><p><b>22.7.</b></p> +<a name="devfaq.mailinglists"></a><a name="id1168230172694"></a><p><b>22.7.</b></p> </td> <td align="left" valign="top"><p>Which mailing lists are there for package developers?</p></td> @@ -9746,9 +9732,9 @@ do?</a> lists.</p></dd> </dl></div></td> </tr> -<tr class="question"> +<tr class="question" title="22.8."> <td align="left" valign="top"> -<a name="devfaq.documentation"></a><a name="id52060621"></a><p><b>22.8.</b></p> +<a name="devfaq.documentation"></a><a name="id1168230172726"></a><p><b>22.8.</b></p> </td> <td align="left" valign="top"><p>Where is the pkgsrc documentation?</p></td> @@ -9758,23 +9744,23 @@ do?</a> <td align="left" valign="top"> <p>There are many places where you can find documentation about pkgsrc:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>The pkgsrc guide (this document) is a collection +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>The pkgsrc guide (this document) is a collection of chapters that explain large parts of pkgsrc, but some chapters tend to be outdated. Which ones they are is hard to say.</p></li> -<li><p>On the mailing list archives (see <a class="ulink" href="http://mail-index.NetBSD.org/" target="_top">http://mail-index.NetBSD.org/</a>), you can find discussions +<li class="listitem"><p>On the mailing list archives (see <a class="ulink" href="http://mail-index.NetBSD.org/" target="_top">http://mail-index.NetBSD.org/</a>), you can find discussions about certain features, announcements of new parts of the pkgsrc infrastructure and sometimes even announcements that a certain feature has been marked as obsolete. The benefit here is that each message has a date appended to it.</p></li> -<li><p>Many of the files in the +<li class="listitem"><p>Many of the files in the <code class="filename">mk/</code> directory start with a comment that describes the purpose of the file and how it can be used by the pkgsrc user and package authors. An easy way to find this documentation is to run <span class="command"><strong>bmake help</strong></span>.</p></li> -<li><p>The CVS log messages are a rich source of +<li class="listitem"><p>The CVS log messages are a rich source of information, but they tend to be highly abbreviated, especially for actions that occur often. Some contain a detailed description of what has changed, but they are geared towards the @@ -9782,8 +9768,8 @@ do?</a> They also only document <span class="emphasis"><em>changes</em></span>, so if you don't know what has been before, these messages may not be worth too much to you.</p></li> -<li><p>Some parts of pkgsrc are only “<span class="quote">implicitly - documented</span>”, that is the documentation exists only in the +<li class="listitem"><p>Some parts of pkgsrc are only <span class="quote">“<span class="quote">implicitly + documented</span>”</span>, that is the documentation exists only in the mind of the developer who wrote the code. To get this information, use the <span class="command"><strong>cvs annotate</strong></span> command to see who has written it and ask on the @@ -9794,9 +9780,9 @@ do?</a> </ul></div> </td> </tr> -<tr class="question"> +<tr class="question" title="22.9."> <td align="left" valign="top"> -<a name="devfaq.too-much-time"></a><a name="id52060812"></a><p><b>22.9.</b></p> +<a name="devfaq.too-much-time"></a><a name="id1168230172780"></a><p><b>22.9.</b></p> </td> <td align="left" valign="top"><p>I have a little time to kill. What shall I do?</p></td> @@ -9806,16 +9792,16 @@ do?</p></td> <td align="left" valign="top"> <p>This is not really an FAQ yet, but here's the answer anyway.</p> -<div class="itemizedlist"><ul type="disc"> -<li><p>Run <span class="command"><strong>pkg_chk -N</strong></span> (from the +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>Run <span class="command"><strong>pkg_chk -N</strong></span> (from the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_chk/README.html" target="_top"><code class="filename">pkgtools/pkg_chk</code></a> package). It 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> +<li class="listitem"><p>Browse <code class="filename">pkgsrc/doc/TODO</code> — 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 +<li class="listitem"><p>Review packages for which review was requested on the <a class="ulink" href="http://pkgsrc-wip.sourceforge.net/" target="_top">pkgsrc-wip</a> review mailing list.</p></li> </ul></div> @@ -9825,7 +9811,7 @@ anyway.</p> </table> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 23. GNOME packaging and porting"> <div class="titlepage"><div><div><h2 class="title"> <a name="gnome"></a>Chapter 23. GNOME packaging and porting</h2></div></div></div> <div class="toc"> @@ -9860,7 +9846,7 @@ portability fixes to make GNOME build and install under it.</p> interested in helping our GNOME porting and packaging efforts. It provides instructions on how to manage the existing packages and some important information regarding their internals.</p> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="We need your help!" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">We need your help!</h3> <p>Should you have some spare cycles to devote to NetBSD, pkgsrc and GNOME and are willing to learn new exciting stuff, please jump @@ -9869,19 +9855,19 @@ important information regarding their internals.</p> fully-functional GNOME desktop under NetBSD and we need your help to achieve it!</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="23.1. Meta packages"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><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 the core GNOME desktop environment. It only includes the necessary bits to get it to boot correctly, although it may lack important functionality for daily operation. The idea behind this package is to let end users build their own configurations on top of this one, first installing this meta package to achieve a functional setup and then adding individual applications.</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome/README.html" target="_top"><code class="filename">meta-pkgs/gnome</code></a>: Provides a +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome/README.html" target="_top"><code class="filename">meta-pkgs/gnome</code></a>: Provides a complete installation of the GNOME platform and desktop as defined by the GNOME project; this is based on the components distributed in the <code class="filename">platform/x.y/x.y.z/sources</code> and @@ -9892,7 +9878,7 @@ important information regarding their internals.</p> set (<code class="filename">bindings/x.y/x.y.z/sources</code>) are not pulled in unless required as a dependency for an end-user component. This package "extends" <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>.</p></li> -<li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-devel/README.html" target="_top"><code class="filename">meta-pkgs/gnome-devel</code></a>: +<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-devel/README.html" target="_top"><code class="filename">meta-pkgs/gnome-devel</code></a>: Installs all the tools required to build a GNOME component when fetched from the CVS repository. These are required to let the <span class="command"><strong>autogen.sh</strong></span> scripts work appropriately.</p></li> @@ -9903,15 +9889,15 @@ packages listed before it but not on any listed after it. It is very important to keep this order to ease updates so... <span class="emphasis"><em>do not change it to alphabetical sorting!</em></span></p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="23.2. Packaging a GNOME application"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 give you a general idea on the minimum required tools:</p> -<div class="itemizedlist"><ul type="disc"> -<li> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"> <p>Almost all GNOME applications use the GNU Autotools as their build system. As a general rule you will need to tell this to your package:</p> @@ -9921,7 +9907,7 @@ USE_LIBTOOL=yes USE_TOOLS+=gmake </pre> </li> -<li> +<li class="listitem"> <p>If the package uses pkg-config to detect dependencies, add this tool to the list of required utilities:</p> <pre class="programlisting">USE_TOOLS+=pkg-config</pre> @@ -9930,11 +9916,11 @@ USE_TOOLS+=gmake specify any dependency in your package and that the version requirements are all correct.</p> </li> -<li><p>If the package uses intltool, be sure to add +<li class="listitem"><p>If the package uses intltool, be sure to add <code class="literal">intltool</code> to the <code class="varname">USE_TOOLS</code> to handle dependencies and to force the package to use the latest available version.</p></li> -<li> +<li class="listitem"> <p>If the package uses gtk-doc (a documentation generation utility), do <span class="emphasis"><em>not</em></span> add a dependency on it. The tool is rather big and the distfile should come with pregenerated @@ -10003,7 +9989,7 @@ solution is given. After applying the solution be sure to </div> <br class="table-break"> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="23.3. Updating GNOME to a newer version"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -10039,8 +10025,8 @@ updates:</p> <p>In order to update the GNOME components in pkgsrc to a new stable release (either major or minor), the following steps should be followed:</p> -<div class="orderedlist"><ol type="1"> -<li> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> <p>Get a list of all the tarballs that form the new release by using the following commands. These will leave the full list of the components' distfiles into the <code class="filename">list.txt</code> @@ -10052,12 +10038,12 @@ followed:</p> ftp -V ftp://ftp.gnome.org/pub/gnome/desktop/x.y/x.y.z/sources/ | \ awk '{ print $9 }' >>list.txt</code></strong></pre> </li> -<li><p>Open each meta package's <code class="filename">Makefile</code> and +<li class="listitem"><p>Open each meta package's <code class="filename">Makefile</code> and bump their version to the release you are updating them to. The three meta packages should be always consistent with versioning. Obviously remove any <code class="varname">PKGREVISION</code>s that might be in them.</p></li> -<li> +<li class="listitem"> <p>For each meta package, update all its <code class="varname">DEPENDS</code> lines to match the latest versions as shown by the above commands. Do <span class="emphasis"><em>not</em></span> list any @@ -10072,27 +10058,27 @@ followed:</p> pkgsrc). This is the case, for example, of the dependencies on the GNU Autotools in the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-devel/README.html" target="_top"><code class="filename">meta-pkgs/gnome-devel</code></a> meta package.</p> </li> -<li> +<li class="listitem"> <p>Generate a patch from the modified meta packages and extract the list of "new" lines. This will provide you an outline on what packages need to be updated in pkgsrc and in what order:</p> <pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>cvs diff -u gnome-devel gnome-base gnome | grep '^+D' >todo.txt</code></strong></pre> </li> -<li><p>For major desktop updates it is recommended to zap all your +<li class="listitem"><p>For major desktop updates it is recommended to zap all your installed packages and start over from scratch at this point.</p></li> -<li><p>Now comes the longest step by far: iterate over the contents +<li class="listitem"><p>Now comes the longest step by far: iterate over the contents of <code class="filename">todo.txt</code> and update the packages listed in it in order. For major desktop updates none of these should be committed until the entire set is completed because there are chances of breaking not-yet-updated packages.</p></li> -<li><p>Once the packages are up to date and working, commit them to +<li class="listitem"><p>Once the packages are up to date and working, commit them to the tree one by one with appropriate log messages. At the end, commit the three meta package updates and all the corresponding changes to the <code class="filename">doc/CHANGES-<YEAR></code> and <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/pkgsrc/doc/TODO?rev=HEAD&content-type=text/x-cvsweb-markup" target="_top"><code class="filename">pkgsrc/doc/TODO</code></a> files.</p></li> </ol></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="23.4. Patching guidelines"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="patching"></a>23.4. Patching guidelines</h2></div></div></div> <p>GNOME is a very big component in pkgsrc which approaches 100 @@ -10120,10 +10106,10 @@ details.</p> </div> </div> </div> -<div class="part" lang="en"> +<div class="part" title="Part III. The pkgsrc infrastructure internals"> <div class="titlepage"><div><div><h1 class="title"> <a name="infrastructure"></a>Part III. The pkgsrc infrastructure internals</h1></div></div></div> -<div class="partintro" lang="en"> +<div class="partintro" title="The pkgsrc infrastructure internals"> <div></div> <p>This part of the guide deals with everything from the infrastructure that is behind the interfaces described @@ -10149,8 +10135,8 @@ details.</p> </dl></dd> <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">24.6.1. The order in bsd.prefs.mk</a></span></dt> -<dt><span class="sect2"><a href="#infr.order.pkg">24.6.2. The order in bsd.pkg.mk</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">25. Regression tests</a></span></dt> @@ -10171,7 +10157,7 @@ details.</p> </dl> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 24. Design of the pkgsrc infrastructure"> <div class="titlepage"><div><div><h2 class="title"> <a name="infr.design"></a>Chapter 24. Design of the pkgsrc infrastructure</h2></div></div></div> <div class="toc"> @@ -10192,8 +10178,8 @@ details.</p> </dl></dd> <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">24.6.1. The order in bsd.prefs.mk</a></span></dt> -<dt><span class="sect2"><a href="#infr.order.pkg">24.6.2. The order in bsd.pkg.mk</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> @@ -10201,7 +10187,7 @@ details.</p> fragments. Each such fragment needs a properly specified interface. This chapter explains how such an interface looks like.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="24.1. The meaning of variable definitions"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -10214,7 +10200,7 @@ details.</p> variables that are intended to be user-defined. They are either defined using the <code class="literal">?=</code> operator or they are left undefined because defining them to anything would - effectively mean “<span class="quote">yes</span>”. All these variables may be + effectively mean <span class="quote">“<span class="quote">yes</span>”</span>. All these variables may be overridden by the pkgsrc user in the <code class="varname">MAKECONF</code> file.</p> <p>Outside this file, the following conventions apply: @@ -10225,14 +10211,14 @@ details.</p> <p>Variables whose name starts with an underscore must not be accessed outside the pkgsrc infrastructure at all. They may change without further notice.</p> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>These conventions are currently not applied consistently to the complete pkgsrc infrastructure.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="24.2. Avoiding problems before they arise"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -10243,7 +10229,7 @@ details.</p> <code class="filename">Makefile</code>s (or other files included by them), since there is no guarantee whether the variable is already set or not, and what its value is. In the case of - <code class="varname">DISTFILES</code>, the packages “<span class="quote">know</span>” + <code class="varname">DISTFILES</code>, the packages <span class="quote">“<span class="quote">know</span>”</span> the default value and just define it as in the following example.</p> <pre class="programlisting"> @@ -10252,25 +10238,25 @@ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} additional-files.tar.gz <p>Because of the selection of this default value, the same value appears in many package Makefiles. Similarly for <code class="varname">USE_LANGUAGES</code>, but in this case the default - value (“<span class="quote"><code class="literal">c</code></span>”) is so short that it + value (<span class="quote">“<span class="quote"><code class="literal">c</code></span>”</span>) is so short that it doesn't stand out. Nevertheless it is mentioned in many files.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="24.3. Variable evaluation"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="infr.var"></a>24.3. Variable evaluation</h2></div></div></div> -<div class="sect2" lang="en"> +<div class="sect2" title="24.3.1. At load time"> <div class="titlepage"><div><div><h3 class="title"> <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> -<div class="itemizedlist"><ul type="disc"> -<li><p>The right hand side of the <code class="literal">:=</code> +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p>The right hand side of the <code class="literal">:=</code> and <code class="literal">!=</code> operators,</p></li> -<li><p>Make directives like <code class="literal">.if</code> or +<li class="listitem"><p>Make directives like <code class="literal">.if</code> or <code class="literal">.for</code>,</p></li> -<li><p>Dependency lines.</p></li> +<li class="listitem"><p>Dependency lines.</p></li> </ul></div> <p>A special exception are references to the iteration variables of <code class="literal">.for</code> loops, which are expanded @@ -10301,7 +10287,7 @@ CFLAGS+= -Wall paragraphs from above typically occur in completely unrelated files.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="24.3.2. At runtime"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -10309,7 +10295,7 @@ CFLAGS+= -Wall the shell commands are expanded at this point.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="24.4. How can variables be specified?"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -10318,14 +10304,14 @@ CFLAGS+= -Wall <code class="literal">pkglint</code> developer's documentation for further details.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="24.5. Designing interfaces for Makefile fragments"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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="sect2" title="24.5.1. Procedures with parameters"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -10359,7 +10345,7 @@ CFLAGS+= -Wall assigned using the <code class="literal">:=</code> operator, which should be used only for this purpose.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="24.5.2. Actions taken on behalf of parameters"> <div class="titlepage"><div><div><h3 class="title"> <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 @@ -10371,7 +10357,7 @@ CFLAGS+= -Wall <code class="filename">mk/subst.mk</code>.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="24.6. The order in which files are loaded"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -10386,7 +10372,7 @@ CFLAGS+= -Wall matters.</p> <p>This section describes at which point the various files are loaded and gives reasons for that order.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="24.6.1. The order in bsd.prefs.mk"> <div class="titlepage"><div><div><h3 class="title"> <a name="infr.order.prefs"></a>24.6.1. The order in <code class="filename">bsd.prefs.mk</code> </h3></div></div></div> @@ -10411,7 +10397,7 @@ CFLAGS+= -Wall variables that have been cached in earlier phases of a package build.</p> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="24.6.2. The order in bsd.pkg.mk"> <div class="titlepage"><div><div><h3 class="title"> <a name="infr.order.pkg"></a>24.6.2. The order in <code class="filename">bsd.pkg.mk</code> </h3></div></div></div> @@ -10444,7 +10430,7 @@ CFLAGS+= -Wall </div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 25. Regression tests"> <div class="titlepage"><div><div><h2 class="title"> <a name="regression"></a>Chapter 25. Regression tests</h2></div></div></div> <div class="toc"> @@ -10467,12 +10453,12 @@ CFLAGS+= -Wall 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.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="25.1. The regression tests framework"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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="sect1" title="25.2. Running the regression tests"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -10480,7 +10466,7 @@ CFLAGS+= -Wall can simply run that command, which will run all tests in the <code class="filename">regress</code> category.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="25.3. Adding a new regression test"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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> @@ -10489,11 +10475,11 @@ CFLAGS+= -Wall that is included by the <span class="command"><strong>pkg_regress</strong></span> command. The following functions can be overridden to suit your needs.</p> -<div class="sect2" lang="en"> +<div class="sect2" title="25.3.1. Overridable functions"> <div class="titlepage"><div><div><h3 class="title"> <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 “<span class="quote">set -e</span>” mode, so you should be careful + called in <span class="quote">“<span class="quote">set -e</span>”</span> mode, so you should be careful to check the exitcodes of any commands you run in the test.</p> <div class="variablelist"><dl> @@ -10516,7 +10502,7 @@ CFLAGS+= -Wall test has been run. By default it does nothing.</p></dd> </dl></div> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="25.3.2. Helper functions"> <div class="titlepage"><div><div><h3 class="title"> <a name="regression.fun.helper"></a>25.3.2. Helper functions</h3></div></div></div> <div class="variablelist"><dl> @@ -10539,7 +10525,7 @@ CFLAGS+= -Wall </div> </div> </div> -<div class="chapter" lang="en"> +<div class="chapter" title="Chapter 26. Porting pkgsrc"> <div class="titlepage"><div><div><h2 class="title"> <a name="porting"></a>Chapter 26. Porting pkgsrc</h2></div></div></div> <div class="toc"> @@ -10553,7 +10539,7 @@ CFLAGS+= -Wall operating systems, hardware architectures and compilers. This chapter explains the necessary steps to make pkgsrc even more portable.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="26.1. Porting pkgsrc to a new operating system"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <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 @@ -10603,14 +10589,14 @@ CFLAGS+= -Wall <p>Now, you should be able to build some basic packages, like <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/lang/perl5/README.html" target="_top"><code class="filename">lang/perl5</code></a>, <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/shells/bash/README.html" target="_top"><code class="filename">shells/bash</code></a>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="26.2. Adding support for a new compiler"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="porting.compiler"></a>26.2. Adding support for a new compiler</h2></div></div></div> <p>TODO</p> </div> </div> </div> -<div class="appendix" lang="en"> +<div class="appendix" title="Appendix A. A simple example package: bison"> <div class="titlepage"><div><div><h2 class="title"> <a name="examples"></a>Appendix A. A simple example package: bison</h2></div></div></div> <div class="toc"> @@ -10621,7 +10607,7 @@ CFLAGS+= -Wall <dt><span class="sect2"><a href="#example-Makefile">A.1.1. Makefile</a></span></dt> <dt><span class="sect2"><a href="#example-descr">A.1.2. DESCR</a></span></dt> <dt><span class="sect2"><a href="#example-plist">A.1.3. PLIST</a></span></dt> -<dt><span class="sect2"><a href="#checking-package-with-pkglint">A.1.4. Checking a package with pkglint</a></span></dt> +<dt><span class="sect2"><a href="#checking-package-with-pkglint">A.1.4. Checking a package with <span class="command"><strong>pkglint</strong></span></a></span></dt> </dl></dd> <dt><span class="sect1"><a href="#steps-for-b-i-p">A.2. Steps for building, installing, packaging</a></span></dt> </dl> @@ -10631,10 +10617,10 @@ CFLAGS+= -Wall <span class="command"><strong>bison</strong></span> when Berkeley <span class="command"><strong>yacc</strong></span> is already present in the tree is beyond us, but it's useful for the purposes of this exercise.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="A.1. files"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="example-files"></a>A.1. files</h2></div></div></div> -<div class="sect2" lang="en"> +<div class="sect2" title="A.1.1. Makefile"> <div class="titlepage"><div><div><h3 class="title"> <a name="example-Makefile"></a>A.1.1. Makefile</h3></div></div></div> <pre class="programlisting"> @@ -10655,7 +10641,7 @@ INFO_FILES= bison.info .include "../../mk/bsd.pkg.mk" </pre> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="A.1.2. DESCR"> <div class="titlepage"><div><div><h3 class="title"> <a name="example-descr"></a>A.1.2. DESCR</h3></div></div></div> <pre class="programlisting"> @@ -10664,7 +10650,7 @@ improvements. Why you would want this when Berkeley <a class="citerefentry" hre of the NetBSD source tree is beyond me. </pre> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="A.1.3. PLIST"> <div class="titlepage"><div><div><h3 class="title"> <a name="example-plist"></a>A.1.3. PLIST</h3></div></div></div> <pre class="programlisting"> @@ -10675,7 +10661,7 @@ share/bison.simple share/bison.hairy </pre> </div> -<div class="sect2" lang="en"> +<div class="sect2" title="A.1.4. Checking a package with pkglint"> <div class="titlepage"><div><div><h3 class="title"> <a name="checking-package-with-pkglint"></a>A.1.4. Checking a package with <span class="command"><strong>pkglint</strong></span> </h3></div></div></div> @@ -10692,7 +10678,7 @@ looks fine.</pre> -Wall</strong></span> for a very thorough check.</p> </div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="A.2. Steps for building, installing, packaging"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="steps-for-b-i-p"></a>A.2. Steps for building, installing, packaging</h2></div></div></div> <p>Create the directory where the package lives, @@ -10801,7 +10787,7 @@ Creating gzip'd tar ball in '/u/pkgsrc/lang/bison/bison-1.25.tgz'</pre> ===> Cleaning for bison-1.25</pre> </div> </div> -<div class="appendix" lang="en"> +<div class="appendix" title="Appendix B. Build logs"> <div class="titlepage"><div><div><h2 class="title"> <a name="logs"></a>Appendix B. Build logs</h2></div></div></div> <div class="toc"> @@ -10811,7 +10797,7 @@ Creating gzip'd tar ball in '/u/pkgsrc/lang/bison/bison-1.25.tgz'</pre> <dt><span class="sect1"><a href="#logs.package">B.2. Packaging figlet</a></span></dt> </dl> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="B.1. Building figlet"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="logs.building"></a>B.1. Building figlet</h2></div></div></div> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make</code></strong> @@ -10903,7 +10889,7 @@ cp figlet.6 /usr/pkg/man/man6 ===> Registering installation for figlet-2.2.1nb2 <code class="prompt">#</code></pre> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="B.2. Packaging figlet"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="logs.package"></a>B.2. Packaging figlet</h2></div></div></div> <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make package</code></strong> @@ -10916,18 +10902,18 @@ Registering depends:. <code class="prompt">#</code></pre> </div> </div> -<div class="appendix" lang="en"> +<div class="appendix" title="Appendix C. Directory layout of the pkgsrc FTP server"> <div class="titlepage"><div><div><h2 class="title"> <a name="ftp-layout"></a>Appendix C. Directory layout of the pkgsrc FTP server</h2></div></div></div> <div class="toc"> <p><b>Table of Contents</b></p> <dl> -<dt><span class="sect1"><a href="#ftp-distfiles">C.1. distfiles: The distributed source files</a></span></dt> -<dt><span class="sect1"><a href="#ftp-misc">C.2. misc: Miscellaneous things</a></span></dt> -<dt><span class="sect1"><a href="#ftp-packages">C.3. packages: Binary packages</a></span></dt> -<dt><span class="sect1"><a href="#ftp-reports">C.4. reports: Bulk build reports</a></span></dt> -<dt><span class="sect1"><a href="#ftp-source">C.5. current, -pkgsrc-20xxQy: +<dt><span class="sect1"><a href="#ftp-distfiles">C.1. <code class="filename">distfiles</code>: The distributed source files</a></span></dt> +<dt><span class="sect1"><a href="#ftp-misc">C.2. <code class="filename">misc</code>: Miscellaneous things</a></span></dt> +<dt><span class="sect1"><a href="#ftp-packages">C.3. <code class="filename">packages</code>: Binary packages</a></span></dt> +<dt><span class="sect1"><a href="#ftp-reports">C.4. <code class="filename">reports</code>: Bulk build reports</a></span></dt> +<dt><span class="sect1"><a href="#ftp-source">C.5. <code class="filename">current</code>, +<code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>: source packages</a></span></dt> </dl> </div> @@ -10939,7 +10925,7 @@ source packages</a></span></dt> everything should look the same, no matter on which server you are. This directory contains some subdirectories, which are explained below.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="C.1. distfiles: The distributed source files"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="ftp-distfiles"></a>C.1. <code class="filename">distfiles</code>: The distributed source files</h2></div></div></div> <p>The directory <code class="filename">distfiles</code> contains lots @@ -10949,35 +10935,35 @@ source packages</a></span></dt> explicitly contain a version number or are otherwise too generic (for example <code class="filename">release.tar.gz</code>).</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="C.2. misc: Miscellaneous things"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="ftp-misc"></a>C.2. <code class="filename">misc</code>: Miscellaneous things</h2></div></div></div> <p>This directory contains things that individual pkgsrc developers find worth publishing.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="C.3. packages: Binary packages"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="ftp-packages"></a>C.3. <code class="filename">packages</code>: Binary packages</h2></div></div></div> <p>This directory contains binary packages for the various platforms that are supported by pkgsrc. Each subdirectory is of the form <em class="replaceable"><code>OPSYS</code></em>/<em class="replaceable"><code>ARCH</code></em>/<em class="replaceable"><code>OSVERSION_TAG</code></em>. The meaning of these variables is:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="varname">OPSYS</code> is the name of the +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="varname">OPSYS</code> is the name of the operating system for which the packages have been built. The name is taken from the output of the <span class="command"><strong>uname</strong></span> command, so it may differ from the one you are used to hear.</p></li> -<li><p><code class="varname">ARCH</code> is the hardware +<li class="listitem"><p><code class="varname">ARCH</code> is the hardware architecture of the platform for which the packages have been built. It also includes the <code class="varname">ABI</code> (Application Binary Interface) for platforms that have several of them.</p></li> -<li><p><code class="varname">OSVERSION</code> is the version of +<li class="listitem"><p><code class="varname">OSVERSION</code> is the version of the operating system. For version numbers that change often (for example NetBSD-current), the often-changing part should be replaced with an <code class="literal">x</code>, for example <code class="literal">4.99.x</code>.</p></li> -<li><p><code class="varname">TAG</code> is either +<li class="listitem"><p><code class="varname">TAG</code> is either <code class="literal">20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code> for a stable branch, or <code class="literal">head</code> for packages built from the HEAD branch. The latter should only be used when @@ -10999,19 +10985,19 @@ source packages</a></span></dt> Besides that, there are various category directories that contain symbolic links to the real binary packages.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="C.4. reports: Bulk build reports"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="ftp-reports"></a>C.4. <code class="filename">reports</code>: Bulk build reports</h2></div></div></div> <p>Here are the reports from bulk builds, for those who want to fix packages that didn't build on some of the platforms. The - structure of subdirectories should look like the one in <a class="xref" href="#ftp-packages" title="C.3. packages: Binary packages">Section C.3, “packages: Binary packages”</a>.</p> + structure of subdirectories should look like the one in <a class="xref" href="#ftp-packages" title="C.3. packages: Binary packages">Section C.3, “<code class="filename">packages</code>: Binary packages”</a>.</p> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="C.5. current, pkgsrc-20xxQy: source packages"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="ftp-source"></a>C.5. <code class="filename">current</code>, <code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>: source packages</h2></div></div></div> -<p>These directories contain the “<span class="quote">real</span>” pkgsrc, +<p>These directories contain the <span class="quote">“<span class="quote">real</span>”</span> pkgsrc, that is the files that define how to create binary packages from source archives.</p> <p>The directory <code class="filename">pkgsrc</code> contains a @@ -11024,7 +11010,7 @@ source packages</h2></div></div></div> which contains the state of pkgsrc when it was branched.</p> </div> </div> -<div class="appendix" lang="en"> +<div class="appendix" title="Appendix D. Editing guidelines for the pkgsrc guide"> <div class="titlepage"><div><div><h2 class="title"> <a name="editing"></a>Appendix D. Editing guidelines for the pkgsrc guide</h2></div></div></div> <div class="toc"> @@ -11036,54 +11022,54 @@ source packages</h2></div></div></div> </div> <p>This section contains information on editing the pkgsrc guide itself.</p> -<div class="sect1" lang="en"> +<div class="sect1" title="D.1. Make targets"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="targets"></a>D.1. Make targets</h2></div></div></div> <p>The pkgsrc guide's source code is stored in <code class="filename">pkgsrc/doc/guide/files</code>, and several files are created from it:</p> -<div class="itemizedlist"><ul type="disc"> -<li><p><code class="filename">pkgsrc/doc/pkgsrc.txt</code></p></li> -<li><p><code class="filename">pkgsrc/doc/pkgsrc.html</code></p></li> -<li><p><a class="ulink" href="http://www.NetBSD.org/docs/pkgsrc/" target="_top">http://www.NetBSD.org/docs/pkgsrc/</a></p></li> -<li><p><a class="ulink" href="http://www.NetBSD.org/docs/pkgsrc/pkgsrc.pdf" target="_top">http://www.NetBSD.org/docs/pkgsrc/pkgsrc.pdf</a>: +<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<li class="listitem"><p><code class="filename">pkgsrc/doc/pkgsrc.txt</code></p></li> +<li class="listitem"><p><code class="filename">pkgsrc/doc/pkgsrc.html</code></p></li> +<li class="listitem"><p><a class="ulink" href="http://www.NetBSD.org/docs/pkgsrc/" target="_top">http://www.NetBSD.org/docs/pkgsrc/</a></p></li> +<li class="listitem"><p><a class="ulink" href="http://www.NetBSD.org/docs/pkgsrc/pkgsrc.pdf" target="_top">http://www.NetBSD.org/docs/pkgsrc/pkgsrc.pdf</a>: The PDF version of the pkgsrc guide.</p></li> -<li><p><a class="ulink" href="http://www.NetBSD.org/docs/pkgsrc/pkgsrc.ps" target="_top">http://www.NetBSD.org/docs/pkgsrc/pkgsrc.ps</a>: +<li class="listitem"><p><a class="ulink" href="http://www.NetBSD.org/docs/pkgsrc/pkgsrc.ps" target="_top">http://www.NetBSD.org/docs/pkgsrc/pkgsrc.ps</a>: PostScript version of the pkgsrc guide.</p></li> </ul></div> </div> -<div class="sect1" lang="en"> +<div class="sect1" title="D.2. Procedure"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="procedure"></a>D.2. Procedure</h2></div></div></div> <p>The procedure to edit the pkgsrc guide is:</p> -<div class="procedure"><ol type="1"> -<li><p>Make sure you have the packages needed to +<div class="procedure"><ol class="procedure" type="1"> +<li class="step" title="Step 1"><p>Make sure you have the packages needed to regenerate the pkgsrc guide (and other XML-based NetBSD documentation) installed. These are <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/netbsd-doc/README.html" target="_top"><code class="filename">meta-pkgs/netbsd-doc</code></a> for creating the ASCII and HTML versions, and <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/netbsd-doc-print/README.html" target="_top"><code class="filename">meta-pkgs/netbsd-doc-print</code></a> for the PostScript and PDF versions. You will need both packages installed, to make sure documentation is consistent across all formats.</p></li> -<li><p>Run <span class="command"><strong>cd doc/guide</strong></span> to get to the +<li class="step" title="Step 2"><p>Run <span class="command"><strong>cd doc/guide</strong></span> to get to the right directory. All further steps will take place here.</p></li> -<li><p>Edit the XML file(s) in +<li class="step" title="Step 3"><p>Edit the XML file(s) in <code class="filename">files/</code>.</p></li> -<li><p>Run <span class="command"><strong>bmake</strong></span> to check the pkgsrc +<li class="step" title="Step 4"><p>Run <span class="command"><strong>bmake</strong></span> to check the pkgsrc guide for valid XML and to build the final output files. If you get any errors at this stage, you can just edit the files, as there are only symbolic links in the working directory, pointing to the files in <code class="filename">files/</code>.</p></li> -<li><p><span class="command"><strong>(cd files && cvs +<li class="step" title="Step 5"><p><span class="command"><strong>(cd files && cvs commit)</strong></span></p></li> -<li><p>Run <span class="command"><strong>bmake clean && bmake</strong></span> to +<li class="step" title="Step 6"><p>Run <span class="command"><strong>bmake clean && bmake</strong></span> to regenerate the output files with the proper RCS Ids.</p></li> -<li> +<li class="step" title="Step 7"> <p>Run <span class="command"><strong>bmake regen</strong></span> to install and commit the files in both <code class="filename">pkgsrc/doc</code> and <code class="filename">htdocs</code>.</p> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> +<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>If you have added, removed or renamed some chapters, you need to synchronize them using <span class="command"><strong>cvs add</strong></span> or diff --git a/doc/pkgsrc.txt b/doc/pkgsrc.txt index 6e662aab88e..f799b594ca7 100644 --- a/doc/pkgsrc.txt +++ b/doc/pkgsrc.txt @@ -48,8 +48,7 @@ I. The pkgsrc user's guide 2.1. Getting pkgsrc for the first time 2.1.1. As tar file - 2.1.2. Via SUP - 2.1.3. Via anonymous CVS + 2.1.2. Via anonymous CVS 2.2. Keeping pkgsrc up-to-date @@ -149,15 +148,16 @@ I. The pkgsrc user's guide 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.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? + 9.17. What does "Makefile appears to contain unresolved cvs/rcs/??? + merge conflicts" mean? II. The pkgsrc developer's guide @@ -304,7 +304,7 @@ II. The pkgsrc developer's guide 19.1. General operation 19.1.1. Portability of packages - 19.1.2. How to pull in user-settable variables from ??? + 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 @@ -341,7 +341,7 @@ II. The pkgsrc developer's guide 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.3. Undefined reference to "..." 19.5.4. Running out of memory 19.6. Fixing problems in the install phase @@ -584,6 +584,8 @@ Table 1.1. Platforms supported by pkgsrc |OSF/1 | Nov 2004 | |---------------------------------------------+------------------| |HP-UX | Apr 2007 | +|---------------------------------------------+------------------| +|Haiku | Sep 2010 | +----------------------------------------------------------------+ @@ -689,8 +691,7 @@ Table of Contents 2.1. Getting pkgsrc for the first time 2.1.1. As tar file - 2.1.2. Via SUP - 2.1.3. Via anonymous CVS + 2.1.2. Via anonymous CVS 2.2. Keeping pkgsrc up-to-date @@ -790,15 +791,15 @@ Table of Contents 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.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? + 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 @@ -807,8 +808,7 @@ Table of Contents 2.1. Getting pkgsrc for the first time 2.1.1. As tar file - 2.1.2. Via SUP - 2.1.3. Via anonymous CVS + 2.1.2. Via anonymous CVS 2.2. Keeping pkgsrc up-to-date @@ -832,7 +832,7 @@ of the stable branches are built from the year and the quarter, for example 2009Q1. The second step is to decide how you want to download pkgsrc. You can get it as -a tar file, via SUP, or via CVS. All three ways are described here. +a tar file or via CVS. Both ways are described here. 2.1.1. As tar file @@ -864,30 +864,35 @@ To download pkgsrc-current, run: $ ftp ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc.tar.gz -2.1.2. Via SUP +2.1.2. Via anonymous CVS + +To fetch a specific pkgsrc stable branch, run: -As an alternative to the tar file, you can get pkgsrc via the Software Update -Protocol, SUP. To do so, make sure your supfile has a line +$ cd /usr && cvs -q -z3 -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -r pkgsrc-20xxQy -P pkgsrc -release=pkgsrc +Where pkgsrc-20xxQy is the stable branch to be checked out, for example, +"pkgsrc-2009Q1" + +This will create the directory pkgsrc/ in your /usr/ directory and all the +package source will be stored under /usr/pkgsrc/. -in it, see the examples in /usr/share/examples/supfiles, and that the /usr/ -pkgsrc directory exists. Then, simply run: +To fetch the pkgsrc current branch, run: -$ sup -v /path/to/your/supfile. +$ cd /usr && cvs -q -z3 -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P pkgsrc -2.1.3. Via anonymous CVS +Refer to list of available CVS mirrors to choose faster one. -To do an initial (full) checkout of pkgsrc, you first have to set some -environment variables. For the C-Shell, type: +If you get error messages from rsh, you need to set CVS_RSH variable. E.g.: -% setenv CVSROOT anoncvs@anoncvs.NetBSD.org:/cvsroot -% setenv CVS_RSH ssh +$ cd /usr && env CVS_RSH=ssh cvs -q -z3 -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P pkgsrc -Or, the same for the bourne shell: +Refer to documentation on your command shell how to set CVS_RSH=ssh +permanently. For Bourne shells, you can set it in your .profile or better +globally in /etc/profile: -$ export CVSROOT="anoncvs@anoncvs.NetBSD.org:/cvsroot" -$ export CVS_RSH="ssh" +# set CVS remote shell command +CVS_RSH=ssh +export CVS_RSH By default, CVS doesn't do things like most people would expect it to do. But there is a way to convince CVS, by creating a file called .cvsrc in your home @@ -896,28 +901,12 @@ headache and some bug reports, so we strongly recommend it. You can find an explanation of this file in the CVS documentation. # recommended CVS configuration file from the pkgsrc guide +cvs -q -z3 checkout -P update -dP -release -d diff -upN -cvs -q -z3 rdiff -u - -To fetch a specific pkgsrc stable branch from scratch, run: - -$ cd /usr -$ cvs checkout -r pkgsrc-20xxQy -P pkgsrc - -Where pkgsrc-20xxQy is the stable branch to be checked out, for example, -"pkgsrc-2009Q1" - -This will create the directory pkgsrc/ in your /usr/ directory and all the -package source will be stored under /usr/pkgsrc/. - -To fetch the pkgsrc current branch, run: - -$ cd /usr -$ cvs checkout -P pkgsrc +release -d 2.2. Keeping pkgsrc up-to-date @@ -1060,8 +1049,10 @@ officially supported. (The main difference in 3.0/3.1 is lack of pthreads, but other parts of libc may also be lacking.) Services for Unix Applications (aka SUA) is an integrated component of Windows -Server 2003 R2 and Windows Vista. As of this writing, SUA's Interix 5.x -subsystem has not yet been tested with pkgsrc. +Server 2003 R2 (5.2), Windows Vista and Windows Server 2008 (6.0), Windows 7 +and Windows Server 2008 R2 (6.1). As of this writing, SUA's Interix 6.0 (32bit) +subsystem has been tested. 6.0 (64bit) and 6.1 (both 32bit and 64bit) may work. +Interix 5.x subsystem has not yet been tested with pkgsrc. 3.3.3.1. When installing Interix/SFU @@ -1492,11 +1483,7 @@ packages). In the directory from the last section, there is a subdirectory called All, which contains all the binary packages that are available for the platform, excluding those that may not be distributed via FTP or CDROM (depending on -which medium you are using). There may be an extra directory for packages -that have vulnerabilities and therefore are considered insecure to install -without checking the implications first. This method has been replaced by -setting CHECK_VULNERABILITIES=yes in pkg_install.conf so pkg_add will -complain about vulnerabilities, instead. +which medium you are using). To install packages directly from an FTP or HTTP server, run the following commands in a Bourne-compatible shell (be sure to su to root first): @@ -1519,6 +1506,10 @@ After these preparations, installing a package is very easy: Note that any prerequisite packages needed to run the package in question will be installed, too, assuming they are present where you install from. +Adding packages might install vulnerable packages. Thus you should run +pkg_admin audit regularly, especially after installing new packages, and verify +that the vulnerabilities are acceptable for your configuration. + After you've installed packages, be sure to have /usr/pkg/bin and /usr/pkg/sbin in your PATH so you can actually start the just installed program. @@ -1967,8 +1958,7 @@ CFLAGS+= -your -flags Using CFLAGS= (i.e. without the "+") may lead to problems with packages that need to add their own flags. You may want to take a look at the devel/cpuflags -package if you're interested in optimization for the current CPU. Setting -USE_CPUFLAGS to yes in mk.conf will cause pkgsrc to automatically use cpuflags. +package if you're interested in optimization specifically for the current CPU. 5.4.3. Additional flags to the linker (LDFLAGS) @@ -2232,9 +2222,8 @@ Some other options are scattered in the pkgsrc infrastructure: * ALLOW_VULNERABLE_PACKAGES should be set to yes. The purpose of the bulk builds is creating binary packages, no matter if they are vulnerable or - not. Leaving this variable unset would prevent the bulk build system - from even trying to build them, so possible building errors would not - show up. + not. Leaving this variable unset would prevent the bulk build system from + even trying to build them, so possible building errors would not show up. * CHECK_FILES (pkgsrc/mk/check/check-files.mk) can be set to "yes" to check that the installed set of files matches the PLIST. @@ -2413,7 +2402,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 7.3.1.2, "???". +11. Edit mk.conf, see Section 7.3.1.2, "mk.conf". 12. Adjust mk/bulk/build.conf to suit your needs. @@ -2778,15 +2767,15 @@ Table of Contents 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.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? +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 @@ -2858,8 +2847,7 @@ Utilities used by pkgsrc (not automatically installed): * pkgtools/xpkgwedge: Put X11 packages someplace else (enabled by default). * devel/cpuflags: Determine the best compiler flags to optimise code for your - current CPU and compiler. Setting USE_CPUFLAGS to yes in mk.conf will cause - pkgsrc to automatically use cpuflags. + current CPU and compiler. Utilities for keeping track of installed packages, being up to date, etc: @@ -3077,9 +3065,9 @@ following two tools (installed as part of the pkgtools/pkg_install package): ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities 2. pkg_admin audit, an easy way to audit the current machine, checking each - vulnerability which is known. If a vulnerable package is installed, it will - be shown by output to stdout, including a description of the type of - vulnerability, and a URL containing more information. + known vulnerability. If a vulnerable package is installed, it will be shown + by output to stdout, including a description of the type of vulnerability, + and a URL containing more information. Use of these tools is strongly recommended! After "pkg_install" is installed, please read the package's message, which you can get by running pkg_info -D @@ -3283,7 +3271,7 @@ Table of Contents 19.1. General operation 19.1.1. Portability of packages - 19.1.2. How to pull in user-settable variables from ??? + 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 @@ -3319,7 +3307,7 @@ Table of Contents 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.3. Undefined reference to "..." 19.5.4. Running out of memory 19.6. Fixing problems in the install phase @@ -3848,9 +3836,9 @@ patches directory (see Section 11.3, "patches/*"). To regenerate the distinfo file, use the make makedistinfo or make mdi command. Some packages have different sets of distfiles depending on the platform, for -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. +example lang/openjdk7. 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. 11.3. patches/* @@ -6386,7 +6374,7 @@ Table of Contents 19.1. General operation 19.1.1. Portability of packages - 19.1.2. How to pull in user-settable variables from ??? + 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 @@ -6422,7 +6410,7 @@ Table of Contents 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.3. Undefined reference to "..." 19.5.4. Running out of memory 19.6. Fixing problems in the install phase |