Import of pkgsrc-2015Q3
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!-- $NetBSD: build.xml,v 1.72 2015/05/08 20:26:19 bsiegert Exp $ -->
|
||||
<!-- $NetBSD: build.xml,v 1.76 2015/08/31 11:54:29 leot Exp $ -->
|
||||
|
||||
<chapter id="build">
|
||||
<title>The build process</title>
|
||||
@@ -82,54 +82,19 @@
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>X11-based packages are special in that they may be
|
||||
installed in either <varname>X11BASE</varname> or
|
||||
<para>X11-based packages using imake must set
|
||||
<varname>USE_IMAKE</varname> to be installed correctly under
|
||||
<varname>LOCALBASE</varname>.</para>
|
||||
|
||||
<para>Usually, X11 packages should be installed under
|
||||
<varname>LOCALBASE</varname> whenever possible. Note that you
|
||||
will need to include
|
||||
<filename>../../mk/x11.buildlink3.mk</filename> in them to
|
||||
request the presence of X11 and to get the right compilation
|
||||
flags.</para>
|
||||
|
||||
<para>Even though, there are some packages that cannot be installed
|
||||
under <varname>LOCALBASE</varname>: those that come with app-defaults
|
||||
files. These packages are special and they must be placed under
|
||||
<varname>X11BASE</varname>. To accomplish this, set either
|
||||
<varname>USE_X11BASE</varname> or <varname>USE_IMAKE</varname> in
|
||||
your package.</para>
|
||||
|
||||
<para>Some notes: If you need
|
||||
to find includes or libraries installed by a pkg that has
|
||||
<varname>USE_IMAKE</varname> or <varname>USE_X11BASE</varname> in
|
||||
its pkg <filename>Makefile</filename>, you need to look in
|
||||
<emphasis>both</emphasis> <filename>${X11BASE}</filename> and
|
||||
<filename>${LOCALBASE}</filename>. To force installation of
|
||||
all X11 packages in <varname>LOCALBASE</varname>, the
|
||||
<filename role="pkg">pkgtools/xpkgwedge</filename> package
|
||||
is enabled by default.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>X11PREFIX</varname> should be used to refer to
|
||||
the installed location of an X11
|
||||
package. <varname>X11PREFIX</varname> will be set to
|
||||
<varname>X11BASE</varname> if xpkgwedge is not installed, and
|
||||
to <varname>LOCALBASE</varname> if xpkgwedge is
|
||||
installed.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>If xpkgwedge is installed, it is possible to have some
|
||||
packages installed in <varname>X11BASE</varname> and some in
|
||||
<varname>LOCALBASE</varname>. To determine the prefix of an
|
||||
<para>To determine the prefix of an
|
||||
installed package, the <varname>EVAL_PREFIX</varname>
|
||||
definition can be used. It takes pairs in the format
|
||||
<quote>DIRNAME=<package></quote>, and the &man.make.1;
|
||||
variable <varname>DIRNAME</varname> will be set to the prefix
|
||||
of the installed package <package>, or
|
||||
<quote>${X11PREFIX}</quote> if the package is not
|
||||
<quote>${PREFIX}</quote> if the package is not
|
||||
installed.</para>
|
||||
|
||||
<para>This is best illustrated by example.</para>
|
||||
@@ -341,12 +306,12 @@ ${MASTER_SITE_MOZILLA_ESR}
|
||||
${MASTER_SITE_MYSQL}
|
||||
${MASTER_SITE_NETLIB}
|
||||
${MASTER_SITE_OPENOFFICE}
|
||||
${MASTER_SITE_OSDN}
|
||||
${MASTER_SITE_PERL_CPAN}
|
||||
${MASTER_SITE_PGSQL}
|
||||
${MASTER_SITE_RUBYGEMS}
|
||||
${MASTER_SITE_R_CRAN}
|
||||
${MASTER_SITE_SOURCEFORGE}
|
||||
${MASTER_SITE_SOURCEFORGE_JP}
|
||||
${MASTER_SITE_SUNSITE}
|
||||
${MASTER_SITE_SUSE}
|
||||
${MASTER_SITE_TEX_CTAN}
|
||||
@@ -619,10 +584,8 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
|
||||
<para>If the program uses an <filename>Imakefile</filename>
|
||||
for configuration, the appropriate steps can be invoked by
|
||||
setting <varname>USE_IMAKE</varname> to
|
||||
<quote>yes</quote>. (If you only want the package installed in
|
||||
<varname>${X11PREFIX}</varname> but xmkmf not being run, set
|
||||
<varname>USE_X11BASE</varname> instead.) You can add variables to
|
||||
xmkmf's environment by adding them to the
|
||||
<quote>yes</quote>. If you only need xmkmf, add it to <varname>USE_TOOLS</varname>.
|
||||
You can add variables to xmkmf's environment by adding them to the
|
||||
<varname>SCRIPTS_ENV</varname> variable.</para>
|
||||
|
||||
<para>If the program uses <filename>cmake</filename>
|
||||
@@ -746,6 +709,10 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
|
||||
<listitem><para>directories that contain man
|
||||
pages</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><varname>INSTALL_GAME_DIR</varname></term>
|
||||
<listitem><para>directories that contain data files for games
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><varname>INSTALL_PROGRAM</varname></term>
|
||||
<listitem><para>binaries that can be stripped from debugging
|
||||
symbols</para></listitem></varlistentry>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- $NetBSD: components.xml,v 1.50 2014/11/28 12:11:24 bsiegert Exp $ -->
|
||||
<!-- $NetBSD: components.xml,v 1.51 2015/07/04 16:12:54 joerg Exp $ -->
|
||||
|
||||
<chapter id="components"> <?dbhtml filename="components.html"?>
|
||||
<title>Package components - files, directories and contents</title>
|
||||
@@ -591,8 +591,7 @@ MESSAGE_SUBST+= SOMEVAR="somevalue"
|
||||
<filename>MESSAGE</filename>. By default, substitution is
|
||||
performed for <varname>PKGNAME</varname>,
|
||||
<varname>PKGBASE</varname>, <varname>PREFIX</varname>,
|
||||
<varname>LOCALBASE</varname>, <varname>X11PREFIX</varname>,
|
||||
<varname>X11BASE</varname>,
|
||||
<varname>LOCALBASE</varname>, <varname>X11BASE</varname>,
|
||||
<varname>PKG_SYSCONFDIR</varname>,
|
||||
<varname>ROOT_GROUP</varname>, and
|
||||
<varname>ROOT_USER</varname>.</para>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- $NetBSD: fixes.xml,v 1.131 2015/04/25 11:31:01 wiz Exp $ -->
|
||||
<!-- $NetBSD: fixes.xml,v 1.133 2015/08/31 11:54:29 leot Exp $ -->
|
||||
|
||||
<chapter id="fixes"> <?dbhtml filename="fixes.html"?>
|
||||
<title>Making your package work</title>
|
||||
@@ -444,20 +444,6 @@ DEPENDS+= ImageMagick>=6.0:../../graphics/ImageMagick
|
||||
linkend="security-handling"/> for more
|
||||
information.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>If the package depends on either one of two (or more)
|
||||
packages, specify the <quote>pre-req-package-name</quote> as a
|
||||
comma-separated list between curly braces.</para>
|
||||
|
||||
<para>As an example, take a package that depends on the Perl
|
||||
<quote>version</quote> module, which has been part of Perl
|
||||
itself since version 5.10.0. This either/or dependency is
|
||||
expressed as:</para>
|
||||
|
||||
<programlisting>
|
||||
DEPENDS+= {perl>=5.10.0,p5-version-[0-9]*}:../../devel/p5-version
|
||||
</programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>If your package needs files from another package to build,
|
||||
@@ -1445,12 +1431,40 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
|
||||
<filename>mk/defaults/mk.conf</filename>, control this
|
||||
behaviour: <varname>GAMEDATAMODE</varname>,
|
||||
<varname>GAMEDIRMODE</varname>, <varname>GAMES_GROUP</varname>,
|
||||
<varname>GAMEMODE</varname>, <varname>GAME_USER</varname>.</para>
|
||||
<varname>GAMEMODE</varname>, <varname>GAME_USER</varname>.
|
||||
Other useful variables are: <varname>GAMEDIR_PERMS</varname>,
|
||||
<varname>GAMEDATA_PERMS</varname> and
|
||||
<varname>SETGID_GAMES_PERMS</varname>.</para>
|
||||
|
||||
<para>An example that illustrates some of the variables described above is
|
||||
<filename>games/moon-buggy</filename>. <varname>OWN_DIRS_PERMS</varname> is
|
||||
used to properly set directory permissions of the directory where the
|
||||
scorefile is saved, <varname>REQD_FILES_PERMS</varname> is used to create a
|
||||
dummy scorefile (<filename>mbscore</filename>) with the proper permissions
|
||||
and <varname>SPECIAL_PERMS</varname> is used to install setgid the game
|
||||
binary:</para>
|
||||
|
||||
<programlisting>
|
||||
USE_GAMESGROUP= yes
|
||||
|
||||
BUILD_DEFS+= VARBASE
|
||||
|
||||
OWN_DIRS_PERMS+= ${VARBASE}/games/moon-buggy ${GAMEDIR_PERMS}
|
||||
REQD_FILES_PERMS+= /dev/null ${VARBASE}/games/moon-buggy/mbscore ${GAMEDATA_PERMS}
|
||||
SPECIAL_PERMS+= ${PREFIX}/bin/moon-buggy ${SETGID_GAMES_PERMS}
|
||||
</programlisting>
|
||||
|
||||
<para>Various <varname>INSTALL_*</varname> variables are also available:
|
||||
<varname>INSTALL_GAME</varname> to install setgid game binaries,
|
||||
<varname>INSTALL_GAME_DIR</varname> to install game directories that are
|
||||
needed to be accessed by setgid games and
|
||||
<varname>INSTALL_GAME_DATA</varname> to install scorefiles.</para>
|
||||
|
||||
<para>A package should therefore never hard code file ownership or
|
||||
access permissions but rely on <varname>INSTALL_GAME</varname> and
|
||||
<varname>INSTALL_GAME_DATA</varname> to set these
|
||||
correctly.</para>
|
||||
access permissions but rely on <varname>*_PERMS</varname> as described above
|
||||
or alternatively on <varname>INSTALL_GAME</varname>,
|
||||
<varname>INSTALL_GAME_DATA</varname> and
|
||||
<varname>INSTALL_GAME_DIR</varname> to set these correctly.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="destdir-support">
|
||||
|
||||
Reference in New Issue
Block a user