Index: head/en_US.ISO8859-1/books/porters-handbook/plist/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/plist/chapter.xml (revision 47541)
+++ head/en_US.ISO8859-1/books/porters-handbook/plist/chapter.xml (revision 47542)
@@ -1,936 +1,951 @@
Advanced pkg-plist PracticesChanging pkg-plist Based on Make
VariablesSome ports, particularly the p5- ports,
need to change their pkg-plist depending on
what options they are configured with (or version of
perl, in the case of p5-
ports). To make this easy, any instances in
pkg-plist of %%OSREL%%,
%%PERL_VER%%, and
%%PERL_VERSION%% will be substituted
appropriately. The value of %%OSREL%% is the
numeric revision of the operating system (for example,
4.9). %%PERL_VERSION%%
and %%PERL_VER%% is the full version number
of perl (for example,
5.8.9). Several other
%%VARS%% related
to port's documentation files are described in the relevant
section.To make other substitutions, set
PLIST_SUB with a list of
VAR=VALUE
pairs and instances of
%%VAR%% will be
substituted with VALUE in
pkg-plist.For instance, if a port installs many files
in a version-specific subdirectory, use a placeholder for the
version so that pkg-plist does not have to
be regenerated every time the port is updated. For
example:OCTAVE_VERSION= ${PORTREVISION}
PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}in the Makefile and use
%%OCTAVE_VERSION%% wherever the version shows
up in pkg-plist. When
the port is upgraded, it will not be necessary to edit dozens
(or in some cases, hundreds) of lines in
pkg-plist.If files are installed conditionally on the options
set in the port, the usual way of handling it is prefixing
pkg-plist lines with a
%%OPT%% for lines needed when the option is
enabled, or %%NO_OPT%% when the option is
disabled, and adding OPTIONS_SUB=yes to the
Makefile. See for more information.For instance, if there are files that are only installed
when the X11 option is enabled, and
Makefile has:OPTIONS_DEFINE= X11
OPTIONS_SUB= yesIn pkg-plist, put
%%X11%% in front of the lines only being
installed when the option is enabled, like this :%%X11%%bin/foo-guiThis substitution will be done between the
pre-install and
do-install targets, by reading from
PLIST and writing to
TMPPLIST (default:
WRKDIR/.PLIST.mktmp). So if the port
builds PLIST on the fly, do so in or before
pre-install. Also, if the port
needs to edit the resulting file, do so in
post-install to a file named
TMPPLIST.Another way of modifying a port's packing list is based on
setting the variables PLIST_FILES and
PLIST_DIRS. The value of each variable is
regarded as a list of pathnames to write to
TMPPLIST along with
PLIST contents. Names listed in
PLIST_FILES and
PLIST_DIRS are subject to
%%VAR%%
substitution as described above. Except for that, names from
PLIST_FILES will appear in the final packing
list unchanged, while @dir
will be prepended to names from
PLIST_DIRS. To take effect,
PLIST_FILES and
PLIST_DIRS must be set before
TMPPLIST is written, that is, in
pre-install or earlier.From time to time, using OPTIONS_SUB
is not enough. In those cases, adding a specific
TAG to
PLIST_SUB
inside the Makefile with a special
value of @comment, makes package tools to
ignore the line. For instance, if some files are only installed
when the X11 option is on and the
architecture is i386:.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MX11} && ${ARCH} == "i386"
PLIST_SUB+= X11I386=""
.else
PLIST_SUB+= X11I386="@comment "
.endifEmpty DirectoriesCleaning Up Empty DirectoriesWhen being de-installed, a port has to remove empty
directories it created. Most of these directories are removed
automatically by &man.pkg.8;, but for directories created
outside of ${PREFIX}, or empty
directories, some more work needs to be done. This is usually
accomplished by adding @dir lines for those
directories. Subdirectories must be deleted before deleting
parent directories.[...]
@dir /var/games/oneko/saved-games
@dir /var/games/onekoCreating Empty DirectoriesEmpty directories created during port installation need
special attention. They must be present when the package
is created. If they are not created by the port code, create
them in the Makefile:post-stage:
@${MKDIR} ${STAGEDIR}${PREFIX}/some/directoryAdd the directory to pkg-plist
like any other. For example:@dir some/directoryConfiguration FilesIf the port installs configuration files to
PREFIX/etc (or elsewhere) do
not list them in
pkg-plist. That will cause
pkg delete to remove files that have been
carefully edited by the user, and a re-installation will wipe
them out.Instead, install sample files with a
filename.sample
extension. The @sample macro automates this,
see for what it does
exactly. For each sample file, add a line to
pkg-plist:@sample etc/orbit.conf.sampleIf there is a very good reason not to install a working
configuration file by default, only list the sample filename in
pkg-plist, without the
@sample followed by a space part, and add a
message pointing out that the
user must copy and edit the file before the software will
work.When a port installs its configuration in a subdirectory
of ${PREFIX}/etc, use
ETCDIR, which defaults to
${PREFIX}/etc/${PORTNAME}, it can be
overridden in the ports Makefile if there
is a convention for the port to use some other directory. The
%%ETCDIR%% macro will be used in its
stead in pkg-plist.The sample configuration files should always have the
.sample suffix. If for some historical
reason using the standard suffix is not possible, or if the
sample files come from some other directory, use
this construct:@sample etc/orbit.conf-dist etc/orbit.confor@sample %%EXAMPLESDIR%%/orbit.conf etc/orbit.confThe format is @sample
sample-fileactual-config-file.Dynamic Versus Static Package ListA static package list is a package
list which is available in the Ports Collection either as
pkg-plist (with or without variable
substitution), or embedded into the
Makefile via
PLIST_FILES and
PLIST_DIRS. Even if the contents are
auto-generated by a tool or a target in the Makefile
before the inclusion into the Ports
Collection by a committer (for example, using make
makeplist>), this is still considered a static list,
since it is possible to examine it without having to download or
compile the distfile.A dynamic package list is a package
list which is generated at the time the port is compiled based
upon the files and directories which are installed. It is not
possible to examine it before the source code of the ported
application is downloaded and compiled, or after running a
make clean.While the use of dynamic package lists is not forbidden,
maintainers should use static package lists wherever possible,
as it enables users to &man.grep.1; through available ports to
discover, for example, which port installs a certain file.
Dynamic lists should be primarily used for complex ports where
the package list changes drastically based upon optional
features of the port (and thus maintaining a static package list
is infeasible), or ports which change the package list based
upon the version of dependent software used. For example, ports
which generate docs with
Javadoc.Automated Package List CreationFirst, make sure the port is almost complete, with only
pkg-plist missing. Running make
makeplist will show an example for
pkg-plist. The output of
makeplist must be double checked for
correctness as it tries to automatically guess a few things, and
can get it wrong.User configuration files should be installed as
filename.sample,
as it is described in .
info/dir must not be listed and
appropriate install-info lines must be
added as noted in the info
files section. Any libraries installed by the port
must be listed as specified in the shared libraries
section.Expanding Package List with KeywordsAll keywords can also take optional arguments in
parentheses. The arguments are owner, group, and mode. This
argument is used on the file or directory referenced.
To change the owner, group, and mode of a configuration file,
use:@sample(games,games,640) etc/config.sampleThe arguments are optional. If only the group and mode
need to be changed, use:@sample(,games,660) etc/config.sample@desktop-file-utilsWill run update-desktop-database -q
after installation and deinstallation.@fcdirectoryAdd a @dir entry for the directory
passed as an argument, and run fc-cache -fs
on that directory after installation and
deinstallation.@fcfontsdirdirectoryAdd a @dir entry for the
directory passed as an argument, and run fc-cache
-fs, mkfontscale and
mkfontdir on that directory after
installation and deinstallation. Additionally, on
deinstallation, it removes the
fonts.scale and
fonts.dir cache files if they are
empty. This keyword is equivalent to adding both @fcdirectory and @fontsdirdirectory.@fontsdirdirectoryAdd a @dir entry for the
directory passed as an argument, and run
mkfontscale and
mkfontdir on that directory after
installation and deinstallation. Additionally, on
deinstallation, it removes the
fonts.scale and
fonts.dir cache files if they are
empty.@glib-schemasRuns glib-compile-schemas on
installation and deinstallation.@infofileAdd the file passed as argument to the plist, and updates
the info document index on installation and deinstallation.
Additionally, it removes the index if empty on
deinstallation. This should never be used manually, but
always through INFO. See for more information.@klddirectoryRuns kldxref on the directory
on installation and deinstallation. Additionally, on
deinstallation, it will remove the directory if empty.@rmtryfileWill remove the file on deinstallation, and not give an
error if the file is not there.@samplefile
[file]This is used to handle installation of configuration
files, through example files bundled with the package. The
actual, non-sample, file is either the second
filename, if present, or the first filename without the
.sample extension.This does three things. First, add the first file passed
as argument, the sample file, to the plist. Then, on
installation, if the actual file is not found, copy the sample
file to the actual file. And finally, on deinstallation,
remove the actual file if it has not been modified. See for more information.@shared-mime-infodirectoryRuns update-mime-database on the
directory on installation and deinstallation.@shellfileAdd the file passed as argument to the plist.On installation, add the full path to
file to
/etc/shells, while making sure it is not
added twice. On deinstallation, remove it from
/etc/shells.
+
+ @terminfo
+
+ Do not use by itself. If the port installs
+ *.terminfo
+ files, add USES=terminfo
+ to its Makefile.
+
+ On installation and deinstallation, if
+ tic is present, refresh
+ ${PREFIX}/share/misc/terminfo.db from the
+ *.terminfo
+ files in ${PREFIX}/share/misc.
+
+
Base KeywordsThere are a few keywords that are hardcoded, and
documented in &man.pkg-create.8;. For the sake of
completeness, they are also documented here.@
[file]The empty keyword is a placeholder to use when the
file's owner, group, or mode need to be changed. For
example, to set the group of the file to
games and add the setgid bit, add:@(,games,2755) sbin/daemon@preexeccommand,
@postexeccommand,
@preunexeccommand,
@postunexeccommandExecute command as part of
the package installation or deinstallation process.@preexeccommandExecute command as part
of the pre-install
scripts.@postexeccommandExecute command as part
of the post-install
scripts.@preunexeccommandExecute command as part
of the pre-deinstall
scripts.@postunexeccommandExecute command as part
of the post-deinstall
scripts.If command contains
any of these
sequences somewhere in it, they are expanded
inline. For these examples, assume that
@cwd is set to
/usr/local and the last
extracted file was bin/emacs.%FExpand to the last filename extracted (as
specified). In the example case
bin/emacs.%DExpand to the current directory prefix, as set
with @cwd. In the example case
/usr/local.%BExpand to the basename of the fully qualified
filename, that is, the current directory prefix plus
the last filespec, minus the trailing filename. In
the example case, that would be
/usr/local/bin.%fExpand to the filename part of the fully qualified
name, or the converse of %B. In
the example case,
emacs.@modemodeSet default permission for all subsequently extracted
files to mode. Format is the
same as that used by &man.chmod.1;. Use without an arg to
set back to default permissions (mode of the file while
being packed).This must be a numeric mode, like
644, 4755, or
600. It cannnot be a relative mode
like u+s.@owneruserSet default ownership for all subsequent files to
user. Use without an argument to
set back to default ownership (root).@groupgroupSet default group ownership for all subsequent files to
group. Use without an arg to set
back to default group ownership (wheel).@commentstringThis line is ignored when packing.@dirdirectoryDeclare directory name. By default, directories created
under PREFIX by a package installation
are automatically removed. Use this when an empty directory
under PREFIX needs to be created, or when
the directory needs to have non default owner, group, or
mode. Directories outside of PREFIX need
to be registered. For example,
/var/db/${PORTNAME} needs to have a
@dir entry whereas
${PREFIX}/share/${PORTNAME} does not if
it contains files or uses the default owner, group, and
mode.@execcommand,
@unexeccommand (Deprecated)Execute command as part of
the installation or deinstallation process. Please use
instead.@dirrmdirectory (Deprecated)Declare directory name to be deleted at deinstall time.
By default, directories created under
PREFIX by a package installation are
deleted when the package is deinstalled.@dirrmtrydirectory (Deprecated)Declare directory name to be removed, as for
@dirrm, but does not issue a warning if
the directory cannot be removed.Creating New KeywordsPackage list files can be extended by keywords that are
defined in the ${PORTSDIR}/Keywords
directory. The settings for each keyword are stored in a
UCL file named
keyword.ucl.
The file must contain at least one of these sections:attributesactionpre-installpost-installpre-deinstallpost-deinstallpre-upgradepost-upgradeattributesChanges the owner, group, or mode used by the keyword.
Contains an associative array where the possible keys are
owner, group, and
mode. The values are, respectively, a
user name, a group name, and a file mode. For
example:attributes: { owner: "games", group: "games", mode: 0555 }actionDefines what happens to the keyword's parameter.
Contains an array where the possible values are:setprefixSet the prefix for the next plist entries.dirRegister a directory to be created on install and
removed on deinstall.dirrmRegister a directory to be deleted on deinstall.
Deprecated.dirrmtryRegister a directory to try and deleted on
deinstall. Deprecated.fileRegister a file.setmodeSet the mode for the next plist entries.setownerSet the owner for the next plist entries.setgroupSet the group for the next plist entries.commentDoes not do anything, equivalent to not entering
an action section.ignore_nextIgnore the next entry in the plist.argumentsIf set to true, adds argument
handling, splitting the whole line, %@,
into numbered arguments, %1,
%2, and so on. For example, for this
line:@foo some.content other.content%1 and %2 will
contain:some.content
other.contentIt also affects how the action
entry works. When there is more than one argument, the
argument number must be specified. For example:actions: [file(1)]pre-install,
post-install,
pre-deinstall,
post-deinstall,
pre-upgrade,
post-upgradeThese keywords contains a &man.sh.1; script to be
executed before or after installation, deinstallation, or
upgrade of the package. In addition to the usual
@exec%foo
placeholders described in , there is a new one,
%@, which represents the argument of the
keyword.Custom Keyword ExamplesExample of a @dirrmtryecho
KeywordThis keyword does two things, it adds a
@dirrmtry
directory line to
the packing list, and echoes the fact that the directory
is removed when deinstalling the package.actions: [dirrmtry]
post-deinstall: <<EOD
echo "Directory %D/%@ removed."
EODReal Life Example, How @sample is
ImplementedThis keyword does three things. It adds the first
filename passed as an argument
to @sample to the packing list, it adds
to the post-install script instructions
to copy the sample to the actual configuration file if it
does not already exist, and it adds to the
post-deinstall instructions to remove
the configuration file if it has not been modified.actions: [file(1)]
arguments: true
post-install: <<EOD
case "%1" in
/*) sample_file="%1" ;;
*) sample_file="%D/%1" ;;
esac
target_file="${sample_file%.sample}"
set -- %@
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="%D/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}" && \
/bin/chmod u+w "${target_file}"
fi
EOD
pre-deinstall: <<EOD
case "%1" in
/*) sample_file="%1" ;;
*) sample_file="%D/%1" ;;
esac
target_file="${sample_file%.sample}"
set -- %@
if [ $# -eq 2 ]; then
set -- %@
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="%D/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
EOD
Index: head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml (revision 47541)
+++ head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml (revision 47542)
@@ -1,1428 +1,1440 @@
Using USES
MacrosAn Introduction to USESUSES macros make it easy to declare
requirements and settings for a port. They can add
dependencies, change building behavior, add metadata to
packages, and so on, all by selecting simple, preset
values..Each section in this chapter describes a possible value for
USES, along with its possible arguments.
Arguments are appeneded to the value after a colon
(:). Multiple arguments are separated by
commas (,).Using Multiple ValuesUSES= bison perlAdding an ArgumentUSES= gmake:liteAdding Multiple ArgumentsUSES= drupal:7,themeMixing it All TogetherUSES= pgsql:9.3+ cpe python:2.7,buildadaPossible arguments: (none), 47,
49, 5Depends on an Ada-capable
compiler, and sets CC accordingly. Defaults
to a gcc 4.9 based compiler, use
:47 to use the older
gcc 4.7 based one and
:5 to use the newer
gcc 5 based one.autoreconfPossible arguments: (none), buildRuns autoreconf. It encapsulates the
aclocal, autoconf,
autoheader, automake,
autopoint, and libtoolize
commands. Each command applies to
${CONFIGURE_WRKSRC}/configure.ac or its old
name, ${CONFIGURE_WRKSRC}/configure.in. If
configure.ac defines subdirectories with
their own configure.ac using
AC_CONFIG_SUBDIRS,
autoreconf will recursively update those as
well. The :build argument only adds build
time dependencies on those tools but does not run
autoreconf.blaslapackPossible arguments: (none), atlas,
netlib (default),
gotoblas, openblasAdds dependencies on Blas / Lapack libraries.bisonPossible arguments: (none), build,
run, bothUses devel/bison By default,
with no arguments or with the build argument,
it implies bison is a build-time dependency,
run implies a run-time dependency, and
both implies both run-time and build-time
dependencies.charsetfixPossible arguments: (none)Prevents the port from installing
charset.alias. This must be installed only
by converters/libiconv.
CHARSETFIX_MAKEFILEIN can be set to a path
relative to WRKSRC if
charset.alias is not installed by
${WRKSRC}/Makefile.in.cmakePossible arguments: (none), outsource,
runUses CMake for configuring and
building. With the outsource argument, an
out-of-source build will be performed. With the
run argument, a run-time dependency is
registered. For more information see .compilerPossible arguments: (none), c++0x,
c++11-lang, gcc-c++11-lib,
c++11-lib, c11,
openmp, nestedfct,
featuresDetermines which compiler to use based on any given wishes.
Use c++11-lang if the port needs a
C++11-capable compiler, gcc-c++11-lib if the
port needs the g++ compiler with a C++11
library, and c++11-lib if the port also needs
a C++11-ready standard library. If the port needs a compiler
understanding C++0X, C11, OpenMP, or nested functions, the
corresponding parameters can be used. Use
features to request a list of features
supported by the default compiler. After including
bsd.port.pre.mk the port can inspect the
results using these variables:COMPILER_TYPE: the default compiler
on the system, either gcc or clangALT_COMPILER_TYPE: the alternative
compiler on the system, either gcc or clang. Only set if
two compilers are present in the base system.COMPILER_VERSION: the first two
digits of the version of the default compiler.ALT_COMPILER_VERSION: the first two
digits of the version of the alternative compiler, if
present.CHOSEN_COMPILER_TYPE: the chosen
compiler, either gcc or clangCOMPILER_FEATURES: the features
supported by the default compiler. It currently lists the
C++ library.cpePossible arguments: (none) Include Common Platform Enumeration
(CPE) information in package manifest as a
CPE 2.3 formatted string. See the CPE
specification for details. To add
CPE information to a port, follow these
steps:Search for the official CPE para for the software
product either by using the NVD's CPE
search engine or in the official
CPE dictionary (warning, very
large XML file). Do not ever
make up CPE data.Add cpe to USES
and compare the result of make -V CPE_STR
to the CPE dictionary para. Continue one
step at a time until make -V CPE_STR is
correct.If the product name (second field, defaults to
PORTNAME) is incorrect, define
CPE_PRODUCT.If the vendor name (first field, defaults to
CPE_PRODUCT) is incorrect, define
CPE_VENDOR.If the version field (third field, defaults to
PORTVERSION) is incorrect, define
CPE_VERSION.If the update field (fourth field, defaults to empty) is
incorrect, define CPE_UPDATE.If it is still not correct, check
Mk/Uses/cpe.mk for additional details,
or contact the &a.ports-secteam;.Derive as much as possible of the CPE
name from existing variables such as
PORTNAME and
PORTVERSION. Use variable modifiers to
extract the relevant portions from these variables rather
than hardcoding the name.Always run make -V
CPE_STR and check the output before committing
anything that changes PORTNAME or
PORTVERSION or any other variable which
is used to derive CPE_STR.cranPossible arguments: (none),
auto-plistUses the Comprehensive R Archive Network. Specify
auto-plist to automatically generate
pkg-plist.desktop-file-utilsPossible arguments: (none)Uses update-desktop-database from
devel/desktop-file-utils. An
extra post-install step will be run without interfering with any
post-install steps already in the port
Makefile. A line with @desktop-file-utils
will be added to the plist.desthackPossible arguments: (none)Changes the behavior of GNU configure to properly support
DESTDIR in case the original software does
not.displayPossible arguments: (none),
ARGSSet up a virtual display environment. If the environment
variable DISPLAY is not set, then
Xvfb is added as a build dependency,
and CONFIGURE_ENV is extended with the port
number of the currently running instance of
Xvfb. The
ARGS
parameter defaults to install and controls
the phase around which to start and stop the virtual
display.dos2unixPossible arguments: (none)The port has files with line endings in
DOS format which need to be converted. Three
variables can be set to control which files will be converted.
The default is to convert all files,
including binaries. See for
examples.DOS2UNIX_REGEX: match file names
based on a regular expression.DOS2UNIX_FILES: match literal file
names.DOS2UNIX_GLOB: match file names based
on a glob pattern.drupalPossible arguments: 6,
7, module,
themeAutomate installation of a port that is a
Drupal theme or module. Use with the
version of Drupal that the port is expecting. For example,
USES=drupal:6,module says that this port
creates a Drupal 6 module. A Drupal 7 theme can be specified
with USES=drupal:7,theme.execinfoPossible arguments: (none)Add a library dependency on devel/libexecinfo if
libexecinfo.so is not present in the base
system.fakerootPossible arguments: (none)Changes some default behaviour of build systems to allow
installing as a user. See for more
information on fakeroot.famPossible arguments: (none), fam,
gaminUses a File Alteration Monitor as a library dependency,
either devel/fam or devel/gamin. End users can set
WITH_FAM_SYSTEM to specify their preference.fmakePossible arguments: (none)Uses devel/fmake as a
build-time dependency.fontsPossible arguments: (none), fc,
fcfontsdir (default),
fontsdir, noneAdds a runtime dependency on tools needed to register fonts.
Depending on the argument, add a @fc ${FONTSDIR}
line, @fcfontsdir
${FONTSDIR} line, @fontsdir
${FONTSDIR} line, or no line if the argument is
none, to the plist.
FONTSDIR defaults to
${PREFIX}/share/fonts/${FONTNAME} and
FONTNAME to ${PORTNAME}.
Add FONTSDIR to PLIST_SUB
and SUB_LISTfortranPossible arguments: gcc (default),
ifortUses the Fortran compiler from either GNU or Intel.fusePossible arguments: (none)The port will depend on the FUSE library and handle the
dependency on the kernel module depending on the version of
&os;.geckoPossible arguments: libxul (default),
firefox, seamonkey,
thunderbird, build,
XY,
XY+Add a dependency on different
gecko based applications. If
libxul is used, it is the only argument
allowed. When the argument is not libxul,
the firefox, seamonkey, or
thunderbird arguments can be used, along with
optional build and
XY/XY+
version arguments.gettextPossible arguments: (none)Deprecated. Will include both gettext-runtime
and gettext-tools.gettext-runtimePossible arguments: (none), lib
(default), build,
runUses devel/gettext-runtime.
By default, with no arguments or with the lib
argument, implies a library dependency on
libintl.so. build and
run implies, respectively a build-time and a
run-time dependency on gettext.gettext-toolsPossible arguments: (none), build
(default), runUses devel/gettext-tools. By
default, with no argument, or with the build
argument, a build time dependency on msgfmt
is registered. With the run argument, a
run-time dependency is registered.ghostscriptPossible arguments: X,
build, run,
nox11A specific version X can be used.
Possible versions are 7,
8, 9 (default), and
agpl. nox11 indicates
that the -nox11 version of the port is
required. build and run
add build- and run-time dependencies on
Ghostscript. The default is both
build- and run-time dependencies.gmakePossible arguments: (none), liteUses devel/gmake, or devel/gmake-lite if the
lite argument is used, as a build-time
dependency and sets up the environment to use
gmake as the default make
for the build.gperfPossible arguments: (none)Add a buildtime dependency on devel/gperf if gperf
is not present in the base system.gssapiPossible arguments: (none), base
(default), heimdal, mit,
flags, bootstrapHandle dependencies needed by consumers of the
GSS-API. Only libraries that provide the
Kerberos mechanism are available. By
default, or set to base, the
GSS-API library from the base system is used.
Can also be set to heimdal to use security/heimdal, or
mit to use security/krb5.When the local Kerberos
installation is not in LOCALBASE, set
HEIMDAL_HOME (for heimdal)
or KRB5_HOME (for krb5) to
the location of the Kerberos
installation.These variables are exported for the ports to use:GSSAPIBASEDIRGSSAPICPPFLAGSGSSAPIINCDIRGSSAPILDFLAGSGSSAPILIBDIRGSSAPILIBSGSSAPI_CONFIGURE_ARGSThe flags option can be given alongside
base, heimdal, or
mit to automatically add
GSSAPICPPFLAGS,
GSSAPILDFLAGS, and
GSSAPILIBS to CFLAGS,
LDFLAGS, and LDADD,
respectively. For example, use
base,flags.The bootstrap option is a special prefix
only for use by security/krb5 and
security/heimdal. For example,
use bootstrap,mit.Typical UseOPTIONS_SINGLE= GSSAPI
OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE
GSSAPI_BASE_USES= gssapi
GSSAPI_BASE_CONFIGURE_ON= --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
GSSAPI_HEIMDAL_USES= gssapi:heimdal
GSSAPI_HEIMDAL_CONFIGURE_ON= --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
GSSAPI_MIT_USES= gssapi:mit
GSSAPI_MIT_CONFIGURE_ON= --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
GSSAPI_NONE_CONFIGURE_ON= --without-gssapihordePossible arguments: (none)Add buildtime and runtime dependencies on devel/pear-channel-horde. Other
Horde dependencies can be added
with USE_HORDE_BUILD and
USE_HORDE_RUN. See for more information.iconvPossible arguments: (none), lib,
build,
patch, translit,
wchar_tUses iconv functions, either from the
port converters/libiconv as a
build-time and run-time dependency, or from the base system on
10-CURRENT after a native iconv was committed
in 254273. By default, with no arguments
or with the lib argument, implies
iconv with build-time and run-time
dependencies. build implies a build-time
dependency, and patch implies a patch-time
dependency. If the port uses the WCHAR_T or
//TRANSLIT iconv extensions, add the relevant
arguments so that the correct iconv is used. For more
information see .imakePossible arguments: (none), env,
notall, nomanAdd devel/imake as a
build-time dependency and run xmkmf -a during
the configure stage. If the
env argument is given, the
configure target is not set. If the
flag is a problem for the port, add the
notall argument. If xmkmf
does not generate a install.man
target, add the noman argument.kmodPossible arguments: (none)Fills in the boilerplate for kernel module ports,
currently:Add kld to
CATEGORIES.Set SSP_UNSAFE.Set IGNORE if the kernel sources are
not found in SRC_BASE.Define KMODDIR to
/boot/modules by default, add it to
PLIST_SUB and
MAKE_ENV, and create it upon
installation. If KMODDIR is set to
/boot/kernel, it will be rewritten to
/boot/modules. This prevents breaking
packages when upgrading the kernel due to
/boot/kernel being renamed to
/boot/kernel.old in the process.Handle cross-referencing kernel modules upon
installation and deinstallation, using @kld.lhaPossible arguments: (none)Set EXTRACT_SUFX to
.lzhlibarchivePossible arguments: (none)Registers a dependency on archivers/libarchive. Any ports
depending on libarchive must include
USES=libarchive.libeditPossible arguments: (none)Registers a dependency on devel/libedit. Any ports depending on
libedit must include
USES=libedit.libtoolPossible arguments: (none), keepla,
buildPatches libtool scripts. This must be
added to all ports that use libtool. The
keepla argument can be used to keep
.la files. Some ports do not ship with
their own copy of libtool and need a build time dependency on
devel/libtool, use the
:build argument to add such
dependency.localbasePossible arguments: (none)Ensures that libraries from dependencies in
LOCALBASE are used instead of the ones from
the base system. Ports that depend on libraries that are also
present in the base system should use this. It is also used
internally by a few other USES.luaPossible arguments: (none),
XY+,
XY,
build, runAdds a dependency on Lua. By
default this is a library dependency, unless overridden by the
build or run option. The
default version is 5.2, unless set by the
XY parameter (for
example, 51 or
52+).makeinfoPossible arguments: build (default),
run, bothAdd the corresponding dependencies on
makeinfo.makeselfPossible arguments: (none)Indicates that the distribution files are makeself archives
and sets the appropriate dependencies.metaportPossible arguments: (none)Sets the following variables to make it easier to create a
metaport: MASTER_SITES,
DISTFILES, EXTRACT_ONLY,
NO_BUILD, NO_INSTALL,
NO_MTREE, NO_ARCH.monoPossible arguments: (none)Adds a dependency on the Mono
(currently only C#) framework by setting the appropriate
dependencies.motifPossible arguments: (none)Uses x11-toolkits/open-motif
as a library dependency. End users can set
WANT_LESSTIF for the dependency to be on
x11-toolkits/lesstif instead of
x11-toolkits/open-motif.ncursesPossible arguments: (none), base,
portUses ncurses, and causes some
useful variables to be set.ninjaPossible arguments: (none)Uses ninja to build the port.
End users can set NINJA_VERBOSE for verbose
output.objcPossible arguments: (none)Add objective C dependencies (compiler, runtime library) if
the base system does not support it.openalPossible arguments: al,
soft (default), si,
alutUses OpenAL. The backend can be
specified, with the software implementation as the default. The
user can specify a preferred backend with
WANT_OPENAL. Valid values for this knob are
soft (default) and
si.pathfixPossible arguments: (none)Look for Makefile.in and
configure in the port's associated sources
and fix common paths to make sure they respect the &os;
hierarchy. If the port uses automake, set
PATHFIX_MAKEFILEIN to
Makefile.am if needed.pearPossible arguments: (none)Adds a dependency on devel/pear. It will setup default
behavior for software using the PHP
Extension and Application Repository. See for more information.perl5Possible arguments: (none)Depends on Perl. These variables
can be set:PERL_VERSION: Full version of
Perl to use, or the default if
not setPERL_ARCH: Directory name of
architecture dependent libraries, defaults to
machPERL_PORT: Name of the
Perl port to be installed, the
default is derived from
PERL_VERSIONSITE_PERL: Directory name for site
specific Perl packagesUSE_PERL5: Phases in which to use
Perl, can be
extract, patch,
build, install, or
run. It can also be
configure, modbuild,
or modbuildtiny when
Makefile.PL,
Build.PL, or the Module::Build::Tiny
flavor of Build.PL is required. It
defaults to build run.pgsqlPossible arguments: (none),
X.Y,
X.Y+,
X.Y-Provide support for PostgreSQL. Maintainer can set version
required. Minimum and maximum versions can be specified; for
example, 9.0-, 8.4+.Add PostgreSQL component dependency, using
WANT_PGSQL=component[:target]. for example,
WANT_PGSQL=server:configure pltcl plperl For
the full list use make -V
_USE_PGSQL_DEP.pkgconfigPossible arguments: (none), build
(default), run,
bothUses devel/pkgconf. With no
arguments or with the build argument, it
implies pkg-config as a build-time
dependency. run implies a run-time
dependency and both implies both run-time and
build-time dependencies.purePossible arguments: (none), ffiUses lang/pure. Largely used
for building related pure ports.
With the ffi argument, it implies devel/pure-ffi as a run-time
dependency.pythonPossible arguments: (none),
X.Y,
X.Y+,
-X.Y,
X.Y-Z.A,
build, runUses Python. A supported version
or version range can be specified. If Python is only needed at
build or run time, it can be set as a build or run dependency
with build or run. See
for more information.qmailPossible arguments: (none), build,
run, both,
varsUses mail/qmail. With the
build argument, it implies
qmail as a build-time dependency.
run implies a run-time dependency. Using no
argument or the both argument implies both
run-time and build-time dependencies. vars
will only set QMAIL variables for the port to use.qmakePossible arguments: (none), norecursive,
outsourceUses QMake for configuring. For
more information see .readlinePossible arguments: (none), portUses readline as a library
dependency, and sets CPPFLAGS and
LDFLAGS as necessary. If the
port argument is used or if readline is not
present in the base system, add a dependency on devel/readlinesconsPossible arguments: (none)Provide support for the use of devel/sconsshared-mime-infoPossible arguments: (none)Uses update-mime-database from
misc/shared-mime-info. This uses
will automatically add a post-install step in such a way that
the port itself still can specify there own post-install step if
needed. It also add an @shared-mime-info
para to the plist.shebangfixPossible arguments: (none)A lot of software uses incorrect locations for script
interpreters, most notably /usr/bin/perl
and /bin/bash. This fixes shebang lines in
scripts listed in SHEBANG_FILES. Currently
Bash,
Java, Ksh,
Perl, PHP,
Python,
Ruby, Tcl,
and Tk are supported by default. To
support another interpreter, set
SHEBANG_LANG, lua_OLD_CMD
and lua_CMD. For example
SHEBANG_LANG=lua, then
lua_OLD_CMD=/usr/bin/lua and
lua_CMD=${LOCALBASE}/bin/lua.tarPossible arguments: (none), Z,
bz2, bzip2,
lzma, tbz,
tgz, txz,
xzSet EXTRACT_SUFX to
.tar, .tar.Z,
.tar.bz2, .tar.bz2,
.tar.lzma, .tbz,
.tgz, .txz or
.tar.xz respectively.tclPossible arguments: PORTAdd a dependency on Tcl. The
PORT parameter can be either
tcl or tk. Either a
version or wrapper dependency can be appended using
PORT:version or
PORT:wrapper. The version can be empty, one
or more exact version numbers (currently 84,
85, or 86), or a minimal
version number (currently 84+,
85+ or 86+). A build- or
run-time only dependency can be specified using
PORT,build or PORT,run.
After including bsd.port.pre.mk the port
can inspect the results using these variables:TCL_VER: chosen major.minor version
of TclTCLSH: full path of the
Tcl interpreterTCL_LIBDIR: path of the
Tcl librariesTCL_INCLUDEDIR: path of the
Tcl C header filesTK_VER: chosen major.minor version of
TkWISH: full path of the
Tk interpreterTK_LIBDIR: path of the
Tk librariesTK_INCLUDEDIR: path of the
Tk C header files
+
+
+
+ terminfo
+
+ Possible arguments: (none)
+
+ Adds @terminfo
+ to the plist. Use when the port installs
+ *.terminfo files
+ in ${PREFIX}/share/misc.tkSame as arguments for tclSmall wrapper when using both Tcl
and Tk. The same variables are
returned as when using Tcl.twistedPossible arguments: (none), ARGSAdd a dependency on twistedCore.
The list of required components can be specified as a value of
this variable. ARGS can be one of:build: add
twistedCore or any specified
component as build dependency.run: add
twistedCore or any specified
component as run dependency.Besides build and run,
one or more other supported twisted
components can be specified. Supported values are listed in
Uses/twisted.mk.uidfixPossible arguments: (none)Changes some default behavior (mostly variables) of
the build system to allow installing this port as a normal
user. Try this in the port before adding
NEED_ROOT=yesuniquefilesPossible arguments: (none), dirsMake files or directories 'unique', by adding a prefix or
suffix. If the dirs argument is used, the
port needs a prefix (a only a prefix) based on
UNIQUE_PREFIX for standard directories
DOCSDIR, EXAMPLESDIR,
DATADIR, WWWDIR,
ETCDIR. These variables are available for
ports:UNIQUE_PREFIX: The prefix to be used
for directories and files. Default:
${PKGNAMEPREFIX}.UNIQUE_PREFIX_FILES: A list of files
that need to be prefixed. Default: empty.UNIQUE_SUFFIX: The suffix to be used
for files. Default:
${PKGNAMESUFFIX}.UNIQUE_SUFFIX_FILES: A list of files
that need to be suffixed. Default: empty.webpluginPossible arguments: (none), ARGSAutomatically create and remove symbolic links for each
application that supports the webplugin framework.
ARGS can be one of:gecko: support plug-ins based on
Geckonative: support plug-ins for Gecko,
Opera, and WebKit-GTKlinux: support Linux plug-insall (default, implicit): support all
plug-in types(individual entries): support only the browsers
listedThese variables can be adjusted:WEBPLUGIN_FILES: No default, must be
set manually. The plug-in files to install.WEBPLUGIN_DIR: The directory to
install the plug-in files to, default
PREFIX/lib/browser_plugins/WEBPLUGIN_NAME.
Set this if the port installs plug-in files outside of the
default directory to prevent broken symbolic links.WEBPLUGIN_NAME: The final directory
to install the plug-in files into, default
PKGBASE.xfcePossible arguments: (none), gtk3Provide support for Xfce related
ports. See for details.The gtk3 argument specifies that the port
requires GTK3 support. It adds
additional features provided by some core components, for
example, x11/libxfce4menu and
x11-wm/xfce4-panel.zipPossible arguments: (none),
infozipIndicates that the distribution files use the ZIP
compression algorithm. For files using the InfoZip algorithm
the infozip argument must be passed to set
the appropriate dependencies.zopePossible arguments: (none)Uses www/zope. Mostly used
for building zope related ports.
ZOPE_VERSION can be used by a port to
indicate that a specific version of
zope shall be used.