Sun May 26 18:21:46 2013 UTC ()
Document how to add build dependencies using buildlink3.mk.
Requested by rodent.


(wiz)
diff -r1.120 -r1.121 pkgsrc/doc/guide/files/fixes.xml

cvs diff -r1.120 -r1.121 pkgsrc/doc/guide/files/fixes.xml (expand / switch to unified diff)

--- pkgsrc/doc/guide/files/fixes.xml 2013/05/06 01:32:58 1.120
+++ pkgsrc/doc/guide/files/fixes.xml 2013/05/26 18:21:46 1.121
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1<!-- $NetBSD: fixes.xml,v 1.120 2013/05/06 01:32:58 rodent Exp $ --> 1<!-- $NetBSD: fixes.xml,v 1.121 2013/05/26 18:21:46 wiz Exp $ -->
2 2
3<chapter id="fixes"> <?dbhtml filename="fixes.html"?> 3<chapter id="fixes"> <?dbhtml filename="fixes.html"?>
4<title>Making your package work</title> 4<title>Making your package work</title>
5 5
6<sect1 id="general-operation"> 6<sect1 id="general-operation">
7 <title>General operation</title> 7 <title>General operation</title>
8 8
9 <sect2 id="portability-of-packages"> 9 <sect2 id="portability-of-packages">
10 <title>Portability of packages</title> 10 <title>Portability of packages</title>
11 11
12 <para>One appealing feature of pkgsrc is that it runs on many 12 <para>One appealing feature of pkgsrc is that it runs on many
13 different platforms. As a result, it is important to ensure, 13 different platforms. As a result, it is important to ensure,
14 where possible, that packages in pkgsrc are portable. This 14 where possible, that packages in pkgsrc are portable. This
@@ -348,35 +348,49 @@ ACCEPTABLE_LICENSES+=xv-license @@ -348,35 +348,49 @@ ACCEPTABLE_LICENSES+=xv-license
348 <varname>DEPENDS</varname> definition is:</para> 348 <varname>DEPENDS</varname> definition is:</para>
349 349
350 <programlisting> 350 <programlisting>
351&lt;pre-req-package-name&gt;:../../&lt;category&gt;/&lt;pre-req-package&gt; 351&lt;pre-req-package-name&gt;:../../&lt;category&gt;/&lt;pre-req-package&gt;
352 </programlisting> 352 </programlisting>
353 353
354 <para>Please note that the <quote>pre-req-package-name</quote> 354 <para>Please note that the <quote>pre-req-package-name</quote>
355 may include any of the wildcard version numbers recognized by 355 may include any of the wildcard version numbers recognized by
356 &man.pkg.info.1;.</para> 356 &man.pkg.info.1;.</para>
357 357
358 <orderedlist> 358 <orderedlist>
359 <listitem> 359 <listitem>
360 <para>If your package needs another package's binaries or 360 <para>If your package needs another package's binaries or
361 libraries to build or run, and if that package has a 361 libraries to build and run, and if that package has a
362 <filename>buildlink3.mk</filename> file available, use it:</para> 362 <filename>buildlink3.mk</filename> file available, use it:</para>
363 363
364 <programlisting> 364 <programlisting>
365.include "../../graphics/jpeg/buildlink3.mk" 365.include "../../graphics/jpeg/buildlink3.mk"
366 </programlisting> 366 </programlisting>
367 </listitem> 367 </listitem>
368 368
369 <listitem> 369 <listitem>
 370 <para>If your package needs another package's binaries or
 371 libraries only for building, and if that package has a
 372 <filename>buildlink3.mk</filename> file available, use it:</para>
 373
 374 <programlisting>
 375.include "../../graphics/jpeg/buildlink3.mk"
 376 </programlisting>
 377 <para>but set
 378 <varname>BUILDLINK_DEPMETHOD.<replaceable>jpeg</replaceable>?=build</varname>
 379 to make it a build dependency only. This case is rather
 380 rare.</para>
 381 </listitem>
 382
 383 <listitem>
370 <para>If your package needs binaries from another package to build, 384 <para>If your package needs binaries from another package to build,
371 use the <varname>BUILD_DEPENDS</varname> definition:</para> 385 use the <varname>BUILD_DEPENDS</varname> definition:</para>
372 386
373 <programlisting> 387 <programlisting>
374BUILD_DEPENDS+= scons-[0-9]*:../../devel/scons 388BUILD_DEPENDS+= scons-[0-9]*:../../devel/scons
375 </programlisting> 389 </programlisting>
376 </listitem> 390 </listitem>
377 391
378 <listitem> 392 <listitem>
379 <para>If your package needs a library with which to link and 393 <para>If your package needs a library with which to link and
380 there is no <filename>buildlink3.mk</filename> file 394 there is no <filename>buildlink3.mk</filename> file
381 available, create one. Using 395 available, create one. Using
382 <varname>DEPENDS</varname> won't be sufficient because the 396 <varname>DEPENDS</varname> won't be sufficient because the