dev-lang/php: enforce what was an elog warning with REQUIRED_USE.
authorMichael Orlitzky <mjo@gentoo.org>
Thu, 28 Jan 2016 01:43:01 +0000 (20:43 -0500)
committerMichael Orlitzky <mjo@gentoo.org>
Thu, 28 Jan 2016 14:45:39 +0000 (09:45 -0500)
The interactive "php -a" command-line interface will hang unless PHP
is built with USE=readline. This used to be an elog warning, but was
rather easy to overlook and mysterious to those who hit the bug. We
already have REQUIRED_USE for our other flags, so it makes sense to
enforce the cli dependency on readline there.

Package-Manager: portage-2.2.26

dev-lang/php/php-5.6.17-r5.ebuild [moved from dev-lang/php/php-5.6.17-r4.ebuild with 99% similarity]
dev-lang/php/php-7.0.2-r5.ebuild [moved from dev-lang/php/php-7.0.2-r4.ebuild with 99% similarity]

similarity index 99%
rename from dev-lang/php/php-5.6.17-r4.ebuild
rename to dev-lang/php/php-5.6.17-r5.ebuild
index 184650ea954ca07190d2da43b8d961b1104d5843..82e7a03ede15d24123d06cd2d4b917c79ddca81f 100644 (file)
@@ -165,7 +165,9 @@ DEPEND="${DEPEND}
 
 php="=${CATEGORY}/${PF}"
 
+# Without USE=readline, the interactive "php -a" CLI will hang.
 REQUIRED_USE="
+       cli? ( readline )
        truetype? ( gd )
        vpx? ( gd )
        cjk? ( gd )
@@ -774,11 +776,6 @@ pkg_postinst() {
        elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes"
        elog "php${SLOT/./-} in order to compile extensions for the ${SLOT} ABI."
        elog
-       if ! use readline && use cli ; then
-               ewarn "Note that in order to use php interactivly, you need to"
-               ewarn "enable the readline USE flag or php -a will hang."
-               elog
-       fi
        elog "This ebuild installed a version of php.ini based on"
        elog "php.ini-${PHP_INI_VERSION}. You can choose which version of"
        elog "php.ini to install by default by setting PHP_INI_VERSION"
similarity index 99%
rename from dev-lang/php/php-7.0.2-r4.ebuild
rename to dev-lang/php/php-7.0.2-r5.ebuild
index f5d481896a9827d393e481f58348282dbff510ab..e502be41dadbf7693e504b859a0558f65567db77 100644 (file)
@@ -158,7 +158,9 @@ DEPEND="${DEPEND}
 
 php="=${CATEGORY}/${PF}"
 
+# Without USE=readline, the interactive "php -a" CLI will hang.
 REQUIRED_USE="
+       cli? ( readline )
        truetype? ( gd )
        vpx? ( gd )
        cjk? ( gd )
@@ -766,11 +768,6 @@ pkg_postinst() {
        elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes"
        elog "php${SLOT/./-} in order to compile extensions for the ${SLOT} ABI."
        elog
-       if ! use readline && use cli ; then
-               ewarn "Note that in order to use php interactivly, you need to"
-               ewarn "enable the readline USE flag or php -a will hang."
-               elog
-       fi
        elog "This ebuild installed a version of php.ini based on"
        elog "php.ini-${PHP_INI_VERSION}. You can choose which version of"
        elog "php.ini to install by default by setting PHP_INI_VERSION"