summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTal Peer <coredumb@gentoo.org>2003-06-28 20:23:40 +0000
committerTal Peer <coredumb@gentoo.org>2003-06-28 20:23:40 +0000
commit780d11c671ff2e1d185719286480c067dec5a23b (patch)
tree8e72e58a21f5ef50a17efb98204a1431521cc5ed /eclass/php-ext.eclass
parentphp.net does that, not php :) (diff)
downloadgentoo-2-780d11c671ff2e1d185719286480c067dec5a23b.tar.gz
gentoo-2-780d11c671ff2e1d185719286480c067dec5a23b.tar.bz2
gentoo-2-780d11c671ff2e1d185719286480c067dec5a23b.zip
Added a variable to allow not adding an extension line to php.ini
Diffstat (limited to 'eclass/php-ext.eclass')
-rw-r--r--eclass/php-ext.eclass30
1 files changed, 19 insertions, 11 deletions
diff --git a/eclass/php-ext.eclass b/eclass/php-ext.eclass
index 5eacd4168e27..ba0a683930ea 100644
--- a/eclass/php-ext.eclass
+++ b/eclass/php-ext.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext.eclass,v 1.1 2003/05/15 18:45:26 coredumb Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext.eclass,v 1.2 2003/06/28 20:23:40 coredumb Exp $
#
# Author: Tal Peer <coredumb@gentoo.org>
#
@@ -17,10 +17,14 @@ EXPORT_FUNCTIONS src_compile src_install pkg_postinst
# The extension name, this must be set, otherwise we die.
[ -z "$PHP_EXT_NAME" ] && die "No module name specified for the php-ext eclass."
-# Whether the extensions is a Zend Engine extension
+# Wether the extensions is a Zend Engine extension
#(defaults to "no" and if you don't know what is it, you don't need it.)
[ -z "$PHP_EXT_ZENDEXT" ] && PHP_EXT_ZENDEXT="no"
+# Wether or not to add a line in the php.ini for the extension
+# (defaults to "yes" and shouldn't be changed in most cases)
+[ -z "$PHP_EXT_INI" ] && PHP_EXT_INI="yes"
+
# ---end ebuild configurable settings
DEPEND="${DEPEND}
@@ -45,16 +49,20 @@ php-ext_src_install() {
}
php-ext_pkg_postinst() {
- if [ `grep ${EXT_DIR}/${PHP_EXT_NAME}.so /etc/php4/php.ini` ] ; then
- einfo "No changes made to php.ini"
- else
- if [ "$PHP_EXT_ZENDEXT" = "yes" ] ; then
- echo zend_extension=${EXT_DIR}/${PHP_EXT_NAME}.so >> /etc/php4/php.ini
+ if [ "$PHP_EXT_INI" = "yes" ] ; then
+ if [ `grep ${EXT_DIR}/${PHP_EXT_NAME}.so /etc/php4/php.ini` ] ; then
+ einfo "No changes made to php.ini"
else
- echo extension=${EXT_DIR}/${PHP_EXT_NAME}.so >> /etc/php4/php.ini
- fi
+ if [ "$PHP_EXT_ZENDEXT" = "yes" ] ; then
+ echo zend_extension=${EXT_DIR}/${PHP_EXT_NAME}.so >> /etc/php4/php.ini
+ else
+ echo extension=${EXT_DIR}/${PHP_EXT_NAME}.so >> /etc/php4/php.ini
+ fi
- einfo "${PHP_EXT_NAME} has been added to php.ini"
- einfo "Please check phpinfo() output to verify that ${PHP_EXT_NAME} is loaded."
+ einfo "${PHP_EXT_NAME} has been added to php.ini"
+ einfo "Please check phpinfo() output to verify that ${PHP_EXT_NAME} is loaded."
+ fi
+ else
+ einfo "No changes made to php.ini"
fi
}