Possible arguments: (none), phpize,
ext, zend,
build, cli,
cgi, mod,
web, embed,
pecl, flavors,
noflavors
Provide support for PHP. Add a runtime dependency on the default PHP version, lang/php56.
phpizeUse to build a PHP extension. Enables flavors.
extUse to build, install and register a PHP extension. Enables flavors.
zendUse to build, install and register a Zend extension. Enables flavors.
buildSet PHP also as a build-time dependency.
cliNeeds the CLI version of PHP.
cgiNeeds the CGI version of PHP.
modNeeds the Apache module for PHP.
webNeeds the Apache module or the CGI version of PHP.
embedNeeds the embedded library version of PHP.
peclProvide defaults for fetching PHP extensions from the PECL repository. Enables flavors.
flavorsEnable automatic PHP
flavors generation. Flavors will be generated
for all PHP versions, except the ones present in
IGNORE_WITH_PHP.
noflavorsDisable automatic PHP flavors generation. Must only be used with extensions provided by PHP itself.
Variables are used to specify which PHP modules are required, as well as which version of PHP are supported.
USE_PHPThe list of required PHP
extensions at run-time. Add :build to
the extension name to add a build-time dependency.
Example: pcre xml:build gettext
IGNORE_WITH_PHPThe port does not work with
PHP of the given version. For
possible values look at the content of
_ALL_PHP_VERSIONS in
Mk/Uses/php.mk.
When building a PHP or
Zend extension with
:ext or :zend, these
variables can be set:
PHP_MODNAMEThe name of the PHP or
Zend extension. Default value
is ${PORTNAME}.
PHP_HEADER_DIRSA list of subdirectories from which to install header files. The framework will always install the header files that are present in the same directory as the extension.
PHP_MOD_PRIOThe priority at which to load the extension. It is a
number between 00 and
99.
For extensions that do not depend on any extension,
the priority is automatically set to
20, for extensions that depend on
another extension, the priority is automatically set to
30. Some extensions may need to be
loaded before every other extension, for example www/php56-opcache. Some may need
to be loaded after an extension with a priority of
30. In that case, add
PHP_MOD_PRIO=
in the port's Makefile. For example:XX
USES= php:ext USE_PHP= wddx PHP_MOD_PRIO= 40
These variables are available to use in
PKGNAMEPREFIX or
PKGNAMESUFFIX:
PHP_PKGNAMEPREFIXContains
php where
XY-XY is the current flavor's PHP
version. Use with PHP extensions and modules.
PHP_PKGNAMESUFFIXContains
-php where
XYXY is the current flavor's PHP
version. Use with PHP applications.
PECL_PKGNAMEPREFIXContains
php
where XY-pecl-XY is the current
flavor's PHP version. Use with
PECL modules.
With flavors, all PHP extensions, PECL extensions, PEAR
modules must have a different package
name, so they must all use one of these three variables in
their PKGNAMEPREFIX or
PKGNAMESUFFIX.
All FreeBSD documents are available for download at https://download.freebsd.org/ftp/doc/
Questions that are not answered by the
documentation may be
sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.