summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guide/files/binary.xml34
-rw-r--r--doc/guide/files/build.xml161
-rw-r--r--doc/guide/files/buildlink.xml141
-rw-r--r--doc/guide/files/components.xml111
-rw-r--r--doc/guide/files/configuring.xml6
-rw-r--r--doc/guide/files/creating.xml210
-rw-r--r--doc/guide/files/examples.xml40
-rw-r--r--doc/guide/files/faq.xml26
-rw-r--r--doc/guide/files/files.xml18
-rw-r--r--doc/guide/files/fixes.xml230
-rw-r--r--doc/guide/files/getting.xml4
-rw-r--r--doc/guide/files/gnome.xml8
-rw-r--r--doc/guide/files/infr.design.xml14
-rw-r--r--doc/guide/files/makefile.xml110
-rw-r--r--doc/guide/files/options.xml94
-rw-r--r--doc/guide/files/pkginstall.xml22
-rw-r--r--doc/guide/files/platforms.xml40
-rw-r--r--doc/guide/files/plist.xml18
-rw-r--r--doc/guide/files/submit.xml6
19 files changed, 657 insertions, 636 deletions
diff --git a/doc/guide/files/binary.xml b/doc/guide/files/binary.xml
index d9a76cd8c51..9a59d683fc5 100644
--- a/doc/guide/files/binary.xml
+++ b/doc/guide/files/binary.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: binary.xml,v 1.31 2007/05/23 12:36:56 rillig Exp $ -->
+<!-- $NetBSD: binary.xml,v 1.32 2007/06/01 11:07:24 rillig Exp $ -->
<chapter id="binary">
<title>Creating binary packages</title>
@@ -85,16 +85,16 @@
As used in this example, <varname>_ACCEPTABLE=yes</varname>
accepts <emphasis>all</emphasis> licenses.</para>
- <programlisting>
- PACKAGES?= ${_PKGSRCDIR}/packages/${MACHINE_ARCH}
- WRKOBJDIR?= /usr/tmp/pkgsrc # build here instead of in pkgsrc
- BSDSRCDIR= /usr/src
- BSDXSRCDIR= /usr/xsrc # for x11/xservers
- OBJHOSTNAME?= yes # use work.`hostname`
- FAILOVER_FETCH= yes # insist on the correct checksum
- PKG_DEVELOPER?= yes
- _ACCEPTABLE= yes
- </programlisting>
+<programlisting>
+PACKAGES?= ${_PKGSRCDIR}/packages/${MACHINE_ARCH}
+WRKOBJDIR?= /usr/tmp/pkgsrc # build here instead of in pkgsrc
+BSDSRCDIR= /usr/src
+BSDXSRCDIR= /usr/xsrc # for x11/xservers
+OBJHOSTNAME?= yes # use work.`hostname`
+FAILOVER_FETCH= yes # insist on the correct checksum
+PKG_DEVELOPER?= yes
+_ACCEPTABLE= yes
+</programlisting>
<para>Some options that are especially useful for bulk builds
can be found at the top lines of the file
@@ -194,12 +194,12 @@
version of ssh for some reason, be sure to install ssh before
starting it from <filename>rc.local</filename>:</para>
- <programlisting>
- ( cd /usr/pkgsrc/security/ssh ; make bulk-install )
- if [ -f /usr/pkg/etc/rc.d/sshd ]; then
- /usr/pkg/etc/rc.d/sshd
- fi
- </programlisting>
+<programlisting>
+(cd /usr/pkgsrc/security/ssh && make bulk-install)
+if [ -f /usr/pkg/etc/rc.d/sshd ]; then
+ /usr/pkg/etc/rc.d/sshd
+fi
+</programlisting>
<para>Not doing so will result in you being not able to log in
via ssh after the bulk build is finished or if the machine
diff --git a/doc/guide/files/build.xml b/doc/guide/files/build.xml
index b451f3b5cc2..269bbe26ca5 100644
--- a/doc/guide/files/build.xml
+++ b/doc/guide/files/build.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: build.xml,v 1.45 2007/04/19 16:54:58 joerg Exp $ -->
+<!-- $NetBSD: build.xml,v 1.46 2007/06/01 11:07:24 rillig Exp $ -->
<chapter id="build">
<title>The build process</title>
@@ -137,20 +137,20 @@
<para>The following lines are taken from
<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>
- <programlisting>
- GTKDIR_DEFAULT= ${LOCALBASE}
- </programlisting>
+<programlisting>
+GTKDIR_DEFAULT= ${LOCALBASE}
+</programlisting>
<para>where <varname>GTKDIR</varname> corresponds
to the first definition in
@@ -252,9 +252,9 @@
additional filenames using the <literal>+=</literal>
operator, but you have write for example:</para>
- <programlisting>
- DISTFILES= ${DISTNAME}${EXTRACT_SUFX} additional-files.tar.gz
- </programlisting>
+<programlisting>
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} additional-files.tar.gz
+</programlisting>
<para>Each distfile is fetched from a list of sites, usually
<varname>MASTER_SITES</varname>. If the package has multiple
@@ -266,13 +266,13 @@
<filename><replaceable>distfile</replaceable></filename>
(including the suffix) can be found.</para>
- <programlisting>
- DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
- DISTFILES+= foo-file.tar.gz
- SITES.foo-file.tar.gz= \
- http://www.somewhere.com/somehow/ \
- http://www.somewhereelse.com/mirror/somehow/
- </programlisting>
+<programlisting>
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
+DISTFILES+= foo-file.tar.gz
+SITES.foo-file.tar.gz= \
+http://www.somewhere.com/somehow/ \
+http://www.somewhereelse.com/mirror/somehow/
+</programlisting>
<para>When actually fetching the distfiles, each item from
<varname>MASTER_SITES</varname> or
@@ -284,9 +284,9 @@
that gets the name of the distfile as a parameter. In this
case, the definition would look like:</para>
- <programlisting>
- MASTER_SITES= http://www.example.com/download.cgi?file=
- </programlisting>
+<programlisting>
+MASTER_SITES= http://www.example.com/download.cgi?file=
+</programlisting>
<para>There are some predefined values for
<varname>MASTER_SITES</varname>, which can be used in
@@ -295,33 +295,33 @@
<!-- sort mk/fetch/sites.mk | sed -n 's/\(^MA[A-Z_]*\).*/ ${\1}/p' -->
- <programlisting>
- ${MASTER_SITE_APACHE}
- ${MASTER_SITE_BACKUP}
- ${MASTER_SITE_CYGWIN}
- ${MASTER_SITE_DEBIAN}
- ${MASTER_SITE_FREEBSD}
- ${MASTER_SITE_FREEBSD_LOCAL}
- ${MASTER_SITE_GENTOO}
- ${MASTER_SITE_GNOME}
- ${MASTER_SITE_GNU}
- ${MASTER_SITE_GNUSTEP}
- ${MASTER_SITE_IFARCHIVE}
- ${MASTER_SITE_KDE}
- ${MASTER_SITE_MOZILLA}
- ${MASTER_SITE_MYSQL}
- ${MASTER_SITE_OPENOFFICE}
- ${MASTER_SITE_PERL_CPAN}
- ${MASTER_SITE_PGSQL}
- ${MASTER_SITE_R_CRAN}
- ${MASTER_SITE_SOURCEFORGE}
- ${MASTER_SITE_SOURCEFORGE_JP}
- ${MASTER_SITE_SUNSITE}
- ${MASTER_SITE_SUSE}
- ${MASTER_SITE_TEX_CTAN}
- ${MASTER_SITE_XCONTRIB}
- ${MASTER_SITE_XEMACS}
- </programlisting>
+<programlisting>
+${MASTER_SITE_APACHE}
+${MASTER_SITE_BACKUP}
+${MASTER_SITE_CYGWIN}
+${MASTER_SITE_DEBIAN}
+${MASTER_SITE_FREEBSD}
+${MASTER_SITE_FREEBSD_LOCAL}
+${MASTER_SITE_GENTOO}
+${MASTER_SITE_GNOME}
+${MASTER_SITE_GNU}
+${MASTER_SITE_GNUSTEP}
+${MASTER_SITE_IFARCHIVE}
+${MASTER_SITE_KDE}
+${MASTER_SITE_MOZILLA}
+${MASTER_SITE_MYSQL}
+${MASTER_SITE_OPENOFFICE}
+${MASTER_SITE_PERL_CPAN}
+${MASTER_SITE_PGSQL}
+${MASTER_SITE_R_CRAN}
+${MASTER_SITE_SOURCEFORGE}
+${MASTER_SITE_SOURCEFORGE_JP}
+${MASTER_SITE_SUNSITE}
+${MASTER_SITE_SUSE}
+${MASTER_SITE_TEX_CTAN}
+${MASTER_SITE_XCONTRIB}
+${MASTER_SITE_XEMACS}
+</programlisting>
<para>Some explanations for the less self-explaining ones:
<varname>MASTER_SITE_BACKUP</varname> contains backup sites
@@ -338,10 +338,10 @@
<emphasis>must</emphasis> use the following construct to
specify a subdirectory:</para>
- <programlisting>
- MASTER_SITES= ${MASTER_SITE_GNU:=subdirectory/name/}
- MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=project_name/}
- </programlisting>
+<programlisting>
+MASTER_SITES= ${MASTER_SITE_GNU:=subdirectory/name/}
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=project_name/}
+</programlisting>
<para>Note the trailing slash after the subdirectory
name.</para>
@@ -356,9 +356,9 @@
user). If the files do not exist, they are fetched using
commands of the form</para>
- <programlisting>
- ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
- </programlisting>
+<programlisting>
+${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
+</programlisting>
<para>where <literal>${site}</literal> varies through
several possibilities in turn: first,
@@ -553,12 +553,13 @@
<quote>yes</quote> instead. What happens in the
<emphasis>configure</emphasis> phase is roughly:</para>
- <programlisting>
- .for d in ${CONFIGURE_DIRS}
- cd ${WRKSRC} &amp;&amp; cd ${d} &amp;&amp; env ${CONFIGURE_ENV} \
- ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
- .endfor
- </programlisting>
+<programlisting>
+.for d in ${CONFIGURE_DIRS}
+ cd ${WRKSRC} \
+ &amp;&amp; cd ${d} \
+ &amp;&amp; env ${CONFIGURE_ENV} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
+.endfor
+</programlisting>
<para><varname>CONFIGURE_DIRS</varname> (default:
<quote>.</quote>) is a list of pathnames relative to
@@ -591,13 +592,16 @@
<para>For building a package, a rough equivalent of the
following code is executed.</para>
- <programlisting>
- .for d in ${BUILD_DIRS}
- cd ${WRKSRC} &amp;&amp; cd ${d} &amp;&amp; env ${MAKE_ENV} \
- ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} \
- -f ${MAKE_FILE} ${BUILD_TARGET}
- .endfor
- </programlisting>
+<programlisting>
+.for d in ${BUILD_DIRS}
+ cd ${WRKSRC} \
+ &amp;&amp; cd ${d} \
+ &amp;&amp; env ${MAKE_ENV} \
+ ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} \
+ -f ${MAKE_FILE} \
+ ${BUILD_TARGET}
+.endfor
+</programlisting>
<para><varname>BUILD_DIRS</varname> (default:
<quote>.</quote>) is a list of pathnames relative to
@@ -641,13 +645,16 @@
before and after this code, much magic is performed to do
consistency checks, registering the package, and so on.</para>
- <programlisting>
- .for d in ${INSTALL_DIRS}
- cd ${WRKSRC} &amp;&amp; cd ${d} &amp;&amp; env ${MAKE_ENV} \
- ${MAKE_PROGRAM} ${INSTALL_MAKE_FLAGS} \
- -f ${MAKE_FILE} ${BUILD_TARGET}
- .endfor
- </programlisting>
+<programlisting>
+.for d in ${INSTALL_DIRS}
+ cd ${WRKSRC} \
+ &amp;&amp; cd ${d} \
+ &amp;&amp; env ${MAKE_ENV} \
+ ${MAKE_PROGRAM} ${INSTALL_MAKE_FLAGS} \
+ -f ${MAKE_FILE} \
+ ${INSTALL_TARGET}
+.endfor
+</programlisting>
<para>The variable's meanings are analogous to the ones in the
<emphasis>build</emphasis> phase.
diff --git a/doc/guide/files/buildlink.xml b/doc/guide/files/buildlink.xml
index a82ab55f488..a6c9bda9921 100644
--- a/doc/guide/files/buildlink.xml
+++ b/doc/guide/files/buildlink.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: buildlink.xml,v 1.23 2007/01/17 03:11:18 rillig Exp $ -->
+<!-- $NetBSD: buildlink.xml,v 1.24 2007/06/01 11:07:24 rillig Exp $ -->
<chapter id="buildlink">
<title>Buildlink methodology</title>
@@ -69,24 +69,24 @@
<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>
- <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>
@@ -186,29 +186,29 @@
<filename>buildlink3.mk</filename> is taken
from <filename>pkgsrc/graphics/tiff</filename>:</para>
- <programlisting>
- # &#36;NetBSD: buildlink3.mk,v 1.7 2004/03/18 09:12:12 jlam Exp &#36;
+<programlisting>
+# &#36;NetBSD: buildlink3.mk,v 1.7 2004/03/18 09:12:12 jlam Exp &#36;
- 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 ${BUILDLINK_DEPTH} == "+"
+BUILDLINK_DEPENDS+= tiff
+.endif
- BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntiff}
- BUILDLINK_PACKAGES+= tiff
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntiff}
+BUILDLINK_PACKAGES+= tiff
- .if !empty(TIFF_BUILDLINK3_MK:M+)
- BUILDLINK_API_DEPENDS.tiff+= tiff>=3.6.1
- BUILDLINK_PKGSRCDIR.tiff?= ../../graphics/tiff
- .endif # TIFF_BUILDLINK3_MK
+.if ${TIFF_BUILDLINK3_MK} == "+"
+BUILDLINK_API_DEPENDS.tiff+= tiff>=3.6.1
+BUILDLINK_PKGSRCDIR.tiff?= ../../graphics/tiff
+.endif # TIFF_BUILDLINK3_MK
- .include "../../devel/zlib/buildlink3.mk"
- .include "../../graphics/jpeg/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/jpeg/buildlink3.mk"
- BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
- </programlisting>
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+</programlisting>
<para>The header and footer manipulate
<varname>BUILDLINK_DEPTH</varname>, which is common across all
@@ -441,46 +441,43 @@
<para>The following is the recommended template for builtin.mk
files:</para>
- <programlisting>
- .if !defined(IS_BUILTIN.foo)
- #
- # IS_BUILTIN.foo is set to "yes" or "no" depending on whether "foo"
- # genuinely exists in the system or not.
- #
- IS_BUILTIN.foo?= no
-
- # BUILTIN_PKG.foo should be set here if "foo" is built-in and its package
- # version can be determined.
- #
- . if !empty(IS_BUILTIN.foo:M[yY][eE][sS])
- BUILTIN_PKG.foo?= foo-1.0
- . endif
- .endif # IS_BUILTIN.foo
-
- .if !defined(USE_BUILTIN.foo)
- USE_BUILTIN.foo?= ${IS_BUILTIN.foo}
- . if defined(BUILTIN_PKG.foo)
- . for _depend_ in ${BUILDLINK_API_DEPENDS.foo}
- . if !empty(USE_BUILTIN.foo:M[yY][eE][sS])
- USE_BUILTIN.foo!= \
- if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.foo}; then \
- ${ECHO} "yes"; \
- else \
- ${ECHO} "no"; \
- fi
- . endif
- . endfor
- . endif
- .endif # USE_BUILTIN.foo
-
- CHECK_BUILTIN.foo?= no
- .if !empty(CHECK_BUILTIN.foo:M[nN][oO])
- #
- # Here we place code that depends on whether USE_BUILTIN.foo is set to
- # "yes" or "no".
- #
- .endif # CHECK_BUILTIN.foo
- </programlisting>
+<programlisting>
+.if !defined(IS_BUILTIN.foo)
+#
+# IS_BUILTIN.foo is set to "yes" or "no" depending on whether "foo"
+# genuinely exists in the system or not.
+#
+IS_BUILTIN.foo?= no
+
+# BUILTIN_PKG.foo should be set here if "foo" is built-in and its package
+# version can be determined.
+#
+. if !empty(IS_BUILTIN.foo:M[yY][eE][sS])
+BUILTIN_PKG.foo?= foo-1.0
+. endif
+.endif # IS_BUILTIN.foo
+
+.if !defined(USE_BUILTIN.foo)
+USE_BUILTIN.foo?= ${IS_BUILTIN.foo}
+. if defined(BUILTIN_PKG.foo)
+. for _depend_ in ${BUILDLINK_API_DEPENDS.foo}
+. if !empty(USE_BUILTIN.foo:M[yY][eE][sS])
+USE_BUILTIN.foo!= \
+ ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.foo} \
+ &amp;&amp; ${ECHO} "yes" || ${ECHO} "no"
+. endif
+. endfor
+. endif
+.endif # USE_BUILTIN.foo
+
+CHECK_BUILTIN.foo?= no
+.if !empty(CHECK_BUILTIN.foo:M[nN][oO])
+#
+# Here we place code that depends on whether USE_BUILTIN.foo is set to
+# "yes" or "no".
+#
+.endif # CHECK_BUILTIN.foo
+</programlisting>
<para>The first section sets
<varname>IS_BUILTIN.<replaceable>pkg</replaceable></varname>
@@ -554,10 +551,10 @@
using pkgsrc versions of software for all but the most basic
bits on a NetBSD system, you can set:</para>
- <programlisting>
- PREFER_PKGSRC= yes
- PREFER_NATIVE= getopt skey tcp_wrappers
- </programlisting>
+<programlisting>
+PREFER_PKGSRC= yes
+PREFER_NATIVE= getopt skey tcp_wrappers
+</programlisting>
<para>A package <emphasis>must</emphasis> have a
<filename>builtin.mk</filename>
diff --git a/doc/guide/files/components.xml b/doc/guide/files/components.xml
index f63635a01c0..297a931eba4 100644
--- a/doc/guide/files/components.xml
+++ b/doc/guide/files/components.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: components.xml,v 1.34 2007/01/11 07:33:15 wiz Exp $ -->
+<!-- $NetBSD: components.xml,v 1.35 2007/06/01 11:07:24 rillig Exp $ -->
<chapter id="components"> <?dbhtml filename="components.html"?>
<title>Package components - files, directories and contents</title>
@@ -57,16 +57,16 @@ sections.</para>
<varname>CATEGORIES</varname>. If more than
one is used, they need to be separated by spaces:</para>
- <programlisting>
- archivers cross geography meta-pkgs security
- audio databases graphics misc shells
- benchmarks devel ham multimedia sysutils
- biology editors inputmethod net textproc
- cad emulators lang news time
- chat finance mail parallel wm
- comms fonts math pkgtools www
- converters games mbone print x11
- </programlisting>
+<programlisting>
+archivers cross geography meta-pkgs security
+audio databases graphics misc shells
+benchmarks devel ham multimedia sysutils
+biology editors inputmethod net textproc
+cad emulators lang news time
+chat finance mail parallel wm
+comms fonts math pkgtools www
+converters games mbone print x11
+</programlisting>
</listitem>
<listitem><para><varname>MASTER_SITES</varname>,
@@ -306,7 +306,7 @@ sections.</para>
<varname>PATCHDIR</varname> to the path where the patch files
can be found, e.g.:</para>
<programlisting>
- PATCHDIR= ${.CURDIR}/../xemacs/patches
+PATCHDIR= ${.CURDIR}/../xemacs/patches
</programlisting>
<para>Patch files that are distributed by the author or other
@@ -373,55 +373,68 @@ sections.</para>
<row>
<entry>configure script</entry>
<entry>
- <programlisting>case ${target_os} in
- netbsd*) have_kvm=yes ;;
- *) have_kvm=no ;;
- esac</programlisting>
+<programlisting>
+case ${target_os} in
+netbsd*) have_kvm=yes ;;
+*) have_kvm=no ;;
+esac
+</programlisting>
</entry>
<entry>
- <programlisting>AC_CHECK_LIB(kvm, kvm_open, have_kvm=yes, have_kvm=no)</programlisting>
+<programlisting>
+AC_CHECK_LIB(kvm, kvm_open, have_kvm=yes, have_kvm=no)
+</programlisting>
</entry>
</row>
<row>
<entry>C source file</entry>
<entry>
- <programlisting>#if defined(__NetBSD__)
- # include &lt;sys/event.h&gt;
- #endif</programlisting>
+<programlisting>
+#if defined(__NetBSD__)
+# include &lt;sys/event.h&gt;
+#endif
+</programlisting>
</entry>
<entry>
- <programlisting>#if defined(HAVE_SYS_EVENT_H)
- # include &lt;sys/event.h&gt;
- #endif</programlisting>
+<programlisting>
+#if defined(HAVE_SYS_EVENT_H)
+# include &lt;sys/event.h&gt;
+#endif
+</programlisting>
</entry>
</row>
<row>
<entry>C source file</entry>
- <entry><programlisting>int
- monitor_file(...)
- {
- #if defined(__NetBSD__)
- int fd = kqueue();
- ...
- #else
- ...
- #endif
- }</programlisting>
+ <entry>
+<programlisting>
+int
+monitor_file(...)
+{
+#if defined(__NetBSD__)
+ int fd = kqueue();
+ ...
+#else
+ ...
+#endif
+}
+</programlisting>
</entry>
<entry>
- <programlisting>int
- monitor_file(...)
- {
- #if defined(HAVE_KQUEUE)
- int fd = kqueue();
- ...
- #else
- ...
- #endif
- }</programlisting>
+<programlisting>
+int
+monitor_file(...)
+{
+#if defined(HAVE_KQUEUE)
+ int fd = kqueue();
+ ...
+#else
+ ...
+#endif
+}
+</programlisting>
</entry>
</row>
</tbody>
@@ -543,9 +556,9 @@ sections.</para>
<varname>MESSAGE_SUBST</varname> in the package's
<filename>Makefile</filename>:</para>
- <programlisting>
- MESSAGE_SUBST+= SOMEVAR="somevalue"
- </programlisting>
+<programlisting>
+MESSAGE_SUBST+= SOMEVAR="somevalue"
+</programlisting>
<para>replaces "${SOMEVAR}" with <quote>somevalue</quote> in
<filename>MESSAGE</filename>. By default, substitution is
@@ -656,8 +669,8 @@ sections.</para>
packages, set the <varname>FILESDIR</varname> variable to point
to the other package's <filename>files</filename> directory,
e.g.:</para>
- <programlisting>
- FILESDIR=${.CURDIR}/../xemacs/files
- </programlisting>
+<programlisting>
+FILESDIR=${.CURDIR}/../xemacs/files
+</programlisting>
</sect1>
</chapter>
diff --git a/doc/guide/files/configuring.xml b/doc/guide/files/configuring.xml
index 930e505d9ff..e7da55ff679 100644
--- a/doc/guide/files/configuring.xml
+++ b/doc/guide/files/configuring.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: configuring.xml,v 1.26 2007/03/03 12:30:12 kano Exp $ -->
+<!-- $NetBSD: configuring.xml,v 1.27 2007/06/01 11:07:24 rillig Exp $ -->
<chapter id="configuring">
<title>Configuring pkgsrc</title>
@@ -211,7 +211,7 @@ works.</para>
instead of the <literal>=</literal> operator:</para>
<programlisting>
- CFLAGS+= -your -flags
+CFLAGS+= -your -flags
</programlisting>
<para>Using <varname>CFLAGS=</varname> (i.e. without the
@@ -236,7 +236,7 @@ the inclusion of <filename>mk/x11.buildlink3.mk</filename>. As with
<varname>CFLAGS</varname>, if you do not wish to override these
settings, use the <literal>+=</literal> operator:</para>
<programlisting>
- LDFLAGS+= -your -linkerflags
+LDFLAGS+= -your -linkerflags
</programlisting>
</sect2>
</sect1>
diff --git a/doc/guide/files/creating.xml b/doc/guide/files/creating.xml
index 999cbe8ae89..f1fd9fac2a9 100644
--- a/doc/guide/files/creating.xml
+++ b/doc/guide/files/creating.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: creating.xml,v 1.6 2006/12/15 13:22:14 martti Exp $ -->
+<!-- $NetBSD: creating.xml,v 1.7 2007/06/01 11:07:24 rillig Exp $ -->
<chapter id="creating">
<title>Creating a new pkgsrc package from scratch</title>
@@ -44,17 +44,17 @@ needed for building the package, but not when using it, use
Your package may then look like this:</para>
<programlisting>
- [...]
+[...]
- BUILD_DEPENDS+= lua>=5.0:../../lang/lua
- DEPENDS+= screen-[0-9]*:../../misc/screen
- DEPENDS+= screen>=4.0:../../misc/screen
+BUILD_DEPENDS+= lua>=5.0:../../lang/lua
+DEPENDS+= screen-[0-9]*:../../misc/screen
+DEPENDS+= screen>=4.0:../../misc/screen
- [...]
+[...]
- .include "../../<replaceable>category</replaceable>/<replaceable>package</replaceable>/buildlink3.mk"
- .include "../../devel/glib2/buildlink3.mk"
- .include "../../mk/bsd.pkg.mk"
+.include "../../<replaceable>category</replaceable>/<replaceable>package</replaceable>/buildlink3.mk"
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
</programlisting>
</step>
@@ -144,15 +144,15 @@ pkgsrc. As the description says it has to do with the web, the obvious
choice for the category is <quote>www</quote>.</para>
<programlisting>
- &uprompt; mkdir www/nvu
- &uprompt; cd www/nvu
+&uprompt; mkdir www/nvu
+&uprompt; cd www/nvu
</programlisting>
<para>The web site says that the sources are available as a tar file, so
I fed that URL to the <command>url2pkg</command> program:</para>
<programlisting>
- &uprompt; url2pkg http://cvs.nvu.com/download/nvu-1.0-sources.tar.bz2
+&uprompt; url2pkg http://cvs.nvu.com/download/nvu-1.0-sources.tar.bz2
</programlisting>
<para>My editor popped up, and I added a <varname>PKGNAME</varname> line
@@ -163,46 +163,46 @@ not have the word <quote>sources</quote> in it. I also filled in the
<filename>Makefile</filename> looked like that:</para>
<programlisting>
- # &#36;NetBSD&#36;
- #
+# &#36;NetBSD&#36;
+#
- DISTNAME= nvu-1.0-sources
- PKGNAME= nvu-1.0
- CATEGORIES= www
- MASTER_SITES= http://cvs.nvu.com/download/
- EXTRACT_SUFX= .tar.bz2
+DISTNAME= nvu-1.0-sources
+PKGNAME= nvu-1.0
+CATEGORIES= www
+MASTER_SITES= http://cvs.nvu.com/download/
+EXTRACT_SUFX= .tar.bz2
- MAINTAINER= rillig@NetBSD.org
- HOMEPAGE= http://cvs.nvu.com/
- COMMENT= Web Authoring System
+MAINTAINER= rillig@NetBSD.org
+HOMEPAGE= http://cvs.nvu.com/
+COMMENT= Web Authoring System
- # url2pkg-marker (please do not remove this line.)
- .include "../../mk/bsd.pkg.mk"
+# url2pkg-marker (please do not remove this line.)
+.include "../../mk/bsd.pkg.mk"
</programlisting>
<para>Then, I quit the editor and watched pkgsrc downloading a large
source archive:</para>
<programlisting>
- url2pkg> Running "make makesum" ...
- => Required installed package digest>=20010302: digest-20060826 found
- => Fetching nvu-1.0-sources.tar.bz2
- Requesting http://cvs.nvu.com/download/nvu-1.0-sources.tar.bz2
- 100% |*************************************| 28992 KB 150.77 KB/s 00:00 ETA
- 29687976 bytes retrieved in 03:12 (150.77 KB/s)
- url2pkg> Running "make extract" ...
- => Required installed package digest>=20010302: digest-20060826 found
- => Checksum SHA1 OK for nvu-1.0-sources.tar.bz2
- => Checksum RMD160 OK for nvu-1.0-sources.tar.bz2
- work.bacc -> /tmp/roland/pkgsrc/www/nvu/work.bacc
- ===> Installing dependencies for nvu-1.0
- ===> Overriding tools for nvu-1.0
- ===> Extracting for nvu-1.0
- url2pkg> Adjusting the Makefile.
-
- Remember to correct CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done!
-
- Good luck! (See pkgsrc/doc/pkgsrc.txt for some more help :-)
+url2pkg> Running "make makesum" ...
+=> Required installed package digest>=20010302: digest-20060826 found
+=> Fetching nvu-1.0-sources.tar.bz2
+Requesting http://cvs.nvu.com/download/nvu-1.0-sources.tar.bz2
+100% |*************************************| 28992 KB 150.77 KB/s00:00 ETA
+29687976 bytes retrieved in 03:12 (150.77 KB/s)
+url2pkg> Running "make extract" ...
+=> Required installed package digest>=20010302: digest-20060826 found
+=> Checksum SHA1 OK for nvu-1.0-sources.tar.bz2
+=> Checksum RMD160 OK for nvu-1.0-sources.tar.bz2
+work.bacc -> /tmp/roland/pkgsrc/www/nvu/work.bacc
+===> Installing dependencies for nvu-1.0
+===> Overriding tools for nvu-1.0
+===> Extracting for nvu-1.0
+url2pkg> Adjusting the Makefile.
+
+Remember to correct CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done!
+
+Good luck! (See pkgsrc/doc/pkgsrc.txt for some more help :-)
</programlisting>
</sect3>
@@ -218,18 +218,18 @@ in the package, let's hope that it will complain about everything it
needs.</para>
<programlisting>
- &uprompt; bmake
- => Required installed package digest>=20010302: digest-20060826 found
- => Checksum SHA1 OK for nvu-1.0-sources.tar.bz2
- => Checksum RMD160 OK for nvu-1.0-sources.tar.bz2
- ===> Patching for nvu-1.0
- ===> Creating toolchain wrappers for nvu-1.0
- ===> Configuring for nvu-1.0
- [...]
- configure: error: Perl 5.004 or higher is required.
- [...]
- WARNING: Please add USE_TOOLS+=perl to the package Makefile.
- [...]
+&uprompt; bmake
+=> Required installed package digest>=20010302: digest-20060826 found
+=> Checksum SHA1 OK for nvu-1.0-sources.tar.bz2
+=> Checksum RMD160 OK for nvu-1.0-sources.tar.bz2
+===> Patching for nvu-1.0
+===> Creating toolchain wrappers for nvu-1.0
+===> Configuring for nvu-1.0
+[...]
+configure: error: Perl 5.004 or higher is required.
+[...]
+WARNING: Please add USE_TOOLS+=perl to the package Makefile.
+[...]
</programlisting>
<para>That worked quite well. So I opened the package Makefile in my
@@ -240,37 +240,37 @@ installed in the <quote>tools</quote> phase, I need to build the package
from scratch.</para>
<programlisting>
- &uprompt; bmake clean
- ===> Cleaning for nvu-1.0
- &uprompt; bmake
- [...]
- *** /tmp/roland/pkgsrc/www/nvu/work.bacc/.tools/bin/make is not \
- GNU Make. You will not be able to build Mozilla without GNU Make.
- [...]
+&uprompt; bmake clean
+===> Cleaning for nvu-1.0
+&uprompt; bmake
+[...]
+*** /tmp/roland/pkgsrc/www/nvu/work.bacc/.tools/bin/make is not \
+GNU Make. You will not be able to build Mozilla without GNU Make.
+[...]
</programlisting>
<para>So I added <quote>gmake</quote> to the
<varname>USE_TOOLS</varname> line and tried again (from scratch).</para>
<programlisting>
- [...]
- checking for GTK - version >= 1.2.0... no
- *** Could not run GTK test program, checking why...
- [...]
+[...]
+checking for GTK - version >= 1.2.0... no
+*** Could not run GTK test program, checking why...
+[...]
</programlisting>
<para>Now to the other dependencies. The first question is: Where is the
GTK package hidden in pkgsrc?</para>
<programlisting>
- &uprompt; echo ../../*/gtk*
- [many packages ...]
- &uprompt; echo ../../*/gtk
- ../../x11/gtk
- &uprompt; echo ../../*/gtk2
- ../../x11/gtk2
- &uprompt; echo ../../*/gtk2/bui*
- ../../x11/gtk2/buildlink3.mk
+&uprompt; echo ../../*/gtk*
+[many packages ...]
+&uprompt; echo ../../*/gtk
+../../x11/gtk
+&uprompt; echo ../../*/gtk2
+../../x11/gtk2
+&uprompt; echo ../../*/gtk2/bui*
+../../x11/gtk2/buildlink3.mk
</programlisting>
<para>The first try was definitely too broad. The second one had exactly
@@ -287,25 +287,25 @@ file, adding the dependency is very easy. I just inserted an
<filename>Makefile</filename>, so that it now looks like this:</para>
<programlisting>
- [...]
- .include "../../x11/gtk2/buildlink3.mk"
- .include "../../mk/bsd.pkg.mk
+[...]
+.include "../../x11/gtk2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk
</programlisting>
<para>After another <command>bmake clean && bmake</command>, the answer
was:</para>
<programlisting>
- [...]
- checking for gtk-config... /home/roland/pkg/bin/gtk-config
- checking for GTK - version >= 1.2.0... no
- *** Could not run GTK test program, checking why...
- *** The test program failed to compile or link. See the file config.log for the
- *** exact error that occured. This usually means GTK was incorrectly installed
- *** or that you have moved GTK since it was installed. In the latter case, you
- *** may want to edit the gtk-config script: /home/roland/pkg/bin/gtk-config
- configure: error: Test for GTK failed.
- [...]
+[...]
+checking for gtk-config... /home/roland/pkg/bin/gtk-config
+checking for GTK - version >= 1.2.0... no
+*** Could not run GTK test program, checking why...
+*** The test program failed to compile or link. See the file config.log for the
+*** exact error that occured. This usually means GTK was incorrectly installed
+*** or that you have moved GTK since it was installed. In the latter case, you
+*** may want to edit the gtk-config script: /home/roland/pkg/bin/gtk-config
+configure: error: Test for GTK failed.
+[...]
</programlisting>
<para>In this particular case, the assumption that <quote>every package
@@ -318,13 +318,13 @@ So I changed the <literal>x11/gtk2</literal> to
and tried again.</para>
<programlisting>
- [...]
- cc -o xpidl.o -c -DOSTYPE=\"NetBSD3\" -DOSARCH=\"NetBSD\" -I../../../dist/include/xpcom -I../../../dist/include -I/tmp/roland/pkgsrc/www/nvu/work.bacc/mozilla/dist/include/nspr -I/usr/X11R6/include -fPIC -DPIC -I/home/roland/pkg/include -I/usr/include -I/usr/X11R6/include -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -O2 -I/home/roland/pkg/include -I/usr/include -Dunix -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_roland -DTRACING -g -I/home/roland/pkg/include/glib/glib-1.2 -I/home/roland/pkg/lib/glib/include -I/usr/pkg/include/orbit-1.0 -I/home/roland/pkg/include -I/usr/include -I/usr/X11R6/include -include ../../../mozilla-config.h -DMOZILLA_CLIENT -Wp,-MD,.deps/xpidl.pp xpidl.c
- In file included from xpidl.c:42:
- xpidl.h:53:24: libIDL/IDL.h: No such file or directory
- In file included from xpidl.c:42:
- xpidl.h:132: error: parse error before "IDL_ns"
- [...]
+[...]
+cc -o xpidl.o -c -DOSTYPE=\"NetBSD3\" -DOSARCH=\"NetBSD\" -I../../../dist/include/xpcom -I../../../dist/include -I/tmp/roland/pkgsrc/www/nvu/work.bacc/mozilla/dist/include/nspr -I/usr/X11R6/include -fPIC -DPIC -I/home/roland/pkg/include -I/usr/include -I/usr/X11R6/include -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -O2 -I/home/roland/pkg/include -I/usr/include -Dunix -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_roland -DTRACING -g -I/home/roland/pkg/include/glib/glib-1.2 -I/home/roland/pkg/lib/glib/include -I/usr/pkg/include/orbit-1.0 -I/home/roland/pkg/include -I/usr/include -I/usr/X11R6/include -include ../../../mozilla-config.h -DMOZILLA_CLIENT -Wp,-MD,.deps/xpidl.pp xpidl.c
+In file included from xpidl.c:42:
+xpidl.h:53:24: libIDL/IDL.h: No such file or directory
+In file included from xpidl.c:42:
+xpidl.h:132: error: parse error before "IDL_ns"
+[...]
</programlisting>
<para>The package still does not find all of its dependencies. Now the
@@ -332,10 +332,10 @@ question is: Which package provides the
<filename>libIDL/IDL.h</filename> header file?</para>
<programlisting>
- &uprompt; echo ../../*/*idl*
- ../../devel/py-idle ../../wip/idled ../../x11/acidlaunch
- &uprompt; echo ../../*/*IDL*
- ../../net/libIDL
+&uprompt; echo ../../*/*idl*
+../../devel/py-idle ../../wip/idled ../../x11/acidlaunch
+&uprompt; echo ../../*/*IDL*
+../../net/libIDL
</programlisting>
<para>Let's take the one from the second try. So I included the
@@ -347,8 +347,8 @@ large, I didn't want to fix it. So I added the following to the package
<filename>Makefile</filename> and tried again:</para>
<programlisting>
- CPPFLAGS+= -I${BUILDLINK_PREFIX.libIDL}/include/libIDL-2.0
- BUILDLINK_TRANSFORM+= -l:IDL:IDL-2
+CPPFLAGS+= -I${BUILDLINK_PREFIX.libIDL}/include/libIDL-2.0
+BUILDLINK_TRANSFORM+= -l:IDL:IDL-2
</programlisting>
<para>The latter line is needed because the package expects the library
@@ -369,11 +369,11 @@ everything worked.</para>
<title>Installing the package</title>
<programlisting>
- &uprompt; bmake CHECK_FILES=no install
- [...]
- &uprompt; bmake print-PLIST >PLIST
- &uprompt; bmake deinstall
- &uprompt; bmake install
+&uprompt; bmake CHECK_FILES=no install
+[...]
+&uprompt; bmake print-PLIST >PLIST
+&uprompt; bmake deinstall
+&uprompt; bmake install
</programlisting>
</sect3>
diff --git a/doc/guide/files/examples.xml b/doc/guide/files/examples.xml
index 6aecfc7dd66..650e45506bb 100644
--- a/doc/guide/files/examples.xml
+++ b/doc/guide/files/examples.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: examples.xml,v 1.11 2006/09/13 23:26:21 wiz Exp $ -->
+<!-- $NetBSD: examples.xml,v 1.12 2007/06/01 11:07:24 rillig Exp $ -->
<appendix id="examples">
<title>A simple example package: bison</title>
@@ -16,21 +16,21 @@
<title>Makefile</title>
<programlisting>
- # &#36;NetBSD&#36;
- #
+# &#36;NetBSD&#36;
+#
- DISTNAME= bison-1.25
- CATEGORIES= devel
- MASTER_SITES= ${MASTER_SITE_GNU}
+DISTNAME= bison-1.25
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GNU}
- MAINTAINER= thorpej@NetBSD.org
- HOMEPAGE= http://www.gnu.org/software/bison/bison.html
- COMMENT= GNU yacc clone
+MAINTAINER= thorpej@NetBSD.org
+HOMEPAGE= http://www.gnu.org/software/bison/bison.html
+COMMENT= GNU yacc clone
- GNU_CONFIGURE= yes
- INFO_FILES= bison.info
+GNU_CONFIGURE= yes
+INFO_FILES= bison.info
- .include "../../mk/bsd.pkg.mk"
+.include "../../mk/bsd.pkg.mk"
</programlisting>
</sect2>
@@ -38,9 +38,9 @@
<title>DESCR</title>
<programlisting>
- GNU version of yacc. Can make re-entrant parsers, and numerous other
- improvements. Why you would want this when Berkeley &man.yacc.1; is part
- of the &os; source tree is beyond me.
+GNU version of yacc. Can make re-entrant parsers, and numerous other
+improvements. Why you would want this when Berkeley &man.yacc.1; is part
+of the &os; source tree is beyond me.
</programlisting>
</sect2>
@@ -48,11 +48,11 @@
<title>PLIST</title>
<programlisting>
- @comment &#36;NetBSD&#36;
- bin/bison
- man/man1/bison.1.gz
- share/bison.simple
- share/bison.hairy
+@comment &#36;NetBSD&#36;
+bin/bison
+man/man1/bison.1.gz
+share/bison.simple
+share/bison.hairy
</programlisting>
</sect2>
diff --git a/doc/guide/files/faq.xml b/doc/guide/files/faq.xml
index fb37cafd5fb..4d9c3b389e1 100644
--- a/doc/guide/files/faq.xml
+++ b/doc/guide/files/faq.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: faq.xml,v 1.33 2007/05/01 11:44:48 rillig Exp $ -->
+<!-- $NetBSD: faq.xml,v 1.34 2007/06/01 11:07:25 rillig Exp $ -->
<chapter id="faq"> <?dbhtml filename="faq.html"?>
<title>Frequently Asked Questions</title>
@@ -51,7 +51,7 @@ it contains items for both pkgsrc users and developers.</para>
<para>To subscribe, do:</para>
<programlisting>
- &cprompt; echo subscribe <replaceable>listname</replaceable> | mail majordomo@NetBSD.org
+&cprompt; echo subscribe <replaceable>listname</replaceable> | mail majordomo@NetBSD.org
</programlisting>
<para>Archives for all these mailing lists are available from
@@ -279,10 +279,10 @@ values.</para>
like:</para>
<programlisting>
- FETCH_CMD= wget
- FETCH_BEFORE_ARGS= --passive-ftp
- FETCH_RESUME_ARGS= -c
- FETCH_OUTPUT_ARGS= -O
+FETCH_CMD= wget
+FETCH_BEFORE_ARGS= --passive-ftp
+FETCH_RESUME_ARGS= -c
+FETCH_OUTPUT_ARGS= -O
</programlisting>
</sect1>
@@ -298,7 +298,7 @@ X11 (<filename>/usr/X11R6</filename>, <filename>/usr/openwin</filename>,
<filename>/etc/mk.conf</filename>:</para>
<programlisting>
- X11_TYPE=XFree86
+X11_TYPE=XFree86
</programlisting>
</sect1>
@@ -314,7 +314,7 @@ you will have to add the following line into
<filename>/etc/mk.conf</filename>:</para>
<programlisting>
- X11_TYPE=xorg
+X11_TYPE=xorg
</programlisting>
<note><para>The DragonFly operating system defaults to using
@@ -336,8 +336,8 @@ port 80 as the proxy port number. So the proxy environment variables
are:</para>
<programlisting>
- ftp_proxy=ftp://orpheus.amdahl.com:80/
- http_proxy=http://orpheus.amdahl.com:80/
+ftp_proxy=ftp://orpheus.amdahl.com:80/
+http_proxy=http://orpheus.amdahl.com:80/
</programlisting>
</sect1>
@@ -474,9 +474,9 @@ following into your <filename>/etc/mk.conf</filename>, somewhere
<varname>LOCALBASE</varname> variable:</para>
<programlisting>
- .if exists(${LOCALBASE}/bin/sudo)
- SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c
- .endif
+.if exists(${LOCALBASE}/bin/sudo)
+SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c
+.endif
</programlisting>
</sect1>
diff --git a/doc/guide/files/files.xml b/doc/guide/files/files.xml
index 7315ba88b56..623fb6424ae 100644
--- a/doc/guide/files/files.xml
+++ b/doc/guide/files/files.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: files.xml,v 1.4 2006/11/23 11:44:47 yyamano Exp $ -->
+<!-- $NetBSD: files.xml,v 1.5 2007/06/01 11:07:25 rillig Exp $ -->
<chapter id="files">
<title>Directory layout of the installed files</title>
@@ -17,20 +17,20 @@ When pkgsrc has been installed as root, the default locations
are:</para>
<programlisting>
- LOCALBASE= /usr/pkg
- PKG_SYSCONFBASE= /usr/pkg/etc
- VARBASE= /var
- PKG_DBDIR= /var/db/pkg
+LOCALBASE= /usr/pkg
+PKG_SYSCONFBASE= /usr/pkg/etc
+VARBASE= /var
+PKG_DBDIR= /var/db/pkg
</programlisting>
<para>In unprivileged mode (when pkgsrc has been installed as any other
user), the default locations are:</para>
<programlisting>
- LOCALBASE= ${HOME}/pkg
- PKG_SYSCONFBASE= ${HOME}/pkg/etc
- VARBASE= ${HOME}/pkg/var
- PKG_DBDIR= ${HOME}/pkg/var/db/pkg
+LOCALBASE= ${HOME}/pkg
+PKG_SYSCONFBASE= ${HOME}/pkg/etc
+VARBASE= ${HOME}/pkg/var
+PKG_DBDIR= ${HOME}/pkg/var/db/pkg
</programlisting>
<para>What these four directories are for, and what they look like is
diff --git a/doc/guide/files/fixes.xml b/doc/guide/files/fixes.xml
index 438341fed67..fd54bf2ed07 100644
--- a/doc/guide/files/fixes.xml
+++ b/doc/guide/files/fixes.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: fixes.xml,v 1.86 2007/06/01 08:53:06 rillig Exp $ -->
+<!-- $NetBSD: fixes.xml,v 1.87 2007/06/01 11:07:25 rillig Exp $ -->
<chapter id="fixes"> <?dbhtml filename="fixes.html"?>
<title>Making your package work</title>
@@ -81,13 +81,13 @@
<filename>Makefile</filename>, e.g.:</para>
<programlisting>
- INTERACTIVE_STAGE= build
+INTERACTIVE_STAGE= build
</programlisting>
<para>Multiple interactive stages can be specified:</para>
<programlisting>
- INTERACTIVE_STAGE= configure install
+INTERACTIVE_STAGE= configure install
</programlisting>
<para>The user can then decide to skip this package by setting the
@@ -147,7 +147,7 @@
role="pkg">graphics/xv</filename>:</para>
<programlisting>
- LICENSE= xv-license
+LICENSE= xv-license
</programlisting>
<para>When trying to build, the user will get a notice that the
@@ -155,12 +155,12 @@
<varname>ACCEPTABLE_LICENSES</varname> variable:</para>
<programlisting>
- &cprompt; <userinput>make</userinput>
- ===> xv-3.10anb9 has an unacceptable license: xv-license.
- ===> To view the license, enter "/usr/bin/make show-license".
- ===> To indicate acceptance, add this line to your /etc/mk.conf:
- ===> ACCEPTABLE_LICENSES+=xv-license
- *** Error code 1
+&cprompt; <userinput>make</userinput>
+===> xv-3.10anb9 has an unacceptable license: xv-license.
+===> To view the license, enter "/usr/bin/make show-license".
+===> To indicate acceptance, add this line to your /etc/mk.conf:
+===> ACCEPTABLE_LICENSES+=xv-license
+*** Error code 1
</programlisting>
<para>The license can be viewed with <command>make
@@ -170,7 +170,7 @@
that license:</para>
<programlisting>
- ACCEPTABLE_LICENSES+=xv-license
+ACCEPTABLE_LICENSES+=xv-license
</programlisting>
<para>When adding a package with a new license, the license text
@@ -306,7 +306,7 @@
<varname>DEPENDS</varname> definition is:</para>
<programlisting>
- &lt;pre-req-package-name&gt;:../../&lt;category&gt;/&lt;pre-req-package&gt;
+&lt;pre-req-package-name&gt;:../../&lt;category&gt;/&lt;pre-req-package&gt;
</programlisting>
<para>Please note that the <quote>pre-req-package-name</quote>
@@ -320,7 +320,7 @@
<filename>buildlink3.mk</filename> file available, use it:</para>
<programlisting>
- .include "../../graphics/jpeg/buildlink3.mk"
+.include "../../graphics/jpeg/buildlink3.mk"
</programlisting>
</listitem>
@@ -331,7 +331,7 @@
definition:</para>
<programlisting>
- BUILD_DEPENDS+= autoconf-2.13:../../devel/autoconf
+BUILD_DEPENDS+= autoconf-2.13:../../devel/autoconf
</programlisting>
</listitem>
@@ -343,13 +343,13 @@
<varname>DEPENDS</varname> definition. For example:</para>
<programlisting>
- DEPENDS+= xpm-3.4j:../../graphics/xpm
+DEPENDS+= xpm-3.4j:../../graphics/xpm
</programlisting>
<para>You can also use wildcards in package dependences:</para>
<programlisting>
- DEPENDS+= xpm-[0-9]*:../../graphics/xpm
+DEPENDS+= xpm-[0-9]*:../../graphics/xpm
</programlisting>
<para>Note that such wildcard dependencies are retained when
@@ -368,7 +368,7 @@
pre-requisite:</para>
<programlisting>
- DEPENDS+= tiff>=3.5.4:../../graphics/tiff
+DEPENDS+= tiff>=3.5.4:../../graphics/tiff
</programlisting>
<para>This means that the package will build against version
@@ -385,7 +385,7 @@
<varname>ABI_DEPENDS</varname>:</para>
<programlisting>
- ABI_DEPENDS+= tiff>=3.6.1:../../graphics/tiff
+ABI_DEPENDS+= tiff>=3.6.1:../../graphics/tiff
</programlisting>
<para>In addition to the above <varname>DEPENDS</varname>
@@ -426,7 +426,7 @@
when it runs, and that is specified:</para>
<programlisting>
- DEPENDS+= teTeX-[0-9]*:../../print/teTeX
+DEPENDS+= teTeX-[0-9]*:../../print/teTeX
</programlisting>
<para>The comment about wildcard dependencies from previous
@@ -462,13 +462,13 @@
<filename>pkgsrc/x11/Xaw3d/Makefile</filename>:</para>
<programlisting>
- CONFLICTS= Xaw-Xpm-[0-9]*
+CONFLICTS= Xaw-Xpm-[0-9]*
</programlisting>
<para>and in <filename>pkgsrc/x11/Xaw-Xpm/Makefile</filename>:</para>
<programlisting>
- CONFLICTS= Xaw3d-[0-9]*
+CONFLICTS= Xaw3d-[0-9]*
</programlisting>
<para>Packages will automatically conflict with other packages
@@ -555,8 +555,8 @@
<quote>.</quote> by the package tools. e.g.</para>
<programlisting>
- DISTNAME= foo-17.42
- PKGREVISION= 9
+DISTNAME= foo-17.42
+PKGREVISION= 9
</programlisting>
<para>will result in a <varname>PKGNAME</varname> of
@@ -570,7 +570,7 @@
minor release of the above package, things should be like:</para>
<programlisting>
- DISTNAME= foo-17.43
+DISTNAME= foo-17.43
</programlisting>
<para><varname>PKGREVISION</varname> should be incremented for any
@@ -585,21 +585,21 @@
changes that do not merit increasing
<varname>PKGREVISION</varname> are:</para>
- <programlisting>
- Changing <varname>HOMEPAGE</varname>, <varname>MAINTAINER</varname>,
- or comments in Makefile.
- Changing build variables if the resulting binary package is the same.
- Changing <filename>DESCR</filename>.
- Adding <varname>PKG_OPTIONS</varname> if the default options don't change.
- </programlisting>
+ <itemizedlist><listitem>
+ <para>Changing <varname>HOMEPAGE</varname>, <varname>MAINTAINER</varname>,
+ or comments in Makefile.</para></listitem><listitem><para>
+ Changing build variables if the resulting binary package is the same.</para></listitem><listitem><para>
+ Changing <filename>DESCR</filename>.</para></listitem><listitem><para>
+ Adding <varname>PKG_OPTIONS</varname> if the default options don't change.</para></listitem>
+ </itemizedlist>
<para>Examples of changes that do merit an increase to
<varname>PKGREVISION</varname> include:</para>
- <programlisting>
- Security fixes
- Changes or additions to a patch file
- Changes to the <filename>PLIST</filename>
- </programlisting>
+ <itemizedlist><listitem><para>
+ Security fixes</para></listitem><listitem><para>
+ Changes or additions to a patch file</para></listitem><listitem><para>
+ Changes to the <filename>PLIST</filename></para></listitem>
+ </itemizedlist>
<para>PKGREVISION must also be incremented when dependencies have ABI
changes.</para>
@@ -615,13 +615,13 @@
Example:</para>
<programlisting>
- SUBST_CLASSES+= fix-paths
- SUBST_STAGE.fix-paths= pre-configure
- SUBST_MESSAGE.fix-paths= Fixing absolute paths.
- SUBST_FILES.fix-paths= src/*.c
- SUBST_FILES.fix-paths+= scripts/*.sh
- SUBST_SED.fix-paths= -e 's,"/usr/local,"${PREFIX},g'
- SUBST_SED.fix-paths+= -e 's,"/var/log,"${VARBASE}/log,g'
+SUBST_CLASSES+= fix-paths
+SUBST_STAGE.fix-paths= pre-configure
+SUBST_MESSAGE.fix-paths= Fixing absolute paths.
+SUBST_FILES.fix-paths= src/*.c
+SUBST_FILES.fix-paths+= scripts/*.sh
+SUBST_SED.fix-paths= -e 's,"/usr/local,"${PREFIX},g'
+SUBST_SED.fix-paths+= -e 's,"/var/log,"${VARBASE}/log,g'
</programlisting>
<para><varname>SUBST_CLASSES</varname> is a list of identifiers
@@ -695,9 +695,9 @@
displayed to the user before aborting the build. Example:</para>
<programlisting>
- FETCH_MESSAGE= "Please download the files"
- FETCH_MESSAGE+= " "${DISTFILES:Q}
- FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"."
+FETCH_MESSAGE= "Please download the files"
+FETCH_MESSAGE+= " "${DISTFILES:Q}
+FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"."
</programlisting>
</sect2>
@@ -780,8 +780,11 @@
-Bshareable</quote> commands, and instead use:</para>
<programlisting>
- ${LIBTOOL} --mode=link ${CC} -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} \
- -rpath ${PREFIX}/lib -version-info major:minor
+${LIBTOOL} --mode=link \
+ ${CC} -o ${.TARGET:.a=.la} \
+ ${OBJS:.o=.lo} \
+ -rpath ${PREFIX}/lib \
+ -version-info major:minor
</programlisting>
<para>Note that the library is changed to have a
@@ -799,22 +802,22 @@
<para>From the libtool manual:</para>
<programlisting>
- So, libtool library versions are described by three integers:
+So, libtool library versions are described by three integers:
- CURRENT
- The most recent interface number that this library implements.
+CURRENT
+The most recent interface number that this library implements.
- REVISION
- The implementation number of the CURRENT interface.
+REVISION
+The implementation number of the CURRENT interface.
- AGE
- The difference between the newest and oldest interfaces that
- this library implements. In other words, the library implements
- all the interface numbers in the range from number `CURRENT -
- AGE' to `CURRENT'.
+AGE
+The difference between the newest and oldest interfaces that
+this library implements. In other words, the library implements
+all the interface numbers in the range from number `CURRENT -
+AGE' to `CURRENT'.
- If two libraries have identical CURRENT and AGE numbers, then the
- dynamic linker chooses the library with the greater REVISION number.
+If two libraries have identical CURRENT and AGE numbers, then the
+dynamic linker chooses the library with the greater REVISION number.
</programlisting>
<para>The <quote>-release</quote> option will produce
@@ -857,13 +860,13 @@
<filename>.la</filename> file. e.g.</para>
<programlisting>
- ${LIBTOOL} --mode=link ${CC} -o someprog -L../somelib -lsomelib
+${LIBTOOL} --mode=link ${CC} -o someprog -L../somelib -lsomelib
</programlisting>
<para>should be changed to:</para>
<programlisting>
- ${LIBTOOL} --mode=link ${CC} -o <replaceable>someprog</replaceable> <replaceable>../somelib/somelib.la</replaceable>
+${LIBTOOL} --mode=link ${CC} -o <replaceable>someprog</replaceable> <replaceable>../somelib/somelib.la</replaceable>
</programlisting>
<para>and it will do the right thing with the libraries.</para>
@@ -876,7 +879,7 @@
<filename>.la</filename>. e.g.</para>
<programlisting>
- ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
+${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
</programlisting>
<para>This will install the static <filename>.a</filename>,
@@ -961,29 +964,28 @@
<para>For packages that need only autoconf:</para>
<programlisting>
- AUTOCONF_REQD= 2.50 # if default version is not good enough
- USE_TOOLS+= autoconf # use "autoconf213" for autoconf-2.13
- ...
+AUTOCONF_REQD= 2.50 # if default version is not good enough
+USE_TOOLS+= autoconf # use "autoconf213" for autoconf-2.13
+...
- pre-configure:
- cd ${WRKSRC}; autoconf
+pre-configure:
+ cd ${WRKSRC} &amp;&amp; autoconf
- ...
+...
</programlisting>
<para>and for packages that need automake and autoconf:</para>
<programlisting>
- AUTOMAKE_REQD= 1.7.1 # if default version is not good enough
- USE_TOOLS+= automake # use "automake14" for automake-1.4
- ...
+AUTOMAKE_REQD= 1.7.1 # if default version is not good enough
+USE_TOOLS+= automake # use "automake14" for automake-1.4
+...
- pre-configure:
- cd ${WRKSRC}; \
- aclocal; autoheader; \
- automake -a --foreign -i; autoconf
+pre-configure:
+ set -e; cd ${WRKSRC}; \
+ aclocal; autoheader; automake -a --foreign -i; autoconf
- ...
+...
</programlisting>
<para>Packages which use GNU Automake will almost certainly
@@ -1117,26 +1119,26 @@
rest of the world, you should use the following code.</para>
<programlisting>
- #include &lt;sys/param.h&gt;
- #if (defined(BSD) &amp;&amp; BSD &gt;= 199306)
- /* BSD-specific code goes here */
- #else
- /* non-BSD-specific code goes here */
- #endif
+#include &lt;sys/param.h&gt;
+#if (defined(BSD) &amp;&amp; BSD &gt;= 199306)
+/* BSD-specific code goes here */
+#else
+/* non-BSD-specific code goes here */
+#endif
</programlisting>
<para>If this distinction is not fine enough, you can also test
for the following macros.</para>
<programlisting>
- FreeBSD __FreeBSD__
- DragonFly __DragonFly__
- Interix __INTERIX
- IRIX __sgi (TODO: get a definite source for this)
- Linux linux, __linux, __linux__
- NetBSD __NetBSD__
- OpenBSD __OpenBSD__
- Solaris sun, __sun
+FreeBSD __FreeBSD__
+DragonFly __DragonFly__
+Interix __INTERIX
+IRIX __sgi (TODO: get a definite source for this)
+Linux linux, __linux, __linux__
+NetBSD __NetBSD__
+OpenBSD __OpenBSD__
+Solaris sun, __sun
</programlisting>
</sect3>
@@ -1144,9 +1146,9 @@
<title>C preprocessor macros to identify the hardware architecture</title>
<programlisting>
- i386 i386, __i386, __i386__
- MIPS __mips
- SPARC sparc, __sparc
+i386 i386, __i386, __i386__
+MIPS __mips
+SPARC sparc, __sparc
</programlisting>
</sect3>
@@ -1154,10 +1156,10 @@
<title>C preprocessor macros to identify the compiler</title>
<programlisting>
- GCC __GNUC__ (major version), __GNUC_MINOR__
- MIPSpro _COMPILER_VERSION (0x741 for MIPSpro 7.41)
- SunPro __SUNPRO_C (0x570 for Sun C 5.7)
- SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8)
+GCC __GNUC__ (major version), __GNUC_MINOR__
+MIPSpro _COMPILER_VERSION (0x741 for MIPSpro 7.41)
+SunPro __SUNPRO_C (0x570 for Sun C 5.7)
+SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8)
</programlisting>
</sect3>
@@ -1215,18 +1217,18 @@
possibility. That compiler cannot handle the following code:</para>
<programlisting>
- extern int extern_func(int);
+extern int extern_func(int);
- static inline int
- inline_func(int x)
- {
+static inline int
+inline_func(int x)
+{
return extern_func(x);
- }
+}
- int main(void)
- {
+int main(void)
+{
return 0;
- }
+}
</programlisting>
<para>It generates the code for <function>inline_func</function> even if
@@ -1266,8 +1268,8 @@ of functions.</para>
<literal>${INSTALL_*_DIR}</literal> like this:</para>
<programlisting>
- ${INSTALL_DATA_DIR} ${PREFIX}/dir1
- ${INSTALL_DATA_DIR} ${PREFIX}/dir2
+${INSTALL_DATA_DIR} ${PREFIX}/dir1
+${INSTALL_DATA_DIR} ${PREFIX}/dir2
</programlisting>
<para>You can also just append <quote><literal>dir1
@@ -1345,11 +1347,11 @@ of functions.</para>
shall use <command>tclsh</command> in this example):</para>
<programlisting>
- REPLACE_INTERPRETER+= tcl
- REPLACE.tcl.old= .*/bin/tclsh
- REPLACE.tcl.new= ${PREFIX}/bin/tclsh
- REPLACE_FILES.tcl= # list of tcl scripts which need to be fixed,
- # relative to ${WRKSRC}, just as in REPLACE_PERL
+REPLACE_INTERPRETER+= tcl
+REPLACE.tcl.old= .*/bin/tclsh
+REPLACE.tcl.new= ${PREFIX}/bin/tclsh
+REPLACE_FILES.tcl= # list of tcl scripts which need to be fixed,
+# relative to ${WRKSRC}, just as in REPLACE_PERL
</programlisting>
<note><para>Before March 2006, these variables were called
@@ -1380,7 +1382,7 @@ of functions.</para>
paths to packlist files, e.g.:</para>
<programlisting>
- PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
+PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</programlisting>
<para>The variables <varname>PERL5_SITELIB</varname>,
diff --git a/doc/guide/files/getting.xml b/doc/guide/files/getting.xml
index 68b8db54a4f..937150005ad 100644
--- a/doc/guide/files/getting.xml
+++ b/doc/guide/files/getting.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: getting.xml,v 1.18 2007/04/20 08:33:41 ghen Exp $ -->
+<!-- $NetBSD: getting.xml,v 1.19 2007/06/01 11:07:25 rillig Exp $ -->
<chapter id="getting">
<title>Where to get pkgsrc and how to keep it up-to-date</title>
@@ -58,7 +58,7 @@ and dashes.</para>
supfile has a line
<programlisting>
- release=pkgsrc
+release=pkgsrc
</programlisting>
in it, see the examples in
diff --git a/doc/guide/files/gnome.xml b/doc/guide/files/gnome.xml
index e34a6e8ee82..816bab7a3b3 100644
--- a/doc/guide/files/gnome.xml
+++ b/doc/guide/files/gnome.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: gnome.xml,v 1.7 2006/12/15 13:22:14 martti Exp $ -->
+<!-- $NetBSD: gnome.xml,v 1.8 2007/06/01 11:07:25 rillig Exp $ -->
<chapter id="gnome"> <?dbhtml filename="gnome.html"?>
<title>GNOME packaging and porting</title>
@@ -108,9 +108,11 @@ give you a general idea on the minimum required tools:</para>
build system. As a general rule you will need to tell this to your
package:</para>
- <programlisting>GNU_CONFIGURE=yes
+ <programlisting>
+GNU_CONFIGURE=yes
USE_LIBTOOL=yes
-USE_TOOLS+=gmake</programlisting>
+USE_TOOLS+=gmake
+</programlisting>
</listitem>
<listitem>
diff --git a/doc/guide/files/infr.design.xml b/doc/guide/files/infr.design.xml
index c0326d16fac..1191cbc5709 100644
--- a/doc/guide/files/infr.design.xml
+++ b/doc/guide/files/infr.design.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: infr.design.xml,v 1.6 2006/12/10 16:46:50 kano Exp $ -->
+<!-- $NetBSD: infr.design.xml,v 1.7 2007/06/01 11:07:25 rillig Exp $ -->
<chapter id="infr.design"> <?dbhtml filename="infr.design.html"?>
<title>Design of the pkgsrc infrastructure</title>
@@ -66,7 +66,7 @@
example.</para>
<programlisting>
- DISTFILES= ${DISTNAME}${EXTRACT_SUFX} additional-files.tar.gz
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} additional-files.tar.gz
</programlisting>
<para>Because of the selection of this default value, the same
@@ -112,13 +112,13 @@
clear, here is an example:</para>
<programlisting>
- CONFIGURE_ARGS= # none
- CFLAGS= -O
- CONFIGURE_ARGS+= CFLAGS=${CFLAGS:Q}
+CONFIGURE_ARGS= # none
+CFLAGS= -O
+CONFIGURE_ARGS+= CFLAGS=${CFLAGS:Q}
- CONFIGURE_ARGS:= ${CONFIGURE_ARGS}
+CONFIGURE_ARGS:= ${CONFIGURE_ARGS}
- CFLAGS+= -Wall
+CFLAGS+= -Wall
</programlisting>
<para>This code shows how the use of the <literal>:=</literal>
diff --git a/doc/guide/files/makefile.xml b/doc/guide/files/makefile.xml
index bb6848b0912..6ee143ce9ac 100644
--- a/doc/guide/files/makefile.xml
+++ b/doc/guide/files/makefile.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: makefile.xml,v 1.22 2007/03/08 16:00:16 rillig Exp $ -->
+<!-- $NetBSD: makefile.xml,v 1.23 2007/06/01 11:07:25 rillig Exp $ -->
<chapter id="makefile"> <?dbhtml filename="makefile.html"?>
<title>Programming in <filename>Makefile</filename>s</title>
@@ -31,16 +31,16 @@
regenerated properly. Example:</para>
<programlisting>
- wrong:
- @echo "line 1" > ${.TARGET}
- @echo "line 2" >> ${.TARGET}
- @false
-
- correct:
- @echo "line 1" > ${.TARGET}.tmp
- @echo "line 2" >> ${.TARGET}.tmp
- @false
- @mv ${.TARGET}.tmp ${.TARGET}
+wrong:
+ @echo "line 1" > ${.TARGET}
+ @echo "line 2" >> ${.TARGET}
+ @false
+
+correct:
+ @echo "line 1" > ${.TARGET}.tmp
+ @echo "line 2" >> ${.TARGET}.tmp
+ @false
+ @mv ${.TARGET}.tmp ${.TARGET}
</programlisting>
<para>When you run <command>make wrong</command> twice, the file
@@ -163,16 +163,16 @@
<title>Adding things to a list</title>
<programlisting>
- STRING= foo * bar `date`
- INT_LIST= # empty
- ANOTHER_INT_LIST= apache-[0-9]*:../../www/apache
- EXT_LIST= # empty
- ANOTHER_EXT_LIST= a=b c=d
-
- INT_LIST+= ${STRING} # 1
- INT_LIST+= ${ANOTHER_INT_LIST} # 2
- EXT_LIST+= ${STRING:Q} # 3
- EXT_LIST+= ${ANOTHER_EXT_LIST} # 4
+STRING= foo * bar `date`
+INT_LIST= # empty
+ANOTHER_INT_LIST= apache-[0-9]*:../../www/apache
+EXT_LIST= # empty
+ANOTHER_EXT_LIST= a=b c=d
+
+INT_LIST+= ${STRING} # 1
+INT_LIST+= ${ANOTHER_INT_LIST} # 2
+EXT_LIST+= ${STRING:Q} # 3
+EXT_LIST+= ${ANOTHER_EXT_LIST} # 4
</programlisting>
<para>When you add a string to an external list (example 3), it
@@ -187,10 +187,10 @@
<title>Converting an internal list into an external list</title>
<programlisting>
- EXT_LIST= # empty
- .for i in ${INT_LIST}
- EXT_LIST+= ${i:Q}""
- .endfor
+EXT_LIST= # empty
+.for i in ${INT_LIST}
+EXT_LIST+= ${i:Q}""
+.endfor
</programlisting>
<para>This code converts the internal list
@@ -209,17 +209,17 @@
nastiness.</para>
<programlisting>
- STRING= foo bar < > * `date` $$HOME ' "
- EXT_LIST= string=${STRING:Q} x=second\ item
-
- all:
- echo ${STRING} # 1
- echo "${STRING}" # 2
- echo "${STRING:Q}" # 3
- echo ${STRING:Q} # 4
- echo x${STRING:Q} | sed 1s,.,, # 5
- printf "%s\\n" ${STRING:Q}"" # 6
- env ${EXT_LIST} /bin/sh -c 'echo "$$string"; echo "$$x"'
+STRING= foo bar < > * `date` $$HOME ' "
+EXT_LIST= string=${STRING:Q} x=second\ item
+
+all:
+ echo ${STRING} # 1
+ echo "${STRING}" # 2
+ echo "${STRING:Q}" # 3
+ echo ${STRING:Q} # 4
+ echo x${STRING:Q} | sed 1s,.,, # 5
+ printf "%s\\n" ${STRING:Q}"" # 6
+ env ${EXT_LIST} /bin/sh -c 'echo "$$string"; echo "$$x"'
</programlisting>
<para>Example 1 leads to a syntax error in the shell, as the
@@ -284,15 +284,15 @@
here is how we do it:</para>
<programlisting>
- CPPFLAGS= # empty
- CPPFLAGS+= -Wundef -DPREFIX=\"${PREFIX:Q}\"
- CPPFLAGS+= ${MY_CPPFLAGS}
+CPPFLAGS= # empty
+CPPFLAGS+= -Wundef -DPREFIX=\"${PREFIX:Q}\"
+CPPFLAGS+= ${MY_CPPFLAGS}
- CONFIGURE_ARGS+= CPPFLAGS=${CPPFLAGS:M*:Q}
+CONFIGURE_ARGS+= CPPFLAGS=${CPPFLAGS:M*:Q}
- all:
- echo x${CPPFLAGS:Q}x # leading and trailing whitespace
- echo x${CONFIGURE_ARGS}x # properly trimmed
+all:
+ echo x${CPPFLAGS:Q}x # leading and trailing whitespace
+ echo x${CONFIGURE_ARGS}x # properly trimmed
</programlisting></listitem>
<listitem><para>The example above contains one bug: The
@@ -313,17 +313,17 @@
same trick.</para>
<programlisting>
- EMPTY= # empty
- empty_test:
- for i in a ${EMPTY:Q} c; do \
- echo "$$i"; \
- done
-
- for_test:
- .for i in a:\ a:\test.txt
- echo ${i:Q}
- echo "foo"
- .endfor
+EMPTY= # empty
+empty_test:
+ for i in a ${EMPTY:Q} c; do \
+ echo "$$i"; \
+ done
+
+for_test:
+.for i in a:\ a:\test.txt
+ echo ${i:Q}
+ echo "foo"
+.endfor
</programlisting>
<para>The first example will only print two of the three lines
@@ -354,7 +354,7 @@
in <varname>${VAR}</varname> after this code executes.</para>
<programlisting>
- VAR:= ${VAR:N${_othervar_:C/-//}}
+VAR:= ${VAR:N${_othervar_:C/-//}}
</programlisting>
<para>For a more complex code snippet and a workaround, see the
diff --git a/doc/guide/files/options.xml b/doc/guide/files/options.xml
index da215e73792..66b7da7dd44 100644
--- a/doc/guide/files/options.xml
+++ b/doc/guide/files/options.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: options.xml,v 1.20 2006/06/08 08:45:45 rillig Exp $ -->
+<!-- $NetBSD: options.xml,v 1.21 2007/06/01 11:07:25 rillig Exp $ -->
<!-- based on: pkgsrc/mk/bsd.options.mk 1.56 -->
@@ -36,51 +36,51 @@ e.g. <filename>options.mk</filename>, that is included by the
main package <filename>Makefile</filename>.</para>
<programlisting>
- PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
- PKG_SUPPORTED_OPTIONS= wibble-foo ldap
- PKG_OPTIONS_OPTIONAL_GROUPS= database
- PKG_OPTIONS_GROUP.database= mysql pgsql
- PKG_SUGGESTED_OPTIONS= wibble-foo
- PKG_OPTIONS_LEGACY_VARS+= WIBBLE_USE_OPENLDAP:ldap
- PKG_OPTIONS_LEGACY_OPTS+= foo:wibble-foo
-
- .include "../../mk/bsd.prefs.mk"
-
- # this package was previously named wibble2
- .if defined(PKG_OPTIONS.wibble2)
- PKG_LEGACY_OPTIONS+= ${PKG_OPTIONS.wibble2}
- PKG_OPTIONS_DEPRECATED_WARNINGS+= \
- "Deprecated variable PKG_OPTIONS.wibble2 used, use ${PKG_OPTIONS_VAR} instead."
- .endif
-
- .include "../../mk/bsd.options.mk"
-
- # Package-specific option-handling
-
- ###
- ### FOO support
- ###
- .if !empty(PKG_OPTIONS:Mwibble-foo)
- CONFIGURE_ARGS+= --enable-foo
- .endif
-
- ###
- ### LDAP support
- ###
- .if !empty(PKG_OPTIONS:Mldap)
- . include "../../databases/openldap-client/buildlink3.mk"
- CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap-client}
- .endif
-
- ###
- ### database support
- ###
- .if !empty(PKG_OPTIONS:Mmysql)
- . include "../../mk/mysql.buildlink3.mk"
- .endif
- .if !empty(PKG_OPTIONS:Mpgsql)
- . include "../../mk/pgsql.buildlink3.mk"
- .endif
+PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
+PKG_SUPPORTED_OPTIONS= wibble-foo ldap
+PKG_OPTIONS_OPTIONAL_GROUPS= database
+PKG_OPTIONS_GROUP.database= mysql pgsql
+PKG_SUGGESTED_OPTIONS= wibble-foo
+PKG_OPTIONS_LEGACY_VARS+= WIBBLE_USE_OPENLDAP:ldap
+PKG_OPTIONS_LEGACY_OPTS+= foo:wibble-foo
+
+.include "../../mk/bsd.prefs.mk"
+
+# this package was previously named wibble2
+.if defined(PKG_OPTIONS.wibble2)
+PKG_LEGACY_OPTIONS+= ${PKG_OPTIONS.wibble2}
+PKG_OPTIONS_DEPRECATED_WARNINGS+= \
+ "Deprecated variable PKG_OPTIONS.wibble2 used, use ${PKG_OPTIONS_VAR} instead."
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+# Package-specific option-handling
+
+###
+### FOO support
+###
+.if !empty(PKG_OPTIONS:Mwibble-foo)
+CONFIGURE_ARGS+= --enable-foo
+.endif
+
+###
+### LDAP support
+###
+.if !empty(PKG_OPTIONS:Mldap)
+. include "../../databases/openldap-client/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap-client}
+.endif
+
+###
+### database support
+###
+.if !empty(PKG_OPTIONS:Mmysql)
+. include "../../mk/mysql.buildlink3.mk"
+.endif
+.if !empty(PKG_OPTIONS:Mpgsql)
+. include "../../mk/pgsql.buildlink3.mk"
+.endif
</programlisting>
<para>The first section contains the information about which build
@@ -179,7 +179,7 @@ each option. The correct way to check for an option is to check
whether it is listed in <varname>PKG_OPTIONS</varname>:</para>
<programlisting>
- .if !empty(PKG_OPTIONS:M<replaceable>option</replaceable>)
+.if !empty(PKG_OPTIONS:M<replaceable>option</replaceable>)
</programlisting>
</sect1>
diff --git a/doc/guide/files/pkginstall.xml b/doc/guide/files/pkginstall.xml
index 9395c5cba82..57e950c5094 100644
--- a/doc/guide/files/pkginstall.xml
+++ b/doc/guide/files/pkginstall.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: pkginstall.xml,v 1.14 2007/01/10 17:58:43 reed Exp $ -->
+<!-- $NetBSD: pkginstall.xml,v 1.15 2007/06/01 11:07:25 rillig Exp $ -->
<chapter id="pkginstall"> <?dbhtml filename="pkginstall.html"?>
<title>The pkginstall framework</title>
@@ -114,7 +114,7 @@ directories anywhere in the file system:</para>
numerical mode. For example:</para>
<programlisting>
- MAKE_DIRS_PERMS+= ${VARBASE}/foo/private ${ROOT_USER} ${ROOT_GROUP} 0700
+MAKE_DIRS_PERMS+= ${VARBASE}/foo/private ${ROOT_USER} ${ROOT_GROUP} 0700
</programlisting>
<para>The difference between the two is exactly the same as their
@@ -164,7 +164,7 @@ installation prefix:</para>
this order. For example:</para>
<programlisting>
- SUPPORT_FILES_PERMS+= ${PREFIX}/share/somefile ${VARBASE}/somefile ${ROOT_USER} ${ROOT_GROUP} 0700
+SUPPORT_FILES_PERMS+= ${PREFIX}/share/somefile ${VARBASE}/somefile ${ROOT_USER} ${ROOT_GROUP} 0700
</programlisting>
<para>The difference between the two is exactly the same as their
@@ -288,7 +288,7 @@ extra flag to the configuration script; this is the case of GNU Autoconf-
generated files:</para>
<programlisting>
- CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
</programlisting>
<para>Note that this specifies where the package has to <emphasis>look
@@ -326,8 +326,8 @@ about their syntax and their purpose. Here is an example, taken from the
<filename role="pkg">mail/mutt</filename> package:</para>
<programlisting>
- EGDIR= ${PREFIX}/share/doc/mutt/samples
- CONF_FILES= ${EGDIR}/Muttrc ${PKG_SYSCONFDIR}/Muttrc
+EGDIR= ${PREFIX}/share/doc/mutt/samples
+CONF_FILES= ${EGDIR}/Muttrc ${PKG_SYSCONFDIR}/Muttrc
</programlisting>
<para>Note that the <varname>EGDIR</varname> variable is specific to that
@@ -380,7 +380,7 @@ to:</para>
Continuing the previous example:</para>
<programlisting>
- RCD_SCRIPTS+= cupsd
+RCD_SCRIPTS+= cupsd
</programlisting>
</listitem>
@@ -445,7 +445,7 @@ installation, it can do so by using the pkginstall framework.</para>
syntax:</para>
<programlisting>
- user:group
+user:group
</programlisting>
<para>Further specification of user details may be done by setting
@@ -465,7 +465,7 @@ not specified.</para>
<varname>PKG_GROUPS</varname> variable, whose syntax is:</para>
<programlisting>
- group
+group
</programlisting>
<para>The numeric GID of the group may be set by defining
@@ -497,7 +497,7 @@ add some hooks to the installation scripts to handle it. Consider the
following example, taken from <filename role="pkg">shells/zsh</filename>:</para>
<programlisting>
- PKG_SHELL= ${PREFIX}/bin/zsh
+PKG_SHELL= ${PREFIX}/bin/zsh
</programlisting>
<!-- ================================================================== -->
@@ -536,7 +536,7 @@ installation prefix. Consider the following example, taken from <filename
role="pkg">fonts/dbz-ttf</filename>:</para>
<programlisting>
- FONTS_DIRS.ttf= ${PREFIX}/lib/X11/fonts/TTF
+FONTS_DIRS.ttf= ${PREFIX}/lib/X11/fonts/TTF
</programlisting>
<!-- ================================================================== -->
diff --git a/doc/guide/files/platforms.xml b/doc/guide/files/platforms.xml
index 7ff53a793c4..9fc07c4ade9 100644
--- a/doc/guide/files/platforms.xml
+++ b/doc/guide/files/platforms.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: platforms.xml,v 1.54 2007/04/21 02:57:58 kano Exp $ -->
+<!-- $NetBSD: platforms.xml,v 1.55 2007/06/01 11:07:25 rillig Exp $ -->
<chapter id="platforms">
<title>Using pkgsrc on systems other than &os;</title>
@@ -504,7 +504,7 @@ file and inspect the contents before extracting it.
entry provides adequate emulation in most cases:</para>
<programlisting>
- interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi:
+interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi:
</programlisting>
</sect3>
@@ -623,7 +623,7 @@ file and inspect the contents before extracting it.
<para>If you are using SGI's MIPSPro compiler, please set
<programlisting>
- PKGSRC_COMPILER= mipspro
+PKGSRC_COMPILER= mipspro
</programlisting>
in <filename>/etc/mk.conf</filename>. Otherwise, pkgsrc will assume you
@@ -654,8 +654,8 @@ file and inspect the contents before extracting it.
directory:</para>
<programlisting>
- env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \
- ac_cv___attribute__=yes ./bootstrap
+env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \
+ac_cv___attribute__=yes ./bootstrap
</programlisting>
<note>
@@ -673,7 +673,7 @@ file and inspect the contents before extracting it.
in <filename>/etc/mk.conf</filename>:</para>
<programlisting>
- PKGSRC_COMPILER= icc
+PKGSRC_COMPILER= icc
</programlisting>
<para>The default installation directory for icc is
@@ -683,7 +683,7 @@ file and inspect the contents before extracting it.
<filename>/etc/mk.conf</filename>:</para>
<programlisting>
- ICCBASE= /opt/icc
+ICCBASE= /opt/icc
</programlisting>
<para>pkgsrc uses the static linking method of the runtime libraries
@@ -739,11 +739,11 @@ file and inspect the contents before extracting it.
of the file with:</para>
<programlisting>
- .ifdef BSD_PKG_MK
- # pkgsrc stuff, e.g. insert defaults/mk.conf or similar here
- .else
- # OpenBSD stuff
- .endif
+.ifdef BSD_PKG_MK
+# pkgsrc stuff, e.g. insert defaults/mk.conf or similar here
+.else
+# OpenBSD stuff
+.endif
</programlisting>
</listitem>
</orderedlist>
@@ -811,10 +811,10 @@ file and inspect the contents before extracting it.
<filename>mk.conf</filename> file:</para>
<programlisting>
- CC= cc
- CXX= CC
- CPP= cc -E
- CXXCPP= CC -E
+CC= cc
+CXX= CC
+CPP= cc -E
+CXXCPP= CC -E
</programlisting>
<note><para>The <varname>CPP</varname> setting might break some
@@ -830,8 +830,8 @@ file and inspect the contents before extracting it.
file:</para>
<programlisting>
- PKGSRC_COMPILER= sunpro
- ABI= 64
+PKGSRC_COMPILER= sunpro
+ABI= 64
</programlisting>
<note><para>This setting has been tested for the SPARC
@@ -849,8 +849,8 @@ file and inspect the contents before extracting it.
to your <filename>mk.conf</filename>:</para>
<programlisting>
- CONFIG_SHELL= ${LOCALBASE}/bin/bash
- WRAPPER_SHELL= ${LOCALBASE}/bin/bash
+CONFIG_SHELL= ${LOCALBASE}/bin/bash
+WRAPPER_SHELL= ${LOCALBASE}/bin/bash
</programlisting>
<para>Then, rebuild the <filename
diff --git a/doc/guide/files/plist.xml b/doc/guide/files/plist.xml
index b27720a2227..a25fe9145dc 100644
--- a/doc/guide/files/plist.xml
+++ b/doc/guide/files/plist.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: plist.xml,v 1.13 2006/09/10 19:31:42 wiz Exp $ -->
+<!-- $NetBSD: plist.xml,v 1.14 2007/06/01 11:07:26 rillig Exp $ -->
<chapter id="plist">
<title>PLIST issues</title>
@@ -20,7 +20,7 @@
<filename>PLIST</filename> file you write:</para>
<programlisting>
- @comment &#36;NetBSD&#36;
+@comment &#36;NetBSD&#36;
</programlisting>
</sect1>
@@ -56,7 +56,7 @@
resulting PLIST:</para>
<programlisting>
- PRINT_PLIST_AWK+= /^libdata\/foo/ { next; }
+PRINT_PLIST_AWK+= /^libdata\/foo/ { next; }
</programlisting>
<para>And to get all the <varname>@dirrm</varname> lines referring
@@ -64,7 +64,7 @@
<varname>@comment</varname>s:</para>
<programlisting>
- PRINT_PLIST_AWK+= /^@dirrm share\/specific/ { print "@comment " $$0; next; }
+PRINT_PLIST_AWK+= /^@dirrm share\/specific/ { print "@comment " $$0; next; }
</programlisting>
</sect1>
@@ -141,7 +141,7 @@
linkend="components.optional"/>):</para>
<programlisting>
- PLIST_SUBST+= SOMEVAR="somevalue"
+PLIST_SUBST+= SOMEVAR="somevalue"
</programlisting>
<para>This replaces all occurrences of <quote>${SOMEVAR}</quote>
@@ -221,7 +221,7 @@
an extra package to remove it. Therefore, one simply does:</para>
<programlisting>
- @unexec ${RMDIR} %D/path/to/shared/directory 2>/dev/null || ${TRUE}
+@unexec ${RMDIR} %D/path/to/shared/directory 2>/dev/null || ${TRUE}
</programlisting>
<para>in the PLISTs of all affected packages, instead of the
@@ -250,8 +250,8 @@
idea of the *-dirs packages available, issue:</para>
<programlisting>
- &cprompt; cd .../pkgsrc
- &cprompt; ls -d */*-dirs
+&cprompt; cd .../pkgsrc
+&cprompt; ls -d */*-dirs
</programlisting>
<para>Their use from other packages is very simple. The
@@ -265,7 +265,7 @@
following line in it:</para>
<programlisting>
- USE_DIRS+= xdg-1.1
+USE_DIRS+= xdg-1.1
</programlisting>
<para>After regenerating the PLIST using <command>make
diff --git a/doc/guide/files/submit.xml b/doc/guide/files/submit.xml
index ba84189ef5e..3f343bb09b9 100644
--- a/doc/guide/files/submit.xml
+++ b/doc/guide/files/submit.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: submit.xml,v 1.16 2006/12/02 06:05:27 kano Exp $ -->
+<!-- $NetBSD: submit.xml,v 1.17 2007/06/01 11:07:26 rillig Exp $ -->
<chapter id="submit"> <?dbhtml filename="submit.html"?>
<title>Submitting and Committing</title>
@@ -97,8 +97,8 @@
<quote>pkgsrc-base</quote>, e.g:</para>
<programlisting>
- &uprompt; cd .../pkgsrc/category/pkgname
- &uprompt; cvs import pkgsrc/category/pkgname TNF pkgsrc-base
+&uprompt; cd .../pkgsrc/category/pkgname
+&uprompt; cvs import pkgsrc/category/pkgname TNF pkgsrc-base
</programlisting>
<para>Remember to move the directory from which you imported out of