Sun Feb 15 18:50:48 2015 UTC ()
regen


(wiz)
diff -r1.196 -r1.197 pkgsrc/doc/pkgsrc.html
diff -r1.197 -r1.198 pkgsrc/doc/pkgsrc.txt

cvs diff -r1.196 -r1.197 pkgsrc/doc/pkgsrc.html (expand / switch to unified diff)

--- pkgsrc/doc/pkgsrc.html 2015/01/26 23:00:30 1.196
+++ pkgsrc/doc/pkgsrc.html 2015/02/15 18:50:48 1.197
@@ -215,27 +215,28 @@ builds) @@ -215,27 +215,28 @@ builds)
215<dt><span class="sect2"><a href="#quoting-guideline">12.3.4. Quoting guideline</a></span></dt> 215<dt><span class="sect2"><a href="#quoting-guideline">12.3.4. Quoting guideline</a></span></dt>
216<dt><span class="sect2"><a href="#bsd-make-bug-workaround">12.3.5. Workaround for a bug in BSD Make</a></span></dt> 216<dt><span class="sect2"><a href="#bsd-make-bug-workaround">12.3.5. Workaround for a bug in BSD Make</a></span></dt>
217</dl></dd> 217</dl></dd>
218</dl></dd> 218</dl></dd>
219<dt><span class="chapter"><a href="#plist">13. PLIST issues</a></span></dt> 219<dt><span class="chapter"><a href="#plist">13. PLIST issues</a></span></dt>
220<dd><dl> 220<dd><dl>
221<dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt> 221<dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt>
222<dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt> 222<dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
223<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> 223<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>
224<dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt> 224<dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt>
225<dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt> 225<dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt>
226<dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt> 226<dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
227<dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt> 227<dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt>
228<dt><span class="sect1"><a href="#faq.common-dirs">13.8. Sharing directories between packages</a></span></dt> 228<dt><span class="sect1"><a href="#build-plist">13.8. Build-specific PLISTs</a></span></dt>
 229<dt><span class="sect1"><a href="#faq.common-dirs">13.9. Sharing directories between packages</a></span></dt>
229</dl></dd> 230</dl></dd>
230<dt><span class="chapter"><a href="#buildlink">14. Buildlink methodology</a></span></dt> 231<dt><span class="chapter"><a href="#buildlink">14. Buildlink methodology</a></span></dt>
231<dd><dl> 232<dd><dl>
232<dt><span class="sect1"><a href="#converting-to-buildlink3">14.1. Converting packages to use buildlink3</a></span></dt> 233<dt><span class="sect1"><a href="#converting-to-buildlink3">14.1. Converting packages to use buildlink3</a></span></dt>
233<dt><span class="sect1"><a href="#creating-buildlink3.mk">14.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt> 234<dt><span class="sect1"><a href="#creating-buildlink3.mk">14.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
234<dd><dl> 235<dd><dl>
235<dt><span class="sect2"><a href="#anatomy-of-bl3">14.2.1. Anatomy of a buildlink3.mk file</a></span></dt> 236<dt><span class="sect2"><a href="#anatomy-of-bl3">14.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
236<dt><span class="sect2"><a href="#updating-buildlink-depends">14.2.2. Updating 237<dt><span class="sect2"><a href="#updating-buildlink-depends">14.2.2. Updating
237 <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> 238 <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code>
238 and 239 and
239 <code class="varname">BUILDLINK_ABI_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> 240 <code class="varname">BUILDLINK_ABI_DEPENDS.<em class="replaceable"><code>pkg</code></em></code>
240 in <code class="filename">buildlink3.mk</code> files</a></span></dt> 241 in <code class="filename">buildlink3.mk</code> files</a></span></dt>
241</dl></dd> 242</dl></dd>
@@ -3346,27 +3347,28 @@ anymore, you can remove that file and ru @@ -3346,27 +3347,28 @@ anymore, you can remove that file and ru
3346<dt><span class="sect2"><a href="#quoting-guideline">12.3.4. Quoting guideline</a></span></dt> 3347<dt><span class="sect2"><a href="#quoting-guideline">12.3.4. Quoting guideline</a></span></dt>
3347<dt><span class="sect2"><a href="#bsd-make-bug-workaround">12.3.5. Workaround for a bug in BSD Make</a></span></dt> 3348<dt><span class="sect2"><a href="#bsd-make-bug-workaround">12.3.5. Workaround for a bug in BSD Make</a></span></dt>
3348</dl></dd> 3349</dl></dd>
3349</dl></dd> 3350</dl></dd>
3350<dt><span class="chapter"><a href="#plist">13. PLIST issues</a></span></dt> 3351<dt><span class="chapter"><a href="#plist">13. PLIST issues</a></span></dt>
3351<dd><dl> 3352<dd><dl>
3352<dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt> 3353<dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt>
3353<dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt> 3354<dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
3354<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> 3355<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>
3355<dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt> 3356<dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt>
3356<dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt> 3357<dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt>
3357<dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt> 3358<dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
3358<dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt> 3359<dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt>
3359<dt><span class="sect1"><a href="#faq.common-dirs">13.8. Sharing directories between packages</a></span></dt> 3360<dt><span class="sect1"><a href="#build-plist">13.8. Build-specific PLISTs</a></span></dt>
 3361<dt><span class="sect1"><a href="#faq.common-dirs">13.9. Sharing directories between packages</a></span></dt>
3360</dl></dd> 3362</dl></dd>
3361<dt><span class="chapter"><a href="#buildlink">14. Buildlink methodology</a></span></dt> 3363<dt><span class="chapter"><a href="#buildlink">14. Buildlink methodology</a></span></dt>
3362<dd><dl> 3364<dd><dl>
3363<dt><span class="sect1"><a href="#converting-to-buildlink3">14.1. Converting packages to use buildlink3</a></span></dt> 3365<dt><span class="sect1"><a href="#converting-to-buildlink3">14.1. Converting packages to use buildlink3</a></span></dt>
3364<dt><span class="sect1"><a href="#creating-buildlink3.mk">14.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt> 3366<dt><span class="sect1"><a href="#creating-buildlink3.mk">14.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
3365<dd><dl> 3367<dd><dl>
3366<dt><span class="sect2"><a href="#anatomy-of-bl3">14.2.1. Anatomy of a buildlink3.mk file</a></span></dt> 3368<dt><span class="sect2"><a href="#anatomy-of-bl3">14.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
3367<dt><span class="sect2"><a href="#updating-buildlink-depends">14.2.2. Updating 3369<dt><span class="sect2"><a href="#updating-buildlink-depends">14.2.2. Updating
3368 <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> 3370 <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code>
3369 and 3371 and
3370 <code class="varname">BUILDLINK_ABI_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> 3372 <code class="varname">BUILDLINK_ABI_DEPENDS.<em class="replaceable"><code>pkg</code></em></code>
3371 in <code class="filename">buildlink3.mk</code> files</a></span></dt> 3373 in <code class="filename">buildlink3.mk</code> files</a></span></dt>
3372</dl></dd> 3374</dl></dd>
@@ -4863,27 +4865,28 @@ VAR:= ${VAR:N${_othervar_:C/-//}} @@ -4863,27 +4865,28 @@ VAR:= ${VAR:N${_othervar_:C/-//}}
4863<div class="chapter"> 4865<div class="chapter">
4864<div class="titlepage"><div><div><h2 class="title"> 4866<div class="titlepage"><div><div><h2 class="title">
4865<a name="plist"></a>Chapter 13. PLIST issues</h2></div></div></div> 4867<a name="plist"></a>Chapter 13. PLIST issues</h2></div></div></div>
4866<div class="toc"> 4868<div class="toc">
4867<p><b>Table of Contents</b></p> 4869<p><b>Table of Contents</b></p>
4868<dl class="toc"> 4870<dl class="toc">
4869<dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt> 4871<dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt>
4870<dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt> 4872<dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
4871<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> 4873<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>
4872<dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt> 4874<dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt>
4873<dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt> 4875<dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt>
4874<dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt> 4876<dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
4875<dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt> 4877<dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt>
4876<dt><span class="sect1"><a href="#faq.common-dirs">13.8. Sharing directories between packages</a></span></dt> 4878<dt><span class="sect1"><a href="#build-plist">13.8. Build-specific PLISTs</a></span></dt>
 4879<dt><span class="sect1"><a href="#faq.common-dirs">13.9. Sharing directories between packages</a></span></dt>
4877</dl> 4880</dl>
4878</div> 4881</div>
4879<p>The <code class="filename">PLIST</code> file contains a package's 4882<p>The <code class="filename">PLIST</code> file contains a package's
4880 <span class="quote">&#8220;<span class="quote">packing list</span>&#8221;</span>, i.e. a list of files that belong to 4883 <span class="quote">&#8220;<span class="quote">packing list</span>&#8221;</span>, i.e. a list of files that belong to
4881 the package (relative to the <code class="filename">${PREFIX}</code> 4884 the package (relative to the <code class="filename">${PREFIX}</code>
4882 directory it's been installed in) plus some additional statements 4885 directory it's been installed in) plus some additional statements
4883 - see the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?pkg_create+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">pkg_create</span>(1)</span></a> man page for a full list. 4886 - see the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?pkg_create+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">pkg_create</span>(1)</span></a> man page for a full list.
4884 This chapter addresses some issues that need attention when 4887 This chapter addresses some issues that need attention when
4885 dealing with the <code class="filename">PLIST</code> file (or files, see 4888 dealing with the <code class="filename">PLIST</code> file (or files, see
4886 below!).</p> 4889 below!).</p>
4887<div class="sect1"> 4890<div class="sect1">
4888<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4891<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4889<a name="rcs-id"></a>13.1. RCS ID</h2></div></div></div> 4892<a name="rcs-id"></a>13.1. RCS ID</h2></div></div></div>
@@ -4896,27 +4899,27 @@ VAR:= ${VAR:N${_othervar_:C/-//}} @@ -4896,27 +4899,27 @@ VAR:= ${VAR:N${_othervar_:C/-//}}
4896<div class="sect1"> 4899<div class="sect1">
4897<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4900<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4898<a name="automatic-plist-generation"></a>13.2. Semi-automatic <code class="filename">PLIST</code> generation</h2></div></div></div> 4901<a name="automatic-plist-generation"></a>13.2. Semi-automatic <code class="filename">PLIST</code> generation</h2></div></div></div>
4899<p>You can use the <span class="command"><strong>make print-PLIST</strong></span> command 4902<p>You can use the <span class="command"><strong>make print-PLIST</strong></span> command
4900 to output a PLIST that matches any new files since the package 4903 to output a PLIST that matches any new files since the package
4901 was extracted. See <a class="xref" href="#build.helpful-targets" title="17.17. Other helpful targets">Section 17.17, &#8220;Other helpful targets&#8221;</a> for 4904 was extracted. See <a class="xref" href="#build.helpful-targets" title="17.17. Other helpful targets">Section 17.17, &#8220;Other helpful targets&#8221;</a> for
4902 more information on this target.</p> 4905 more information on this target.</p>
4903</div> 4906</div>
4904<div class="sect1"> 4907<div class="sect1">
4905<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4908<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4906<a name="print-PLIST"></a>13.3. Tweaking output of <span class="command"><strong>make print-PLIST</strong></span> 4909<a name="print-PLIST"></a>13.3. Tweaking output of <span class="command"><strong>make print-PLIST</strong></span>
4907</h2></div></div></div> 4910</h2></div></div></div>
4908<p>If you have used any of the *-dirs packages, as explained in 4911<p>If you have used any of the *-dirs packages, as explained in
4909 <a class="xref" href="#faq.common-dirs" title="13.8. Sharing directories between packages">Section 13.8, &#8220;Sharing directories between packages&#8221;</a>, you may have noticed that 4912 <a class="xref" href="#faq.common-dirs" title="13.9. Sharing directories between packages">Section 13.9, &#8220;Sharing directories between packages&#8221;</a>, you may have noticed that
4910 <span class="command"><strong>make print-PLIST</strong></span> outputs a set of 4913 <span class="command"><strong>make print-PLIST</strong></span> outputs a set of
4911 <code class="varname">@comment</code>s instead of real 4914 <code class="varname">@comment</code>s instead of real
4912 <code class="varname">@dirrm</code> lines. You can also do this for 4915 <code class="varname">@dirrm</code> lines. You can also do this for
4913 specific directories and files, so that the results of that 4916 specific directories and files, so that the results of that
4914 command are very close to reality. This helps <span class="emphasis"><em>a 4917 command are very close to reality. This helps <span class="emphasis"><em>a
4915 lot</em></span> during the update of packages.</p> 4918 lot</em></span> during the update of packages.</p>
4916<p>The <code class="varname">PRINT_PLIST_AWK</code> variable takes a set 4919<p>The <code class="varname">PRINT_PLIST_AWK</code> variable takes a set
4917 of AWK patterns and actions that are used to filter the output of 4920 of AWK patterns and actions that are used to filter the output of
4918 print-PLIST. You can <span class="emphasis"><em>append</em></span> any chunk of AWK 4921 print-PLIST. You can <span class="emphasis"><em>append</em></span> any chunk of AWK
4919 scripting you like to it, but be careful with quoting.</p> 4922 scripting you like to it, but be careful with quoting.</p>
4920<p>For example, to get all files inside the 4923<p>For example, to get all files inside the
4921 <code class="filename">libdata/foo</code> directory removed from the 4924 <code class="filename">libdata/foo</code> directory removed from the
4922 resulting PLIST:</p> 4925 resulting PLIST:</p>
@@ -5042,44 +5045,64 @@ ${PLIST.foo}@dirrm share/bar @@ -5042,44 +5045,64 @@ ${PLIST.foo}@dirrm share/bar
5042<p>Some packages decide to install a different set of files based on 5045<p>Some packages decide to install a different set of files based on
5043 the operating system being used. These differences can be 5046 the operating system being used. These differences can be
5044 automatically handled by using the following files:</p> 5047 automatically handled by using the following files:</p>
5045<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 5048<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
5046<li class="listitem"><p><code class="filename">PLIST.common</code></p></li> 5049<li class="listitem"><p><code class="filename">PLIST.common</code></p></li>
5047<li class="listitem"><p><code class="filename">PLIST.${OPSYS}</code></p></li> 5050<li class="listitem"><p><code class="filename">PLIST.${OPSYS}</code></p></li>
5048<li class="listitem"><p><code class="filename">PLIST.${MACHINE_ARCH}</code></p></li> 5051<li class="listitem"><p><code class="filename">PLIST.${MACHINE_ARCH}</code></p></li>
5049<li class="listitem"><p><code class="filename">PLIST.${OPSYS}-${MACHINE_ARCH}</code></p></li> 5052<li class="listitem"><p><code class="filename">PLIST.${OPSYS}-${MACHINE_ARCH}</code></p></li>
5050<li class="listitem"><p><code class="filename">PLIST.common_end</code></p></li> 5053<li class="listitem"><p><code class="filename">PLIST.common_end</code></p></li>
5051</ul></div> 5054</ul></div>
5052</div> 5055</div>
5053<div class="sect1"> 5056<div class="sect1">
5054<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 5057<div class="titlepage"><div><div><h2 class="title" style="clear: both">
5055<a name="faq.common-dirs"></a>13.8. Sharing directories between packages</h2></div></div></div> 5058<a name="build-plist"></a>13.8. Build-specific PLISTs</h2></div></div></div>
 5059<p>Some packages decide to generate hard-to-guess file names
 5060 during installation that are hard to wire down.</p>
 5061<p>In such cases, you can set the
 5062 <code class="varname">GENERATE_PLIST</code> variable to shell code
 5063 terminated (with a semicolon) that will output PLIST entries which
 5064 will be appended to the PLIST</p>
 5065<p>You can find one example in editors/xemacs:</p>
 5066<pre class="programlisting">
 5067 GENERATE_PLIST+= ${ECHO} bin/${DISTNAME}-`${WRKSRC}/src/xemacs -sd`.dmp ;
 5068 </pre>
 5069<p>which will append something like
 5070 <code class="filename">bin/xemacs-21.4.23-54e8ea71.dmp</code> to the
 5071 <code class="filename">PLIST</code>.
 5072 </p>
 5073</div>
 5074<div class="sect1">
 5075<div class="titlepage"><div><div><h2 class="title" style="clear: both">
 5076<a name="faq.common-dirs"></a>13.9. Sharing directories between packages</h2></div></div></div>
5056<p>A <span class="quote">&#8220;<span class="quote">shared directory</span>&#8221;</span> is a directory where 5077<p>A <span class="quote">&#8220;<span class="quote">shared directory</span>&#8221;</span> is a directory where
5057 multiple (and unrelated) packages install files. These 5078 multiple (and unrelated) packages install files. These
5058 directories were problematic because you had to add special 5079 directories were problematic because you had to add special
5059 tricks in the PLIST to conditionally remove them, or have some 5080 tricks in the PLIST to conditionally remove them, or have some
5060 centralized package handle them.</p> 5081 centralized package handle them.</p>
5061<p>In pkgsrc, it is now easy: Each package should create 5082<p>In pkgsrc, it is now easy: Each package should create
5062 directories and install files as needed; <span class="command"><strong>pkg_delete</strong></span> 5083 directories and install files as needed; <span class="command"><strong>pkg_delete</strong></span>
5063 will remove any directories left empty after uninstalling a 5084 will remove any directories left empty after uninstalling a
5064 package.</p> 5085 package.</p>
5065<p>If a package needs an empty directory to work, create 5086<p>If a package needs an empty directory to work, create
5066 the directory during installation as usual, and also add an 5087 the directory during installation as usual, and also add an
5067 entry to the PLIST: 5088 entry to the PLIST:
5068 </p> 5089 </p>
5069<pre class="programlisting"> 5090<pre class="programlisting">
5070@pkgdir path/to/empty/directory 5091@pkgdir path/to/empty/directory
5071 </pre> 5092 </pre>
5072<p> 5093<p>
 5094 or take a look at <code class="varname">MAKE_DIRS</code> and
 5095 <code class="varname">OWN_DIRS</code>.
5073 </p> 5096 </p>
5074</div> 5097</div>
5075</div> 5098</div>
5076<div class="chapter"> 5099<div class="chapter">
5077<div class="titlepage"><div><div><h2 class="title"> 5100<div class="titlepage"><div><div><h2 class="title">
5078<a name="buildlink"></a>Chapter 14. Buildlink methodology</h2></div></div></div> 5101<a name="buildlink"></a>Chapter 14. Buildlink methodology</h2></div></div></div>
5079<div class="toc"> 5102<div class="toc">
5080<p><b>Table of Contents</b></p> 5103<p><b>Table of Contents</b></p>
5081<dl class="toc"> 5104<dl class="toc">
5082<dt><span class="sect1"><a href="#converting-to-buildlink3">14.1. Converting packages to use buildlink3</a></span></dt> 5105<dt><span class="sect1"><a href="#converting-to-buildlink3">14.1. Converting packages to use buildlink3</a></span></dt>
5083<dt><span class="sect1"><a href="#creating-buildlink3.mk">14.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt> 5106<dt><span class="sect1"><a href="#creating-buildlink3.mk">14.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
5084<dd><dl> 5107<dd><dl>
5085<dt><span class="sect2"><a href="#anatomy-of-bl3">14.2.1. Anatomy of a buildlink3.mk file</a></span></dt> 5108<dt><span class="sect2"><a href="#anatomy-of-bl3">14.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
@@ -7326,67 +7349,67 @@ the name of the common tools. For exampl @@ -7326,67 +7349,67 @@ the name of the common tools. For exampl
7326.if exists(/usr/bin/bzcat) 7349.if exists(/usr/bin/bzcat)
7327TOOLS_PLATFORM.bzcat?= /usr/bin/bzcat 7350TOOLS_PLATFORM.bzcat?= /usr/bin/bzcat
7328.elif exists(/usr/bin/bzip2) 7351.elif exists(/usr/bin/bzip2)
7329TOOLS_PLATFORM.bzcat?= /usr/bin/bzip2 -cd 7352TOOLS_PLATFORM.bzcat?= /usr/bin/bzip2 -cd
7330.endif 7353.endif
7331 7354
7332TOOLS_PLATFORM.true?= true # shell builtin 7355TOOLS_PLATFORM.true?= true # shell builtin
7333</pre> 7356</pre>
7334</div> 7357</div>
7335<div class="sect1"> 7358<div class="sect1">
7336<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 7359<div class="titlepage"><div><div><h2 class="title" style="clear: both">
7337<a name="tools.questions"></a>18.4. Questions regarding the tools</h2></div></div></div> 7360<a name="tools.questions"></a>18.4. Questions regarding the tools</h2></div></div></div>
7338<div class="qandaset"> 7361<div class="qandaset">
7339<a name="idm75787664"></a><dl> 7362<a name="idm77724944"></a><dl>
7340<dt>18.4.1. <a href="#tools.new">How do I add a new tool?</a> 7363<dt>18.4.1. <a href="#tools.new">How do I add a new tool?</a>
7341</dt> 7364</dt>
7342<dt>18.4.2. <a href="#tools.listall">How do I get a list of all available 7365<dt>18.4.2. <a href="#tools.listall">How do I get a list of all available
7343 tools?</a> 7366 tools?</a>
7344</dt> 7367</dt>
7345<dt>18.4.3. <a href="#tools.used">How can I get a list of all the tools that a 7368<dt>18.4.3. <a href="#tools.used">How can I get a list of all the tools that a
7346 package is using while being built? I want to know whether it 7369 package is using while being built? I want to know whether it
7347 uses sed or not.</a> 7370 uses sed or not.</a>
7348</dt> 7371</dt>
7349</dl> 7372</dl>
7350<table border="0" style="width: 100%;"> 7373<table border="0" style="width: 100%;">
7351<colgroup> 7374<colgroup>
7352<col align="left" width="1%"> 7375<col align="left" width="1%">
7353<col> 7376<col>
7354</colgroup> 7377</colgroup>
7355<tbody> 7378<tbody>
7356<tr class="question"> 7379<tr class="question">
7357<td align="left" valign="top"> 7380<td align="left" valign="top">
7358<a name="tools.new"></a><a name="idm75787280"></a><p><b>18.4.1.</b></p> 7381<a name="tools.new"></a><a name="idm77724560"></a><p><b>18.4.1.</b></p>
7359</td> 7382</td>
7360<td align="left" valign="top"><p>How do I add a new tool?</p></td> 7383<td align="left" valign="top"><p>How do I add a new tool?</p></td>
7361</tr> 7384</tr>
7362<tr class="answer"> 7385<tr class="answer">
7363<td align="left" valign="top"></td> 7386<td align="left" valign="top"></td>
7364<td align="left" valign="top"><p>TODO</p></td> 7387<td align="left" valign="top"><p>TODO</p></td>
7365</tr> 7388</tr>
7366<tr class="question"> 7389<tr class="question">
7367<td align="left" valign="top"> 7390<td align="left" valign="top">
7368<a name="tools.listall"></a><a name="idm75786256"></a><p><b>18.4.2.</b></p> 7391<a name="tools.listall"></a><a name="idm77723536"></a><p><b>18.4.2.</b></p>
7369</td> 7392</td>
7370<td align="left" valign="top"><p>How do I get a list of all available 7393<td align="left" valign="top"><p>How do I get a list of all available
7371 tools?</p></td> 7394 tools?</p></td>
7372</tr> 7395</tr>
7373<tr class="answer"> 7396<tr class="answer">
7374<td align="left" valign="top"></td> 7397<td align="left" valign="top"></td>
7375<td align="left" valign="top"><p>TODO</p></td> 7398<td align="left" valign="top"><p>TODO</p></td>
7376</tr> 7399</tr>
7377<tr class="question"> 7400<tr class="question">
7378<td align="left" valign="top"> 7401<td align="left" valign="top">
7379<a name="tools.used"></a><a name="idm75785104"></a><p><b>18.4.3.</b></p> 7402<a name="tools.used"></a><a name="idm77722512"></a><p><b>18.4.3.</b></p>
7380</td> 7403</td>
7381<td align="left" valign="top"><p>How can I get a list of all the tools that a 7404<td align="left" valign="top"><p>How can I get a list of all the tools that a
7382 package is using while being built? I want to know whether it 7405 package is using while being built? I want to know whether it
7383 uses sed or not.</p></td> 7406 uses sed or not.</p></td>
7384</tr> 7407</tr>
7385<tr class="answer"> 7408<tr class="answer">
7386<td align="left" valign="top"></td> 7409<td align="left" valign="top"></td>
7387<td align="left" valign="top"><p>Currently, you can't. (TODO: But I want to be able 7410<td align="left" valign="top"><p>Currently, you can't. (TODO: But I want to be able
7388 to do it.)</p></td> 7411 to do it.)</p></td>
7389</tr> 7412</tr>
7390</tbody> 7413</tbody>
7391</table> 7414</table>
7392</div> 7415</div>
@@ -9461,27 +9484,27 @@ place.

 @@ -9461,27 +9484,27 @@ place.

9461</li> 9484</li>
9462</ol></div> 9485</ol></div>
9463</div> 9486</div>
9464</div> 9487</div>
9465<div class="chapter"> 9488<div class="chapter">
9466<div class="titlepage"><div><div><h2 class="title"> 9489<div class="titlepage"><div><div><h2 class="title">
9467<a name="devfaq"></a>Chapter 22. Frequently Asked Questions</h2></div></div></div> 9490<a name="devfaq"></a>Chapter 22. Frequently Asked Questions</h2></div></div></div>
9468<p>This section contains the answers to questions that may 9491<p>This section contains the answers to questions that may
9469 arise when you are writing a package. If you don't find your 9492 arise when you are writing a package. If you don't find your
9470 question answered here, first have a look in the other chapters, 9493 question answered here, first have a look in the other chapters,
9471 and if you still don't have the answer, ask on the 9494 and if you still don't have the answer, ask on the
9472 <code class="literal">pkgsrc-users</code> mailing list.</p> 9495 <code class="literal">pkgsrc-users</code> mailing list.</p>
9473<div class="qandaset"> 9496<div class="qandaset">
9474<a name="idm77324944"></a><dl> 9497<a name="idm77173392"></a><dl>
9475<dt>22.1. <a href="#devfaq.makeflags">What is the difference between 9498<dt>22.1. <a href="#devfaq.makeflags">What is the difference between
9476 MAKEFLAGS, .MAKEFLAGS and 9499 MAKEFLAGS, .MAKEFLAGS and
9477 MAKE_FLAGS?</a> 9500 MAKE_FLAGS?</a>
9478</dt> 9501</dt>
9479<dt>22.2. <a href="#devfaq.make">What is the difference between 9502<dt>22.2. <a href="#devfaq.make">What is the difference between
9480 MAKE, GMAKE and 9503 MAKE, GMAKE and
9481 MAKE_PROGRAM?</a> 9504 MAKE_PROGRAM?</a>
9482</dt> 9505</dt>
9483<dt>22.3. <a href="#devfaq.cc">What is the difference between 9506<dt>22.3. <a href="#devfaq.cc">What is the difference between
9484 CC, PKG_CC and 9507 CC, PKG_CC and
9485 PKGSRC_COMPILER?</a> 9508 PKGSRC_COMPILER?</a>
9486</dt> 9509</dt>
9487<dt>22.4. <a href="#devfaq.bl3flags">What is the difference between 9510<dt>22.4. <a href="#devfaq.bl3flags">What is the difference between
@@ -9506,157 +9529,157 @@ place.

 @@ -9506,157 +9529,157 @@ place.

9506</dt> 9529</dt>
9507<dt>22.9. <a href="#devfaq.too-much-time">I have a little time to kill. What shall I 9530<dt>22.9. <a href="#devfaq.too-much-time">I have a little time to kill. What shall I
9508do?</a> 9531do?</a>
9509</dt> 9532</dt>
9510</dl> 9533</dl>
9511<table border="0" style="width: 100%;"> 9534<table border="0" style="width: 100%;">
9512<colgroup> 9535<colgroup>
9513<col align="left" width="1%"> 9536<col align="left" width="1%">
9514<col> 9537<col>
9515</colgroup> 9538</colgroup>
9516<tbody> 9539<tbody>
9517<tr class="question"> 9540<tr class="question">
9518<td align="left" valign="top"> 9541<td align="left" valign="top">
9519<a name="devfaq.makeflags"></a><a name="idm77324560"></a><p><b>22.1.</b></p> 9542<a name="devfaq.makeflags"></a><a name="idm77173008"></a><p><b>22.1.</b></p>
9520</td> 9543</td>
9521<td align="left" valign="top"><p>What is the difference between 9544<td align="left" valign="top"><p>What is the difference between
9522 <code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and 9545 <code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and
9523 <code class="varname">MAKE_FLAGS</code>?</p></td> 9546 <code class="varname">MAKE_FLAGS</code>?</p></td>
9524</tr> 9547</tr>
9525<tr class="answer"> 9548<tr class="answer">
9526<td align="left" valign="top"></td> 9549<td align="left" valign="top"></td>
9527<td align="left" valign="top"><p><code class="varname">MAKEFLAGS</code> are the flags passed 9550<td align="left" valign="top"><p><code class="varname">MAKEFLAGS</code> are the flags passed
9528 to the pkgsrc-internal invocations of <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a>, while 9551 to the pkgsrc-internal invocations of <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a>, while
9529 <code class="varname">MAKE_FLAGS</code> are the flags that are passed to 9552 <code class="varname">MAKE_FLAGS</code> are the flags that are passed to
9530 the <code class="varname">MAKE_PROGRAM</code> when building the 9553 the <code class="varname">MAKE_PROGRAM</code> when building the
9531 package. [FIXME: What is .MAKEFLAGS for?]</p></td> 9554 package. [FIXME: What is .MAKEFLAGS for?]</p></td>
9532</tr> 9555</tr>
9533<tr class="question"> 9556<tr class="question">
9534<td align="left" valign="top"> 9557<td align="left" valign="top">
9535<a name="devfaq.make"></a><a name="idm77320592"></a><p><b>22.2.</b></p> 9558<a name="devfaq.make"></a><a name="idm77168912"></a><p><b>22.2.</b></p>
9536</td> 9559</td>
9537<td align="left" valign="top"><p>What is the difference between 9560<td align="left" valign="top"><p>What is the difference between
9538 <code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and 9561 <code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and
9539 <code class="varname">MAKE_PROGRAM</code>?</p></td> 9562 <code class="varname">MAKE_PROGRAM</code>?</p></td>
9540</tr> 9563</tr>
9541<tr class="answer"> 9564<tr class="answer">
9542<td align="left" valign="top"></td> 9565<td align="left" valign="top"></td>
9543<td align="left" valign="top"><p><code class="varname">MAKE</code> is the path to the 9566<td align="left" valign="top"><p><code class="varname">MAKE</code> is the path to the
9544 <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> program that is used in the pkgsrc 9567 <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> program that is used in the pkgsrc
9545 infrastructure. <code class="varname">GMAKE</code> is the path to GNU 9568 infrastructure. <code class="varname">GMAKE</code> is the path to GNU
9546 Make, but you need to say <code class="varname">USE_TOOLS+=gmake</code> to 9569 Make, but you need to say <code class="varname">USE_TOOLS+=gmake</code> to
9547 use that. <code class="varname">MAKE_PROGRAM</code> is the path to the 9570 use that. <code class="varname">MAKE_PROGRAM</code> is the path to the
9548 Make program that is used for building the 9571 Make program that is used for building the
9549 package.</p></td> 9572 package.</p></td>
9550</tr> 9573</tr>
9551<tr class="question"> 9574<tr class="question">
9552<td align="left" valign="top"> 9575<td align="left" valign="top">
9553<a name="devfaq.cc"></a><a name="idm77316112"></a><p><b>22.3.</b></p> 9576<a name="devfaq.cc"></a><a name="idm77164560"></a><p><b>22.3.</b></p>
9554</td> 9577</td>
9555<td align="left" valign="top"><p>What is the difference between 9578<td align="left" valign="top"><p>What is the difference between
9556 <code class="varname">CC</code>, <code class="varname">PKG_CC</code> and 9579 <code class="varname">CC</code>, <code class="varname">PKG_CC</code> and
9557 <code class="varname">PKGSRC_COMPILER</code>?</p></td> 9580 <code class="varname">PKGSRC_COMPILER</code>?</p></td>
9558</tr> 9581</tr>
9559<tr class="answer"> 9582<tr class="answer">
9560<td align="left" valign="top"></td> 9583<td align="left" valign="top"></td>
9561<td align="left" valign="top"><p><code class="varname">CC</code> is the path to the real C 9584<td align="left" valign="top"><p><code class="varname">CC</code> is the path to the real C
9562 compiler, which can be configured by the pkgsrc user. 9585 compiler, which can be configured by the pkgsrc user.
9563 <code class="varname">PKG_CC</code> is the path to the compiler wrapper. 9586 <code class="varname">PKG_CC</code> is the path to the compiler wrapper.
9564 <code class="varname">PKGSRC_COMPILER</code> is <span class="emphasis"><em>not</em></span> a 9587 <code class="varname">PKGSRC_COMPILER</code> is <span class="emphasis"><em>not</em></span> a
9565 path to a compiler, but the type of compiler that should be 9588 path to a compiler, but the type of compiler that should be
9566 used. See <code class="filename">mk/compiler.mk</code> for more 9589 used. See <code class="filename">mk/compiler.mk</code> for more
9567 information about the latter variable.</p></td> 9590 information about the latter variable.</p></td>
9568</tr> 9591</tr>
9569<tr class="question"> 9592<tr class="question">
9570<td align="left" valign="top"> 9593<td align="left" valign="top">
9571<a name="devfaq.bl3flags"></a><a name="idm77312016"></a><p><b>22.4.</b></p> 9594<a name="devfaq.bl3flags"></a><a name="idm77160336"></a><p><b>22.4.</b></p>
9572</td> 9595</td>
9573<td align="left" valign="top"><p>What is the difference between 9596<td align="left" valign="top"><p>What is the difference between
9574 <code class="varname">BUILDLINK_LDFLAGS</code>, 9597 <code class="varname">BUILDLINK_LDFLAGS</code>,
9575 <code class="varname">BUILDLINK_LDADD</code> and 9598 <code class="varname">BUILDLINK_LDADD</code> and
9576 <code class="varname">BUILDLINK_LIBS</code>?</p></td> 9599 <code class="varname">BUILDLINK_LIBS</code>?</p></td>
9577</tr> 9600</tr>
9578<tr class="answer"> 9601<tr class="answer">
9579<td align="left" valign="top"></td> 9602<td align="left" valign="top"></td>
9580<td align="left" valign="top"><p>[FIXME]</p></td> 9603<td align="left" valign="top"><p>[FIXME]</p></td>
9581</tr> 9604</tr>
9582<tr class="question"> 9605<tr class="question">
9583<td align="left" valign="top"> 9606<td align="left" valign="top">
9584<a name="devfaq.bl3prefix"></a><a name="idm77309840"></a><p><b>22.5.</b></p> 9607<a name="devfaq.bl3prefix"></a><a name="idm77158160"></a><p><b>22.5.</b></p>
9585</td> 9608</td>
9586<td align="left" valign="top"><p>Why does <span class="command"><strong>make show-var 9609<td align="left" valign="top"><p>Why does <span class="command"><strong>make show-var
9587 VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span> 9610 VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span>
9588 say it's empty?</p></td> 9611 say it's empty?</p></td>
9589</tr> 9612</tr>
9590<tr class="answer"> 9613<tr class="answer">
9591<td align="left" valign="top"></td> 9614<td align="left" valign="top"></td>
9592<td align="left" valign="top"><p>For optimization reasons, some variables are only 9615<td align="left" valign="top"><p>For optimization reasons, some variables are only
9593 available in the <span class="quote">&#8220;<span class="quote">wrapper</span>&#8221;</span> phase and later. To 9616 available in the <span class="quote">&#8220;<span class="quote">wrapper</span>&#8221;</span> phase and later. To
9594 <span class="quote">&#8220;<span class="quote">simulate</span>&#8221;</span> the wrapper phase, append 9617 <span class="quote">&#8220;<span class="quote">simulate</span>&#8221;</span> the wrapper phase, append
9595 <span class="command"><strong>PKG_PHASE=wrapper</strong></span> to the above 9618 <span class="command"><strong>PKG_PHASE=wrapper</strong></span> to the above
9596 command.</p></td> 9619 command.</p></td>
9597</tr> 9620</tr>
9598<tr class="question"> 9621<tr class="question">
9599<td align="left" valign="top"> 9622<td align="left" valign="top">
9600<a name="devfaq.master_sites"></a><a name="idm77306640"></a><p><b>22.6.</b></p> 9623<a name="devfaq.master_sites"></a><a name="idm77155088"></a><p><b>22.6.</b></p>
9601</td> 9624</td>
9602<td align="left" valign="top"><p>What does 9625<td align="left" valign="top"><p>What does
9603 <code class="literal">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I 9626 <code class="literal">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I
9604 don't understand the <code class="literal">:=</code> inside 9627 don't understand the <code class="literal">:=</code> inside
9605 it.</p></td> 9628 it.</p></td>
9606</tr> 9629</tr>
9607<tr class="answer"> 9630<tr class="answer">
9608<td align="left" valign="top"></td> 9631<td align="left" valign="top"></td>
9609<td align="left" valign="top"><p>The <code class="literal">:=</code> is not really an 9632<td align="left" valign="top"><p>The <code class="literal">:=</code> is not really an
9610 assignment operator, like you might expect at first sight. 9633 assignment operator, like you might expect at first sight.
9611 Instead, it is a degenerate form of 9634 Instead, it is a degenerate form of
9612 <code class="literal">${LIST:<em class="replaceable"><code>old_string</code></em>=<em class="replaceable"><code>new_string</code></em>}</code>, 9635 <code class="literal">${LIST:<em class="replaceable"><code>old_string</code></em>=<em class="replaceable"><code>new_string</code></em>}</code>,
9613 which is documented in the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> man page and which you 9636 which is documented in the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> man page and which you
9614 may have seen as in <code class="literal">${SRCS:.c=.o}</code>. In the 9637 may have seen as in <code class="literal">${SRCS:.c=.o}</code>. In the
9615 case of <code class="varname">MASTER_SITE_*</code>, 9638 case of <code class="varname">MASTER_SITE_*</code>,
9616 <em class="replaceable"><code>old_string</code></em> is the empty string and 9639 <em class="replaceable"><code>old_string</code></em> is the empty string and
9617 <em class="replaceable"><code>new_string</code></em> is 9640 <em class="replaceable"><code>new_string</code></em> is
9618 <code class="literal">package/</code>. That's where the 9641 <code class="literal">package/</code>. That's where the
9619 <code class="literal">:</code> and the <code class="literal">=</code> fall 9642 <code class="literal">:</code> and the <code class="literal">=</code> fall
9620 together.</p></td> 9643 together.</p></td>
9621</tr> 9644</tr>
9622<tr class="question"> 9645<tr class="question">
9623<td align="left" valign="top"> 9646<td align="left" valign="top">
9624<a name="devfaq.mailinglists"></a><a name="idm77298576"></a><p><b>22.7.</b></p> 9647<a name="devfaq.mailinglists"></a><a name="idm77147024"></a><p><b>22.7.</b></p>
9625</td> 9648</td>
9626<td align="left" valign="top"><p>Which mailing lists are there for package 9649<td align="left" valign="top"><p>Which mailing lists are there for package
9627 developers?</p></td> 9650 developers?</p></td>
9628</tr> 9651</tr>
9629<tr class="answer"> 9652<tr class="answer">
9630<td align="left" valign="top"></td> 9653<td align="left" valign="top"></td>
9631<td align="left" valign="top"><div class="variablelist"><dl class="variablelist"> 9654<td align="left" valign="top"><div class="variablelist"><dl class="variablelist">
9632<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#tech-pkg" target="_top">tech-pkg</a></span></dt> 9655<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#tech-pkg" target="_top">tech-pkg</a></span></dt>
9633<dd><p>This is a list for technical discussions related 9656<dd><p>This is a list for technical discussions related
9634 to pkgsrc development, e.g. soliciting feedback for changes to 9657 to pkgsrc development, e.g. soliciting feedback for changes to
9635 pkgsrc infrastructure, proposed new features, questions related 9658 pkgsrc infrastructure, proposed new features, questions related
9636 to porting pkgsrc to a new platform, advice for maintaining a 9659 to porting pkgsrc to a new platform, advice for maintaining a
9637 package, patches that affect many packages, help requests moved 9660 package, patches that affect many packages, help requests moved
9638 from pkgsrc-users when an infrastructure bug is found, 9661 from pkgsrc-users when an infrastructure bug is found,
9639 etc.</p></dd> 9662 etc.</p></dd>
9640<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bugs" target="_top">pkgsrc-bugs</a></span></dt> 9663<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bugs" target="_top">pkgsrc-bugs</a></span></dt>
9641<dd><p>All bug reports in category "pkg" sent with 9664<dd><p>All bug reports in category "pkg" sent with
9642 <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?send-pr+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">send-pr</span>(1)</span></a> appear here. Please do not report your bugs here 9665 <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?send-pr+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">send-pr</span>(1)</span></a> appear here. Please do not report your bugs here
9643 directly; use one of the other mailing 9666 directly; use one of the other mailing
9644 lists.</p></dd> 9667 lists.</p></dd>
9645</dl></div></td> 9668</dl></div></td>
9646</tr> 9669</tr>
9647<tr class="question"> 9670<tr class="question">
9648<td align="left" valign="top"> 9671<td align="left" valign="top">
9649<a name="devfaq.documentation"></a><a name="idm77294864"></a><p><b>22.8.</b></p> 9672<a name="devfaq.documentation"></a><a name="idm77143184"></a><p><b>22.8.</b></p>
9650</td> 9673</td>
9651<td align="left" valign="top"><p>Where is the pkgsrc 9674<td align="left" valign="top"><p>Where is the pkgsrc
9652 documentation?</p></td> 9675 documentation?</p></td>
9653</tr> 9676</tr>
9654<tr class="answer"> 9677<tr class="answer">
9655<td align="left" valign="top"></td> 9678<td align="left" valign="top"></td>
9656<td align="left" valign="top"> 9679<td align="left" valign="top">
9657<p>There are many places where you can find 9680<p>There are many places where you can find
9658 documentation about pkgsrc:</p> 9681 documentation about pkgsrc:</p>
9659<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 9682<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
9660<li class="listitem"><p>The pkgsrc guide (this document) is a collection 9683<li class="listitem"><p>The pkgsrc guide (this document) is a collection
9661 of chapters that explain large parts of pkgsrc, but some 9684 of chapters that explain large parts of pkgsrc, but some
9662 chapters tend to be outdated. Which ones they are is hard to 9685 chapters tend to be outdated. Which ones they are is hard to
@@ -9684,27 +9707,27 @@ do? @@ -9684,27 +9707,27 @@ do?
9684 documented</span>&#8221;</span>, that is the documentation exists only in the 9707 documented</span>&#8221;</span>, that is the documentation exists only in the
9685 mind of the developer who wrote the code. To get this 9708 mind of the developer who wrote the code. To get this
9686 information, use the <span class="command"><strong>cvs annotate</strong></span> command 9709 information, use the <span class="command"><strong>cvs annotate</strong></span> command
9687 to see who has written it and ask on the 9710 to see who has written it and ask on the
9688 <code class="literal">tech-pkg</code> mailing list, so that others can 9711 <code class="literal">tech-pkg</code> mailing list, so that others can
9689 find your questions later (see above). To be sure that the 9712 find your questions later (see above). To be sure that the
9690 developer in charge reads the mail, you may CC him or 9713 developer in charge reads the mail, you may CC him or
9691 her.</p></li> 9714 her.</p></li>
9692</ul></div> 9715</ul></div>
9693</td> 9716</td>
9694</tr> 9717</tr>
9695<tr class="question"> 9718<tr class="question">
9696<td align="left" valign="top"> 9719<td align="left" valign="top">
9697<a name="devfaq.too-much-time"></a><a name="idm77288336"></a><p><b>22.9.</b></p> 9720<a name="devfaq.too-much-time"></a><a name="idm77128464"></a><p><b>22.9.</b></p>
9698</td> 9721</td>
9699<td align="left" valign="top"><p>I have a little time to kill. What shall I 9722<td align="left" valign="top"><p>I have a little time to kill. What shall I
9700do?</p></td> 9723do?</p></td>
9701</tr> 9724</tr>
9702<tr class="answer"> 9725<tr class="answer">
9703<td align="left" valign="top"></td> 9726<td align="left" valign="top"></td>
9704<td align="left" valign="top"> 9727<td align="left" valign="top">
9705<p>This is not really an FAQ yet, but here's the answer 9728<p>This is not really an FAQ yet, but here's the answer
9706anyway.</p> 9729anyway.</p>
9707<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 9730<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
9708<li class="listitem"><p>Run <span class="command"><strong>pkg_chk -N</strong></span> (from the 9731<li class="listitem"><p>Run <span class="command"><strong>pkg_chk -N</strong></span> (from the
9709 <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 9732 <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
9710 will tell you about newer versions of installed packages that are 9733 will tell you about newer versions of installed packages that are

cvs diff -r1.197 -r1.198 pkgsrc/doc/pkgsrc.txt (expand / switch to unified diff)

--- pkgsrc/doc/pkgsrc.txt 2015/01/26 23:00:30 1.197
+++ pkgsrc/doc/pkgsrc.txt 2015/02/15 18:50:48 1.198
@@ -200,27 +200,28 @@ II. The pkgsrc developer's guide @@ -200,27 +200,28 @@ II. The pkgsrc developer's guide
200 12.3.3. Passing variables to a shell command 200 12.3.3. Passing variables to a shell command
201 12.3.4. Quoting guideline 201 12.3.4. Quoting guideline
202 12.3.5. Workaround for a bug in BSD Make 202 12.3.5. Workaround for a bug in BSD Make
203 203
204 13. PLIST issues 204 13. PLIST issues
205 205
206 13.1. RCS ID 206 13.1. RCS ID
207 13.2. Semi-automatic PLIST generation 207 13.2. Semi-automatic PLIST generation
208 13.3. Tweaking output of make print-PLIST 208 13.3. Tweaking output of make print-PLIST
209 13.4. Variable substitution in PLIST 209 13.4. Variable substitution in PLIST
210 13.5. Man page compression 210 13.5. Man page compression
211 13.6. Changing PLIST source with PLIST_SRC 211 13.6. Changing PLIST source with PLIST_SRC
212 13.7. Platform-specific and differing PLISTs 212 13.7. Platform-specific and differing PLISTs
213 13.8. Sharing directories between packages 213 13.8. Build-specific PLISTs
 214 13.9. Sharing directories between packages
214 215
215 14. Buildlink methodology 216 14. Buildlink methodology
216 217
217 14.1. Converting packages to use buildlink3 218 14.1. Converting packages to use buildlink3
218 14.2. Writing buildlink3.mk files 219 14.2. Writing buildlink3.mk files
219 220
220 14.2.1. Anatomy of a buildlink3.mk file 221 14.2.1. Anatomy of a buildlink3.mk file
221 14.2.2. Updating BUILDLINK_API_DEPENDS.pkg and 222 14.2.2. Updating BUILDLINK_API_DEPENDS.pkg and
222 BUILDLINK_ABI_DEPENDS.pkg in buildlink3.mk files 223 BUILDLINK_ABI_DEPENDS.pkg in buildlink3.mk files
223 224
224 14.3. Writing builtin.mk files 225 14.3. Writing builtin.mk files
225 226
226 14.3.1. Anatomy of a builtin.mk file 227 14.3.1. Anatomy of a builtin.mk file
@@ -2901,27 +2902,28 @@ Table of Contents @@ -2901,27 +2902,28 @@ Table of Contents
2901 12.3.3. Passing variables to a shell command 2902 12.3.3. Passing variables to a shell command
2902 12.3.4. Quoting guideline 2903 12.3.4. Quoting guideline
2903 12.3.5. Workaround for a bug in BSD Make 2904 12.3.5. Workaround for a bug in BSD Make
2904 2905
290513. PLIST issues 290613. PLIST issues
2906 2907
2907 13.1. RCS ID 2908 13.1. RCS ID
2908 13.2. Semi-automatic PLIST generation 2909 13.2. Semi-automatic PLIST generation
2909 13.3. Tweaking output of make print-PLIST 2910 13.3. Tweaking output of make print-PLIST
2910 13.4. Variable substitution in PLIST 2911 13.4. Variable substitution in PLIST
2911 13.5. Man page compression 2912 13.5. Man page compression
2912 13.6. Changing PLIST source with PLIST_SRC 2913 13.6. Changing PLIST source with PLIST_SRC
2913 13.7. Platform-specific and differing PLISTs 2914 13.7. Platform-specific and differing PLISTs
2914 13.8. Sharing directories between packages 2915 13.8. Build-specific PLISTs
 2916 13.9. Sharing directories between packages
2915 2917
291614. Buildlink methodology 291814. Buildlink methodology
2917 2919
2918 14.1. Converting packages to use buildlink3 2920 14.1. Converting packages to use buildlink3
2919 14.2. Writing buildlink3.mk files 2921 14.2. Writing buildlink3.mk files
2920 2922
2921 14.2.1. Anatomy of a buildlink3.mk file 2923 14.2.1. Anatomy of a buildlink3.mk file
2922 14.2.2. Updating BUILDLINK_API_DEPENDS.pkg and BUILDLINK_ABI_DEPENDS. 2924 14.2.2. Updating BUILDLINK_API_DEPENDS.pkg and BUILDLINK_ABI_DEPENDS.
2923 pkg in buildlink3.mk files 2925 pkg in buildlink3.mk files
2924 2926
2925 14.3. Writing builtin.mk files 2927 14.3. Writing builtin.mk files
2926 2928
2927 14.3.1. Anatomy of a builtin.mk file 2929 14.3.1. Anatomy of a builtin.mk file
@@ -4146,50 +4148,51 @@ For a more complex code snippet and a wo @@ -4146,50 +4148,51 @@ For a more complex code snippet and a wo
4146make-quoting, testcase bug1. 4148make-quoting, testcase bug1.
4147 4149
4148Chapter 13. PLIST issues 4150Chapter 13. PLIST issues
4149 4151
4150Table of Contents 4152Table of Contents
4151 4153
415213.1. RCS ID 415413.1. RCS ID
415313.2. Semi-automatic PLIST generation 415513.2. Semi-automatic PLIST generation
415413.3. Tweaking output of make print-PLIST 415613.3. Tweaking output of make print-PLIST
415513.4. Variable substitution in PLIST 415713.4. Variable substitution in PLIST
415613.5. Man page compression 415813.5. Man page compression
415713.6. Changing PLIST source with PLIST_SRC 415913.6. Changing PLIST source with PLIST_SRC
415813.7. Platform-specific and differing PLISTs 416013.7. Platform-specific and differing PLISTs
415913.8. Sharing directories between packages 416113.8. Build-specific PLISTs
 416213.9. Sharing directories between packages
4160 4163
4161The PLIST file contains a package's "packing list", i.e. a list of files that 4164The PLIST file contains a package's "packing list", i.e. a list of files that
4162belong to the package (relative to the ${PREFIX} directory it's been installed 4165belong to the package (relative to the ${PREFIX} directory it's been installed
4163in) plus some additional statements - see the pkg_create(1) man page for a full 4166in) plus some additional statements - see the pkg_create(1) man page for a full
4164list. This chapter addresses some issues that need attention when dealing with 4167list. This chapter addresses some issues that need attention when dealing with
4165the PLIST file (or files, see below!). 4168the PLIST file (or files, see below!).
4166 4169
416713.1. RCS ID 417013.1. RCS ID
4168 4171
4169Be sure to add a RCS ID line as the first thing in any PLIST file you write: 4172Be sure to add a RCS ID line as the first thing in any PLIST file you write:
4170 4173
4171@comment $NetBSD$ 4174@comment $NetBSD$
4172 4175
4173 4176
417413.2. Semi-automatic PLIST generation 417713.2. Semi-automatic PLIST generation
4175 4178
4176You can use the make print-PLIST command to output a PLIST that matches any new 4179You can use the make print-PLIST command to output a PLIST that matches any new
4177files since the package was extracted. See Section 17.17, "Other helpful 4180files since the package was extracted. See Section 17.17, "Other helpful
4178targets" for more information on this target. 4181targets" for more information on this target.
4179 4182
418013.3. Tweaking output of make print-PLIST 418313.3. Tweaking output of make print-PLIST
4181 4184
4182If you have used any of the *-dirs packages, as explained in Section 13.8, 4185If you have used any of the *-dirs packages, as explained in Section 13.9,
4183"Sharing directories between packages", you may have noticed that make 4186"Sharing directories between packages", you may have noticed that make
4184print-PLIST outputs a set of @comments instead of real @dirrm lines. You can 4187print-PLIST outputs a set of @comments instead of real @dirrm lines. You can
4185also do this for specific directories and files, so that the results of that 4188also do this for specific directories and files, so that the results of that
4186command are very close to reality. This helps a lot during the update of 4189command are very close to reality. This helps a lot during the update of
4187packages. 4190packages.
4188 4191
4189The PRINT_PLIST_AWK variable takes a set of AWK patterns and actions that are 4192The PRINT_PLIST_AWK variable takes a set of AWK patterns and actions that are
4190used to filter the output of print-PLIST. You can append any chunk of AWK 4193used to filter the output of print-PLIST. You can append any chunk of AWK
4191scripting you like to it, but be careful with quoting. 4194scripting you like to it, but be careful with quoting.
4192 4195
4193For example, to get all files inside the libdata/foo directory removed from the 4196For example, to get all files inside the libdata/foo directory removed from the
4194resulting PLIST: 4197resulting PLIST:
4195 4198
@@ -4289,43 +4292,61 @@ Some packages decide to install a differ @@ -4289,43 +4292,61 @@ Some packages decide to install a differ
4289system being used. These differences can be automatically handled by using the 4292system being used. These differences can be automatically handled by using the
4290following files: 4293following files:
4291 4294
4292 * PLIST.common 4295 * PLIST.common
4293 4296
4294 * PLIST.${OPSYS} 4297 * PLIST.${OPSYS}
4295 4298
4296 * PLIST.${MACHINE_ARCH} 4299 * PLIST.${MACHINE_ARCH}
4297 4300
4298 * PLIST.${OPSYS}-${MACHINE_ARCH} 4301 * PLIST.${OPSYS}-${MACHINE_ARCH}
4299 4302
4300 * PLIST.common_end 4303 * PLIST.common_end
4301 4304
430213.8. Sharing directories between packages 430513.8. Build-specific PLISTs
 4306
 4307Some packages decide to generate hard-to-guess file names during installation
 4308that are hard to wire down.
 4309
 4310In such cases, you can set the GENERATE_PLIST variable to shell code terminated
 4311(with a semicolon) that will output PLIST entries which will be appended to the
 4312PLIST
 4313
 4314You can find one example in editors/xemacs:
 4315
 4316 GENERATE_PLIST+= ${ECHO} bin/${DISTNAME}-`${WRKSRC}/src/xemacs -sd`.dmp ;
 4317
 4318
 4319which will append something like bin/xemacs-21.4.23-54e8ea71.dmp to the PLIST.
 4320
 432113.9. Sharing directories between packages
4303 4322
4304A "shared directory" is a directory where multiple (and unrelated) packages 4323A "shared directory" is a directory where multiple (and unrelated) packages
4305install files. These directories were problematic because you had to add 4324install files. These directories were problematic because you had to add
4306special tricks in the PLIST to conditionally remove them, or have some 4325special tricks in the PLIST to conditionally remove them, or have some
4307centralized package handle them. 4326centralized package handle them.
4308 4327
4309In pkgsrc, it is now easy: Each package should create directories and install 4328In pkgsrc, it is now easy: Each package should create directories and install
4310files as needed; pkg_delete will remove any directories left empty after 4329files as needed; pkg_delete will remove any directories left empty after
4311uninstalling a package. 4330uninstalling a package.
4312 4331
4313If a package needs an empty directory to work, create the directory during 4332If a package needs an empty directory to work, create the directory during
4314installation as usual, and also add an entry to the PLIST: 4333installation as usual, and also add an entry to the PLIST:
4315 4334
4316@pkgdir path/to/empty/directory 4335@pkgdir path/to/empty/directory
4317 4336
4318 4337
 4338or take a look at MAKE_DIRS and OWN_DIRS.
 4339
4319Chapter 14. Buildlink methodology 4340Chapter 14. Buildlink methodology
4320 4341
4321Table of Contents 4342Table of Contents
4322 4343
432314.1. Converting packages to use buildlink3 434414.1. Converting packages to use buildlink3
432414.2. Writing buildlink3.mk files 434514.2. Writing buildlink3.mk files
4325 4346
4326 14.2.1. Anatomy of a buildlink3.mk file 4347 14.2.1. Anatomy of a buildlink3.mk file
4327 14.2.2. Updating BUILDLINK_API_DEPENDS.pkg and BUILDLINK_ABI_DEPENDS.pkg in 4348 14.2.2. Updating BUILDLINK_API_DEPENDS.pkg and BUILDLINK_ABI_DEPENDS.pkg in
4328 buildlink3.mk files 4349 buildlink3.mk files
4329 4350
433014.3. Writing builtin.mk files 435114.3. Writing builtin.mk files
4331 4352