summaryrefslogtreecommitdiffstats
path: root/dev-lang/php/files/eblits/pkg_postinst-v1.eblit
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /dev-lang/php/files/eblits/pkg_postinst-v1.eblit
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'dev-lang/php/files/eblits/pkg_postinst-v1.eblit')
-rw-r--r--dev-lang/php/files/eblits/pkg_postinst-v1.eblit76
1 files changed, 76 insertions, 0 deletions
diff --git a/dev-lang/php/files/eblits/pkg_postinst-v1.eblit b/dev-lang/php/files/eblits/pkg_postinst-v1.eblit
new file mode 100644
index 0000000..c19dd9a
--- /dev/null
+++ b/dev-lang/php/files/eblits/pkg_postinst-v1.eblit
@@ -0,0 +1,76 @@
+# Copyright 1999-2010 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-v1.eblit,v 1.4 2011/02/16 08:12:28 olemarkus Exp $
+
+eblit-php-pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP${PHP_MV}"
+ if use concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php${PHP_MV}_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php${PHP_MV}"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache2 to use mod_php
+ if use apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php${PHP_MV}
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn "To make Apache2 use php-${PHP_MV}, use"
+ ewarn " php-select apache2 php${PHP_MV}"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if use cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php${PHP_MV}
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn "To make usr/bin/php point to php-${PHP_MV}, use"
+ ewarn " php-select php php${PHP_MV}"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if use cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php${PHP_MV}
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn "To make usr/bin/php-cgi point to php-${PHP_MV}, use"
+ ewarn " php-select php-cgi php${PHP_MV}"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php${PHP_MV} > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php${PHP_MV}
+ elif [[ $exitStatus == 4 ]] ; then
+ ewarn "To make usr/bin/php-config and usr/bin/phpize point to php-${PHP_MV}, use"
+ ewarn " php-select php-devel php${PHP_MV}"
+ ewarn
+ fi
+
+ ewarn "You may have to recompile third-party extensions now"
+ ewarn "(includes every dev-php5/pecl-* package and probably others in that category)"
+ ewarn "Also make sure that you merge in the correct extension_dir ini setting for all your"
+ ewarn "php.ini files."
+ ewarn
+ ewarn "Please read the upgrade guide: http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ ewarn
+}
+
+