pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/doc/guide/files Whitespace cleanups.
details: https://anonhg.NetBSD.org/pkgsrc/rev/625e7bd270a3
branches: trunk
changeset: 518441:625e7bd270a3
user: wiz <wiz%pkgsrc.org@localhost>
date: Sat Sep 09 23:49:08 2006 +0000
description:
Whitespace cleanups.
diffstat:
doc/guide/files/buildlink.xml | 713 +++++++++++++++++++--------------------
doc/guide/files/configuring.xml | 8 +-
doc/guide/files/debug.xml | 7 +-
doc/guide/files/faq.xml | 26 +-
4 files changed, 363 insertions(+), 391 deletions(-)
diffs (truncated from 1071 to 300 lines):
diff -r 7b9f900ec139 -r 625e7bd270a3 doc/guide/files/buildlink.xml
--- a/doc/guide/files/buildlink.xml Sat Sep 09 23:47:40 2006 +0000
+++ b/doc/guide/files/buildlink.xml Sat Sep 09 23:49:08 2006 +0000
@@ -1,328 +1,318 @@
-<!-- $NetBSD: buildlink.xml,v 1.16 2006/04/06 07:57:10 reed Exp $ -->
+<!-- $NetBSD: buildlink.xml,v 1.17 2006/09/09 23:49:08 wiz Exp $ -->
<chapter id="buildlink">
<title>Buildlink methodology</title>
<para>Buildlink is a framework in pkgsrc that controls what headers and libraries
- are seen by a package's configure and build processes. This is implemented
- in a two step process:</para>
+ are seen by a package's configure and build processes. This is implemented
+ in a two step process:</para>
<orderedlist>
<listitem>
<para>Symlink headers and libraries for dependencies into
- <varname>BUILDLINK_DIR</varname>, which by default is a subdirectory
- of <varname>WRKDIR</varname>.</para>
+ <varname>BUILDLINK_DIR</varname>, which by default is a subdirectory
+ of <varname>WRKDIR</varname>.</para>
</listitem>
<listitem>
<para>Create wrapper scripts that are used in place of the normal compiler
- tools that translate <option>-I${LOCALBASE}/include</option> and
- <option>-L${LOCALBASE}/lib</option> into references to
- <varname>BUILDLINK_DIR</varname>. The wrapper scripts also make
- native compiler on some operating systems look like GCC, so that
- packages that expect GCC won't require modifications to build with
- those native compilers.</para>
+ tools that translate <option>-I${LOCALBASE}/include</option> and
+ <option>-L${LOCALBASE}/lib</option> into references to
+ <varname>BUILDLINK_DIR</varname>. The wrapper scripts also make
+ native compiler on some operating systems look like GCC, so that
+ packages that expect GCC won't require modifications to build with
+ those native compilers.</para>
</listitem>
</orderedlist>
<para>This normalizes the environment in which a package is built so that the
- package may be built consistently despite what other software may be
- installed. Please note that the normal system header and library paths,
- e.g. <filename>/usr/include</filename>,
- <filename>/usr/lib</filename>, etc., are always searched -- buildlink3 is
- designed to insulate the package build from non-system-supplied
- software. </para>
+ package may be built consistently despite what other software may be
+ installed. Please note that the normal system header and library paths,
+ e.g. <filename>/usr/include</filename>,
+ <filename>/usr/lib</filename>, etc., are always searched -- buildlink3 is
+ designed to insulate the package build from non-system-supplied
+ software.</para>
<sect1 id="converting-to-buildlink3">
<title>Converting packages to use buildlink3</title>
<para>The process of converting packages to use the buildlink3
- framework (<quote>bl3ifying</quote>) is fairly straightforward.
- The things to keep in mind are:</para>
+ framework (<quote>bl3ifying</quote>) is fairly straightforward.
+ The things to keep in mind are:</para>
<orderedlist>
<listitem>
- <para> Ensure that the build always calls the wrapper scripts
- instead of the actual toolchain. Some packages are tricky,
- and the only way to know for sure is the check
- <filename>${WRKDIR}/.work.log</filename> to see if the
- wrappers are being invoked. </para>
+ <para>Ensure that the build always calls the wrapper scripts
+ instead of the actual toolchain. Some packages are tricky,
+ and the only way to know for sure is the check
+ <filename>${WRKDIR}/.work.log</filename> to see if the
+ wrappers are being invoked.</para>
</listitem>
<listitem>
- <para> Don't override <varname>PREFIX</varname> from within
- the package Makefile, e.g. Java VMs, standalone shells,
- etc., because the code to symlink files into
- <filename>${BUILDLINK_DIR}</filename> looks for files
- relative to <quote>pkg_info -qp <replaceable>pkgname</replaceable></quote>.
- </para>
+ <para>Don't override <varname>PREFIX</varname> from within
+ the package Makefile, e.g. Java VMs, standalone shells,
+ etc., because the code to symlink files into
+ <filename>${BUILDLINK_DIR}</filename> looks for files
+ relative to <quote>pkg_info -qp <replaceable>pkgname</replaceable></quote>.
+ </para>
</listitem>
<listitem>
- <para> Remember that <emphasis>only</emphasis> the
- <filename>buildlink3.mk</filename> files that you list in a
- package's Makefile are added as dependencies for that package.
- </para>
+ <para>Remember that <emphasis>only</emphasis> the
+ <filename>buildlink3.mk</filename> files that you list in a
+ package's Makefile are added as dependencies for that package.
+ </para>
</listitem>
</orderedlist>
- <para> If a dependency on a particular package is required for its libraries and
- headers, then we replace: </para>
+ <para>If a dependency on a particular package is required for its libraries and
+ headers, then we replace:</para>
-<programlisting>
- DEPENDS+= foo>=1.1.0:../../category/foo
-</programlisting>
+ <programlisting>
+ DEPENDS+= foo>=1.1.0:../../category/foo
+ </programlisting>
<para>with</para>
-<programlisting>
- .include "../../category/foo/buildlink3.mk"
-</programlisting>
+ <programlisting>
+ .include "../../category/foo/buildlink3.mk"
+ </programlisting>
<para>The buildlink3.mk files usually define the required dependencies.
If you need a newer version of the dependency when using buildlink3.mk
- files, then you can define it in your Makefile; for example:
- </para>
+ files, then you can define it in your Makefile; for example:</para>
-<programlisting>
- BUILDLINK_API_DEPENDS.foo+= foo>=1.1.0
- .include "../../category/foo/buildlink3.mk"
-</programlisting>
+ <programlisting>
+ BUILDLINK_API_DEPENDS.foo+= foo>=1.1.0
+ .include "../../category/foo/buildlink3.mk"
+ </programlisting>
<para>There are several <filename>buildlink3.mk</filename>
- files in <filename>pkgsrc/mk</filename>
- that handle special package issues:</para>
+ files in <filename>pkgsrc/mk</filename>
+ that handle special package issues:</para>
<itemizedlist>
<listitem>
<para><filename>bdb.buildlink3.mk</filename> chooses either
- the native or a pkgsrc Berkeley DB implementation based on
- the values of <varname>BDB_ACCEPTED</varname> and
- <varname>BDB_DEFAULT</varname>.</para>
+ the native or a pkgsrc Berkeley DB implementation based on
+ the values of <varname>BDB_ACCEPTED</varname> and
+ <varname>BDB_DEFAULT</varname>.</para>
</listitem>
<listitem>
<para><filename>curses.buildlink3.mk</filename>: If the system
- comes with neither Curses nor NCurses, this will take care
- to install the <filename
- role="pkg">devel/ncurses</filename> package.</para>
+ comes with neither Curses nor NCurses, this will take care
+ to install the <filename
+ role="pkg">devel/ncurses</filename> package.</para>
</listitem>
<listitem>
<para><filename>krb5.buildlink3.mk</filename> uses the value
- of <varname>KRB5_ACCEPTED</varname> to choose between
- adding a dependency on Heimdal or MIT-krb5 for packages that
- require a Kerberos 5 implementation.</para>
+ of <varname>KRB5_ACCEPTED</varname> to choose between
+ adding a dependency on Heimdal or MIT-krb5 for packages that
+ require a Kerberos 5 implementation.</para>
</listitem>
<listitem>
<para><filename>motif.buildlink3.mk</filename> checks
- for a system-provided
- Motif installation or adds a dependency on <filename
- role="pkg">x11/lesstif</filename> or
- <filename role="pkg">x11/openmotif</filename>.</para>
+ for a system-provided
+ Motif installation or adds a dependency on <filename
+ role="pkg">x11/lesstif</filename> or
+ <filename role="pkg">x11/openmotif</filename>.</para>
</listitem>
<listitem>
<para><filename>oss.buildlink3.mk</filename> defines several
- variables that may be used by packages that use the
- Open Sound System (OSS) API.</para>
+ variables that may be used by packages that use the
+ Open Sound System (OSS) API.</para>
</listitem>
<listitem>
<para><filename>pgsql.buildlink3.mk</filename> will accept
- either Postgres 7.3 or 7.4, whichever is found installed. See
- the file for more information. </para>
+ either Postgres 7.3 or 7.4, whichever is found installed. See
+ the file for more information.</para>
</listitem>
<listitem>
<para><filename>pthread.buildlink3.mk</filename> uses the value of
- <varname>PTHREAD_OPTS</varname> and checks for native pthreads or adds
- a dependency on <filename
- role="pkg">devel/pth</filename> as needed.</para>
+ <varname>PTHREAD_OPTS</varname> and checks for native pthreads or adds
+ a dependency on <filename
+ role="pkg">devel/pth</filename> as needed.</para>
</listitem>
<listitem>
<para><filename>xaw.buildlink3.mk</filename> uses the value of
- <varname>XAW_TYPE</varname> to choose a particular Athena widgets
- library.</para>
+ <varname>XAW_TYPE</varname> to choose a particular Athena widgets
+ library.</para>
</listitem>
</itemizedlist>
<para>The comments in those <filename>buildlink3.mk</filename>
- files provide a more complete
- description of how to use them properly.</para>
+ files provide a more complete
+ description of how to use them properly.</para>
</sect1>
<sect1 id="creating-buildlink3.mk">
<title>Writing <filename>buildlink3.mk</filename> files</title>
- <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
- <filename>buildlink3.mk</filename> file should always provide
- enough information to add the correct type of dependency
- relationship and include any other
- <filename>buildlink3.mk</filename> files that it needs to find
- headers and libraries that it needs in turn.</para>
+ <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
+ <filename>buildlink3.mk</filename> file should always provide
+ enough information to add the correct type of dependency
+ relationship and include any other
+ <filename>buildlink3.mk</filename> files that it needs to find
+ headers and libraries that it needs in turn.</para>
- <para> To generate an initial <filename>buildlink3.mk</filename>
- file for further editing, Rene Hexel's <filename
- role="pkg">pkgtools/createbuildlink</filename>
- package is highly recommended. For most packages, the following
- command will generate a good starting point for
- <filename>buildlink3.mk</filename> files:</para>
+ <para>To generate an initial <filename>buildlink3.mk</filename>
+ file for further editing, Rene Hexel's <filename
+ role="pkg">pkgtools/createbuildlink</filename>
+ package is highly recommended. For most packages, the following
+ command will generate a good starting point for
+ <filename>buildlink3.mk</filename> files:</para>
<screen>&cprompt; <userinput>cd pkgsrc/<replaceable>category</replaceable>/<replaceable>pkgdir</replaceable>
-&cprompt; createbuildlink >buildlink3.mk</userinput></screen>
+ &cprompt; createbuildlink >buildlink3.mk</userinput></screen>
<sect2 id="anatomy-of-bl3">
<title>Anatomy of a buildlink3.mk file</title>
<para>The following real-life example
- <filename>buildlink3.mk</filename> is taken
- from <filename>pkgsrc/graphics/tiff</filename>:</para>
+ <filename>buildlink3.mk</filename> is taken
+ from <filename>pkgsrc/graphics/tiff</filename>:</para>
-<programlisting>
- # $NetBSD: buildlink3.mk,v 1.7 2004/03/18 09:12:12 jlam Exp $
+ <programlisting>
+ # $NetBSD: buildlink3.mk,v 1.7 2004/03/18 09:12:12 jlam Exp $
- BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
- TIFF_BUILDLINK3_MK:= ${TIFF_BUILDLINK3_MK}+
+ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+ TIFF_BUILDLINK3_MK:= ${TIFF_BUILDLINK3_MK}+
- .if !empty(BUILDLINK_DEPTH:M+)
- BUILDLINK_DEPENDS+= tiff
- .endif
+ .if !empty(BUILDLINK_DEPTH:M+)
+ BUILDLINK_DEPENDS+= tiff
+ .endif
- BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntiff}
- BUILDLINK_PACKAGES+= tiff
+ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntiff}
+ BUILDLINK_PACKAGES+= tiff
Home |
Main Index |
Thread Index |
Old Index