Index: head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml
+++ head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml
@@ -262,6 +262,73 @@
Flavors Auto-Activation
+
+ USES=php and Flavors
+
+ 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.
+
+
+
+ Simple USES=php Extension
+
+ This will generate package for all the supported
+ versions:
+
+ PORTNAME= some-ext
+PORTVERSION= 0.0.1
+PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX}
+
+USES= php:ext
+
+ This 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= 72
+
+
+
+ PHP Flavors with PHP Applications
+
+ PHP 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.
+
+
+
+ Flavorizing a PHP Application
+
+ Adding Flavors support to a PHP application is
+ straightforward:
+
+ PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}
+
+USES= php:flavors
+
+
+
+
USES=python and Flavors
@@ -306,7 +373,7 @@
USES= python:-3.5
USE_PYTHON= distutils
- Will get this flavor: py27.
+ Will get this flavor: py27.USES= python:-3.5
USE_PYTHON= distutils allflavors
Index: head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
+++ head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
@@ -3631,6 +3631,28 @@
.include <bsd.port.mk>
+
+ PEAR modules will
+ automatically be flavorized using PHP
+ flavors.
+
+
+
+ If a non default PEAR_CHANNEL is
+ used, the build and run-time dependencies will automatically
+ be added.
+
+
+
+ PEAR modules do not need to defined
+ PKGNAMESUFFIX it is automatically filled
+ in using PEAR_PKGNAMEPREFIX. If a port
+ needs to add to PKGNAMEPREFIX, it must
+ also use PEAR_PKGNAMEPREFIX to
+ differentiate between different flavors.
+
+
Horde Modules
@@ -3677,6 +3699,14 @@
.include <bsd.port.mk>
+
+
+ As Horde modules are also
+ PEAR modules they will also
+ automatically be flavorized using PHP
+ flavors.
+
Index: head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
+++ head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
@@ -2014,13 +2014,15 @@
pear
- Possible arguments: (none)
+ Possible arguments: envAdds a dependency on devel/pear. It will setup default
behavior for software using the PHP
- Extension and Application Repository. See for more information.
+ Extension and Application Repository. Using the
+ env arguments only sets up the
+ PEAR environment variables. See
+ for more information.
@@ -2082,7 +2084,8 @@
build, cli,
cgi, mod,
web, embed,
- pecl
+ pecl, flavors,
+ noflavorsProvide support for PHP. Add a
runtime dependency on the default PHP version, phpizeUse to build a PHP
- extension.
+ extension. Enables flavors.
@@ -2101,7 +2104,8 @@
extUse to build, install and register a
- PHP extension.
+ PHP extension. Enables
+ flavors.
@@ -2109,7 +2113,7 @@
zendUse to build, install and register a Zend
- extension.
+ extension. Enables flavors.
@@ -2167,9 +2171,30 @@
Provide defaults for fetching
PHP extensions from the PECL
- repository.
+ repository. Enables flavors.
+
+
+ flavors
+
+ Enable automatic PHP
+ flavors generation. Flavors will be generated
+ for all PHP versions, except the ones present in
+ IGNORE_WITH_PHP.
+
+
+
+
+ noflavors
+
+ Disable automatic PHP
+ flavors generation. Must only be
+ used with extensions provided by
+ PHP itself.
+
+ Variables are used to specify which
@@ -2188,25 +2213,14 @@
-
- DEFAULT_PHP_VER
-
- Selects which major version of
- PHP will be installed as a
- dependency when no PHP is
- installed yet. Default is 56.
- Possible values: 55,
- 56, and 70.
-
-
-
-
+ IGNORE_WITH_PHPThe port does not work with
- PHP of the given version.
- Possible values: 55,
- 56, and 7.
+ PHP of the given version. For
+ possible values look at the content of
+ _ALL_PHP_VERSIONS in
+ Mk/Uses/php.mk.
@@ -2261,6 +2275,51 @@
+
+ These variables are available to use in
+ PKGNAMEPREFIX or
+ PKGNAMESUFFIX:
+
+
+
+ PHP_PKGNAMEPREFIX
+
+ Contains
+ phpXY- where
+ XY is the current flavor's PHP
+ version. Use with PHP extensions and modules.
+
+
+
+
+ PHP_PKGNAMESUFFIX
+
+ Contains
+ -phpXY where
+ XY is the current flavor's PHP
+ version. Use with PHP applications.
+
+
+
+
+ PECL_PKGNAMEPREFIX
+
+ Contains
+ phpXY-pecl-
+ where 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.
+