Thu Mar 5 13:12:10 2009 UTC ()
regen


(imil)
diff -r1.117 -r1.118 pkgsrc/doc/pkgsrc.html
diff -r1.118 -r1.119 pkgsrc/doc/pkgsrc.txt

cvs diff -r1.117 -r1.118 pkgsrc/doc/pkgsrc.html (expand / switch to unified diff)

--- pkgsrc/doc/pkgsrc.html 2009/02/17 06:17:55 1.117
+++ pkgsrc/doc/pkgsrc.html 2009/03/05 13:12:10 1.118
@@ -177,26 +177,27 @@ builds) @@ -177,26 +177,27 @@ builds)
177<dt><span class="sect1"><a href="#ufaq-cflags">9.15. Why do some packages ignore my CFLAGS?</a></span></dt> 177<dt><span class="sect1"><a href="#ufaq-cflags">9.15. Why do some packages ignore my CFLAGS?</a></span></dt>
178<dt><span class="sect1"><a href="#ufaq-fail">9.16. A package does not build. What shall I do?</a></span></dt> 178<dt><span class="sect1"><a href="#ufaq-fail">9.16. A package does not build. What shall I do?</a></span></dt>
179<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> 179<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>
180</dl></dd> 180</dl></dd>
181</dl></dd> 181</dl></dd>
182<dt><span class="part"><a href="#developers-guide">II. The pkgsrc developer's guide</a></span></dt> 182<dt><span class="part"><a href="#developers-guide">II. The pkgsrc developer's guide</a></span></dt>
183<dd><dl> 183<dd><dl>
184<dt><span class="chapter"><a href="#creating">10. Creating a new pkgsrc package from scratch</a></span></dt> 184<dt><span class="chapter"><a href="#creating">10. Creating a new pkgsrc package from scratch</a></span></dt>
185<dd><dl> 185<dd><dl>
186<dt><span class="sect1"><a href="#creating.common">10.1. Common types of packages</a></span></dt> 186<dt><span class="sect1"><a href="#creating.common">10.1. Common types of packages</a></span></dt>
187<dd><dl> 187<dd><dl>
188<dt><span class="sect2"><a href="#creating.perl-module">10.1.1. Perl modules</a></span></dt> 188<dt><span class="sect2"><a href="#creating.perl-module">10.1.1. Perl modules</a></span></dt>
189<dt><span class="sect2"><a href="#creating.kde-app">10.1.2. KDE applications</a></span></dt> 189<dt><span class="sect2"><a href="#creating.kde-app">10.1.2. KDE applications</a></span></dt>
 190<dt><span class="sect2"><a href="#creating.python-module">10.1.3. Python modules and programs</a></span></dt>
190</dl></dd> 191</dl></dd>
191<dt><span class="sect1"><a href="#creating.examples">10.2. Examples</a></span></dt> 192<dt><span class="sect1"><a href="#creating.examples">10.2. Examples</a></span></dt>
192<dd><dl><dt><span class="sect2"><a href="#creating.nvu">10.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd> 193<dd><dl><dt><span class="sect2"><a href="#creating.nvu">10.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
193</dl></dd> 194</dl></dd>
194<dt><span class="chapter"><a href="#components">11. Package components - files, directories and contents</a></span></dt> 195<dt><span class="chapter"><a href="#components">11. Package components - files, directories and contents</a></span></dt>
195<dd><dl> 196<dd><dl>
196<dt><span class="sect1"><a href="#components.Makefile">11.1. Makefile</a></span></dt> 197<dt><span class="sect1"><a href="#components.Makefile">11.1. Makefile</a></span></dt>
197<dt><span class="sect1"><a href="#components.distinfo">11.2. distinfo</a></span></dt> 198<dt><span class="sect1"><a href="#components.distinfo">11.2. distinfo</a></span></dt>
198<dt><span class="sect1"><a href="#components.patches">11.3. patches/*</a></span></dt> 199<dt><span class="sect1"><a href="#components.patches">11.3. patches/*</a></span></dt>
199<dd><dl> 200<dd><dl>
200<dt><span class="sect2"><a href="#components.patch.structure">11.3.1. Structure of a single patch file</a></span></dt> 201<dt><span class="sect2"><a href="#components.patch.structure">11.3.1. Structure of a single patch file</a></span></dt>
201<dt><span class="sect2"><a href="#components.patches.caveats">11.3.2. Creating patch files</a></span></dt> 202<dt><span class="sect2"><a href="#components.patches.caveats">11.3.2. Creating patch files</a></span></dt>
202<dt><span class="sect2"><a href="#components.patches.sources">11.3.3. Sources where the patch files come from</a></span></dt> 203<dt><span class="sect2"><a href="#components.patches.sources">11.3.3. Sources where the patch files come from</a></span></dt>
@@ -2224,26 +2225,73 @@ works.

 @@ -2224,26 +2225,73 @@ works.

2224 get the full support with fallback to basic 2225 get the full support with fallback to basic
2225 support. <code class="varname">USE_DESTDIR=full</code> needs <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> version 20070802 (or 2226 support. <code class="varname">USE_DESTDIR=full</code> needs <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> version 20070802 (or
2226 newer). It might become the default DESTDIR support later.</p> 2227 newer). It might become the default DESTDIR support later.</p>
2227<p>DESTDIR support changes the behaviour of various targets 2228<p>DESTDIR support changes the behaviour of various targets
2228 slightly. To install a package after building it, use 2229 slightly. To install a package after building it, use
2229 <code class="literal">package-install</code>. <code class="literal">package</code> and 2230 <code class="literal">package-install</code>. <code class="literal">package</code> and
2230 <code class="literal">install</code> don't do that any 2231 <code class="literal">install</code> don't do that any
2231 longer. <code class="literal">package-install</code> can be used as 2232 longer. <code class="literal">package-install</code> can be used as
2232 <code class="varname">DEPENDS_TARGET</code>. <code class="literal">bin-install</code> 2233 <code class="varname">DEPENDS_TARGET</code>. <code class="literal">bin-install</code>
2233 will ask for the root password to install the package and fail, 2234 will ask for the root password to install the package and fail,
2234 <code class="literal">package-install</code> will ask again.</p> 2235 <code class="literal">package-install</code> will ask again.</p>
2235<p>With basic DESTDIR support, <strong class="userinput"><code>make 2236<p>With basic DESTDIR support, <strong class="userinput"><code>make
2236 clean</code></strong> needs to be run as root.</p> 2237 clean</code></strong> needs to be run as root.</p>
 2238<p>Considering the <code class="filename">foo/bar</code> package,
 2239 DESTDIR full support can be tested using the following commands
 2240
 2241</p>
 2242<pre class="programlisting">
 2243<code class="prompt">$</code> id
 2244uid=1000(myusername) gid=100(users) groups=100(users),0(wheel)
 2245<code class="prompt">$</code> mkdir $HOME/packages
 2246<code class="prompt">$</code> cd $PKGSRCDIR/foo/bar
 2247</pre>
 2248<p>
 2249
 2250 Verify <code class="varname">DESTDIR</code> full support, no root privileges
 2251 should be needed
 2252
 2253</p>
 2254<pre class="programlisting">
 2255<code class="prompt">$</code> make USE_DESTDIR=full install
 2256</pre>
 2257<p>
 2258
 2259 Create a package without root privileges
 2260
 2261</p>
 2262<pre class="programlisting">
 2263<code class="prompt">$</code> make USE_DESTDIR=full PACKAGES=$HOME/packages package
 2264</pre>
 2265<p>
 2266
 2267 For the following command, you must be able to gain root
 2268 privileges using <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?su+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">su</span>(1)</span></a>
 2269
 2270</p>
 2271<pre class="programlisting">
 2272<code class="prompt">$</code> make USE_DESTDIR=full PACKAGES=$HOME/packages package-install
 2273</pre>
 2274<p>
 2275
 2276 Then, as a simple user
 2277
 2278</p>
 2279<pre class="programlisting">
 2280<code class="prompt">$</code> make clean
 2281</pre>
 2282<p>
 2283
 2284 </p>
2237</div> 2285</div>
2238<div class="sect1" lang="en"> 2286<div class="sect1" lang="en">
2239<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 2287<div class="titlepage"><div><div><h2 class="title" style="clear: both">
2240<a name="conf.compiler"></a>5.4. Selecting and configuring the compiler</h2></div></div></div> 2288<a name="conf.compiler"></a>5.4. Selecting and configuring the compiler</h2></div></div></div>
2241<div class="sect2" lang="en"> 2289<div class="sect2" lang="en">
2242<div class="titlepage"><div><div><h3 class="title"> 2290<div class="titlepage"><div><div><h3 class="title">
2243<a name="selecting-the-compiler"></a>5.4.1. Selecting the compiler</h3></div></div></div> 2291<a name="selecting-the-compiler"></a>5.4.1. Selecting the compiler</h3></div></div></div>
2244<p>By default, pkgsrc will use GCC to build packages. This may be 2292<p>By default, pkgsrc will use GCC to build packages. This may be
2245 overridden by setting the following variables in /etc/mk.conf:</p> 2293 overridden by setting the following variables in /etc/mk.conf:</p>
2246<div class="variablelist"><dl> 2294<div class="variablelist"><dl>
2247<dt><span class="term"><code class="varname">PKGSRC_COMPILER</code>:</span></dt> 2295<dt><span class="term"><code class="varname">PKGSRC_COMPILER</code>:</span></dt>
2248<dd> 2296<dd>
2249<p>This is a list of values specifying the chain of 2297<p>This is a list of values specifying the chain of
@@ -3617,26 +3665,27 @@ anymore, you can remove that file and ru @@ -3617,26 +3665,27 @@ anymore, you can remove that file and ru
3617<p>This part of the book deals with creating and 3665<p>This part of the book deals with creating and
3618 modifying packages. It starts with a &#8220;<span class="quote">HOWTO</span>&#8221;-like 3666 modifying packages. It starts with a &#8220;<span class="quote">HOWTO</span>&#8221;-like
3619 guide on creating a new package. The remaining chapters are more 3667 guide on creating a new package. The remaining chapters are more
3620 like a reference manual for pkgsrc.</p> 3668 like a reference manual for pkgsrc.</p>
3621<div class="toc"> 3669<div class="toc">
3622<p><b>Table of Contents</b></p> 3670<p><b>Table of Contents</b></p>
3623<dl> 3671<dl>
3624<dt><span class="chapter"><a href="#creating">10. Creating a new pkgsrc package from scratch</a></span></dt> 3672<dt><span class="chapter"><a href="#creating">10. Creating a new pkgsrc package from scratch</a></span></dt>
3625<dd><dl> 3673<dd><dl>
3626<dt><span class="sect1"><a href="#creating.common">10.1. Common types of packages</a></span></dt> 3674<dt><span class="sect1"><a href="#creating.common">10.1. Common types of packages</a></span></dt>
3627<dd><dl> 3675<dd><dl>
3628<dt><span class="sect2"><a href="#creating.perl-module">10.1.1. Perl modules</a></span></dt> 3676<dt><span class="sect2"><a href="#creating.perl-module">10.1.1. Perl modules</a></span></dt>
3629<dt><span class="sect2"><a href="#creating.kde-app">10.1.2. KDE applications</a></span></dt> 3677<dt><span class="sect2"><a href="#creating.kde-app">10.1.2. KDE applications</a></span></dt>
 3678<dt><span class="sect2"><a href="#creating.python-module">10.1.3. Python modules and programs</a></span></dt>
3630</dl></dd> 3679</dl></dd>
3631<dt><span class="sect1"><a href="#creating.examples">10.2. Examples</a></span></dt> 3680<dt><span class="sect1"><a href="#creating.examples">10.2. Examples</a></span></dt>
3632<dd><dl><dt><span class="sect2"><a href="#creating.nvu">10.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd> 3681<dd><dl><dt><span class="sect2"><a href="#creating.nvu">10.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
3633</dl></dd> 3682</dl></dd>
3634<dt><span class="chapter"><a href="#components">11. Package components - files, directories and contents</a></span></dt> 3683<dt><span class="chapter"><a href="#components">11. Package components - files, directories and contents</a></span></dt>
3635<dd><dl> 3684<dd><dl>
3636<dt><span class="sect1"><a href="#components.Makefile">11.1. Makefile</a></span></dt> 3685<dt><span class="sect1"><a href="#components.Makefile">11.1. Makefile</a></span></dt>
3637<dt><span class="sect1"><a href="#components.distinfo">11.2. distinfo</a></span></dt> 3686<dt><span class="sect1"><a href="#components.distinfo">11.2. distinfo</a></span></dt>
3638<dt><span class="sect1"><a href="#components.patches">11.3. patches/*</a></span></dt> 3687<dt><span class="sect1"><a href="#components.patches">11.3. patches/*</a></span></dt>
3639<dd><dl> 3688<dd><dl>
3640<dt><span class="sect2"><a href="#components.patch.structure">11.3.1. Structure of a single patch file</a></span></dt> 3689<dt><span class="sect2"><a href="#components.patch.structure">11.3.1. Structure of a single patch file</a></span></dt>
3641<dt><span class="sect2"><a href="#components.patches.caveats">11.3.2. Creating patch files</a></span></dt> 3690<dt><span class="sect2"><a href="#components.patches.caveats">11.3.2. Creating patch files</a></span></dt>
3642<dt><span class="sect2"><a href="#components.patches.sources">11.3.3. Sources where the patch files come from</a></span></dt> 3691<dt><span class="sect2"><a href="#components.patches.sources">11.3.3. Sources where the patch files come from</a></span></dt>
@@ -3841,26 +3890,27 @@ anymore, you can remove that file and ru @@ -3841,26 +3890,27 @@ anymore, you can remove that file and ru
3841</dl> 3890</dl>
3842</div> 3891</div>
3843</div> 3892</div>
3844<div class="chapter" lang="en"> 3893<div class="chapter" lang="en">
3845<div class="titlepage"><div><div><h2 class="title"> 3894<div class="titlepage"><div><div><h2 class="title">
3846<a name="creating"></a>Chapter 10. Creating a new pkgsrc package from scratch</h2></div></div></div> 3895<a name="creating"></a>Chapter 10. Creating a new pkgsrc package from scratch</h2></div></div></div>
3847<div class="toc"> 3896<div class="toc">
3848<p><b>Table of Contents</b></p> 3897<p><b>Table of Contents</b></p>
3849<dl> 3898<dl>
3850<dt><span class="sect1"><a href="#creating.common">10.1. Common types of packages</a></span></dt> 3899<dt><span class="sect1"><a href="#creating.common">10.1. Common types of packages</a></span></dt>
3851<dd><dl> 3900<dd><dl>
3852<dt><span class="sect2"><a href="#creating.perl-module">10.1.1. Perl modules</a></span></dt> 3901<dt><span class="sect2"><a href="#creating.perl-module">10.1.1. Perl modules</a></span></dt>
3853<dt><span class="sect2"><a href="#creating.kde-app">10.1.2. KDE applications</a></span></dt> 3902<dt><span class="sect2"><a href="#creating.kde-app">10.1.2. KDE applications</a></span></dt>
 3903<dt><span class="sect2"><a href="#creating.python-module">10.1.3. Python modules and programs</a></span></dt>
3854</dl></dd> 3904</dl></dd>
3855<dt><span class="sect1"><a href="#creating.examples">10.2. Examples</a></span></dt> 3905<dt><span class="sect1"><a href="#creating.examples">10.2. Examples</a></span></dt>
3856<dd><dl><dt><span class="sect2"><a href="#creating.nvu">10.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd> 3906<dd><dl><dt><span class="sect2"><a href="#creating.nvu">10.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
3857</dl> 3907</dl>
3858</div> 3908</div>
3859<p>When you find a package that is not yet in pkgsrc, you 3909<p>When you find a package that is not yet in pkgsrc, you
3860most likely have a URL from where you can download the source 3910most likely have a URL from where you can download the source
3861code. Starting with this URL, creating a package involves only a 3911code. Starting with this URL, creating a package involves only a
3862few steps.</p> 3912few steps.</p>
3863<div class="procedure"><ol type="1"> 3913<div class="procedure"><ol type="1">
3864<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> 3914<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>
3865<li><p>Then, choose one of the top-level directories as the 3915<li><p>Then, choose one of the top-level directories as the
3866category in which you want to place your package. You can also create a 3916category in which you want to place your package. You can also create a
@@ -3945,26 +3995,74 @@ package from the set of installed files. @@ -3945,26 +3995,74 @@ package from the set of installed files.
3945<div class="sect2" lang="en"> 3995<div class="sect2" lang="en">
3946<div class="titlepage"><div><div><h3 class="title"> 3996<div class="titlepage"><div><div><h3 class="title">
3947<a name="creating.perl-module"></a>10.1.1. Perl modules</h3></div></div></div> 3997<a name="creating.perl-module"></a>10.1.1. Perl modules</h3></div></div></div>
3948<p>Simple Perl modules are handled automatically by 3998<p>Simple Perl modules are handled automatically by
3949<span class="command"><strong>url2pkg</strong></span>, including dependencies.</p> 3999<span class="command"><strong>url2pkg</strong></span>, including dependencies.</p>
3950</div> 4000</div>
3951<div class="sect2" lang="en"> 4001<div class="sect2" lang="en">
3952<div class="titlepage"><div><div><h3 class="title"> 4002<div class="titlepage"><div><div><h3 class="title">
3953<a name="creating.kde-app"></a>10.1.2. KDE applications</h3></div></div></div> 4003<a name="creating.kde-app"></a>10.1.2. KDE applications</h3></div></div></div>
3954<p>KDE applications should always include 4004<p>KDE applications should always include
3955<code class="filename">meta-pkgs/kde3/kde3.mk</code>, which contains numerous 4005<code class="filename">meta-pkgs/kde3/kde3.mk</code>, which contains numerous
3956settings that are typical of KDE packages.</p> 4006settings that are typical of KDE packages.</p>
3957</div> 4007</div>
 4008<div class="sect2" lang="en">
 4009<div class="titlepage"><div><div><h3 class="title">
 4010<a name="creating.python-module"></a>10.1.3. Python modules and programs</h3></div></div></div>
 4011<p>Python modules and programs packages are easily created using a
 4012set of predefined variables.</p>
 4013<p>Most Python packages use either &#8220;<span class="quote">distutils</span>&#8221; or
 4014easy-setup (&#8220;<span class="quote">eggs</span>&#8221;).
 4015If the software uses &#8220;<span class="quote">distutils</span>&#8221;, set the
 4016<code class="varname">PYDISTUTILSPKG</code> variable to &#8220;<span class="quote">yes</span>&#8221; so
 4017pkgsrc will make use of this framework.
 4018&#8220;<span class="quote">distutils</span>&#8221; uses a script called <code class="filename">setup.py</code>,
 4019if the &#8220;<span class="quote">distutils</span>&#8221; driver is not called
 4020<code class="filename">setup.py</code>, set the <code class="varname">PYSETUP</code> variable
 4021to the name of the script.</p>
 4022<p>
 4023If the default Python versions are not supported by the software, set the
 4024<code class="varname">PYTHON_VERSIONS_ACCEPTED</code> variable to the Python versions
 4025the software is known to work with, from the most recent to the older
 4026one, e.g.
 4027</p>
 4028<pre class="programlisting">
 4029PYTHON_VERSIONS_ACCEPTED= 25 24 23
 4030</pre>
 4031<p>
 4032If the packaged software is a Python module, include
 4033&#8220;<span class="quote"><code class="filename">../../lang/python/extension.mk</code></span>&#8221;.
 4034In this case, the package directory should be called
 4035&#8220;<span class="quote">py-software</span>&#8221; and <code class="varname">PKGNAME</code> should be set to
 4036&#8220;<span class="quote">${PYPKGPREFIX}-${DISTNAME}</span>&#8221;, e.g.
 4037</p>
 4038<pre class="programlisting">
 4039DISTNAME= foopymodule-1.2.10
 4040PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
 4041</pre>
 4042<p>If it is an application, also include
 4043&#8220;<span class="quote"><code class="filename">../../lang/python/application.mk</code></span>&#8221;
 4044before &#8220;<span class="quote">extension.mk</span>&#8221;.</p>
 4045<p>If the packaged software, either it is an application or a module, is
 4046egg-aware, you only need to include
 4047&#8220;<span class="quote"><code class="filename">../../lang/python/egg.mk</code></span>&#8221;.</p>
 4048<p>In order to correctly set the path to the Python interpreter, use the
 4049<code class="varname">REPLACE_PYTHON</code> variable and set it to the list of files
 4050that must be corrected. For example :
 4051</p>
 4052<pre class="programlisting">
 4053REPLACE_PYTHON= ${WRKSRC}/*.py
 4054</pre>
 4055</div>
3958</div> 4056</div>
3959<div class="sect1" lang="en"> 4057<div class="sect1" lang="en">
3960<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4058<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3961<a name="creating.examples"></a>10.2. Examples</h2></div></div></div> 4059<a name="creating.examples"></a>10.2. Examples</h2></div></div></div>
3962<div class="sect2" lang="en"> 4060<div class="sect2" lang="en">
3963<div class="titlepage"><div><div><h3 class="title"> 4061<div class="titlepage"><div><div><h3 class="title">
3964<a name="creating.nvu"></a>10.2.1. How the www/nvu package came into pkgsrc</h3></div></div></div> 4062<a name="creating.nvu"></a>10.2.1. How the www/nvu package came into pkgsrc</h3></div></div></div>
3965<div class="sect3" lang="en"> 4063<div class="sect3" lang="en">
3966<div class="titlepage"><div><div><h4 class="title"> 4064<div class="titlepage"><div><div><h4 class="title">
3967<a name="creating.nvu.init"></a>10.2.1.1. The initial package</h4></div></div></div> 4065<a name="creating.nvu.init"></a>10.2.1.1. The initial package</h4></div></div></div>
3968<p>Looking at the file <code class="filename">pkgsrc/doc/TODO</code>, I saw 4066<p>Looking at the file <code class="filename">pkgsrc/doc/TODO</code>, I saw
3969that the &#8220;<span class="quote">nvu</span>&#8221; package has not yet been imported into 4067that the &#8220;<span class="quote">nvu</span>&#8221; package has not yet been imported into
3970pkgsrc. As the description says it has to do with the web, the obvious 4068pkgsrc. As the description says it has to do with the web, the obvious
@@ -7526,48 +7624,48 @@ TOOLS_PLATFORM.true?= true  @@ -7526,48 +7624,48 @@ TOOLS_PLATFORM.true?= true
7526<dt>18.4.2. <a href="#tools.listall">How do I get a list of all available 7624<dt>18.4.2. <a href="#tools.listall">How do I get a list of all available
7527 tools?</a> 7625 tools?</a>
7528</dt> 7626</dt>
7529<dt>18.4.3. <a href="#tools.used">How can I get a list of all the tools that a 7627<dt>18.4.3. <a href="#tools.used">How can I get a list of all the tools that a
7530 package is using while being built? I want to know whether it 7628 package is using while being built? I want to know whether it
7531 uses sed or not.</a> 7629 uses sed or not.</a>
7532</dt> 7630</dt>
7533</dl> 7631</dl>
7534<table border="0" summary="Q and A Set"> 7632<table border="0" summary="Q and A Set">
7535<col align="left" width="1%"> 7633<col align="left" width="1%">
7536<tbody> 7634<tbody>
7537<tr class="question"> 7635<tr class="question">
7538<td align="left" valign="top"> 7636<td align="left" valign="top">
7539<a name="tools.new"></a><a name="id9503691"></a><p><b>18.4.1.</b></p> 7637<a name="tools.new"></a><a name="id52054999"></a><p><b>18.4.1.</b></p>
7540</td> 7638</td>
7541<td align="left" valign="top"><p>How do I add a new tool?</p></td> 7639<td align="left" valign="top"><p>How do I add a new tool?</p></td>
7542</tr> 7640</tr>
7543<tr class="answer"> 7641<tr class="answer">
7544<td align="left" valign="top"></td> 7642<td align="left" valign="top"></td>
7545<td align="left" valign="top"><p>TODO</p></td> 7643<td align="left" valign="top"><p>TODO</p></td>
7546</tr> 7644</tr>
7547<tr class="question"> 7645<tr class="question">
7548<td align="left" valign="top"> 7646<td align="left" valign="top">
7549<a name="tools.listall"></a><a name="id9503700"></a><p><b>18.4.2.</b></p> 7647<a name="tools.listall"></a><a name="id52055008"></a><p><b>18.4.2.</b></p>
7550</td> 7648</td>
7551<td align="left" valign="top"><p>How do I get a list of all available 7649<td align="left" valign="top"><p>How do I get a list of all available
7552 tools?</p></td> 7650 tools?</p></td>
7553</tr> 7651</tr>
7554<tr class="answer"> 7652<tr class="answer">
7555<td align="left" valign="top"></td> 7653<td align="left" valign="top"></td>
7556<td align="left" valign="top"><p>TODO</p></td> 7654<td align="left" valign="top"><p>TODO</p></td>
7557</tr> 7655</tr>
7558<tr class="question"> 7656<tr class="question">
7559<td align="left" valign="top"> 7657<td align="left" valign="top">
7560<a name="tools.used"></a><a name="id9503708"></a><p><b>18.4.3.</b></p> 7658<a name="tools.used"></a><a name="id52055016"></a><p><b>18.4.3.</b></p>
7561</td> 7659</td>
7562<td align="left" valign="top"><p>How can I get a list of all the tools that a 7660<td align="left" valign="top"><p>How can I get a list of all the tools that a
7563 package is using while being built? I want to know whether it 7661 package is using while being built? I want to know whether it
7564 uses sed or not.</p></td> 7662 uses sed or not.</p></td>
7565</tr> 7663</tr>
7566<tr class="answer"> 7664<tr class="answer">
7567<td align="left" valign="top"></td> 7665<td align="left" valign="top"></td>
7568<td align="left" valign="top"><p>Currently, you can't. (TODO: But I want to be able 7666<td align="left" valign="top"><p>Currently, you can't. (TODO: But I want to be able
7569 to do it.)</p></td> 7667 to do it.)</p></td>
7570</tr> 7668</tr>
7571</tbody> 7669</tbody>
7572</table> 7670</table>
7573</div> 7671</div>
@@ -8813,30 +8911,27 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2 @@ -8813,30 +8911,27 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
8813 install as non-root user (&#8220;<span class="quote">user-destdir</span>&#8221;).</p> 8911 install as non-root user (&#8220;<span class="quote">user-destdir</span>&#8221;).</p>
8814<div class="itemizedlist"><ul type="disc"> 8912<div class="itemizedlist"><ul type="disc">
8815<li><p><code class="varname">PKG_DESTDIR_SUPPORT</code> has to be 8913<li><p><code class="varname">PKG_DESTDIR_SUPPORT</code> has to be
8816 set to &#8220;<span class="quote">destdir</span>&#8221; or &#8220;<span class="quote">user-destdir</span>&#8221;. If 8914 set to &#8220;<span class="quote">destdir</span>&#8221; or &#8220;<span class="quote">user-destdir</span>&#8221;. If
8817 bsd.prefs.mk is included in the Makefile, 8915 bsd.prefs.mk is included in the Makefile,
8818 <code class="varname">PKG_DESTDIR_SUPPORT</code> needs to be set before 8916 <code class="varname">PKG_DESTDIR_SUPPORT</code> needs to be set before
8819 the inclusion.</p></li> 8917 the inclusion.</p></li>
8820<li><p>All installation operations have to be prefixed with 8918<li><p>All installation operations have to be prefixed with
8821 <code class="filename">${DESTDIR}</code>.</p></li> 8919 <code class="filename">${DESTDIR}</code>.</p></li>
8822<li><p>automake gets this DESTDIR mostly right 8920<li><p>automake gets this DESTDIR mostly right
8823 automatically. Many manual rules and pre/post-install often are 8921 automatically. Many manual rules and pre/post-install often are
8824 incorrect; fix them.</p></li> 8922 incorrect; fix them.</p></li>
8825<li><p>If files are installed with special owner/group 8923<li><p>If files are installed with special owner/group
8826 either use @owner/@group in the <code class="filename">PLIST</code> 8924 use <code class="varname">SPECIAL_PERMS</code>.</p></li>
8827 (preferred) or use <code class="varname">SPECIAL_PERMS</code> 
8828 (discouraged). Note that @owner/@group are sticky during 
8829 install, keep this in mind.</p></li> 
8830<li><p>In general, packages should support 8925<li><p>In general, packages should support
8831 <code class="varname">UNPRIVILEGED</code> to be able to use 8926 <code class="varname">UNPRIVILEGED</code> to be able to use
8832 DESTDIR.</p></li> 8927 DESTDIR.</p></li>
8833</ul></div> 8928</ul></div>
8834</div> 8929</div>
8835<div class="sect2" lang="en"> 8930<div class="sect2" lang="en">
8836<div class="titlepage"><div><div><h3 class="title"> 8931<div class="titlepage"><div><div><h3 class="title">
8837<a name="hardcoded-paths"></a>19.6.5. Packages with hardcoded paths to other interpreters</h3></div></div></div> 8932<a name="hardcoded-paths"></a>19.6.5. Packages with hardcoded paths to other interpreters</h3></div></div></div>
8838<p>Your package may also contain scripts with hardcoded paths to 8933<p>Your package may also contain scripts with hardcoded paths to
8839 other interpreters besides (or as well as) perl. To correct the 8934 other interpreters besides (or as well as) perl. To correct the
8840 full pathname to the script interpreter, you need to set the 8935 full pathname to the script interpreter, you need to set the
8841 following definitions in your <code class="filename">Makefile</code> (we 8936 following definitions in your <code class="filename">Makefile</code> (we
8842 shall use <span class="command"><strong>tclsh</strong></span> in this example):</p> 8937 shall use <span class="command"><strong>tclsh</strong></span> in this example):</p>
@@ -9561,157 +9656,157 @@ place.

 @@ -9561,157 +9656,157 @@ place.

9561</dt> 9656</dt>
9562<dt>22.8. <a href="#devfaq.documentation">Where is the pkgsrc 9657<dt>22.8. <a href="#devfaq.documentation">Where is the pkgsrc
9563 documentation?</a> 9658 documentation?</a>
9564</dt> 9659</dt>
9565<dt>22.9. <a href="#devfaq.too-much-time">I have a little time to kill. What shall I 9660<dt>22.9. <a href="#devfaq.too-much-time">I have a little time to kill. What shall I
9566do?</a> 9661do?</a>
9567</dt> 9662</dt>
9568</dl> 9663</dl>
9569<table border="0" summary="Q and A Set"> 9664<table border="0" summary="Q and A Set">
9570<col align="left" width="1%"> 9665<col align="left" width="1%">
9571<tbody> 9666<tbody>
9572<tr class="question"> 9667<tr class="question">
9573<td align="left" valign="top"> 9668<td align="left" valign="top">
9574<a name="devfaq.makeflags"></a><a name="id9508238"></a><p><b>22.1.</b></p> 9669<a name="devfaq.makeflags"></a><a name="id52059900"></a><p><b>22.1.</b></p>
9575</td> 9670</td>
9576<td align="left" valign="top"><p>What is the difference between 9671<td align="left" valign="top"><p>What is the difference between
9577 <code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and 9672 <code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and
9578 <code class="varname">MAKE_FLAGS</code>?</p></td> 9673 <code class="varname">MAKE_FLAGS</code>?</p></td>
9579</tr> 9674</tr>
9580<tr class="answer"> 9675<tr class="answer">
9581<td align="left" valign="top"></td> 9676<td align="left" valign="top"></td>
9582<td align="left" valign="top"><p><code class="varname">MAKEFLAGS</code> are the flags passed 9677<td align="left" valign="top"><p><code class="varname">MAKEFLAGS</code> are the flags passed
9583 to the pkgsrc-internal invocations of <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>, while 9678 to the pkgsrc-internal invocations of <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>, while
9584 <code class="varname">MAKE_FLAGS</code> are the flags that are passed to 9679 <code class="varname">MAKE_FLAGS</code> are the flags that are passed to
9585 the <code class="varname">MAKE_PROGRAM</code> when building the 9680 the <code class="varname">MAKE_PROGRAM</code> when building the
9586 package. [FIXME: What is .MAKEFLAGS for?]</p></td> 9681 package. [FIXME: What is .MAKEFLAGS for?]</p></td>
9587</tr> 9682</tr>
9588<tr class="question"> 9683<tr class="question">
9589<td align="left" valign="top"> 9684<td align="left" valign="top">
9590<a name="devfaq.make"></a><a name="id9508273"></a><p><b>22.2.</b></p> 9685<a name="devfaq.make"></a><a name="id52059936"></a><p><b>22.2.</b></p>
9591</td> 9686</td>
9592<td align="left" valign="top"><p>What is the difference between 9687<td align="left" valign="top"><p>What is the difference between
9593 <code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and 9688 <code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and
9594 <code class="varname">MAKE_PROGRAM</code>?</p></td> 9689 <code class="varname">MAKE_PROGRAM</code>?</p></td>
9595</tr> 9690</tr>
9596<tr class="answer"> 9691<tr class="answer">
9597<td align="left" valign="top"></td> 9692<td align="left" valign="top"></td>
9598<td align="left" valign="top"><p><code class="varname">MAKE</code> is the path to the 9693<td align="left" valign="top"><p><code class="varname">MAKE</code> is the path to the
9599 <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> program that is used in the pkgsrc 9694 <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> program that is used in the pkgsrc
9600 infrastructure. <code class="varname">GMAKE</code> is the path to GNU 9695 infrastructure. <code class="varname">GMAKE</code> is the path to GNU
9601 Make, but you need to say <code class="varname">USE_TOOLS+=gmake</code> to 9696 Make, but you need to say <code class="varname">USE_TOOLS+=gmake</code> to
9602 use that. <code class="varname">MAKE_PROGRAM</code> is the path to the 9697 use that. <code class="varname">MAKE_PROGRAM</code> is the path to the
9603 Make program that is used for building the 9698 Make program that is used for building the
9604 package.</p></td> 9699 package.</p></td>
9605</tr> 9700</tr>
9606<tr class="question"> 9701<tr class="question">
9607<td align="left" valign="top"> 9702<td align="left" valign="top">
9608<a name="devfaq.cc"></a><a name="id9508309"></a><p><b>22.3.</b></p> 9703<a name="devfaq.cc"></a><a name="id52059974"></a><p><b>22.3.</b></p>
9609</td> 9704</td>
9610<td align="left" valign="top"><p>What is the difference between 9705<td align="left" valign="top"><p>What is the difference between
9611 <code class="varname">CC</code>, <code class="varname">PKG_CC</code> and 9706 <code class="varname">CC</code>, <code class="varname">PKG_CC</code> and
9612 <code class="varname">PKGSRC_COMPILER</code>?</p></td> 9707 <code class="varname">PKGSRC_COMPILER</code>?</p></td>
9613</tr> 9708</tr>
9614<tr class="answer"> 9709<tr class="answer">
9615<td align="left" valign="top"></td> 9710<td align="left" valign="top"></td>
9616<td align="left" valign="top"><p><code class="varname">CC</code> is the path to the real C 9711<td align="left" valign="top"><p><code class="varname">CC</code> is the path to the real C
9617 compiler, which can be configured by the pkgsrc user. 9712 compiler, which can be configured by the pkgsrc user.
9618 <code class="varname">PKG_CC</code> is the path to the compiler wrapper. 9713 <code class="varname">PKG_CC</code> is the path to the compiler wrapper.
9619 <code class="varname">PKGSRC_COMPILER</code> is <span class="emphasis"><em>not</em></span> a 9714 <code class="varname">PKGSRC_COMPILER</code> is <span class="emphasis"><em>not</em></span> a
9620 path to a compiler, but the type of compiler that should be 9715 path to a compiler, but the type of compiler that should be
9621 used. See <code class="filename">mk/compiler.mk</code> for more 9716 used. See <code class="filename">mk/compiler.mk</code> for more
9622 information about the latter variable.</p></td> 9717 information about the latter variable.</p></td>
9623</tr> 9718</tr>
9624<tr class="question"> 9719<tr class="question">
9625<td align="left" valign="top"> 9720<td align="left" valign="top">
9626<a name="devfaq.bl3flags"></a><a name="id9508344"></a><p><b>22.4.</b></p> 9721<a name="devfaq.bl3flags"></a><a name="id52060009"></a><p><b>22.4.</b></p>
9627</td> 9722</td>
9628<td align="left" valign="top"><p>What is the difference between 9723<td align="left" valign="top"><p>What is the difference between
9629 <code class="varname">BUILDLINK_LDFLAGS</code>, 9724 <code class="varname">BUILDLINK_LDFLAGS</code>,
9630 <code class="varname">BUILDLINK_LDADD</code> and 9725 <code class="varname">BUILDLINK_LDADD</code> and
9631 <code class="varname">BUILDLINK_LIBS</code>?</p></td> 9726 <code class="varname">BUILDLINK_LIBS</code>?</p></td>
9632</tr> 9727</tr>
9633<tr class="answer"> 9728<tr class="answer">
9634<td align="left" valign="top"></td> 9729<td align="left" valign="top"></td>
9635<td align="left" valign="top"><p>[FIXME]</p></td> 9730<td align="left" valign="top"><p>[FIXME]</p></td>
9636</tr> 9731</tr>
9637<tr class="question"> 9732<tr class="question">
9638<td align="left" valign="top"> 9733<td align="left" valign="top">
9639<a name="devfaq.bl3prefix"></a><a name="id9508362"></a><p><b>22.5.</b></p> 9734<a name="devfaq.bl3prefix"></a><a name="id52060097"></a><p><b>22.5.</b></p>
9640</td> 9735</td>
9641<td align="left" valign="top"><p>Why does <span class="command"><strong>make show-var 9736<td align="left" valign="top"><p>Why does <span class="command"><strong>make show-var
9642 VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span> 9737 VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span>
9643 say it's empty?</p></td> 9738 say it's empty?</p></td>
9644</tr> 9739</tr>
9645<tr class="answer"> 9740<tr class="answer">
9646<td align="left" valign="top"></td> 9741<td align="left" valign="top"></td>
9647<td align="left" valign="top"><p>For optimization reasons, some variables are only 9742<td align="left" valign="top"><p>For optimization reasons, some variables are only
9648 available in the &#8220;<span class="quote">wrapper</span>&#8221; phase and later. To 9743 available in the &#8220;<span class="quote">wrapper</span>&#8221; phase and later. To
9649 &#8220;<span class="quote">simulate</span>&#8221; the wrapper phase, append 9744 &#8220;<span class="quote">simulate</span>&#8221; the wrapper phase, append
9650 <span class="command"><strong>PKG_PHASE=wrapper</strong></span> to the above 9745 <span class="command"><strong>PKG_PHASE=wrapper</strong></span> to the above
9651 command.</p></td> 9746 command.</p></td>
9652</tr> 9747</tr>
9653<tr class="question"> 9748<tr class="question">
9654<td align="left" valign="top"> 9749<td align="left" valign="top">
9655<a name="devfaq.master_sites"></a><a name="id9508389"></a><p><b>22.6.</b></p> 9750<a name="devfaq.master_sites"></a><a name="id52060122"></a><p><b>22.6.</b></p>
9656</td> 9751</td>
9657<td align="left" valign="top"><p>What does 9752<td align="left" valign="top"><p>What does
9658 <code class="literal">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I 9753 <code class="literal">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I
9659 don't understand the <code class="literal">:=</code> inside 9754 don't understand the <code class="literal">:=</code> inside
9660 it.</p></td> 9755 it.</p></td>
9661</tr> 9756</tr>
9662<tr class="answer"> 9757<tr class="answer">
9663<td align="left" valign="top"></td> 9758<td align="left" valign="top"></td>
9664<td align="left" valign="top"><p>The <code class="literal">:=</code> is not really an 9759<td align="left" valign="top"><p>The <code class="literal">:=</code> is not really an
9665 assignment operator, like you might expect at first sight. 9760 assignment operator, like you might expect at first sight.
9666 Instead, it is a degenerate form of 9761 Instead, it is a degenerate form of
9667 <code class="literal">${LIST:<em class="replaceable"><code>old_string</code></em>=<em class="replaceable"><code>new_string</code></em>}</code>, 9762 <code class="literal">${LIST:<em class="replaceable"><code>old_string</code></em>=<em class="replaceable"><code>new_string</code></em>}</code>,
9668 which is documented in 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> man page and which you 9763 which is documented in 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> man page and which you
9669 may have seen as in <code class="literal">${SRCS:.c=.o}</code>. In the 9764 may have seen as in <code class="literal">${SRCS:.c=.o}</code>. In the
9670 case of <code class="varname">MASTER_SITE_*</code>, 9765 case of <code class="varname">MASTER_SITE_*</code>,
9671 <em class="replaceable"><code>old_string</code></em> is the empty string and 9766 <em class="replaceable"><code>old_string</code></em> is the empty string and
9672 <em class="replaceable"><code>new_string</code></em> is 9767 <em class="replaceable"><code>new_string</code></em> is
9673 <code class="literal">package/</code>. That's where the 9768 <code class="literal">package/</code>. That's where the
9674 <code class="literal">:</code> and the <code class="literal">=</code> fall 9769 <code class="literal">:</code> and the <code class="literal">=</code> fall
9675 together.</p></td> 9770 together.</p></td>
9676</tr> 9771</tr>
9677<tr class="question"> 9772<tr class="question">
9678<td align="left" valign="top"> 9773<td align="left" valign="top">
9679<a name="devfaq.mailinglists"></a><a name="id9508456"></a><p><b>22.7.</b></p> 9774<a name="devfaq.mailinglists"></a><a name="id52060325"></a><p><b>22.7.</b></p>
9680</td> 9775</td>
9681<td align="left" valign="top"><p>Which mailing lists are there for package 9776<td align="left" valign="top"><p>Which mailing lists are there for package
9682 developers?</p></td> 9777 developers?</p></td>
9683</tr> 9778</tr>
9684<tr class="answer"> 9779<tr class="answer">
9685<td align="left" valign="top"></td> 9780<td align="left" valign="top"></td>
9686<td align="left" valign="top"><div class="variablelist"><dl> 9781<td align="left" valign="top"><div class="variablelist"><dl>
9687<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#tech-pkg" target="_top">tech-pkg</a></span></dt> 9782<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#tech-pkg" target="_top">tech-pkg</a></span></dt>
9688<dd><p>This is a list for technical discussions related 9783<dd><p>This is a list for technical discussions related
9689 to pkgsrc development, e.g. soliciting feedback for changes to 9784 to pkgsrc development, e.g. soliciting feedback for changes to
9690 pkgsrc infrastructure, proposed new features, questions related 9785 pkgsrc infrastructure, proposed new features, questions related
9691 to porting pkgsrc to a new platform, advice for maintaining a 9786 to porting pkgsrc to a new platform, advice for maintaining a
9692 package, patches that affect many packages, help requests moved 9787 package, patches that affect many packages, help requests moved
9693 from pkgsrc-users when an infrastructure bug is found, 9788 from pkgsrc-users when an infrastructure bug is found,
9694 etc.</p></dd> 9789 etc.</p></dd>
9695<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bugs" target="_top">pkgsrc-bugs</a></span></dt> 9790<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bugs" target="_top">pkgsrc-bugs</a></span></dt>
9696<dd><p>All bug reports in category "pkg" sent with 9791<dd><p>All bug reports in category "pkg" sent with
9697 <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> appear here. Please do not report your bugs here 9792 <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> appear here. Please do not report your bugs here
9698 directly; use one of the other mailing 9793 directly; use one of the other mailing
9699 lists.</p></dd> 9794 lists.</p></dd>
9700</dl></div></td> 9795</dl></div></td>
9701</tr> 9796</tr>
9702<tr class="question"> 9797<tr class="question">
9703<td align="left" valign="top"> 9798<td align="left" valign="top">
9704<a name="devfaq.documentation"></a><a name="id9508487"></a><p><b>22.8.</b></p> 9799<a name="devfaq.documentation"></a><a name="id52060359"></a><p><b>22.8.</b></p>
9705</td> 9800</td>
9706<td align="left" valign="top"><p>Where is the pkgsrc 9801<td align="left" valign="top"><p>Where is the pkgsrc
9707 documentation?</p></td> 9802 documentation?</p></td>
9708</tr> 9803</tr>
9709<tr class="answer"> 9804<tr class="answer">
9710<td align="left" valign="top"></td> 9805<td align="left" valign="top"></td>
9711<td align="left" valign="top"> 9806<td align="left" valign="top">
9712<p>There are many places where you can find 9807<p>There are many places where you can find
9713 documentation about pkgsrc:</p> 9808 documentation about pkgsrc:</p>
9714<div class="itemizedlist"><ul type="disc"> 9809<div class="itemizedlist"><ul type="disc">
9715<li><p>The pkgsrc guide (this document) is a collection 9810<li><p>The pkgsrc guide (this document) is a collection
9716 of chapters that explain large parts of pkgsrc, but some 9811 of chapters that explain large parts of pkgsrc, but some
9717 chapters tend to be outdated. Which ones they are is hard to 9812 chapters tend to be outdated. Which ones they are is hard to
@@ -9739,27 +9834,27 @@ do? @@ -9739,27 +9834,27 @@ do?
9739 documented</span>&#8221;, that is the documentation exists only in the 9834 documented</span>&#8221;, that is the documentation exists only in the
9740 mind of the developer who wrote the code. To get this 9835 mind of the developer who wrote the code. To get this
9741 information, use the <span class="command"><strong>cvs annotate</strong></span> command 9836 information, use the <span class="command"><strong>cvs annotate</strong></span> command
9742 to see who has written it and ask on the 9837 to see who has written it and ask on the
9743 <code class="literal">tech-pkg</code> mailing list, so that others can 9838 <code class="literal">tech-pkg</code> mailing list, so that others can
9744 find your questions later (see above). To be sure that the 9839 find your questions later (see above). To be sure that the
9745 developer in charge reads the mail, you may CC him or 9840 developer in charge reads the mail, you may CC him or
9746 her.</p></li> 9841 her.</p></li>
9747</ul></div> 9842</ul></div>
9748</td> 9843</td>
9749</tr> 9844</tr>
9750<tr class="question"> 9845<tr class="question">
9751<td align="left" valign="top"> 9846<td align="left" valign="top">
9752<a name="devfaq.too-much-time"></a><a name="id9508541"></a><p><b>22.9.</b></p> 9847<a name="devfaq.too-much-time"></a><a name="id52060413"></a><p><b>22.9.</b></p>
9753</td> 9848</td>
9754<td align="left" valign="top"><p>I have a little time to kill. What shall I 9849<td align="left" valign="top"><p>I have a little time to kill. What shall I
9755do?</p></td> 9850do?</p></td>
9756</tr> 9851</tr>
9757<tr class="answer"> 9852<tr class="answer">
9758<td align="left" valign="top"></td> 9853<td align="left" valign="top"></td>
9759<td align="left" valign="top"> 9854<td align="left" valign="top">
9760<p>This is not really an FAQ yet, but here's the answer 9855<p>This is not really an FAQ yet, but here's the answer
9761anyway.</p> 9856anyway.</p>
9762<div class="itemizedlist"><ul type="disc"> 9857<div class="itemizedlist"><ul type="disc">
9763<li><p>Run <span class="command"><strong>pkg_chk -N</strong></span> (from the 9858<li><p>Run <span class="command"><strong>pkg_chk -N</strong></span> (from the
9764 <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 9859 <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
9765 will tell you about newer versions of installed packages that are 9860 will tell you about newer versions of installed packages that are

cvs diff -r1.118 -r1.119 pkgsrc/doc/pkgsrc.txt (expand / switch to unified diff)

--- pkgsrc/doc/pkgsrc.txt 2009/02/17 06:17:55 1.118
+++ pkgsrc/doc/pkgsrc.txt 2009/03/05 13:12:10 1.119
@@ -157,26 +157,27 @@ I. The pkgsrc user's guide @@ -157,26 +157,27 @@ I. The pkgsrc user's guide
157 9.15. Why do some packages ignore my CFLAGS? 157 9.15. Why do some packages ignore my CFLAGS?
158 9.16. A package does not build. What shall I do? 158 9.16. A package does not build. What shall I do?
159 9.17. What does Makefile appears to contain unresolved cvs/rcs/??? 159 9.17. What does Makefile appears to contain unresolved cvs/rcs/???
160 merge conflicts mean? 160 merge conflicts mean?
161 161
162II. The pkgsrc developer's guide 162II. The pkgsrc developer's guide
163 163
164 10. Creating a new pkgsrc package from scratch 164 10. Creating a new pkgsrc package from scratch
165 165
166 10.1. Common types of packages 166 10.1. Common types of packages
167 167
168 10.1.1. Perl modules 168 10.1.1. Perl modules
169 10.1.2. KDE applications 169 10.1.2. KDE applications
 170 10.1.3. Python modules and programs
170 171
171 10.2. Examples 172 10.2. Examples
172 173
173 10.2.1. How the www/nvu package came into pkgsrc 174 10.2.1. How the www/nvu package came into pkgsrc
174 175
175 11. Package components - files, directories and contents 176 11. Package components - files, directories and contents
176 177
177 11.1. Makefile 178 11.1. Makefile
178 11.2. distinfo 179 11.2. distinfo
179 11.3. patches/* 180 11.3. patches/*
180 181
181 11.3.1. Structure of a single patch file 182 11.3.1. Structure of a single patch file
182 11.3.2. Creating patch files 183 11.3.2. Creating patch files
@@ -1956,26 +1957,50 @@ touched. DESTDIR support exists in two v @@ -1956,26 +1957,50 @@ touched. DESTDIR support exists in two v
1956To use the DESTDIR support, set either USE_DESTDIR=yes to use the basic support 1957To use the DESTDIR support, set either USE_DESTDIR=yes to use the basic support
1957for packages that offer it or USE_DESTDIR=full to get the full support with 1958for packages that offer it or USE_DESTDIR=full to get the full support with
1958fallback to basic support. USE_DESTDIR=full needs pkgtools/pkg_install version 1959fallback to basic support. USE_DESTDIR=full needs pkgtools/pkg_install version
195920070802 (or newer). It might become the default DESTDIR support later. 196020070802 (or newer). It might become the default DESTDIR support later.
1960 1961
1961DESTDIR support changes the behaviour of various targets slightly. To install a 1962DESTDIR support changes the behaviour of various targets slightly. To install a
1962package after building it, use package-install. package and install don't do 1963package after building it, use package-install. package and install don't do
1963that any longer. package-install can be used as DEPENDS_TARGET. bin-install 1964that any longer. package-install can be used as DEPENDS_TARGET. bin-install
1964will ask for the root password to install the package and fail, package-install 1965will ask for the root password to install the package and fail, package-install
1965will ask again. 1966will ask again.
1966 1967
1967With basic DESTDIR support, make clean needs to be run as root. 1968With basic DESTDIR support, make clean needs to be run as root.
1968 1969
 1970Considering the foo/bar package, DESTDIR full support can be tested using the
 1971following commands
 1972
 1973$ id
 1974uid=1000(myusername) gid=100(users) groups=100(users),0(wheel)
 1975$ mkdir $HOME/packages
 1976$ cd $PKGSRCDIR/foo/bar
 1977
 1978Verify DESTDIR full support, no root privileges should be needed
 1979
 1980$ make USE_DESTDIR=full install
 1981
 1982Create a package without root privileges
 1983
 1984$ make USE_DESTDIR=full PACKAGES=$HOME/packages package
 1985
 1986For the following command, you must be able to gain root privileges using su(1)
 1987
 1988$ make USE_DESTDIR=full PACKAGES=$HOME/packages package-install
 1989
 1990Then, as a simple user
 1991
 1992$ make clean
 1993
19695.4. Selecting and configuring the compiler 19945.4. Selecting and configuring the compiler
1970 1995
19715.4.1. Selecting the compiler 19965.4.1. Selecting the compiler
1972 1997
1973By default, pkgsrc will use GCC to build packages. This may be overridden by 1998By default, pkgsrc will use GCC to build packages. This may be overridden by
1974setting the following variables in /etc/mk.conf: 1999setting the following variables in /etc/mk.conf:
1975 2000
1976PKGSRC_COMPILER: 2001PKGSRC_COMPILER:
1977 2002
1978 This is a list of values specifying the chain of compilers to invoke when 2003 This is a list of values specifying the chain of compilers to invoke when
1979 building packages. Valid values are: 2004 building packages. Valid values are:
1980 2005
1981 * distcc: distributed C/C++ (chainable) 2006 * distcc: distributed C/C++ (chainable)
@@ -3182,26 +3207,27 @@ Part II. The pkgsrc developer's guide @@ -3182,26 +3207,27 @@ Part II. The pkgsrc developer's guide
3182 3207
3183This part of the book deals with creating and modifying packages. It starts 3208This part of the book deals with creating and modifying packages. It starts
3184with a "HOWTO"-like guide on creating a new package. The remaining chapters are 3209with a "HOWTO"-like guide on creating a new package. The remaining chapters are
3185more like a reference manual for pkgsrc. 3210more like a reference manual for pkgsrc.
3186 3211
3187Table of Contents 3212Table of Contents
3188 3213
318910. Creating a new pkgsrc package from scratch 321410. Creating a new pkgsrc package from scratch
3190 3215
3191 10.1. Common types of packages 3216 10.1. Common types of packages
3192 3217
3193 10.1.1. Perl modules 3218 10.1.1. Perl modules
3194 10.1.2. KDE applications 3219 10.1.2. KDE applications
 3220 10.1.3. Python modules and programs
3195 3221
3196 10.2. Examples 3222 10.2. Examples
3197 3223
3198 10.2.1. How the www/nvu package came into pkgsrc 3224 10.2.1. How the www/nvu package came into pkgsrc
3199 3225
320011. Package components - files, directories and contents 322611. Package components - files, directories and contents
3201 3227
3202 11.1. Makefile 3228 11.1. Makefile
3203 11.2. distinfo 3229 11.2. distinfo
3204 11.3. patches/* 3230 11.3. patches/*
3205 3231
3206 11.3.1. Structure of a single patch file 3232 11.3.1. Structure of a single patch file
3207 11.3.2. Creating patch files 3233 11.3.2. Creating patch files
@@ -3408,26 +3434,27 @@ Table of Contents @@ -3408,26 +3434,27 @@ Table of Contents
3408 23.1. Meta packages 3434 23.1. Meta packages
3409 23.2. Packaging a GNOME application 3435 23.2. Packaging a GNOME application
3410 23.3. Updating GNOME to a newer version 3436 23.3. Updating GNOME to a newer version
3411 23.4. Patching guidelines 3437 23.4. Patching guidelines
3412 3438
3413Chapter 10. Creating a new pkgsrc package from scratch 3439Chapter 10. Creating a new pkgsrc package from scratch
3414 3440
3415Table of Contents 3441Table of Contents
3416 3442
341710.1. Common types of packages 344310.1. Common types of packages
3418 3444
3419 10.1.1. Perl modules 3445 10.1.1. Perl modules
3420 10.1.2. KDE applications 3446 10.1.2. KDE applications
 3447 10.1.3. Python modules and programs
3421 3448
342210.2. Examples 344910.2. Examples
3423 3450
3424 10.2.1. How the www/nvu package came into pkgsrc 3451 10.2.1. How the www/nvu package came into pkgsrc
3425 3452
3426When you find a package that is not yet in pkgsrc, you most likely have a URL 3453When you find a package that is not yet in pkgsrc, you most likely have a URL
3427from where you can download the source code. Starting with this URL, creating a 3454from where you can download the source code. Starting with this URL, creating a
3428package involves only a few steps. 3455package involves only a few steps.
3429 3456
3430 1. First, install the packages pkgtools/url2pkg and pkgtools/pkglint. 3457 1. First, install the packages pkgtools/url2pkg and pkgtools/pkglint.
3431 3458
3432 2. Then, choose one of the top-level directories as the category in which you 3459 2. Then, choose one of the top-level directories as the category in which you
3433 want to place your package. You can also create a directory of your own 3460 want to place your package. You can also create a directory of your own
@@ -3500,26 +3527,62 @@ package involves only a few steps. @@ -3500,26 +3527,62 @@ package involves only a few steps.
3500 3527
350110.1. Common types of packages 352810.1. Common types of packages
3502 3529
350310.1.1. Perl modules 353010.1.1. Perl modules
3504 3531
3505Simple Perl modules are handled automatically by url2pkg, including 3532Simple Perl modules are handled automatically by url2pkg, including
3506dependencies. 3533dependencies.
3507 3534
350810.1.2. KDE applications 353510.1.2. KDE applications
3509 3536
3510KDE applications should always include meta-pkgs/kde3/kde3.mk, which contains 3537KDE applications should always include meta-pkgs/kde3/kde3.mk, which contains
3511numerous settings that are typical of KDE packages. 3538numerous settings that are typical of KDE packages.
3512 3539
 354010.1.3. Python modules and programs
 3541
 3542Python modules and programs packages are easily created using a set of
 3543predefined variables.
 3544
 3545Most Python packages use either "distutils" or easy-setup ("eggs"). If the
 3546software uses "distutils", set the PYDISTUTILSPKG variable to "yes" so pkgsrc
 3547will make use of this framework. "distutils" uses a script called setup.py, if
 3548the "distutils" driver is not called setup.py, set the PYSETUP variable to the
 3549name of the script.
 3550
 3551If the default Python versions are not supported by the software, set the
 3552PYTHON_VERSIONS_ACCEPTED variable to the Python versions the software is known
 3553to work with, from the most recent to the older one, e.g.
 3554
 3555PYTHON_VERSIONS_ACCEPTED= 25 24 23
 3556
 3557If the packaged software is a Python module, include "../../lang/python/
 3558extension.mk". In this case, the package directory should be called
 3559"py-software" and PKGNAME should be set to "${PYPKGPREFIX}-${DISTNAME}", e.g.
 3560
 3561DISTNAME= foopymodule-1.2.10
 3562PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
 3563
 3564If it is an application, also include "../../lang/python/application.mk" before
 3565"extension.mk".
 3566
 3567If the packaged software, either it is an application or a module, is
 3568egg-aware, you only need to include "../../lang/python/egg.mk".
 3569
 3570In order to correctly set the path to the Python interpreter, use the
 3571REPLACE_PYTHON variable and set it to the list of files that must be corrected.
 3572For example :
 3573
 3574REPLACE_PYTHON= ${WRKSRC}/*.py
 3575
351310.2. Examples 357610.2. Examples
3514 3577
351510.2.1. How the www/nvu package came into pkgsrc 357810.2.1. How the www/nvu package came into pkgsrc
3516 3579
351710.2.1.1. The initial package 358010.2.1.1. The initial package
3518 3581
3519Looking at the file pkgsrc/doc/TODO, I saw that the "nvu" package has not yet 3582Looking at the file pkgsrc/doc/TODO, I saw that the "nvu" package has not yet
3520been imported into pkgsrc. As the description says it has to do with the web, 3583been imported into pkgsrc. As the description says it has to do with the web,
3521the obvious choice for the category is "www". 3584the obvious choice for the category is "www".
3522 3585
3523$ mkdir www/nvu 3586$ mkdir www/nvu
3524$ cd www/nvu 3587$ cd www/nvu
3525 3588
@@ -7416,29 +7479,27 @@ final location of the files. Then a bina @@ -7416,29 +7479,27 @@ final location of the files. Then a bina
7416for installation as usual. There are two ways: Either the package must install 7479for installation as usual. There are two ways: Either the package must install
7417as root ("destdir") or the package can install as non-root user 7480as root ("destdir") or the package can install as non-root user
7418("user-destdir"). 7481("user-destdir").
7419 7482
7420 * PKG_DESTDIR_SUPPORT has to be set to "destdir" or "user-destdir". If 7483 * PKG_DESTDIR_SUPPORT has to be set to "destdir" or "user-destdir". If
7421 bsd.prefs.mk is included in the Makefile, PKG_DESTDIR_SUPPORT needs to be 7484 bsd.prefs.mk is included in the Makefile, PKG_DESTDIR_SUPPORT needs to be
7422 set before the inclusion. 7485 set before the inclusion.
7423 7486
7424 * All installation operations have to be prefixed with ${DESTDIR}. 7487 * All installation operations have to be prefixed with ${DESTDIR}.
7425 7488
7426 * automake gets this DESTDIR mostly right automatically. Many manual rules 7489 * automake gets this DESTDIR mostly right automatically. Many manual rules
7427 and pre/post-install often are incorrect; fix them. 7490 and pre/post-install often are incorrect; fix them.
7428 7491
7429 * If files are installed with special owner/group either use @owner/@group in 7492 * If files are installed with special owner/group use SPECIAL_PERMS.
7430 the PLIST (preferred) or use SPECIAL_PERMS (discouraged). Note that @owner/ 
7431 @group are sticky during install, keep this in mind. 
7432 7493
7433 * In general, packages should support UNPRIVILEGED to be able to use DESTDIR. 7494 * In general, packages should support UNPRIVILEGED to be able to use DESTDIR.
7434 7495
743519.6.5. Packages with hardcoded paths to other interpreters 749619.6.5. Packages with hardcoded paths to other interpreters
7436 7497
7437Your package may also contain scripts with hardcoded paths to other 7498Your package may also contain scripts with hardcoded paths to other
7438interpreters besides (or as well as) perl. To correct the full pathname to the 7499interpreters besides (or as well as) perl. To correct the full pathname to the
7439script interpreter, you need to set the following definitions in your Makefile 7500script interpreter, you need to set the following definitions in your Makefile
7440(we shall use tclsh in this example): 7501(we shall use tclsh in this example):
7441 7502
7442REPLACE_INTERPRETER+= tcl 7503REPLACE_INTERPRETER+= tcl
7443REPLACE.tcl.old= .*/bin/tclsh 7504REPLACE.tcl.old= .*/bin/tclsh
7444REPLACE.tcl.new= ${PREFIX}/bin/tclsh 7505REPLACE.tcl.new= ${PREFIX}/bin/tclsh