From 1798839ee565695baa83ea68f08993fa12579ebf Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 9 Dec 2016 09:18:52 -0500 Subject: [PATCH] dev-lang/php: add "coverage" USE flag to build with --enable-gcov. We add three new revisions, one for each supported branch of PHP. The new revisions have a "coverage" flag, which was chosen because a few other packages in ::gentoo have decided on the same flag name. When enabled, USE=coverage will pull in dev-util/lcov from the Linux Test Project, and PHP will be built with --enable-gcov. Since users won't be running code coverage reports on the PHP source tree itself (at least not the one used by their package manager), this is probably only useful for extension developers who would like to run code coverage reports on the test suites for their extensions. It also requires GCC to work, since lcov wraps GCC's gcov. Both of those caveats have been mentioned in the USE flag description. Gentoo-Bug: 542178 Package-Manager: portage-2.3.0 --- dev-lang/php/metadata.xml | 1 + dev-lang/php/{php-5.6.28-r1.ebuild => php-5.6.28-r2.ebuild} | 4 +++- dev-lang/php/{php-7.0.14.ebuild => php-7.0.14-r1.ebuild} | 4 +++- dev-lang/php/{php-7.1.0-r2.ebuild => php-7.1.0-r3.ebuild} | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) rename dev-lang/php/{php-5.6.28-r1.ebuild => php-5.6.28-r2.ebuild} (99%) rename dev-lang/php/{php-7.0.14.ebuild => php-7.0.14-r1.ebuild} (99%) rename dev-lang/php/{php-7.1.0-r2.ebuild => php-7.1.0-r3.ebuild} (99%) diff --git a/dev-lang/php/metadata.xml b/dev-lang/php/metadata.xml index 66ecbe7d4a77..64d6bb84b891 100644 --- a/dev-lang/php/metadata.xml +++ b/dev-lang/php/metadata.xml @@ -7,6 +7,7 @@ Enable CLI SAPI + Include gcov symbols for test coverage and lcov reports. Only useful for extension developers, and requires GCC. Enable embed SAPI Add supports Enchant spelling library. Add fileinfo extension support diff --git a/dev-lang/php/php-5.6.28-r1.ebuild b/dev-lang/php/php-5.6.28-r2.ebuild similarity index 99% rename from dev-lang/php/php-5.6.28-r1.ebuild rename to dev-lang/php/php-5.6.28-r2.ebuild index 735757389db3..d0446a119ab4 100644 --- a/dev-lang/php/php-5.6.28-r1.ebuild +++ b/dev-lang/php/php-5.6.28-r2.ebuild @@ -30,7 +30,7 @@ IUSE="${IUSE} threads" IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk - crypt +ctype curl debug + coverage crypt +ctype curl debug enchant exif frontbase +fileinfo +filter firebird flatfile ftp gd gdbm gmp +hash +iconv imap inifile intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl @@ -63,6 +63,7 @@ COMMON_DEPEND=" media-libs/libpng:0= sys-libs/zlib ) ) + coverage? ( dev-util/lcov ) crypt? ( >=dev-libs/libmcrypt-2.4 ) curl? ( >=net-misc/curl-7.10.5 ) enchant? ( app-text/enchant ) @@ -301,6 +302,7 @@ src_configure() { $(use_enable bcmath bcmath) $(use_with bzip2 bz2 "${EPREFIX}/usr") $(use_enable calendar calendar) + $(use_enable coverage gcov) $(use_enable ctype ctype) $(use_with curl curl "${EPREFIX}/usr") $(use_enable xml dom) diff --git a/dev-lang/php/php-7.0.14.ebuild b/dev-lang/php/php-7.0.14-r1.ebuild similarity index 99% rename from dev-lang/php/php-7.0.14.ebuild rename to dev-lang/php/php-7.0.14-r1.ebuild index ecc4bce83cd0..da9417192ca0 100644 --- a/dev-lang/php/php-7.0.14.ebuild +++ b/dev-lang/php/php-7.0.14-r1.ebuild @@ -30,7 +30,7 @@ IUSE="${IUSE} threads" IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk - crypt +ctype curl debug + coverage crypt +ctype curl debug enchant exif frontbase +fileinfo +filter firebird flatfile ftp gd gdbm gmp +hash +iconv imap inifile intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl @@ -63,6 +63,7 @@ COMMON_DEPEND=" media-libs/libpng:0= sys-libs/zlib ) ) + coverage? ( dev-util/lcov ) crypt? ( >=dev-libs/libmcrypt-2.4 ) curl? ( >=net-misc/curl-7.10.5 ) enchant? ( app-text/enchant ) @@ -290,6 +291,7 @@ src_configure() { $(use_enable bcmath bcmath) $(use_with bzip2 bz2 "${EPREFIX}/usr") $(use_enable calendar calendar) + $(use_enable coverage gcov) $(use_enable ctype ctype) $(use_with curl curl "${EPREFIX}/usr") $(use_enable xml dom) diff --git a/dev-lang/php/php-7.1.0-r2.ebuild b/dev-lang/php/php-7.1.0-r3.ebuild similarity index 99% rename from dev-lang/php/php-7.1.0-r2.ebuild rename to dev-lang/php/php-7.1.0-r3.ebuild index d0298d28bff5..2eca60ab0540 100644 --- a/dev-lang/php/php-7.1.0-r2.ebuild +++ b/dev-lang/php/php-7.1.0-r3.ebuild @@ -30,7 +30,7 @@ IUSE="${IUSE} threads" IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk - crypt +ctype curl debug + coverage crypt +ctype curl debug enchant exif frontbase +fileinfo +filter firebird flatfile ftp gd gdbm gmp +hash +iconv imap inifile intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl @@ -63,6 +63,7 @@ COMMON_DEPEND=" media-libs/libpng:0= sys-libs/zlib ) ) + coverage? ( dev-util/lcov ) crypt? ( >=dev-libs/libmcrypt-2.4 ) curl? ( >=net-misc/curl-7.10.5 ) enchant? ( app-text/enchant ) @@ -264,6 +265,7 @@ src_configure() { $(use_enable bcmath bcmath) $(use_with bzip2 bz2 "${EPREFIX}/usr") $(use_enable calendar calendar) + $(use_enable coverage gcov) $(use_enable ctype ctype) $(use_with curl curl "${EPREFIX}/usr") $(use_enable xml dom) -- 2.26.2