When using USES=php with
one of these arguments, phpize,
ext, zend, or
pecl, the port will automatically have
FLAVORS filled in with the
PHP versions it supports.
All the examples assume the currently supported PHP versions are 5.6, 7.0, 7.1, and 7.2.
USES=php ExtensionThis will generate package for all the supported versions:
PORTNAME= some-ext
PORTVERSION= 0.0.1
PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX}
USES= php:extThis will generate package for all the supported versions but 7.2:
PORTNAME= some-ext
PORTVERSION= 0.0.1
PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX}
USES= php:ext
IGNORE_WITH_PHP= 72PHP applications can also be flavorized.
This allows generating packages for all PHP versions, so that users can use them with whatever version they need on their servers.
PHP applications that are flavorized
must append
PHP_PKGNAMESUFFIX to their package
names.
Adding Flavors support to a PHP application is straightforward:
PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}
USES= php:flavorsWhen adding a dependency on a
PHP flavored port, use
@${PHP_FLAVOR}.
Never use FLAVOR
directly.
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>.