summaryrefslogtreecommitdiffstats
path: root/dev-lang/php/files/eblits/pkg_postinst-v2.eblit
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/php/files/eblits/pkg_postinst-v2.eblit')
-rw-r--r--dev-lang/php/files/eblits/pkg_postinst-v2.eblit64
1 files changed, 64 insertions, 0 deletions
diff --git a/dev-lang/php/files/eblits/pkg_postinst-v2.eblit b/dev-lang/php/files/eblits/pkg_postinst-v2.eblit
new file mode 100644
index 0000000..70bb7e8
--- /dev/null
+++ b/dev-lang/php/files/eblits/pkg_postinst-v2.eblit
@@ -0,0 +1,64 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_postinst-v2.eblit,v 1.12 2011/02/18 09:18:38 olemarkus Exp $
+
+eblit-php-pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5"
+ apache-module_pkg_postinst
+ fi
+
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "You may have to recompile third-party extensions now"
+ elog "(includes every dev-php5/pecl-* package and probably others in that category)"
+ elog "Make sure that PHP_TARGETS in /etc/make.conf includes php${SLOT/./-} in order"
+ elog "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 enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php5/suhosin"
+ ewarn
+ fi
+}
+