pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/doc/guide/files Document ALLFILES, reindent a bit.
details: https://anonhg.NetBSD.org/pkgsrc/rev/7b9f900ec139
branches: trunk
changeset: 518440:7b9f900ec139
user: wiz <wiz%pkgsrc.org@localhost>
date: Sat Sep 09 23:47:40 2006 +0000
description:
Document ALLFILES, reindent a bit.
diffstat:
doc/guide/files/build.xml | 566 +++++++++++++++++++++++----------------------
1 files changed, 285 insertions(+), 281 deletions(-)
diffs (truncated from 869 to 300 lines):
diff -r 99a9b03d15d7 -r 7b9f900ec139 doc/guide/files/build.xml
--- a/doc/guide/files/build.xml Sat Sep 09 23:40:40 2006 +0000
+++ b/doc/guide/files/build.xml Sat Sep 09 23:47:40 2006 +0000
@@ -1,211 +1,211 @@
-<!-- $NetBSD: build.xml,v 1.32 2006/09/09 04:21:30 obache Exp $ -->
+<!-- $NetBSD: build.xml,v 1.33 2006/09/09 23:47:40 wiz Exp $ -->
<chapter id="build">
-<title>The build process</title>
+ <title>The build process</title>
-<sect1 id="build.intro">
-<title>Introduction</title>
+ <sect1 id="build.intro">
+ <title>Introduction</title>
-<para>This chapter gives a detailed description on how a package is
-built. Building a package is separated into different
-<emphasis>phases</emphasis> (for example <varname>fetch</varname>,
-<varname>build</varname>, <varname>install</varname>), all of which are
-described in the following sections. Each phase is splitted into
-so-called <emphasis>stages</emphasis>, which take the name of the
-containing phase, prefixed by one of <varname>pre-</varname>,
-<varname>do-</varname> or <varname>post-</varname>. (Examples are
-<varname>pre-configure</varname>, <varname>post-build</varname>.) Most
-of the actual work is done in the <varname>do-*</varname> stages.</para>
+ <para>This chapter gives a detailed description on how a package is
+ built. Building a package is separated into different
+ <emphasis>phases</emphasis> (for example <varname>fetch</varname>,
+ <varname>build</varname>, <varname>install</varname>), all of which are
+ described in the following sections. Each phase is splitted into
+ so-called <emphasis>stages</emphasis>, which take the name of the
+ containing phase, prefixed by one of <varname>pre-</varname>,
+ <varname>do-</varname> or <varname>post-</varname>. (Examples are
+ <varname>pre-configure</varname>, <varname>post-build</varname>.) Most
+ of the actual work is done in the <varname>do-*</varname> stages.</para>
-<para>The basic steps for building a program are always the same. First
-the program's source (<emphasis>distfile</emphasis>) must be brought to
-the local system and then extracted. After any pkgsrc-specific patches
-to compile properly are applied, the software can be configured, then
-built (usually by compiling), and finally the generated binaries, etc.
-can be put into place on the system.</para>
+ <para>The basic steps for building a program are always the same. First
+ the program's source (<emphasis>distfile</emphasis>) must be brought to
+ the local system and then extracted. After any pkgsrc-specific patches
+ to compile properly are applied, the software can be configured, then
+ built (usually by compiling), and finally the generated binaries, etc.
+ can be put into place on the system.</para>
-</sect1>
+ </sect1>
<sect1 id="build.prefix">
<title>Program location</title>
<para>Before outlining the process performed by the &os; package system in
- the next section, here's a brief discussion on where programs are
- installed, and which variables influence this.</para>
+ the next section, here's a brief discussion on where programs are
+ installed, and which variables influence this.</para>
<para>The automatic variable <varname>PREFIX</varname> indicates
- where all files of the final program shall be installed. It is
- usually set to <varname>LOCALBASE</varname>
- (<filename>/usr/pkg</filename>), or <varname>CROSSBASE</varname>
- for pkgs in the <quote>cross</quote> category. The value of
- <varname>PREFIX</varname> needs to be put
- into the various places in the program's source where paths to
- these files are encoded. See <xref
- linkend="components.patches"/> and <xref
- linkend="fixes.libtool"/> for more details.</para>
+ where all files of the final program shall be installed. It is
+ usually set to <varname>LOCALBASE</varname>
+ (<filename>/usr/pkg</filename>), or <varname>CROSSBASE</varname>
+ for pkgs in the <quote>cross</quote> category. The value of
+ <varname>PREFIX</varname> needs to be put
+ into the various places in the program's source where paths to
+ these files are encoded. See <xref
+ linkend="components.patches"/> and <xref
+ linkend="fixes.libtool"/> for more details.</para>
<para>When choosing which of these variables to use,
- follow the following rules:</para>
+ follow the following rules:</para>
<itemizedlist>
<listitem>
<para><varname>PREFIX</varname> always points to the location where the current
- pkg will be installed. When referring to a pkg's own installation path,
- use <quote>${PREFIX}</quote>.</para>
+ pkg will be installed. When referring to a pkg's own installation path,
+ use <quote>${PREFIX}</quote>.</para>
</listitem>
<listitem>
<para><varname>LOCALBASE</varname> is where all non-X11 pkgs are installed.
- If you need to construct a -I or -L argument to the compiler to find
- includes and libraries installed by another non-X11 pkg, use
- <quote>${LOCALBASE}</quote>. The name
- <varname>LOCALBASE</varname> stems from FreeBSD, which
- installed all packages in <filename>/usr/local</filename>. As
- pkgsrc leaves <filename>/usr/local</filename> for the system
- administrator, this variable is a misnomer.</para>
+ If you need to construct a -I or -L argument to the compiler to find
+ includes and libraries installed by another non-X11 pkg, use
+ <quote>${LOCALBASE}</quote>. The name
+ <varname>LOCALBASE</varname> stems from FreeBSD, which
+ installed all packages in <filename>/usr/local</filename>. As
+ pkgsrc leaves <filename>/usr/local</filename> for the system
+ administrator, this variable is a misnomer.</para>
</listitem>
<listitem>
<para><varname>X11BASE</varname> is where the actual X11 distribution (from
- xsrc, etc.) is installed. When looking for
- <emphasis>standard</emphasis> X11 includes (not
- those installed by a pkg), use <quote>${X11BASE}</quote>.</para>
+ xsrc, etc.) is installed. When looking for
+ <emphasis>standard</emphasis> X11 includes (not
+ those installed by a pkg), use <quote>${X11BASE}</quote>.</para>
</listitem>
<listitem>
<para>X11-based packages are special in that they may be installed in
- either <varname>X11BASE</varname> or <varname>LOCALBASE</varname>.</para>
+ either <varname>X11BASE</varname> or <varname>LOCALBASE</varname>.</para>
<para>Usually, X11 packages should be installed under
- <varname>LOCALBASE</varname> whenever possible. Note that you will
- need to include <filename>../../mk/x11.buildlink3.mk</filename>
- in them to request the
- presence of X11 and to get the right compilation flags.</para>
+ <varname>LOCALBASE</varname> whenever possible. Note that you will
+ need to include <filename>../../mk/x11.buildlink3.mk</filename>
+ in them to request the
+ presence of X11 and to get the right compilation flags.</para>
<para>Even though, there are some packages that cannot be installed
- under <varname>LOCALBASE</varname>: those that come with app-defaults
- files. These packages are special and they must be placed under
- <varname>X11BASE</varname>. To accomplish this, set either
- <varname>USE_X11BASE</varname> or <varname>USE_IMAKE</varname> in
- your package.</para>
+ under <varname>LOCALBASE</varname>: those that come with app-defaults
+ files. These packages are special and they must be placed under
+ <varname>X11BASE</varname>. To accomplish this, set either
+ <varname>USE_X11BASE</varname> or <varname>USE_IMAKE</varname> in
+ your package.</para>
<para>Some notes: If you need
- to find includes or libraries installed by a pkg that has
- <varname>USE_IMAKE</varname> or <varname>USE_X11BASE</varname> in
- its pkg <filename>Makefile</filename>, you need to look in
- <emphasis>both</emphasis> <filename>${X11BASE}</filename> and
- <filename>${LOCALBASE}</filename>. To force installation of
- all X11 packages in <varname>LOCALBASE</varname>, the
- <filename role="pkg">pkgtools/xpkgwedge</filename> package
- is enabled by default.</para>
+ to find includes or libraries installed by a pkg that has
+ <varname>USE_IMAKE</varname> or <varname>USE_X11BASE</varname> in
+ its pkg <filename>Makefile</filename>, you need to look in
+ <emphasis>both</emphasis> <filename>${X11BASE}</filename> and
+ <filename>${LOCALBASE}</filename>. To force installation of
+ all X11 packages in <varname>LOCALBASE</varname>, the
+ <filename role="pkg">pkgtools/xpkgwedge</filename> package
+ is enabled by default.</para>
</listitem>
<listitem>
<para><varname>X11PREFIX</varname> should be used to refer to the installed
- location of an X11 package. <varname>X11PREFIX</varname> will be set to
- <varname>X11BASE</varname> if xpkgwedge is not installed,
- and to <varname>LOCALBASE</varname> if xpkgwedge is installed.</para>
+ location of an X11 package. <varname>X11PREFIX</varname> will be set to
+ <varname>X11BASE</varname> if xpkgwedge is not installed,
+ and to <varname>LOCALBASE</varname> if xpkgwedge is installed.</para>
</listitem>
<listitem>
<para>If xpkgwedge is installed, it is possible to have some packages installed
- in <varname>X11BASE</varname> and some in <varname>LOCALBASE</varname>.
- To determine the prefix of an installed package, the
- <varname>EVAL_PREFIX</varname> definition can be used. It takes pairs in the
- format <quote>DIRNAME=<package></quote>, and the &man.make.1; variable
- <varname>DIRNAME</varname> will be set to the prefix of the installed
- package <package>, or <quote>${X11PREFIX}</quote> if the package is
- not installed.</para>
+ in <varname>X11BASE</varname> and some in <varname>LOCALBASE</varname>.
+ To determine the prefix of an installed package, the
+ <varname>EVAL_PREFIX</varname> definition can be used. It takes pairs in the
+ format <quote>DIRNAME=<package></quote>, and the &man.make.1; variable
+ <varname>DIRNAME</varname> will be set to the prefix of the installed
+ package <package>, or <quote>${X11PREFIX}</quote> if the package is
+ not installed.</para>
<para>This is best illustrated by example.</para>
<para>The following lines are taken from
- <filename>pkgsrc/wm/scwm/Makefile</filename>:</para>
+ <filename>pkgsrc/wm/scwm/Makefile</filename>:</para>
-<programlisting>
- EVAL_PREFIX+= GTKDIR=gtk+
- CONFIGURE_ARGS+= --with-guile-prefix=${LOCALBASE:Q}
- CONFIGURE_ARGS+= --with-gtk-prefix=${GTKDIR:Q}
- CONFIGURE_ARGS+= --enable-multibyte
-</programlisting>
+ <programlisting>
+ EVAL_PREFIX+= GTKDIR=gtk+
+ CONFIGURE_ARGS+= --with-guile-prefix=${LOCALBASE:Q}
+ CONFIGURE_ARGS+= --with-gtk-prefix=${GTKDIR:Q}
+ CONFIGURE_ARGS+= --enable-multibyte
+ </programlisting>
<para>Specific defaults can be defined for the packages evaluated using
- <varname>EVAL_PREFIX</varname>, by using a definition of the form:</para>
+ <varname>EVAL_PREFIX</varname>, by using a definition of the form:</para>
-<programlisting>
- GTKDIR_DEFAULT= ${LOCALBASE}
-</programlisting>
+ <programlisting>
+ GTKDIR_DEFAULT= ${LOCALBASE}
+ </programlisting>
<para>where <varname>GTKDIR</varname> corresponds
- to the first definition in
- the <varname>EVAL_PREFIX</varname> pair.</para>
+ to the first definition in
+ the <varname>EVAL_PREFIX</varname> pair.</para>
</listitem>
<listitem>
- <para>Within <filename>${PREFIX}</filename>, packages should
- install files according to &man.hier.7;, with the exception that
- manual pages go into <filename>${PREFIX}/man</filename>, not
- <filename>${PREFIX}/share/man</filename>.</para>
+ <para>Within <filename>${PREFIX}</filename>, packages should
+ install files according to &man.hier.7;, with the exception that
+ manual pages go into <filename>${PREFIX}/man</filename>, not
+ <filename>${PREFIX}/share/man</filename>.</para>
</listitem>
</itemizedlist>
</sect1>
-<sect1 id="build.builddirs">
-<title>Directories used during the build process</title>
+ <sect1 id="build.builddirs">
+ <title>Directories used during the build process</title>
-<para>When building a package, a number of directories is used to store
-source files, temporary files, pkgsrc-internal files, and so on. These
-directories are explained here.</para>
+ <para>When building a package, a number of directories is used to store
+ source files, temporary files, pkgsrc-internal files, and so on. These
+ directories are explained here.</para>
-<para>Some of the directory variables contain relative pathnames. There
-are two common base directories for these relative directories:
-<varname>PKGSRCDIR/PKGPATH</varname> is used for directories that are
-pkgsrc-specific. <varname>WRKSRC</varname> is used for directories
-inside the package itself.</para>
+ <para>Some of the directory variables contain relative pathnames. There
+ are two common base directories for these relative directories:
+ <varname>PKGSRCDIR/PKGPATH</varname> is used for directories that are
+ pkgsrc-specific. <varname>WRKSRC</varname> is used for directories
+ inside the package itself.</para>
-<variablelist>
+ <variablelist>
-<varlistentry><term><varname>PKGSRCDIR</varname></term>
-<listitem><para>This is an absolute pathname that points to the pkgsrc
-root directory. Generally, you don't need
-it.</para></listitem></varlistentry>
+ <varlistentry><term><varname>PKGSRCDIR</varname></term>
+ <listitem><para>This is an absolute pathname that points to the pkgsrc
+ root directory. Generally, you don't need
+ it.</para></listitem></varlistentry>
-<varlistentry><term><varname>PKGPATH</varname></term>
-<listitem><para>This is a pathname relative to
-<varname>PKGSRCDIR</varname> that points to the current
-package.</para></listitem></varlistentry>
+ <varlistentry><term><varname>PKGPATH</varname></term>
+ <listitem><para>This is a pathname relative to
+ <varname>PKGSRCDIR</varname> that points to the current
+ package.</para></listitem></varlistentry>
-<varlistentry><term><varname>WRKDIR</varname></term>
-<listitem><para>This is an absolute pathname pointing to the directory
-where all work takes place. The distfiles are extraced to this
-directory. It also contains temporary directories and log files used by
-the various pkgsrc frameworks, like <emphasis>buildlink</emphasis> or
-the <emphasis>wrappers</emphasis>.</para></listitem></varlistentry>
+ <varlistentry><term><varname>WRKDIR</varname></term>
+ <listitem><para>This is an absolute pathname pointing to the directory
+ where all work takes place. The distfiles are extraced to this
+ directory. It also contains temporary directories and log files used by
Home |
Main Index |
Thread Index |
Old Index