From owner-svn-doc-head@freebsd.org Tue Mar 13 11:22:49 2018 Return-Path: Delivered-To: svn-doc-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1505F3FAE5; Tue, 13 Mar 2018 11:22:49 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63DBD77C9E; Tue, 13 Mar 2018 11:22:49 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5EBB31947D; Tue, 13 Mar 2018 11:22:49 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DBMnSN053728; Tue, 13 Mar 2018 11:22:49 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DBMn1T053725; Tue, 13 Mar 2018 11:22:49 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201803131122.w2DBMn1T053725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Tue, 13 Mar 2018 11:22:49 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r51481 - in head/en_US.ISO8859-1/books/porters-handbook: flavors special uses X-SVN-Group: doc-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: in head/en_US.ISO8859-1/books/porters-handbook: flavors special uses X-SVN-Commit-Revision: 51481 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 11:22:49 -0000 Author: mat Date: Tue Mar 13 11:22:48 2018 New Revision: 51481 URL: https://svnweb.freebsd.org/changeset/doc/51481 Log: Document PHP flavors, and related PEAR and Horde changes. Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D14597 Modified: head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml Tue Mar 13 01:04:26 2018 (r51480) +++ head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml Tue Mar 13 11:22:48 2018 (r51481) @@ -262,6 +262,73 @@ lite_PKGNAMESUFFIX= -lite Flavors Auto-Activation + + <literal>USES=php</literal> 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 <literal>USES=php</literal> 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 + + + + <literal>USES=python</literal> and Flavors @@ -306,7 +373,7 @@ USE_PYTHON= distutils allflavors 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 Modified: head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Tue Mar 13 01:04:26 2018 (r51480) +++ head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Tue Mar 13 11:22:48 2018 (r51481) @@ -3631,6 +3631,28 @@ USES= pear .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. + + <application>Horde</application> Modules @@ -3677,6 +3699,14 @@ SOCKETS_USE= PHP=sockets .include <bsd.port.mk> + + + As Horde modules are also + PEAR modules they will also + automatically be flavorized using PHP + flavors. + Modified: head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml Tue Mar 13 01:04:26 2018 (r51480) +++ head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml Tue Mar 13 11:22:48 2018 (r51481) @@ -2014,13 +2014,15 @@ USE_MATE= menus:build intlhack <literal>pear</literal> - Possible arguments: (none) + Possible arguments: env Adds 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 @@ USE_MATE= menus:build intlhack build, cli, cgi, mod, web, embed, - pecl + pecl, flavors, + noflavors Provide support for PHP. Add a runtime dependency on the default PHP version, phpize Use to build a PHP - extension. + extension. Enables flavors. @@ -2101,7 +2104,8 @@ USE_MATE= menus:build intlhack ext Use to build, install and register a - PHP extension. + PHP extension. Enables + flavors. @@ -2109,7 +2113,7 @@ USE_MATE= menus:build intlhack zend Use to build, install and register a Zend - extension. + extension. Enables flavors. @@ -2167,9 +2171,30 @@ USE_MATE= menus:build intlhack 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 @@ USE_MATE= menus:build intlhack - - 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_PHP The 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 @@ PHP_MOD_PRIO= 40 + + 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. +