summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2017-03-21 13:50:27 -0400
committerMichael Orlitzky <mjo@gentoo.org>2017-03-21 15:27:07 -0400
commiteb52e5fc00c55bb18c93beca65e3bf97a1f7ad45 (patch)
treef6a905f52db8caf4001d0ce08ce255eee7560eb8 /dev-lang
parentdev-lang/php: remove unused version 7.0.16. (diff)
downloadgentoo-eb52e5fc00c55bb18c93beca65e3bf97a1f7ad45.tar.gz
gentoo-eb52e5fc00c55bb18c93beca65e3bf97a1f7ad45.tar.bz2
gentoo-eb52e5fc00c55bb18c93beca65e3bf97a1f7ad45.zip
dev-lang/php: new revisions to phase out PHP_INI_VERSION.
These three new revisions install the "production" version of php.ini unconditionally. The changes between the two versions are minimal anway, and the production version is safer for people who don't care. A warning will be emitted for users who still have the variable set. In addition, the 5.6 and 7.0 series will now cache their ./configure test results. This is based on a similar change made in 7.1, and should speed up the build a little. Gentoo-Bug: 530002 Gentoo-Bug: 611214 Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/php/php-5.6.30-r2.ebuild (renamed from dev-lang/php/php-5.6.30-r1.ebuild)44
-rw-r--r--dev-lang/php/php-7.0.17-r1.ebuild (renamed from dev-lang/php/php-7.0.17.ebuild)44
-rw-r--r--dev-lang/php/php-7.1.3-r1.ebuild (renamed from dev-lang/php/php-7.1.3.ebuild)46
3 files changed, 55 insertions, 79 deletions
diff --git a/dev-lang/php/php-5.6.30-r1.ebuild b/dev-lang/php/php-5.6.30-r2.ebuild
index fb4eafab0a7c..bcd67542c27f 100644
--- a/dev-lang/php/php-5.6.30-r1.ebuild
+++ b/dev-lang/php/php-5.6.30-r2.ebuild
@@ -177,27 +177,22 @@ REQUIRED_USE="
PHP_MV="$(get_major_version)"
-# Allow users to install production version if they want to
-if [[ "${PHP_INI_VERSION}" == "production" ]]; then
- PHP_INI_UPSTREAM="php.ini-production"
-else
- PHP_INI_UPSTREAM="php.ini-development"
-fi
-
php_install_ini() {
local phpsapi="${1}"
# work out where we are installing the ini file
php_set_ini_dir "${phpsapi}"
- local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
- cp "${PHP_INI_UPSTREAM}" "${phpinisrc}" || die
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
# default to /tmp for save_path, bug #282768
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
# Set the extension dir
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}" || die
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
# Set the include path to point to where we want to find PEAR packages
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
@@ -227,8 +222,7 @@ php_install_ini() {
doins sapi/fpm/php-fpm.conf
fi
- dodoc php.ini-development
- dodoc php.ini-production
+ dodoc php.ini-{development,production}
}
php_set_ini_dir() {
@@ -473,6 +467,9 @@ src_configure() {
# Changed order to run it in reverse for bug #32022 and #12021.
replace-cpu-flags "k6*" "i586"
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
# Support user-passed configuration parameters
our_conf+=( ${EXTRA_ECONF:-} )
@@ -744,20 +741,15 @@ pkg_postinst() {
elog
fi
- # Only mention PHP_INI_VERSION if the user doesn't have it set.
- case "${PHP_INI_VERSION}" in
- production|development)
- ;;
- *)
- elog "This ebuild installed a version of php.ini based on"
- elog "${PHP_INI_UPSTREAM}. You can choose which version of"
- elog "php.ini to install by default by setting PHP_INI_VERSION"
- elog "to either 'production' or 'development' in your make.conf."
- elog "Both versions of php.ini can be found with the PHP docs in"
- elog "${EPREFIX}/usr/share/doc/${PF}"
- elog
- ;;
- esac
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
elog "For details on how version slotting works, please see"
elog "the wiki:"
diff --git a/dev-lang/php/php-7.0.17.ebuild b/dev-lang/php/php-7.0.17-r1.ebuild
index 959f0c1d2258..0521ed7a63fe 100644
--- a/dev-lang/php/php-7.0.17.ebuild
+++ b/dev-lang/php/php-7.0.17-r1.ebuild
@@ -164,27 +164,22 @@ REQUIRED_USE="
PHP_MV="$(get_major_version)"
-# Allow users to install production version if they want to
-if [[ "${PHP_INI_VERSION}" == "production" ]]; then
- PHP_INI_UPSTREAM="php.ini-production"
-else
- PHP_INI_UPSTREAM="php.ini-development"
-fi
-
php_install_ini() {
local phpsapi="${1}"
# work out where we are installing the ini file
php_set_ini_dir "${phpsapi}"
- local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
- cp "${PHP_INI_UPSTREAM}" "${phpinisrc}" || die
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
# default to /tmp for save_path, bug #282768
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
# Set the extension dir
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}" || die
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
# Set the include path to point to where we want to find PEAR packages
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
@@ -216,8 +211,7 @@ php_install_ini() {
doins sapi/fpm/www.conf
fi
- dodoc php.ini-development
- dodoc php.ini-production
+ dodoc php.ini-{development,production}
}
php_set_ini_dir() {
@@ -432,6 +426,9 @@ src_configure() {
# Changed order to run it in reverse for bug #32022 and #12021.
replace-cpu-flags "k6*" "i586"
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
# Support user-passed configuration parameters
our_conf+=( ${EXTRA_ECONF:-} )
@@ -710,20 +707,15 @@ pkg_postinst() {
elog
fi
- # Only mention PHP_INI_VERSION if the user doesn't have it set.
- case "${PHP_INI_VERSION}" in
- production|development)
- ;;
- *)
- elog "This ebuild installed a version of php.ini based on"
- elog "${PHP_INI_UPSTREAM}. You can choose which version of"
- elog "php.ini to install by default by setting PHP_INI_VERSION"
- elog "to either 'production' or 'development' in your make.conf."
- elog "Both versions of php.ini can be found with the PHP docs in"
- elog "${EPREFIX}/usr/share/doc/${PF}"
- elog
- ;;
- esac
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
elog "For details on how version slotting works, please see"
elog "the wiki:"
diff --git a/dev-lang/php/php-7.1.3.ebuild b/dev-lang/php/php-7.1.3-r1.ebuild
index 692625bee3b3..98b84526328e 100644
--- a/dev-lang/php/php-7.1.3.ebuild
+++ b/dev-lang/php/php-7.1.3-r1.ebuild
@@ -164,27 +164,22 @@ REQUIRED_USE="
PHP_MV="$(get_major_version)"
-# Allow users to install production version if they want to
-if [[ "${PHP_INI_VERSION}" == "production" ]]; then
- PHP_INI_UPSTREAM="php.ini-production"
-else
- PHP_INI_UPSTREAM="php.ini-development"
-fi
-
php_install_ini() {
local phpsapi="${1}"
# work out where we are installing the ini file
php_set_ini_dir "${phpsapi}"
- local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
- cp "${PHP_INI_UPSTREAM}" "${phpinisrc}" || die
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
# default to /tmp for save_path, bug #282768
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
# Set the extension dir
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}" || die
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
# Set the include path to point to where we want to find PEAR packages
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
@@ -216,8 +211,7 @@ php_install_ini() {
doins sapi/fpm/www.conf
fi
- dodoc php.ini-development
- dodoc php.ini-production
+ dodoc php.ini-{development,production}
}
php_set_ini_dir() {
@@ -432,8 +426,11 @@ src_configure() {
# Changed order to run it in reverse for bug #32022 and #12021.
replace-cpu-flags "k6*" "i586"
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
# Support user-passed configuration parameters
- our_conf+=( --cache-file="${T}/config.cache" ${EXTRA_ECONF:-} )
+ our_conf+=( ${EXTRA_ECONF:-} )
# Support the Apache2 extras, they must be set globally for all
# SAPIs to work correctly, especially for external PHP extensions
@@ -710,20 +707,15 @@ pkg_postinst() {
elog
fi
- # Only mention PHP_INI_VERSION if the user doesn't have it set.
- case "${PHP_INI_VERSION}" in
- production|development)
- ;;
- *)
- elog "This ebuild installed a version of php.ini based on"
- elog "${PHP_INI_UPSTREAM}. You can choose which version of"
- elog "php.ini to install by default by setting PHP_INI_VERSION"
- elog "to either 'production' or 'development' in your make.conf."
- elog "Both versions of php.ini can be found with the PHP docs in"
- elog "${EPREFIX}/usr/share/doc/${PF}"
- elog
- ;;
- esac
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
elog "For details on how version slotting works, please see"
elog "the wiki:"