Project:PHP/Php-ext-source-r3 migration guide

Overview
The latest revision php-ext-source-r3.eclass of the php-ext-source eclass offer some improvements but requires a few small changes from the previous revision. These changes also affect php-ext-pecl-r3.eclass which inherits php-ext-source-r3.eclass. Changes specific to the latter are mentioned at the end.

EAPI support
The biggest change in the new revision is that only  is supported. To use php-ext-source-r3.eclass, your ebuild will need to be migrated to.

PATCHES array/variable support
Our  function now comes with support for the   array and   support. All patches in the  array/variable will be applied to each PHP slot's working directory automatically, and then   will be called (in the same directory, one per slot).

That means that functions like this:

are now redundant and can be removed in favor of.

Update DOCS variable
In the previous revision, invalid  were silently ignored. In the new revision, it is an error to include non-existent files in. Ensure that  is accurate for your ebuild before upgrading. Note: the php-ext-pecl-r2.eclass used to install package.xml automatically as part of its  handling. The new revision of that eclass does not; it used the standard  list of docs.

Rename my_conf variable
The  variable was being used to pass extra configuration to the build system. That lowercase and un-namespaced variable has been changed to. No other changes were made to that aspect of the build system, so a find/replace from  to   should suffice.

Rename PHPSAPILIST variable
The  variable limits the PHP SAPIs for which an extension is built/enabled. The variable name was not namespaced, however, so it has been renamed to. A simple find/replace from  to   should suffice.

Internal functions
The  and   functions have been marked. They are not used anywhere in the tree, so please let us know if you have a use case for these in an ebuild.

Changes for php-ext-pecl-r3.eclass
These changes apply only to the PECL extension eclass.

PHP_EXT_PECL_FILENAME variable now requires a filename
In the previous revision, the  variable was supposed to be set to something like "imagick" if you wanted   to point to "imagick-3.4.1.tgz". Now, the  variable should contain the actual full filename "imagick-3.4.1.tgz".

MY_PV no longer implicitly respected
The  variable was implicitly used in previous revisions when setting   and. In the new revision, you will need to modify those variables yourself and not rely on your value of  being used by the eclass.