From 1b85b377b2d74710ba80ec93600876cd3a85c932 Mon Sep 17 00:00:00 2001 From: rillig Date: Mon, 18 Sep 2006 22:34:58 +0000 Subject: regenerated. --- doc/pkgsrc.html | 299 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 170 insertions(+), 129 deletions(-) (limited to 'doc/pkgsrc.html') diff --git a/doc/pkgsrc.html b/doc/pkgsrc.html index 15cfcdcc882..277c5e0f7d6 100644 --- a/doc/pkgsrc.html +++ b/doc/pkgsrc.html @@ -5,7 +5,11 @@ The pkgsrc guide - +
@@ -772,7 +776,6 @@ minutes!

4.2.1. Requirements
4.2.2. Fetching distfiles
4.2.3. How to build and install
-
4.2.4. Selecting the compiler
5. Configuring pkgsrc
@@ -781,8 +784,9 @@ minutes!

5.2. Variables affecting the build process
5.3. Selecting and configuring the compiler
-
5.3.1. Additional flags to the compiler (CFLAGS)
-
5.3.2. Additional flags to the linker (LDFLAGS)
+
5.3.1. Selecting the compiler
+
5.3.2. Additional flags to the compiler (CFLAGS)
+
5.3.3. Additional flags to the linker (LDFLAGS)
5.4. Developer/advanced settings
5.5. Selecting Build Options
@@ -825,7 +829,8 @@ minutes!

7.15. Automated security checks
7.16. Why do some packages ignore my CFLAGS?
7.17. A package does not build. What shall I do?
-
7.18. I have a little time to kill. What shall I do?
+
7.18. What does “Makefile appears to contain unresolved cvs/rcs/??? merge conflicts” mean?
+
7.19. I have a little time to kill. What shall I do?
@@ -1034,7 +1039,7 @@ directory on ftp.NetBSD.org.

Table 3.1. Binary kits and available packages

-
+
@@ -1205,9 +1210,9 @@ directory on ftp.NetBSD.org.

-
 
+
-

+

Simply download the binary kit for your platform, and extract it into / e.g.

@@ -1261,21 +1266,21 @@ file and inspect the contents before extracting it. 3.3.1. Darwin (Mac OS X)

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.

Note

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.

+ requires the file system to be case-sensitive. You can, however, use a case-sensitive HFS+ (aka HFSX) file system as found in Darwin 7.0 and newer.

@@ -1287,28 +1292,28 @@ file and inspect the contents before extracting it. # sudo chown `id -u`:`id -g` /Volumes/NetBSD

Note

-

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:

-
# sudo mount -u -o suid,sync /Volumes/NetBSD
+

Allow suid:

+
# sudo mount -u -o suid /Volumes/NetBSD

-3.3.1.2. Using a UFS partition

+3.3.1.2. Using a UFS or HFSX partition

By default, /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

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 /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”.

+ “Apple_UFS” or “Apple_HFSX” and not “Apple_HFS”.

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.

@@ -1807,7 +1812,6 @@ file and inspect the contents before extracting it.
4.2.1. Requirements
4.2.2. Fetching distfiles
4.2.3. How to build and install
-
4.2.4. Selecting the compiler
@@ -2240,47 +2244,6 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00 not install any if you use a non-standard LOCALBASE.

-
-

-4.2.4. Selecting 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.

-
-
@@ -2293,22 +2256,39 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00
5.2. Variables affecting the build process
5.3. Selecting and configuring the compiler
-
5.3.1. Additional flags to the compiler (CFLAGS)
-
5.3.2. Additional flags to the linker (LDFLAGS)
+
5.3.1. Selecting the compiler
+
5.3.2. Additional flags to the compiler (CFLAGS)
+
5.3.3. Additional flags to the linker (LDFLAGS)
5.4. Developer/advanced settings
5.5. Selecting Build Options
+

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 Makefiles. 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.

5.1. General configuration

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.

+ pkgsrc packages. 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 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

-5.3.1. Additional flags to the compiler (CFLAGS)

+5.3.1. Selecting 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.

+
+ +
+

+5.3.2. Additional flags to the compiler (CFLAGS)

If you wish to set the CFLAGS variable, please make sure to use the += operator instead of the = operator:

@@ -2406,7 +2427,7 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00

-5.3.2. Additional flags to the linker (LDFLAGS)

+5.3.3. Additional flags to the linker (LDFLAGS)

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 “...””.

@@ -2828,7 +2848,7 @@ PKG_OPTIONS.apache= suexec
  • /usr/src (system sources, - e. g. for sysutils/aperture):

    + e. g. for sysutils/aperture):

    # ln -s ../disk1/cvs .
     	  # ln -s cvs/src-2.0 src
  • @@ -3038,7 +3058,8 @@ nbftp% chmod 755 .
    7.15. Automated security checks
    7.16. Why do some packages ignore my CFLAGS?
    7.17. A package does not build. What shall I do?
    -
    7.18. I have a little time to kill. What shall I do?
    +
    7.18. What does “Makefile appears to contain unresolved cvs/rcs/??? merge conflicts” mean?
    +
    7.19. I have a little time to kill. What shall I do?

    This section contains hints, tips & tricks on special things in @@ -3441,7 +3462,20 @@ check.

    -7.18. I have a little time to kill. What shall I do?

    +7.18. What does “Makefile appears to contain unresolved cvs/rcs/??? merge conflicts” mean?
    +

    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.

    + +
    +

    +7.19. I have a little time to kill. What shall I do?

    This is not really an FAQ yet, but here's the answer anyway.

      @@ -3450,7 +3484,7 @@ check.

      will tell you about newer versions of installed packages that are available, but not yet updated in pkgsrc.

    • 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

      -
      +
      @@ -4108,9 +4142,9 @@ sections.

      -
      +
      -

      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.

      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 sh(1).

      -

      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.

      -
      20.1. What is the difference between +
      20.1. What is the difference between MAKEFLAGS, .MAKEFLAGS and MAKE_FLAGS?
      -
      20.2. What is the difference between +
      20.2. What is the difference between MAKE, GMAKE and MAKE_PROGRAM?
      -
      20.3. What is the difference between +
      20.3. What is the difference between CC, PKG_CC and PKGSRC_COMPILER?
      -
      20.4. What is the difference between +
      20.4. What is the difference between BUILDLINK_LDFLAGS, BUILDLINK_LDADD and BUILDLINK_LIBS?
      -
      20.5. Why does make show-var +
      20.5. Why does make show-var VARNAME=BUILDLINK_PREFIX.foo say it's empty?
      -
      20.6. What does +
      20.6. What does ${MASTER_SITE_SOURCEFORGE:=package/} mean? I don't understand the := inside it.
      -
      20.7. Which mailing lists are there for package +
      20.7. Which mailing lists are there for package developers?
      -
      20.8. Where is the pkgsrc +
      20.8. Where is the pkgsrc documentation?
      @@ -8790,14 +8824,14 @@ place.

      -20.1. +20.1.

      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.

      -20.2. +20.2.

      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.

      -20.3. +20.3.

      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.

      -20.4. +20.4.

      What is the difference between BUILDLINK_LDFLAGS, @@ -8850,19 +8884,19 @@ place.

      BUILDLINK_LIBS?

      - +

      [FIXME]

      -20.5. +20.5.

      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.

      -20.6. +20.6.

      What does ${MASTER_SITE_SOURCEFORGE:=package/} mean? I @@ -8879,7 +8913,7 @@ place.

      it.

      - +

      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.

      -20.7. +20.7.

      Which mailing lists are there for package developers?

      - +
      tech-pkg

      This is a list for technical discussions related @@ -8920,13 +8954,13 @@ place.

      -20.8. +20.8.

      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

    -
    +
    @@ -9133,9 +9173,8 @@ solution is given. After applying the solution be sure to -
    See Section 17.6.19, “Packages installing desktop files”.
    +
    -

    @@ -9464,8 +9503,8 @@ details.

    22.5.1. Procedures with parameters

    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 Makefiles 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.

    C.1. bootstrap-pkgsrc: Bootstrap kits

    @@ -10130,9 +10171,9 @@ source packages
    that is the files that define how to create binary packages from source archives.

    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.

    + snapshot of the CVS repository, which is updated regularly. The + file 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-200xQy.tar.gz, -- cgit v1.2.3