From 1b85b377b2d74710ba80ec93600876cd3a85c932 Mon Sep 17 00:00:00 2001
From: rillig Table 3.1. Binary kits and available packages
+
Simply download the binary kit for your platform, and extract it into
Darwin 5.x and up are supported. There are two methods of using
pkgsrc on Mac OS X, by using a disk
- image, or a UFS
+ image, or a UFS or HFSX
partition. Before you start, you will need to download and install the Mac OS X Developer
Tools from Apple's Developer Connection. See http://developer.apple.com/macosx/
for details. Also, make sure you install X11 for Mac OS X and the X11 SDK
from http://www.apple.com/macosx/x11/download/
if you intend to build packages that use the X11 Window System. If you already have a UFS partition, or have a spare partition
- that you can format as UFS, it is recommended to use that instead of
+ If you already have a UFS or HFSX partition, or have a spare partition
+ that you can format as UFS or HFSX, it is recommended to use that instead of
the disk image. It'll be somewhat faster and will mount automatically
at boot time, where you must manually mount a disk image. You cannot use an ordinary HFS+ file system for pkgsrc, because pkgsrc currently
- requires the file system to be case-sensitive. You can, however, use a case-sensitive HFS+ file system as found in Darwin 7.0 and newer. darwindiskimage will mount the filesystem nosuid, which will cause problems for packages that depend on setgid. It will also mount the filesystem asynchronous, which is somewhat dangerous according to the mount(8) man page. darwindiskimage will mount the filesystem nosuid, which will cause problems for packages that depend on setgid. In the case of UFS, it will also mount the filesystem asynchronous, which is somewhat dangerous according to the mount(8) man page. In the case of HFSX, it will disable journalling. Allow suid and synchronous writes: Allow suid: By default, If you created your partitions at the time of installing Mac OS X
- and formatted the target partition as UFS, it should automatically
+ and formatted the target partition as UFS or HFSX, it should automatically
mount on The problem is that none of the disk tools will let you touch a
disk that is booted from. You can unmount the partition, but even if
you newfs it, the partition type will be incorrect and the
@@ -1317,8 +1322,8 @@ file and inspect the contents before extracting it.
You'll need to boot off of the OS X Installation (User) CD. When
the Installation program starts, go up to the menu and select Disk
Utility. Now, you will be able to select the partition you want
- to be UFS, and Format it Apple UFS. Quit the Disk Utility, quit the
- installer which will reboot your machine. The new UFS file system
+ to be UFS or HFSX, and Format it Apple UFS or HFSX. Quit the Disk Utility, quit the
+ installer which will reboot your machine. The new UFS or HFSX file system
will appear in Finder. Be aware that the permissions on the new file system will be writable
by root only.CFLAGS
?CFLAGS
?
+
+
-/
e.g.
Note
@@ -1287,28 +1292,28 @@ file and inspect the contents before extracting it.
#
sudo chown `id -u`:`id -g` /Volumes/NetBSD
Note
-
+#
sudo mount -u -o suid,sync /Volumes/NetBSD
#
sudo mount -u -o suid /Volumes/NetBSD
/usr
will be on your root file
system, normally HFS+. It is possible to use the default
prefix of /usr/pkg
by symlinking /usr/pkg
to a directory on a UFS
- file system. Obviously, another symlink is required if you want to
+ or HFSX file system. Obviously, another symlink is required if you want to
place the package database directory outside the
prefix. e.g.#
./bootstrap --pkgdbdir /usr/pkg/pkgdb
/Volumes/<volume name>
when the
- machine boots. If you are (re)formatting a partition as UFS, you need
+ machine boots. If you are (re)formatting a partition as UFS or HFSX, you need
to ensure that the partition map correctly reflects
- “Apple_UFS” and not “Apple_HFS”.LOCALBASE
.
By default, pkgsrc will use GCC to build packages. This may be - overridden by setting the following variables in /etc/mk.conf:
-PKGSRC_COMPILER
:This is a list of values specifying the chain of - compilers to invoke when building packages. Valid values - are:
-distcc
:
- distributed C/C++ (chainable)
ccache
:
- compiler cache (chainable)
gcc
:
- GNU C/C++ Compiler
mipspro
:
- Silicon Graphics, Inc. MIPSpro (n32/n64)
mipspro
:
- Silicon Graphics, Inc. MIPSpro (o32)
sunpro
:
- Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio
The default is
- “gcc
”. You can use
- ccache
and/or
- distcc
with an appropriate
- PKGSRC_COMPILER
setting,
- e.g. “ccache gcc
”. This
- variable should always be
- terminated with a value for a real compiler.
GCC_REQD
:This specifies the minimum version of GCC to use - when building packages. If the system GCC doesn't - satisfy this requirement, then pkgsrc will build and - install one of the GCC packages to use instead.
The whole pkgsrc system is configured in a single file, usually
+called mk.conf
. In which directory pkgsrc looks for
+that file depends on the installation. On NetBSD, when you use
+make(1) from the base system, it is in the directory
+/etc/
. In all other cases the default location is
+${PREFIX}/etc/
, depending on where you told the
+bootstrap program to install the binary packages.
During the bootstrap, an example configuration file is created. To
+use that, you have to create the directory
+${PREFIX}/etc
and copy the example file
+there.
The format of the configuration file is that of the usual
+BSD-style Makefile
s. The whole pkgsrc configuration
+is done by setting variables in this file. Note that you can define all
+kinds of variables, and no special error checking (for example for
+spelling mistakes) takes place, so you have to try it out to see if it
+works.
In this section, you can find some variables that apply to all
- pkgsrc packages. The preferred method of setting these variables is
- by setting them in /etc/mk.conf
. A complete
- list of the variables that can be configured by the user is
- available in mk/defaults/mk.conf
, together with
- some comments that describe the variable's intent.
mk/defaults/mk.conf
, together with some
+ comments that describe each variable's intent.
LOCALBASE
: Where
packages will be installed. The default is
@@ -2363,7 +2343,7 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00
can be NFS-mounted while ${WRKOBJDIR}
is local to every architecture. (It should be noted that
PKGSRCDIR
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.)
LOCALPATCHES
:
@@ -2391,7 +2371,48 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00
5.3. Selecting and configuring the compiler
By default, pkgsrc will use GCC to build packages. This may be + overridden by setting the following variables in /etc/mk.conf:
+PKGSRC_COMPILER
:This is a list of values specifying the chain of + compilers to invoke when building packages. Valid values + are:
+distcc
:
+ distributed C/C++ (chainable)
ccache
:
+ compiler cache (chainable)
gcc
:
+ GNU C/C++ Compiler
mipspro
:
+ Silicon Graphics, Inc. MIPSpro (n32/n64)
mipspro
:
+ Silicon Graphics, Inc. MIPSpro (o32)
sunpro
:
+ Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio
The default is
+ “gcc
”. You can use
+ ccache
and/or
+ distcc
with an appropriate
+ PKGSRC_COMPILER
setting,
+ e.g. “ccache gcc
”. This
+ variable should always be
+ terminated with a value for a real compiler.
GCC_REQD
:This specifies the minimum version of GCC to use + when building packages. If the system GCC doesn't + satisfy this requirement, then pkgsrc will build and + install one of the GCC packages to use instead.
If you wish to set the CFLAGS
variable,
please make sure to use the +=
operator
instead of the =
operator:
If you want to pass flags to the linker, both in the configure
step and the build step, you can do this in two ways. Either set
LDFLAGS
or LIBS
. The difference
@@ -2420,7 +2441,6 @@ settings, use the +=
operator:
LDFLAGS+= -your -linkerflags-
See also Section 17.5.3, “Undefined reference to “...””.
/usr/src
(system sources,
- e. g. for sysutils/aperture
):
sysutils/aperture
):
#
ln -s ../disk1/cvs .
#
ln -s cvs/src-2.0 src
chmod 755 .
CFLAGS
?This section contains hints, tips & tricks on special things in @@ -3441,7 +3462,20 @@ check.
+You have modified a file from pkgsrc, and someone else has
+modified that same file afterwards in the CVS repository. Both changes
+are in the same region of the file, so when you updated pkgsrc, the
+cvs
command marked the conflicting changes in the
+file. Because of these markers, the file is no longer a valid
+Makefile
.
Have a look at that file, and if you don't need your local changes +anymore, you can remove that file and run cvs -q update +-dP in that directory to download the current version.
+ +This is not really an FAQ yet, but here's the answer anyway.
Browse pkgsrc/doc/TODO
- — 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.
Review packages for which review was requested on @@ -4028,7 +4062,7 @@ sections.
specific features you need. For example, instead of assuming that kqueue is available under NetBSD and using the__NetBSD__
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
configure script. There is absolutely nothing
that prevents some OSes from adopting interfaces from other OSes
@@ -4043,7 +4077,7 @@ sections.
Some typical examples:
Table 9.1. Patching examples
-For more information, please read the Making
+ For more information, please read the Making
packager-friendly software article (part
1, part
2). It summarizes multiple details on how to make
@@ -4351,7 +4385,7 @@ sections.
No rule without exception—the .for +
No rule without exception—the .for loop does not follow the shell quoting rules but splits at sequences of whitespace.
There are several types of variables that should be handled @@ -8752,36 +8786,36 @@ place.
pkgsrc-users
mailing list.
What is the difference between
MAKEFLAGS
, .MAKEFLAGS
and
MAKE_FLAGS
?
MAKEFLAGS
are the flags passed
to the pkgsrc-internal invocations of make(1), while
MAKE_FLAGS
are the flags that are passed to
@@ -8806,14 +8840,14 @@ place.
What is the difference between
MAKE
, GMAKE
and
MAKE_PROGRAM
?
MAKE
is the path to the
make(1) program that is used in the pkgsrc
infrastructure. GMAKE
is the path to GNU
@@ -8824,14 +8858,14 @@ place.
What is the difference between
CC
, PKG_CC
and
PKGSRC_COMPILER
?
CC
is the path to the real C
compiler, which can be configured by the pkgsrc user.
PKG_CC
is the path to the compiler wrapper.
@@ -8842,7 +8876,7 @@ place.
What is the difference between
BUILDLINK_LDFLAGS
,
@@ -8850,19 +8884,19 @@ place.
BUILDLINK_LIBS
?[FIXME]
Why does make show-var
VARNAME=BUILDLINK_PREFIX.foo
say it's empty?
For optimization reasons, some variables are only available in the “wrapper” phase and later. To “simulate” the wrapper phase, append @@ -8871,7 +8905,7 @@ place.
What does
${MASTER_SITE_SOURCEFORGE:=package/}
mean? I
@@ -8879,7 +8913,7 @@ place.
The :=
is not really an
assignment operator, like you might expect at first sight.
Instead, it is a degenerate form of
@@ -8895,13 +8929,13 @@ place.
Which mailing lists are there for package developers?
This is a list for technical discussions related @@ -8920,13 +8954,13 @@ place.
Where is the pkgsrc documentation?
There are many places where you can find documentation about pkgsrc:
@@ -9080,9 +9114,15 @@ USE_TOOLS+=gmake tool is rather big and the distfile should come with pregenerated documentation anyway; if it does not, it is a bug that you ought to report. For such packages you should disable gtk-doc (unless it is - the default) and change the location of installed HTML files: -CONFIGURE_ARGS+=--disable-gtk-doc -CONFIGURE_ARGS+=--with-html-dir=${PREFIX}/share/doc+ the default): +
CONFIGURE_ARGS+=--disable-gtk-doc+
The default location of installed HTML files
+ (share/gtk-doc/<package-name>
) is correct
+ and should not be changed unless the package insists on installing
+ them somewhere else. Otherwise programs as
+ devhelp will not be able to open them. You can
+ do that with an entry similar to:
CONFIGURE_ARGS+=--with-html-dir=${PREFIX}/share/gtk-doc/...
GNOME uses multiple shared directories and @@ -9101,7 +9141,7 @@ solution is given. After applying the solution be sure to make print-PLIST and ensure it is correct.
Table 21.1. PLIST handling for GNOME packages
-See Section 17.6.19, “Packages installing desktop files”. | -
In a traditional imperative programming language some of
the .mk
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 Makefile
s have global scope
care must be taken not to use parameter names that have already
another meaning. For example, PKGNAME
is a
@@ -10070,9 +10109,11 @@ source packages
As in other big projects, the directory layout of pkgsrc
is quite complex for newbies. This chapter explains where you
find things on the FTP server. The base directory on
- ftp.NetBSD.org
is /pub/pkgsrc
.
- This directory contains some subdirectories, which are explained
- below.
ftp.NetBSD.org
is /pub/pkgsrc/
.
+ On other servers it may be different, but inside this directory,
+ everything should look the same, no matter on which server you
+ are. This directory contains some subdirectories, which are
+ explained below.
The directory pkgsrc
contains a
- snapshot of the CVS repository, which is updated on a regularly
- basis. The file pkgsrc.tar.gz
contains the
- same as the directory, ready to be downloaded as a whole.
pkgsrc.tar.gz
contains the same as the
+ directory, ready to be downloaded as a whole.
In the directories for the quarterly branches, there is an
additional file called
pkgsrc-200
,
--
cgit v1.2.3
x
Qy
.tar.gz