pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/doc/guide/files Documented how to query for the option...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c8a562b677ba
branches:  trunk
changeset: 533820:c8a562b677ba
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Mon Oct 01 22:38:42 2007 +0000

description:
Documented how to query for the options with which a dependent package
has been built.

diffstat:

 doc/guide/files/buildlink.xml |   4 +++-
 doc/guide/files/options.xml   |  29 ++++++++++++++++++++++++++++-
 doc/guide/files/pkgsrc.ent    |   3 ++-
 3 files changed, 33 insertions(+), 3 deletions(-)

diffs (72 lines):

diff -r 06a860b1d6ac -r c8a562b677ba doc/guide/files/buildlink.xml
--- a/doc/guide/files/buildlink.xml     Mon Oct 01 22:32:45 2007 +0000
+++ b/doc/guide/files/buildlink.xml     Mon Oct 01 22:38:42 2007 +0000
@@ -1,4 +1,4 @@
-<!-- $NetBSD: buildlink.xml,v 1.24 2007/06/01 11:07:24 rillig Exp $ -->
+<!-- $NetBSD: buildlink.xml,v 1.25 2007/10/01 22:38:42 rillig Exp $ -->
 
 <chapter id="buildlink">
   <title>Buildlink methodology</title>
@@ -158,6 +158,8 @@
   <sect1 id="creating-buildlink3.mk">
     <title>Writing <filename>buildlink3.mk</filename> files</title>
 
+<anchor id="buildlink3.mk"/>
+
     <para>A package's <filename>buildlink3.mk</filename> file is
     included by Makefiles to indicate the need to compile and link
     against header files and libraries provided by the package.  A
diff -r 06a860b1d6ac -r c8a562b677ba doc/guide/files/options.xml
--- a/doc/guide/files/options.xml       Mon Oct 01 22:32:45 2007 +0000
+++ b/doc/guide/files/options.xml       Mon Oct 01 22:38:42 2007 +0000
@@ -1,4 +1,4 @@
-<!-- $NetBSD: options.xml,v 1.24 2007/09/22 02:52:48 kano Exp $ -->
+<!-- $NetBSD: options.xml,v 1.25 2007/10/01 22:38:42 rillig Exp $ -->
 
 <!-- based on: pkgsrc/mk/bsd.options.mk 1.56 -->
 
@@ -243,4 +243,31 @@
 
 </sect1>
 
+<sect1 id="option-build">
+<title>Determining the options of dependencies</title>
+
+<para>When writing &buildlink3.mk; files, it is often necessary to list
+different dependencies based on the options with which the package was
+built. For querying these options, the file
+<filename>pkgsrc/mk/pkg-build-options.mk</filename> should be used. A
+typical example looks like this:</para>
+
+<programlisting>
+pkgbase := libpurple
+.include "../../mk/pkg-build-options.mk"
+
+.if !empty(PKG_BUILD_OPTIONS.libpurple:Mdbus)
+...
+.endif
+</programlisting>
+
+<para>Including <filename>pkg-build-options.mk</filename> here will set
+the variable <varname>PKG_BUILD_OPTIONS.libpurple</varname> to the build
+options of the libpurple package, which can then be queried like
+<varname>PKG_OPTIONS</varname> in the <filename>options.mk</filename>
+file. See the file <filename>pkg-build-options.mk</filename> for more
+details.</para>
+
+</sect1>
+
 </chapter>
diff -r 06a860b1d6ac -r c8a562b677ba doc/guide/files/pkgsrc.ent
--- a/doc/guide/files/pkgsrc.ent        Mon Oct 01 22:32:45 2007 +0000
+++ b/doc/guide/files/pkgsrc.ent        Mon Oct 01 22:38:42 2007 +0000
@@ -1,7 +1,8 @@
-<!-- $NetBSD: pkgsrc.ent,v 1.1 2007/08/15 06:33:46 rillig Exp $ -->
+<!-- $NetBSD: pkgsrc.ent,v 1.2 2007/10/01 22:38:42 rillig Exp $ -->
 
 <!--
        Entities that can (and should) be used in the pkgsrc guide.
 -->
 
 <!ENTITY mk.conf "<link linkend='mk.conf'><filename>mk.conf</filename></link>">
+<!ENTITY buildlink3.mk "<link linkend='buildlink3.mk'><filename>buildlink3.mk</filename></link>">



Home | Main Index | Thread Index | Old Index