regen
This commit is contained in:
parent
7d8b7c6596
commit
8719404467
2 changed files with 135 additions and 146 deletions
153
doc/pkgsrc.html
153
doc/pkgsrc.html
|
@ -30,8 +30,8 @@
|
|||
The pkgsrc Developers
|
||||
</h3>
|
||||
</div></div>
|
||||
<div><p class="copyright">Copyright © 1994-2006 The NetBSD Foundation, Inc</p></div>
|
||||
<div><p class="pubdate">$NetBSD: pkgsrc.xml,v 1.24 2006/11/11 05:39:09 rillig Exp $</p></div>
|
||||
<div><p class="copyright">Copyright © 1994-2007 The NetBSD Foundation, Inc</p></div>
|
||||
<div><p class="pubdate">$NetBSD: pkgsrc.xml,v 1.25 2007/08/15 06:32:38 rillig Exp $</p></div>
|
||||
<div><div class="abstract">
|
||||
<p class="title"><b>Abstract</b></p>
|
||||
<p>pkgsrc is a centralized package management system for
|
||||
|
@ -554,14 +554,14 @@ pkgsrc provides the following key features:
|
|||
<p>The following principles are basic to pkgsrc:</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>“<span class="quote">It should only work if it's right.</span>”
|
||||
— That means, if a package contains bugs, it's better to find
|
||||
— That means, if a package contains bugs, it's better to find
|
||||
them and to complain about them rather than to just install the package
|
||||
and hope that it works. There are numerous checks in pkgsrc that try to
|
||||
find such bugs: Static analysis tools (<a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>), build-time checks (portability
|
||||
of shell scripts), and post-installation checks (installed files,
|
||||
references to shared libraries, script interpreters).</p></li>
|
||||
<li><p>“<span class="quote">If it works, it should work everywhere</span>”
|
||||
— Like NetBSD has been ported to many hardware architectures,
|
||||
— Like NetBSD has been ported to many hardware architectures,
|
||||
pkgsrc has been ported to many operating systems. Care is taken that
|
||||
packages behave the same on all platforms.</p></li>
|
||||
</ul></div>
|
||||
|
@ -1421,7 +1421,7 @@ file and inspect the contents before extracting it.
|
|||
<code class="prompt">#</code> <strong class="userinput"><code>mv pkg_info pkg_info.orig</code></strong>
|
||||
</pre>
|
||||
</li>
|
||||
<li><p>An example <code class="filename">/etc/mk.conf</code> file will be placed in
|
||||
<li><p>An example <a href="#mk.conf"><code class="filename">mk.conf</code></a> file will be placed in
|
||||
<code class="filename">/etc/mk.conf.example</code> file
|
||||
when you use the bootstrap script.</p></li>
|
||||
</ol></div>
|
||||
|
@ -1619,7 +1619,7 @@ interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi:
|
|||
with.</p>
|
||||
<p>Therefore, please make sure that you have no conflicting
|
||||
<code class="varname">CFLAGS</code> in your environment or the
|
||||
<code class="filename">/etc/mk.conf</code>. Particularly, make sure that you do not
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a>. Particularly, make sure that you do not
|
||||
try to link n32 object files with lib64 or vice versa. Check your
|
||||
<code class="filename">/etc/compiler.defaults</code>!</p>
|
||||
<p>If you have the actual pkgsrc tree mounted via NFS from a different host,
|
||||
|
@ -1638,7 +1638,7 @@ PKGSRC_COMPILER= mipspro
|
|||
</pre>
|
||||
<p>
|
||||
|
||||
in <code class="filename">/etc/mk.conf</code>. Otherwise, pkgsrc will assume you
|
||||
in <a href="#mk.conf"><code class="filename">mk.conf</code></a>. Otherwise, pkgsrc will assume you
|
||||
are using gcc and may end up passing invalid flags to the compiler. Note that
|
||||
bootstrap should create an appropriate <code class="filename">mk.conf.example</code> by
|
||||
default.</p>
|
||||
|
@ -1675,7 +1675,7 @@ ac_cv___attribute__=yes ./bootstrap
|
|||
overridden so that __attribute__ is assumed supported by the
|
||||
compiler.</p>
|
||||
<p>After bootstrapping, you should set <code class="varname">PKGSRC_COMPILER</code>
|
||||
in <code class="filename">/etc/mk.conf</code>:</p>
|
||||
in <a href="#mk.conf"><code class="filename">mk.conf</code></a>:</p>
|
||||
<pre class="programlisting">
|
||||
PKGSRC_COMPILER= icc
|
||||
</pre>
|
||||
|
@ -1683,7 +1683,7 @@ PKGSRC_COMPILER= icc
|
|||
<code class="filename">/opt/intel_cc_80</code>, which
|
||||
is also the pkgsrc default. If you have installed it into a different
|
||||
directory, set <code class="varname">ICCBASE</code> in
|
||||
<code class="filename">/etc/mk.conf</code>:</p>
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a>:</p>
|
||||
<pre class="programlisting">
|
||||
ICCBASE= /opt/icc
|
||||
</pre>
|
||||
|
@ -1722,10 +1722,10 @@ ICCBASE= /opt/icc
|
|||
</pre>
|
||||
</li>
|
||||
<li>
|
||||
<p>An example <code class="filename">/etc/mk.conf</code> file will be placed in
|
||||
<p>An example <a href="#mk.conf"><code class="filename">mk.conf</code></a> file will be placed in
|
||||
<code class="filename">/etc/mk.conf.example</code> file
|
||||
when you use the bootstrap script. OpenBSD's make program uses
|
||||
<code class="filename">/etc/mk.conf</code>
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a>
|
||||
as well. You can work around this by enclosing all the pkgsrc-specific parts
|
||||
of the file with:</p>
|
||||
<pre class="programlisting">
|
||||
|
@ -1786,7 +1786,7 @@ ICCBASE= /opt/icc
|
|||
- Sun WorkShop Compilers common components</p></li>
|
||||
</ul></div>
|
||||
<p>You should set the following variables in your
|
||||
<code class="filename">mk.conf</code> file:</p>
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a> file:</p>
|
||||
<pre class="programlisting">
|
||||
CC= cc
|
||||
CXX= CC
|
||||
|
@ -1804,8 +1804,7 @@ CXXCPP= CC -E
|
|||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="solaris-sunpro-64"></a>3.3.7.3. Building 64-bit binaries with SunPro</h4></div></div></div>
|
||||
<p>To build 64-bit packages, you just need to have the
|
||||
following lines in your <code class="filename">mk.conf</code>
|
||||
file:</p>
|
||||
following lines in your <a href="#mk.conf"><code class="filename">mk.conf</code></a> file:</p>
|
||||
<pre class="programlisting">
|
||||
PKGSRC_COMPILER= sunpro
|
||||
ABI= 64
|
||||
|
@ -1824,7 +1823,7 @@ ABI= 64
|
|||
<code class="filename">/bin/ksh</code> crashes with a segmentation fault.
|
||||
The workaround is to use another shell for the configure
|
||||
scripts, for example by installing <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/shells/bash/README.html" target="_top"><code class="filename">shells/bash</code></a> and adding the following lines
|
||||
to your <code class="filename">mk.conf</code>:</p>
|
||||
to your <a href="#mk.conf"><code class="filename">mk.conf</code></a>:</p>
|
||||
<pre class="programlisting">
|
||||
CONFIG_SHELL= ${LOCALBASE}/bin/bash
|
||||
WRAPPER_SHELL= ${LOCALBASE}/bin/bash
|
||||
|
@ -2100,7 +2099,7 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00
|
|||
<p>The default <span class="emphasis"><em>prefix</em></span> for installed packages
|
||||
is <code class="filename">/usr/pkg</code>. If you wish to change this, you
|
||||
should do so by setting <code class="varname">LOCALBASE</code> in
|
||||
<code class="filename">mk.conf</code>. You should not try to use multiple
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a>. You should not try to use multiple
|
||||
different <code class="varname">LOCALBASE</code> definitions on the same
|
||||
system (inside a chroot is an exception). </p>
|
||||
<p>The rest of this chapter assumes that the package is already
|
||||
|
@ -2129,7 +2128,7 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00
|
|||
</p>
|
||||
<pre class="screen">DISTDIR=/cdrom/pkgsrc/distfiles</pre>
|
||||
<p>
|
||||
to your <code class="filename">mk.conf</code>.</p>
|
||||
to your <a href="#mk.conf"><code class="filename">mk.conf</code></a>.</p>
|
||||
<p>By default a list of distribution sites will be randomly
|
||||
intermixed to prevent huge load on servers which holding popular
|
||||
packages (for example, SourceForge.net mirrors). Thus, every
|
||||
|
@ -2150,7 +2149,7 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00
|
|||
time.</p>
|
||||
<p>You can change these settings either in your shell's environment, or,
|
||||
if you want to keep the settings, by editing the
|
||||
<code class="filename">/etc/mk.conf</code> file,
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a> file,
|
||||
and adding the definitions there.</p>
|
||||
<p>
|
||||
If a package depends on many other packages (such as
|
||||
|
@ -2238,12 +2237,12 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00
|
|||
conflicts between programs and other files installed by the
|
||||
package system and whatever else may have been installed
|
||||
there.</p>
|
||||
<p>Some packages look in <code class="filename">/etc/mk.conf</code> to
|
||||
<p>Some packages look in <a href="#mk.conf"><code class="filename">mk.conf</code></a> to
|
||||
alter some configuration options at build time. Have a look at
|
||||
<code class="filename">pkgsrc/mk/defaults/mk.conf</code> to get an overview
|
||||
of what will be set there by default. Environment variables such
|
||||
as <code class="varname">LOCALBASE</code> can be set in
|
||||
<code class="filename">/etc/mk.conf</code> to save having to remember to
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a> to save having to remember to
|
||||
set them each time you want to use pkgsrc.</p>
|
||||
<p>Occasionally, people want to “<span class="quote">look under the
|
||||
covers</span>” to see what is going on when a package is building
|
||||
|
@ -2316,7 +2315,7 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00
|
|||
<dt><span class="sect1"><a href="#selecting-build-options">5.6. Selecting Build Options</a></span></dt>
|
||||
</dl>
|
||||
</div>
|
||||
<p>The whole pkgsrc system is configured in a single file, usually
|
||||
<a name="mk.conf"></a><p>The whole pkgsrc system is configured in a single file, usually
|
||||
called <code class="filename">mk.conf</code>. In which directory pkgsrc looks for
|
||||
that file depends on the installation. On NetBSD, when you use
|
||||
<a href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> from the base system, it is in the directory
|
||||
|
@ -2401,7 +2400,7 @@ works.</p>
|
|||
can be NFS-mounted while <code class="filename">${WRKOBJDIR}</code>
|
||||
is local to every architecture. (It should be noted that
|
||||
<code class="varname">PKGSRCDIR</code> should not be set by the user
|
||||
— it is an internal definition which refers to the
|
||||
— it is an internal definition which refers to the
|
||||
root of the pkgsrc tree. It is possible to have many
|
||||
pkgsrc tree instances.)</p></li>
|
||||
<li><p><code class="varname">LOCALPATCHES</code>:
|
||||
|
@ -2409,7 +2408,7 @@ works.</p>
|
|||
See <a href="#components.patches" title="10.3. patches/*">Section 10.3, “patches/*”</a> for more
|
||||
information.</p></li>
|
||||
<li><p><code class="varname">PKGMAKECONF</code>: Location of
|
||||
the <code class="filename">mk.conf</code> file used by a package's
|
||||
the <a href="#mk.conf"><code class="filename">mk.conf</code></a> file used by a package's
|
||||
BSD-style Makefile. If this is not set,
|
||||
<code class="varname">MAKECONF</code> is set to
|
||||
<code class="filename">/dev/null</code> to avoid picking up
|
||||
|
@ -2587,7 +2586,7 @@ LDFLAGS+= -your -linkerflags
|
|||
These options are currently enabled: mozilla ssl
|
||||
</pre>
|
||||
<p>The following variables can be defined in
|
||||
<code class="filename">/etc/mk.conf</code> to select which options to
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a> to select which options to
|
||||
enable for a package: <code class="varname">PKG_DEFAULT_OPTIONS</code>,
|
||||
which can be used to select or disable options for all packages
|
||||
that support them, and
|
||||
|
@ -2597,7 +2596,7 @@ LDFLAGS+= -your -linkerflags
|
|||
these variables are selected, options preceded by “<span class="quote">-</span>”
|
||||
are disabled. A few examples:</p>
|
||||
<pre class="screen">
|
||||
<code class="prompt">$</code> <span><strong class="command">grep "PKG.*OPTION" /etc/mk.conf</strong></span>
|
||||
<code class="prompt">$</code> <span><strong class="command">grep "PKG.*OPTION" <a href="#mk.conf"><code class="filename">mk.conf</code></a></strong></span>
|
||||
PKG_DEFAULT_OPTIONS= -arts -dvdread -esound
|
||||
PKG_OPTIONS.kdebase= debug -sasl
|
||||
PKG_OPTIONS.apache= suexec </pre>
|
||||
|
@ -2621,12 +2620,12 @@ PKG_OPTIONS.apache= suexec </pre>
|
|||
<p>Before the options framework was introduced, build options
|
||||
were selected by setting a variable (often named
|
||||
<code class="varname">USE_<em class="replaceable"><code>FOO</code></em></code>) in
|
||||
<code class="filename">/etc/mk.conf</code> for each option. To ease
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a> for each option. To ease
|
||||
transition to the options framework for the user, these legacy
|
||||
variables are converted to the appropriate options setting
|
||||
(<code class="varname">PKG_OPTIONS.<em class="replaceable"><code>pkgbase</code></em></code>)
|
||||
automatically. A warning is issued to prompt the user to update
|
||||
<code class="filename">/etc/mk.conf</code> to use the options framework
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a> to use the options framework
|
||||
directly. Support for the legacy variables will be removed
|
||||
eventually.</p>
|
||||
</div>
|
||||
|
@ -2718,14 +2717,14 @@ PKG_OPTIONS.apache= suexec </pre>
|
|||
</div>
|
||||
<div class="sect3" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="binary.mk.conf"></a>6.3.1.2. /etc/mk.conf</h4></div></div></div>
|
||||
<p>You may want to set variables in
|
||||
<code class="filename">/etc/mk.conf</code>.
|
||||
<a name="binary.mk.conf"></a>6.3.1.2. <a href="#mk.conf"><code class="filename">mk.conf</code></a>
|
||||
</h4></div></div></div>
|
||||
<p>You may want to set variables in <a href="#mk.conf"><code class="filename">mk.conf</code></a>.
|
||||
Look at <code class="filename">pkgsrc/mk/defaults/mk.conf</code> for
|
||||
details of the default settings. You will want to ensure that
|
||||
<code class="varname">ACCEPTABLE_LICENSES</code> meet your local policy.
|
||||
As used in this example, <code class="varname">_ACCEPTABLE=yes</code>
|
||||
accepts <span class="emphasis"><em>all</em></span> licenses.</p>
|
||||
completely bypasses the license check.</p>
|
||||
<pre class="programlisting">
|
||||
PACKAGES?= ${_PKGSRCDIR}/packages/${MACHINE_ARCH}
|
||||
WRKOBJDIR?= /usr/tmp/pkgsrc # build here instead of in pkgsrc
|
||||
|
@ -2952,7 +2951,7 @@ fi
|
|||
</li>
|
||||
<li>
|
||||
<p><code class="filename">/usr/src</code> (system sources,
|
||||
e. g. for <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/sysutils/aperture/README.html" target="_top"><code class="filename">sysutils/aperture</code></a>):</p>
|
||||
e. g. for <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/sysutils/aperture/README.html" target="_top"><code class="filename">sysutils/aperture</code></a>):</p>
|
||||
<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>ln -s ../disk1/cvs .</code></strong>
|
||||
<code class="prompt">#</code> <strong class="userinput"><code>ln -s cvs/src-2.0 src</code></strong></pre>
|
||||
</li>
|
||||
|
@ -2978,7 +2977,7 @@ fi
|
|||
<code class="filename">/usr/sandbox/usr/pkgsrc/packages</code> and
|
||||
<code class="filename">.../distfiles</code> point somewhere
|
||||
appropriate. NFS- and/or nullfs-mounts may come in handy!</p></li>
|
||||
<li><p>Edit <code class="filename">/etc/mk.conf</code>, see <a href="#binary.mk.conf" title="6.3.1.2. /etc/mk.conf">Section 6.3.1.2, “/etc/mk.conf”</a>.</p></li>
|
||||
<li><p>Edit <a href="#mk.conf"><code class="filename">mk.conf</code></a>, see <a href="#binary.mk.conf" title="6.3.1.2. mk.conf">Section 6.3.1.2, “<code class="filename">mk.conf</code>”</a>.</p></li>
|
||||
<li><p>Adjust <code class="filename">mk/bulk/build.conf</code> to suit your needs.</p></li>
|
||||
</ol></div>
|
||||
<p>When the chroot sandbox is set up, you can start
|
||||
|
@ -3000,7 +2999,7 @@ fi
|
|||
pkgsrc, the <code class="filename">pkgsrc/mk/bulk/build</code> script
|
||||
may be used to build a subset of the packages contained in
|
||||
pkgsrc. By setting <code class="varname">SPECIFIC_PKGS</code>
|
||||
in <code class="filename">/etc/mk.conf</code>, the variables</p>
|
||||
in <a href="#mk.conf"><code class="filename">mk.conf</code></a>, the variables</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>SITE_SPECIFIC_PKGS</p></li>
|
||||
<li><p>HOST_SPECIFIC_PKGS</p></li>
|
||||
|
@ -3189,7 +3188,7 @@ games, network daemons) need write access to it during normal
|
|||
operation.</p></li>
|
||||
<li><p><code class="varname">PKG_SYSCONFDIR</code> corresponds to
|
||||
<code class="filename">/etc</code> in the base system. It contains configuration
|
||||
files of the packages, as well as pkgsrc's <code class="filename">mk.conf</code>
|
||||
files of the packages, as well as pkgsrc's <a href="#mk.conf"><code class="filename">mk.conf</code></a>
|
||||
itself.</p></li>
|
||||
</ul></div>
|
||||
<div class="sect1" lang="en">
|
||||
|
@ -3450,7 +3449,7 @@ that allow finer tuning of the tree layout.</p>
|
|||
<p>By default, resuming transfers in pkgsrc is disabled, but you can
|
||||
enable this feature by adding the option
|
||||
<code class="varname">PKG_RESUME_TRANSFERS=YES</code> into
|
||||
<code class="filename">/etc/mk.conf</code>. If, during a fetch step, an incomplete
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a>. If, during a fetch step, an incomplete
|
||||
distfile is found, pkgsrc will try to resume it.</p>
|
||||
<p>You can also
|
||||
use a different program than the default <a href="http://netbsd.gw.com/cgi-bin/man-cgi?ftp+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">ftp</span>(1)</span></a> by changing the
|
||||
|
@ -3474,7 +3473,7 @@ FETCH_OUTPUT_ARGS= -O
|
|||
<p>If you want to use modular X.org from pkgsrc instead of your system's own X11
|
||||
(<code class="filename">/usr/X11R6</code>, <code class="filename">/usr/openwin</code>, ...)
|
||||
you will have to add the following line into
|
||||
<code class="filename">/etc/mk.conf</code>:</p>
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a>:</p>
|
||||
<pre class="programlisting">
|
||||
X11_TYPE=modular
|
||||
</pre>
|
||||
|
@ -3513,7 +3512,7 @@ the first available command from the following list:</p>
|
|||
<code class="filename">/usr/bin/ftp</code>, which automatically tries passive
|
||||
connections first, and falls back to active connections if the server
|
||||
refuses to do passive. For the other tools, add the following to your
|
||||
<code class="filename">/etc/mk.conf</code> file:
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a> file:
|
||||
<code class="varname">PASSIVE_FETCH=1</code>.</p>
|
||||
<p>Having that option present will prevent
|
||||
<code class="filename">/usr/bin/ftp</code> from falling back to active
|
||||
|
@ -3563,7 +3562,7 @@ the NetBSD base distribution on your machine. It is recommended to do
|
|||
that to format man pages.</p>
|
||||
<p>In the case of the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_install/README.html" target="_top"><code class="filename">pkgtools/pkg_install</code></a> package, you
|
||||
can get away with setting <code class="varname">NOMAN=YES</code> either in the
|
||||
environment or in <code class="filename">/etc/mk.conf</code>.</p>
|
||||
environment or in <a href="#mk.conf"><code class="filename">mk.conf</code></a>.</p>
|
||||
</div>
|
||||
<div class="sect1" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
|
@ -3586,7 +3585,7 @@ password for each required package installed. To avoid this, the sudo
|
|||
package can be used, which does password caching over a limited time. To
|
||||
use it, install sudo (either as binary package or from
|
||||
<a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/security/sudo/README.html" target="_top"><code class="filename">security/sudo</code></a>) and then put the
|
||||
following into your <code class="filename">/etc/mk.conf</code>, somewhere
|
||||
following into your <a href="#mk.conf"><code class="filename">mk.conf</code></a>, somewhere
|
||||
<span class="emphasis"><em>after</em></span> the definition of the
|
||||
<code class="varname">LOCALBASE</code> variable:</p>
|
||||
<pre class="programlisting">
|
||||
|
@ -3606,7 +3605,7 @@ NFS-exported <code class="varname">PREFIX</code> with a need of per-machine
|
|||
configuration of the provided packages).</p>
|
||||
<p>In order to change the defaults, you can modify the
|
||||
<code class="varname">PKG_SYSCONFBASE</code> variable (in
|
||||
<code class="filename">/etc/mk.conf</code>) to point to your preferred configuration
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a>) to point to your preferred configuration
|
||||
directory; some common examples include <code class="filename">/etc</code> or
|
||||
<code class="filename">/etc/pkg</code>.</p>
|
||||
<p>Furthermore, you can change this value on a per-package basis by
|
||||
|
@ -3656,7 +3655,7 @@ check.</p>
|
|||
<a name="ufaq-cflags"></a>8.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</h2></div></div></div>
|
||||
<p>When you add your own preferences to the
|
||||
<code class="varname">CFLAGS</code> variable in your
|
||||
<code class="filename">mk.conf</code>, these flags are passed in
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a>, these flags are passed in
|
||||
environment variables to the <code class="filename">./configure</code>
|
||||
scripts and to <a href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a>. Some package authors ignore the
|
||||
<code class="varname">CFLAGS</code> from the environment variable by
|
||||
|
@ -4424,7 +4423,7 @@ converters games mbone print x11
|
|||
other variables handle common cases of setting
|
||||
<code class="varname">WRKDIR_BASENAME</code> individually. If
|
||||
<code class="varname">OBJHOSTNAME</code> is defined in
|
||||
<code class="filename">/etc/mk.conf</code>, the first component of
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a>, the first component of
|
||||
the host's name is attached to the directory name. If
|
||||
<code class="varname">OBJMACHINE</code> is defined, the platform name
|
||||
is attached, which might look like
|
||||
|
@ -4580,7 +4579,7 @@ PATCHDIR= ${.CURDIR}/../xemacs/patches
|
|||
specific <span class="emphasis"><em>features</em></span> you need. For example,
|
||||
instead of assuming that kqueue is available under NetBSD and
|
||||
using the <code class="varname">__NetBSD__</code> macro to conditionalize
|
||||
kqueue support, add a check that detects kqueue itself —
|
||||
kqueue support, add a check that detects kqueue itself —
|
||||
yes, this generally involves patching the
|
||||
<span><strong class="command">configure</strong></span> script. There is absolutely nothing
|
||||
that prevents some OSes from adopting interfaces from other OSes
|
||||
|
@ -4951,7 +4950,7 @@ correct:
|
|||
operate on the words, others operate on the string as a whole. When
|
||||
a string is split into words, it is split as you would expect
|
||||
it from <a href="http://netbsd.gw.com/cgi-bin/man-cgi?sh+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">sh</span>(1)</span></a>.</p>
|
||||
<p>No rule without exception—the <span><strong class="command">.for</strong></span>
|
||||
<p>No rule without exception—the <span><strong class="command">.for</strong></span>
|
||||
loop does not follow the shell quoting rules but splits at sequences
|
||||
of whitespace.</p>
|
||||
<p>There are several types of variables that should be handled
|
||||
|
@ -6283,7 +6282,7 @@ apply.</p>
|
|||
<p>Global default options are listed in
|
||||
<code class="varname">PKG_DEFAULT_OPTIONS</code>, which is a list of the options
|
||||
that should be built into every package if that option is supported.
|
||||
This variable should be set in <code class="filename">/etc/mk.conf</code>.</p>
|
||||
This variable should be set in <a href="#mk.conf"><code class="filename">mk.conf</code></a>.</p>
|
||||
</div>
|
||||
<div class="sect1" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
|
@ -6378,7 +6377,7 @@ build options which are enabled by default.</p></li>
|
|||
<li><p><code class="varname">PKG_OPTIONS_LEGACY_VARS</code> is a list
|
||||
of
|
||||
“<span class="quote"><em class="replaceable"><code>USE_VARIABLE</code></em>:<em class="replaceable"><code>option</code></em></span>”
|
||||
pairs that map legacy <code class="filename">/etc/mk.conf</code> variables to
|
||||
pairs that map legacy <a href="#mk.conf"><code class="filename">mk.conf</code></a> variables to
|
||||
their option counterparts. Pairs should be added with
|
||||
“<span class="quote">+=</span>” to keep the listing of global legacy variables. A
|
||||
warning will be issued if the user uses a legacy
|
||||
|
@ -7194,7 +7193,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
|
|||
<span><strong class="command">make update</strong></span> will most certainly
|
||||
fail!</p>
|
||||
<p>The following variables can be used either on the
|
||||
command line or in <code class="filename">/etc/mk.conf</code> to
|
||||
command line or in <a href="#mk.conf"><code class="filename">mk.conf</code></a> to
|
||||
alter the behaviour of <span><strong class="command">make
|
||||
update</strong></span>:</p>
|
||||
<div class="variablelist"><dl>
|
||||
|
@ -7266,9 +7265,8 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
|
|||
<code class="prompt">#</code> <strong class="userinput"><code>make update</code></strong>
|
||||
</pre>
|
||||
<p>The following variables can be used either on the
|
||||
command line or in <code class="filename">/etc/mk.conf</code> to
|
||||
alter the behaviour of <span><strong class="command">make
|
||||
clean-update</strong></span>:</p>
|
||||
command line or in <a href="#mk.conf"><code class="filename">mk.conf</code></a> to alter the behaviour of
|
||||
<span><strong class="command">make clean-update</strong></span>:</p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><code class="varname">CLEAR_DIRLIST</code></span></dt>
|
||||
<dd><p>After <span><strong class="command">make clean</strong></span>, do not
|
||||
|
@ -7395,8 +7393,7 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
|
|||
<dd><p>After a package is installed, check all its
|
||||
binaries and (on ELF platforms) shared libraries to see
|
||||
if they find the shared libs they need. Run by default
|
||||
if <code class="varname">PKG_DEVELOPER</code> is set in
|
||||
<code class="filename">/etc/mk.conf</code>.</p></dd>
|
||||
if <code class="varname">PKG_DEVELOPER</code> is set in <a href="#mk.conf"><code class="filename">mk.conf</code></a>.</p></dd>
|
||||
<dt><span class="term">print-PLIST</span></dt>
|
||||
<dd>
|
||||
<p>After a “<span class="quote">make install</span>” from a new or
|
||||
|
@ -7558,7 +7555,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
|
|||
<tbody>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="tools.new"></a><a name="id455178"></a><b>17.4.1.</b>
|
||||
<a name="tools.new"></a><a name="id2708318"></a><b>17.4.1.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>How do I add a new tool?</p></td>
|
||||
</tr>
|
||||
|
@ -7568,7 +7565,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
|
|||
</tr>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="tools.listall"></a><a name="id455188"></a><b>17.4.2.</b>
|
||||
<a name="tools.listall"></a><a name="id2708328"></a><b>17.4.2.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>How do I get a list of all available
|
||||
tools?</p></td>
|
||||
|
@ -7579,7 +7576,7 @@ TOOLS_PLATFORM.true?= true # shell builtin
|
|||
</tr>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="tools.used"></a><a name="id455197"></a><b>17.4.3.</b>
|
||||
<a name="tools.used"></a><a name="id2708339"></a><b>17.4.3.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>How can I get a list of all the tools that a
|
||||
package is using while being built? I want to know whether it
|
||||
|
@ -7682,11 +7679,11 @@ TOOLS_PLATFORM.true?= true # shell builtin
|
|||
</div>
|
||||
<div class="sect2" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="pulling-vars-from-etc-mk.conf"></a>18.1.2. How to pull in user-settable variables from <code class="filename">mk.conf</code>
|
||||
<a name="pulling-vars-from-etc-mk.conf"></a>18.1.2. How to pull in user-settable variables from <a href="#mk.conf"><code class="filename">mk.conf</code></a>
|
||||
</h3></div></div></div>
|
||||
<p>The pkgsrc user can configure pkgsrc by overriding several
|
||||
variables in the file pointed to by <code class="varname">MAKECONF</code>,
|
||||
which is <code class="filename">/etc/mk.conf</code> by default. When you
|
||||
which is <a href="#mk.conf"><code class="filename">mk.conf</code></a> by default. When you
|
||||
want to use those variables in the preprocessor directives of
|
||||
<a href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> (for example <code class="literal">.if</code> or
|
||||
<code class="literal">.for</code>), you need to include the file
|
||||
|
@ -7799,7 +7796,7 @@ LICENSE= xv-license
|
|||
</pre>
|
||||
<p>The license can be viewed with <span><strong class="command">make
|
||||
show-license</strong></span>, and if the user so chooses, the line
|
||||
printed above can be added to <code class="filename">/etc/mk.conf</code> to
|
||||
printed above can be added to <a href="#mk.conf"><code class="filename">mk.conf</code></a> to
|
||||
convey to pkgsrc that it should not in the future fail because of
|
||||
that license:</p>
|
||||
<pre class="programlisting">
|
||||
|
@ -9150,7 +9147,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
|
|||
<p>If a package contains a rc.d script, it won't be copied into
|
||||
the startup directory by default, but you can enable it, by adding
|
||||
the option <code class="varname">PKG_RCD_SCRIPTS=YES</code> in
|
||||
<code class="filename">/etc/mk.conf</code>. This option will copy the scripts
|
||||
<a href="#mk.conf"><code class="filename">mk.conf</code></a>. This option will copy the scripts
|
||||
into <code class="filename">/etc/rc.d</code> when a package is installed, and
|
||||
it will automatically remove the scripts when the package is
|
||||
deinstalled.</p>
|
||||
|
@ -9286,8 +9283,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
|
|||
this is basically the same as what was explained in the previous
|
||||
sections, only with some debugging aids.</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>Be sure to set <code class="varname">PKG_DEVELOPER=1</code> in
|
||||
<code class="filename">/etc/mk.conf</code></p></li>
|
||||
<li><p>Be sure to set <code class="varname">PKG_DEVELOPER=yes</code> in <a href="#mk.conf"><code class="filename">mk.conf</code></a>.</p></li>
|
||||
<li>
|
||||
<p>Install <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/url2pkg/README.html" target="_top"><code class="filename">pkgtools/url2pkg</code></a>,
|
||||
create a directory for a new package, change into it, then run
|
||||
|
@ -9442,7 +9438,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
|
|||
For new packages, or package moves or removals, set the
|
||||
<code class="varname">CTYPE</code> variable on the command line to "Added",
|
||||
"Moved", or "Removed". You can set <code class="varname">NETBSD_LOGIN_NAME</code>
|
||||
in <code class="filename">/etc/mk.conf</code> if your local login name is
|
||||
in <a href="#mk.conf"><code class="filename">mk.conf</code></a> if your local login name is
|
||||
not the same as your NetBSD login name. Don't forget to commit
|
||||
the changes to <code class="filename">pkgsrc/doc/CHANGES-<em class="replaceable"><code>YYYY</code></em></code>!</p>
|
||||
</div>
|
||||
|
@ -9581,7 +9577,7 @@ do?</a>
|
|||
<tbody>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="devfaq.makeflags"></a><a name="id460078"></a><b>21.1.</b>
|
||||
<a name="devfaq.makeflags"></a><a name="id2714146"></a><b>21.1.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>What is the difference between
|
||||
<code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and
|
||||
|
@ -9597,7 +9593,7 @@ do?</a>
|
|||
</tr>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="devfaq.make"></a><a name="id460113"></a><b>21.2.</b>
|
||||
<a name="devfaq.make"></a><a name="id2714184"></a><b>21.2.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>What is the difference between
|
||||
<code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and
|
||||
|
@ -9615,7 +9611,7 @@ do?</a>
|
|||
</tr>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="devfaq.cc"></a><a name="id460151"></a><b>21.3.</b>
|
||||
<a name="devfaq.cc"></a><a name="id2714225"></a><b>21.3.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>What is the difference between
|
||||
<code class="varname">CC</code>, <code class="varname">PKG_CC</code> and
|
||||
|
@ -9633,7 +9629,7 @@ do?</a>
|
|||
</tr>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="devfaq.bl3flags"></a><a name="id460224"></a><b>21.4.</b>
|
||||
<a name="devfaq.bl3flags"></a><a name="id2714264"></a><b>21.4.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>What is the difference between
|
||||
<code class="varname">BUILDLINK_LDFLAGS</code>,
|
||||
|
@ -9646,7 +9642,7 @@ do?</a>
|
|||
</tr>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="devfaq.bl3prefix"></a><a name="id460243"></a><b>21.5.</b>
|
||||
<a name="devfaq.bl3prefix"></a><a name="id2714353"></a><b>21.5.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>Why does <span><strong class="command">make show-var
|
||||
VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span>
|
||||
|
@ -9662,7 +9658,7 @@ do?</a>
|
|||
</tr>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="devfaq.master_sites"></a><a name="id460273"></a><b>21.6.</b>
|
||||
<a name="devfaq.master_sites"></a><a name="id2714382"></a><b>21.6.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>What does
|
||||
<code class="literal">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I
|
||||
|
@ -9686,7 +9682,7 @@ do?</a>
|
|||
</tr>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="devfaq.mailinglists"></a><a name="id460348"></a><b>21.7.</b>
|
||||
<a name="devfaq.mailinglists"></a><a name="id2714459"></a><b>21.7.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>Which mailing lists are there for package
|
||||
developers?</p></td>
|
||||
|
@ -9711,7 +9707,7 @@ do?</a>
|
|||
</tr>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="devfaq.documentation"></a><a name="id460384"></a><b>21.8.</b>
|
||||
<a name="devfaq.documentation"></a><a name="id2714498"></a><b>21.8.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>Where is the pkgsrc
|
||||
documentation?</p></td>
|
||||
|
@ -9759,7 +9755,7 @@ do?</a>
|
|||
</tr>
|
||||
<tr class="question">
|
||||
<td align="left" valign="top">
|
||||
<a name="devfaq.too-much-time"></a><a name="id460445"></a><b>21.9.</b>
|
||||
<a name="devfaq.too-much-time"></a><a name="id2714628"></a><b>21.9.</b>
|
||||
</td>
|
||||
<td align="left" valign="top"><p>I have a little time to kill. What shall I
|
||||
do?</p></td>
|
||||
|
@ -9775,7 +9771,7 @@ anyway.</p>
|
|||
will tell you about newer versions of installed packages that are
|
||||
available, but not yet updated in pkgsrc.</p></li>
|
||||
<li><p>Browse <code class="filename">pkgsrc/doc/TODO</code>
|
||||
— it contains a list of suggested new packages and a list of
|
||||
— it contains a list of suggested new packages and a list of
|
||||
cleanups and enhancements for pkgsrc that would be nice to
|
||||
have.</p></li>
|
||||
<li><p>Review packages for which review was requested on
|
||||
|
@ -10293,8 +10289,8 @@ CFLAGS+= -Wall
|
|||
<a name="infr.design.intf.proc"></a>23.5.1. Procedures with parameters</h3></div></div></div>
|
||||
<p>In a traditional imperative programming language some of
|
||||
the <code class="filename">.mk</code> files could be described as
|
||||
procedures. They take some input parameters and—after
|
||||
inclusion—provide a result in output parameters. Since all
|
||||
procedures. They take some input parameters and—after
|
||||
inclusion—provide a result in output parameters. Since all
|
||||
variables in <code class="filename">Makefile</code>s have global scope
|
||||
care must be taken not to use parameter names that have already
|
||||
another meaning. For example, <code class="varname">PKGNAME</code> is a
|
||||
|
@ -10358,11 +10354,8 @@ CFLAGS+= -Wall
|
|||
<code class="varname">OPSYS</code>, <code class="varname">OS_VERSION</code> and
|
||||
<code class="varname">MACHINE_ARCH</code>.</p>
|
||||
<p>Then, the user settings are loaded from the file specified
|
||||
in <code class="varname">MAKECONF</code>. If the bmake command from pkgsrc
|
||||
is used, <code class="varname">MAKECONF</code> defaults to
|
||||
<code class="filename"><em class="replaceable"><code>${prefix}</code></em>/etc/mk.conf</code>.
|
||||
With the native <a href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> command on NetBSD, it defaults to
|
||||
<code class="filename">/etc/mk.conf</code>. After that, those variables
|
||||
in <code class="varname">MAKECONF</code>, which is usually <a href="#mk.conf"><code class="filename">mk.conf</code></a>.
|
||||
After that, those variables
|
||||
that have not been overridden by the user are loaded from
|
||||
<code class="filename">mk/defaults/mk.conf</code>.</p>
|
||||
<p>After the user settings, the system settings and platform
|
||||
|
|
128
doc/pkgsrc.txt
128
doc/pkgsrc.txt
|
@ -12,9 +12,9 @@ Hubert Feyrer
|
|||
|
||||
The pkgsrc Developers
|
||||
|
||||
Copyright 1994-2006 The NetBSD Foundation, Inc
|
||||
Copyright 1994-2007 The NetBSD Foundation, Inc
|
||||
|
||||
$NetBSD: pkgsrc.xml,v 1.24 2006/11/11 05:39:09 rillig Exp $
|
||||
$NetBSD: pkgsrc.xml,v 1.25 2007/08/15 06:32:38 rillig Exp $
|
||||
|
||||
Abstract
|
||||
|
||||
|
@ -1153,8 +1153,8 @@ with the FreeBSD userland tools. There are several steps:
|
|||
# mv pkg_info pkg_info.orig
|
||||
|
||||
|
||||
3. An example /etc/mk.conf file will be placed in /etc/mk.conf.example file
|
||||
when you use the bootstrap script.
|
||||
3. An example mk.conf file will be placed in /etc/mk.conf.example file when
|
||||
you use the bootstrap script.
|
||||
|
||||
3.3.3. Interix
|
||||
|
||||
|
@ -1341,9 +1341,8 @@ ABI. If you start out using "abi=n32", that's what all your packages will be
|
|||
built with.
|
||||
|
||||
Therefore, please make sure that you have no conflicting CFLAGS in your
|
||||
environment or the /etc/mk.conf. Particularly, make sure that you do not try to
|
||||
link n32 object files with lib64 or vice versa. Check your /etc/
|
||||
compiler.defaults!
|
||||
environment or the mk.conf. Particularly, make sure that you do not try to link
|
||||
n32 object files with lib64 or vice versa. Check your /etc/compiler.defaults!
|
||||
|
||||
If you have the actual pkgsrc tree mounted via NFS from a different host,
|
||||
please make sure to set WRKOBJDIR to a local directory, as it appears that IRIX
|
||||
|
@ -1360,7 +1359,7 @@ If you are using SGI's MIPSPro compiler, please set
|
|||
PKGSRC_COMPILER= mipspro
|
||||
|
||||
|
||||
in /etc/mk.conf. Otherwise, pkgsrc will assume you are using gcc and may end up
|
||||
in mk.conf. Otherwise, pkgsrc will assume you are using gcc and may end up
|
||||
passing invalid flags to the compiler. Note that bootstrap should create an
|
||||
appropriate mk.conf.example by default.
|
||||
|
||||
|
@ -1394,14 +1393,14 @@ side-effect of breaking many of the Linux header files, which cannot be
|
|||
compiled properly without __attribute__. The test must be overridden so that
|
||||
__attribute__ is assumed supported by the compiler.
|
||||
|
||||
After bootstrapping, you should set PKGSRC_COMPILER in /etc/mk.conf:
|
||||
After bootstrapping, you should set PKGSRC_COMPILER in mk.conf:
|
||||
|
||||
PKGSRC_COMPILER= icc
|
||||
|
||||
|
||||
The default installation directory for icc is /opt/intel_cc_80, which is also
|
||||
the pkgsrc default. If you have installed it into a different directory, set
|
||||
ICCBASE in /etc/mk.conf:
|
||||
ICCBASE in mk.conf:
|
||||
|
||||
ICCBASE= /opt/icc
|
||||
|
||||
|
@ -1437,10 +1436,10 @@ with the OpenBSD userland tools. There are several steps:
|
|||
# mv pkg_info pkg_info.orig
|
||||
|
||||
|
||||
3. An example /etc/mk.conf file will be placed in /etc/mk.conf.example file
|
||||
when you use the bootstrap script. OpenBSD's make program uses /etc/mk.conf
|
||||
as well. You can work around this by enclosing all the pkgsrc-specific
|
||||
parts of the file with:
|
||||
3. An example mk.conf file will be placed in /etc/mk.conf.example file when
|
||||
you use the bootstrap script. OpenBSD's make program uses mk.conf as well.
|
||||
You can work around this by enclosing all the pkgsrc-specific parts of the
|
||||
file with:
|
||||
|
||||
.ifdef BSD_PKG_MK
|
||||
# pkgsrc stuff, e.g. insert defaults/mk.conf or similar here
|
||||
|
@ -1770,7 +1769,7 @@ priority than MASTER_SORT. Have a look at pkgsrc/mk/defaults/mk.conf to find
|
|||
some examples. This may save some of your bandwidth and time.
|
||||
|
||||
You can change these settings either in your shell's environment, or, if you
|
||||
want to keep the settings, by editing the /etc/mk.conf file, and adding the
|
||||
want to keep the settings, by editing the mk.conf file, and adding the
|
||||
definitions there.
|
||||
|
||||
If a package depends on many other packages (such as meta-pkgs/kde3), the build
|
||||
|
@ -1841,10 +1840,10 @@ pkgsrc/) below the LOCALBASE tree. This is to prevent possible conflicts
|
|||
between programs and other files installed by the package system and whatever
|
||||
else may have been installed there.
|
||||
|
||||
Some packages look in /etc/mk.conf to alter some configuration options at build
|
||||
Some packages look in mk.conf to alter some configuration options at build
|
||||
time. Have a look at pkgsrc/mk/defaults/mk.conf to get an overview of what will
|
||||
be set there by default. Environment variables such as LOCALBASE can be set in
|
||||
/etc/mk.conf to save having to remember to set them each time you want to use
|
||||
mk.conf to save having to remember to set them each time you want to use
|
||||
pkgsrc.
|
||||
|
||||
Occasionally, people want to "look under the covers" to see what is going on
|
||||
|
@ -2103,14 +2102,14 @@ mutually exclusive, run make show-options, for example:
|
|||
These options are enabled by default: firefox
|
||||
These options are currently enabled: mozilla ssl
|
||||
|
||||
The following variables can be defined in /etc/mk.conf to select which options
|
||||
to enable for a package: PKG_DEFAULT_OPTIONS, which can be used to select or
|
||||
The following variables can be defined in mk.conf to select which options to
|
||||
enable for a package: PKG_DEFAULT_OPTIONS, which can be used to select or
|
||||
disable options for all packages that support them, and PKG_OPTIONS.pkgbase,
|
||||
which can be used to select or disable options specifically for package pkgbase
|
||||
. Options listed in these variables are selected, options preceded by "-" are
|
||||
disabled. A few examples:
|
||||
|
||||
$ grep "PKG.*OPTION" /etc/mk.conf
|
||||
$ grep "PKG.*OPTION" mk.conf
|
||||
PKG_DEFAULT_OPTIONS= -arts -dvdread -esound
|
||||
PKG_OPTIONS.kdebase= debug -sasl
|
||||
PKG_OPTIONS.apache= suexec
|
||||
|
@ -2133,11 +2132,11 @@ option from a required group of options is selected, and building the package
|
|||
will fail.
|
||||
|
||||
Before the options framework was introduced, build options were selected by
|
||||
setting a variable (often named USE_FOO) in /etc/mk.conf for each option. To
|
||||
ease transition to the options framework for the user, these legacy variables
|
||||
are converted to the appropriate options setting (PKG_OPTIONS.pkgbase)
|
||||
automatically. A warning is issued to prompt the user to update /etc/mk.conf to
|
||||
use the options framework directly. Support for the legacy variables will be
|
||||
setting a variable (often named USE_FOO) in mk.conf for each option. To ease
|
||||
transition to the options framework for the user, these legacy variables are
|
||||
converted to the appropriate options setting (PKG_OPTIONS.pkgbase)
|
||||
automatically. A warning is issued to prompt the user to update mk.conf to use
|
||||
the options framework directly. Support for the legacy variables will be
|
||||
removed eventually.
|
||||
|
||||
Chapter 6. Creating binary packages
|
||||
|
@ -2212,12 +2211,12 @@ find an annotated example file in pkgsrc/mk/bulk/build.conf-example. To use it,
|
|||
copy build.conf-example to build.conf and edit it, following the comments in
|
||||
that file.
|
||||
|
||||
6.3.1.2. /etc/mk.conf
|
||||
6.3.1.2. mk.conf
|
||||
|
||||
You may want to set variables in /etc/mk.conf. Look at pkgsrc/mk/defaults/
|
||||
mk.conf for details of the default settings. You will want to ensure that
|
||||
You may want to set variables in mk.conf. Look at pkgsrc/mk/defaults/mk.conf
|
||||
for details of the default settings. You will want to ensure that
|
||||
ACCEPTABLE_LICENSES meet your local policy. As used in this example,
|
||||
_ACCEPTABLE=yes accepts all licenses.
|
||||
_ACCEPTABLE=yes completely bypasses the license check.
|
||||
|
||||
PACKAGES?= ${_PKGSRCDIR}/packages/${MACHINE_ARCH}
|
||||
WRKOBJDIR?= /usr/tmp/pkgsrc # build here instead of in pkgsrc
|
||||
|
@ -2428,7 +2427,7 @@ src/etc, be sure the following items are present and properly configured:
|
|||
10. Make /usr/sandbox/usr/pkgsrc/packages and .../distfiles point somewhere
|
||||
appropriate. NFS- and/or nullfs-mounts may come in handy!
|
||||
|
||||
11. Edit /etc/mk.conf, see Section 6.3.1.2, "/etc/mk.conf".
|
||||
11. Edit mk.conf, see Section 6.3.1.2, "mk.conf".
|
||||
|
||||
12. Adjust mk/bulk/build.conf to suit your needs.
|
||||
|
||||
|
@ -2448,7 +2447,7 @@ from).
|
|||
|
||||
In addition to building a complete set of all packages in pkgsrc, the pkgsrc/mk
|
||||
/bulk/build script may be used to build a subset of the packages contained in
|
||||
pkgsrc. By setting SPECIFIC_PKGS in /etc/mk.conf, the variables
|
||||
pkgsrc. By setting SPECIFIC_PKGS in mk.conf, the variables
|
||||
|
||||
* SITE_SPECIFIC_PKGS
|
||||
|
||||
|
@ -2873,9 +2872,8 @@ the script, as well as some others that allow finer tuning of the tree layout.
|
|||
8.5. How to resume transfers when fetching distfiles?
|
||||
|
||||
By default, resuming transfers in pkgsrc is disabled, but you can enable this
|
||||
feature by adding the option PKG_RESUME_TRANSFERS=YES into /etc/mk.conf. If,
|
||||
during a fetch step, an incomplete distfile is found, pkgsrc will try to resume
|
||||
it.
|
||||
feature by adding the option PKG_RESUME_TRANSFERS=YES into mk.conf. If, during
|
||||
a fetch step, an incomplete distfile is found, pkgsrc will try to resume it.
|
||||
|
||||
You can also use a different program than the default ftp(1) by changing the
|
||||
FETCH_CMD variable. Don't forget to set FETCH_RESUME_ARGS and FETCH_OUTPUT_ARGS
|
||||
|
@ -2892,8 +2890,8 @@ FETCH_OUTPUT_ARGS= -O
|
|||
8.6. How can I install/use modular X.org from pkgsrc?
|
||||
|
||||
If you want to use modular X.org from pkgsrc instead of your system's own X11
|
||||
(/usr/X11R6, /usr/openwin, ...) you will have to add the following line into /
|
||||
etc/mk.conf:
|
||||
(/usr/X11R6, /usr/openwin, ...) you will have to add the following line into
|
||||
mk.conf:
|
||||
|
||||
X11_TYPE=modular
|
||||
|
||||
|
@ -2924,7 +2922,7 @@ FETCH_CMD is assigned the first available command from the following list:
|
|||
On a default NetBSD installation, this will be /usr/bin/ftp, which
|
||||
automatically tries passive connections first, and falls back to active
|
||||
connections if the server refuses to do passive. For the other tools, add the
|
||||
following to your /etc/mk.conf file: PASSIVE_FETCH=1.
|
||||
following to your mk.conf file: PASSIVE_FETCH=1.
|
||||
|
||||
Having that option present will prevent /usr/bin/ftp from falling back to
|
||||
active transfers.
|
||||
|
@ -2972,7 +2970,7 @@ that you don't have installed the "text" set (nroff, ...) from the NetBSD base
|
|||
distribution on your machine. It is recommended to do that to format man pages.
|
||||
|
||||
In the case of the pkgtools/pkg_install package, you can get away with setting
|
||||
NOMAN=YES either in the environment or in /etc/mk.conf.
|
||||
NOMAN=YES either in the environment or in mk.conf.
|
||||
|
||||
8.11. What does "Could not find bsd.own.mk" mean?
|
||||
|
||||
|
@ -2991,8 +2989,8 @@ When installing packages as non-root user and using the just-in-time su(1)
|
|||
feature of pkgsrc, it can become annoying to type in the root password for each
|
||||
required package installed. To avoid this, the sudo package can be used, which
|
||||
does password caching over a limited time. To use it, install sudo (either as
|
||||
binary package or from security/sudo) and then put the following into your /etc
|
||||
/mk.conf, somewhere after the definition of the LOCALBASE variable:
|
||||
binary package or from security/sudo) and then put the following into your
|
||||
mk.conf, somewhere after the definition of the LOCALBASE variable:
|
||||
|
||||
.if exists(${LOCALBASE}/bin/sudo)
|
||||
SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c
|
||||
|
@ -3007,8 +3005,8 @@ expectations (e.g., a read-only, NFS-exported PREFIX with a need of per-machine
|
|||
configuration of the provided packages).
|
||||
|
||||
In order to change the defaults, you can modify the PKG_SYSCONFBASE variable
|
||||
(in /etc/mk.conf) to point to your preferred configuration directory; some
|
||||
common examples include /etc or /etc/pkg.
|
||||
(in mk.conf) to point to your preferred configuration directory; some common
|
||||
examples include /etc or /etc/pkg.
|
||||
|
||||
Furthermore, you can change this value on a per-package basis by setting the
|
||||
PKG_SYSCONFDIR.${PKG_SYSCONFVAR} variable. PKG_SYSCONFVAR's value usually
|
||||
|
@ -3733,8 +3731,8 @@ Other variables that affect the build:
|
|||
the same pkgsrc tree for building different kinds of binary packages, you
|
||||
can change the variable according to your needs. Two other variables handle
|
||||
common cases of setting WRKDIR_BASENAME individually. If OBJHOSTNAME is
|
||||
defined in /etc/mk.conf, the first component of the host's name is attached
|
||||
to the directory name. If OBJMACHINE is defined, the platform name is
|
||||
defined in mk.conf, the first component of the host's name is attached to
|
||||
the directory name. If OBJMACHINE is defined, the platform name is
|
||||
attached, which might look like work.i386 or work.sparc.
|
||||
|
||||
Please pay attention to the following gotchas:
|
||||
|
@ -5204,7 +5202,7 @@ options apply.
|
|||
|
||||
Global default options are listed in PKG_DEFAULT_OPTIONS, which is a list of
|
||||
the options that should be built into every package if that option is
|
||||
supported. This variable should be set in /etc/mk.conf.
|
||||
supported. This variable should be set in mk.conf.
|
||||
|
||||
15.2. Converting packages to use bsd.options.mk
|
||||
|
||||
|
@ -5287,7 +5285,7 @@ supported by the package, and any default options settings if needed.
|
|||
default.
|
||||
|
||||
7. PKG_OPTIONS_LEGACY_VARS is a list of "USE_VARIABLE:option" pairs that map
|
||||
legacy /etc/mk.conf variables to their option counterparts. Pairs should be
|
||||
legacy mk.conf variables to their option counterparts. Pairs should be
|
||||
added with "+=" to keep the listing of global legacy variables. A warning
|
||||
will be issued if the user uses a legacy variable.
|
||||
|
||||
|
@ -5955,7 +5953,7 @@ update
|
|||
tree remains unchanged. If the source code for one of the packages to be
|
||||
updated has been changed, resuming make update will most certainly fail!
|
||||
|
||||
The following variables can be used either on the command line or in /etc/
|
||||
The following variables can be used either on the command line or in
|
||||
mk.conf to alter the behaviour of make update:
|
||||
|
||||
UPDATE_TARGET
|
||||
|
@ -6010,7 +6008,7 @@ clean-update
|
|||
# make update
|
||||
|
||||
|
||||
The following variables can be used either on the command line or in /etc/
|
||||
The following variables can be used either on the command line or in
|
||||
mk.conf to alter the behaviour of make clean-update:
|
||||
|
||||
CLEAR_DIRLIST
|
||||
|
@ -6115,7 +6113,7 @@ check-shlibs
|
|||
|
||||
After a package is installed, check all its binaries and (on ELF platforms)
|
||||
shared libraries to see if they find the shared libs they need. Run by
|
||||
default if PKG_DEVELOPER is set in /etc/mk.conf.
|
||||
default if PKG_DEVELOPER is set in mk.conf.
|
||||
|
||||
print-PLIST
|
||||
|
||||
|
@ -6334,10 +6332,10 @@ attention to while working on pkgsrc.
|
|||
18.1.2. How to pull in user-settable variables from mk.conf
|
||||
|
||||
The pkgsrc user can configure pkgsrc by overriding several variables in the
|
||||
file pointed to by MAKECONF, which is /etc/mk.conf by default. When you want to
|
||||
use those variables in the preprocessor directives of make(1) (for example .if
|
||||
or .for), you need to include the file ../../mk/bsd.prefs.mk before, which in
|
||||
turn loads the user preferences.
|
||||
file pointed to by MAKECONF, which is mk.conf by default. When you want to use
|
||||
those variables in the preprocessor directives of make(1) (for example .if or
|
||||
.for), you need to include the file ../../mk/bsd.prefs.mk before, which in turn
|
||||
loads the user preferences.
|
||||
|
||||
But note that some variables may not be completely defined after ../../mk/
|
||||
bsd.prefs.mk has been included, as they may contain references to variables
|
||||
|
@ -6435,7 +6433,7 @@ a license which has not been placed in the ACCEPTABLE_LICENSES variable:
|
|||
|
||||
|
||||
The license can be viewed with make show-license, and if the user so chooses,
|
||||
the line printed above can be added to /etc/mk.conf to convey to pkgsrc that it
|
||||
the line printed above can be added to mk.conf to convey to pkgsrc that it
|
||||
should not in the future fail because of that license:
|
||||
|
||||
ACCEPTABLE_LICENSES+=xv-license
|
||||
|
@ -7504,9 +7502,9 @@ since it was released.
|
|||
|
||||
If a package contains a rc.d script, it won't be copied into the startup
|
||||
directory by default, but you can enable it, by adding the option
|
||||
PKG_RCD_SCRIPTS=YES in /etc/mk.conf. This option will copy the scripts into /
|
||||
etc/rc.d when a package is installed, and it will automatically remove the
|
||||
scripts when the package is deinstalled.
|
||||
PKG_RCD_SCRIPTS=YES in mk.conf. This option will copy the scripts into /etc/
|
||||
rc.d when a package is installed, and it will automatically remove the scripts
|
||||
when the package is deinstalled.
|
||||
|
||||
18.6.17. Packages installing TeX modules
|
||||
|
||||
|
@ -7605,7 +7603,7 @@ To check out all the gotchas when building a package, here are the steps that I
|
|||
do in order to get a package working. Please note this is basically the same as
|
||||
what was explained in the previous sections, only with some debugging aids.
|
||||
|
||||
* Be sure to set PKG_DEVELOPER=1 in /etc/mk.conf
|
||||
* Be sure to set PKG_DEVELOPER=yes in mk.conf.
|
||||
|
||||
* Install pkgtools/url2pkg, create a directory for a new package, change into
|
||||
it, then run url2pkg:
|
||||
|
@ -7744,9 +7742,9 @@ general usage is to first make sure that your CHANGES-YYYY file is up-to-date
|
|||
(to avoid having to resolve conflicts later-on) and then to cd to the package
|
||||
directory. For package updates, make changes-entry is enough. For new packages,
|
||||
or package moves or removals, set the CTYPE variable on the command line to
|
||||
"Added", "Moved", or "Removed". You can set NETBSD_LOGIN_NAME in /etc/mk.conf
|
||||
if your local login name is not the same as your NetBSD login name. Don't
|
||||
forget to commit the changes to pkgsrc/doc/CHANGES-YYYY!
|
||||
"Added", "Moved", or "Removed". You can set NETBSD_LOGIN_NAME in mk.conf if
|
||||
your local login name is not the same as your NetBSD login name. Don't forget
|
||||
to commit the changes to pkgsrc/doc/CHANGES-YYYY!
|
||||
|
||||
20.4. Committing: Importing a package into CVS
|
||||
|
||||
|
@ -8428,11 +8426,9 @@ reasons for that order.
|
|||
The very first action in bsd.prefs.mk is to define some essential variables
|
||||
like OPSYS, OS_VERSION and MACHINE_ARCH.
|
||||
|
||||
Then, the user settings are loaded from the file specified in MAKECONF. If the
|
||||
bmake command from pkgsrc is used, MAKECONF defaults to ${prefix}/etc/mk.conf.
|
||||
With the native make(1) command on NetBSD, it defaults to /etc/mk.conf. After
|
||||
that, those variables that have not been overridden by the user are loaded from
|
||||
mk/defaults/mk.conf.
|
||||
Then, the user settings are loaded from the file specified in MAKECONF, which
|
||||
is usually mk.conf. After that, those variables that have not been overridden
|
||||
by the user are loaded from mk/defaults/mk.conf.
|
||||
|
||||
After the user settings, the system settings and platform settings are loaded,
|
||||
which may override the user settings.
|
||||
|
|
Loading…
Reference in a new issue