diff options
Diffstat (limited to 'dev-php5/eaccelerator/eaccelerator-0.9.5.1.ebuild')
-rw-r--r-- | dev-php5/eaccelerator/eaccelerator-0.9.5.1.ebuild | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/dev-php5/eaccelerator/eaccelerator-0.9.5.1.ebuild b/dev-php5/eaccelerator/eaccelerator-0.9.5.1.ebuild index c58503d46523..a1934ee1d3fa 100644 --- a/dev-php5/eaccelerator/eaccelerator-0.9.5.1.ebuild +++ b/dev-php5/eaccelerator/eaccelerator-0.9.5.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php5/eaccelerator/eaccelerator-0.9.5.1.ebuild,v 1.1 2007/05/12 14:28:32 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php5/eaccelerator/eaccelerator-0.9.5.1.ebuild,v 1.2 2007/08/20 21:02:53 jokey Exp $ PHP_EXT_NAME="eaccelerator" PHP_EXT_INI="yes" @@ -8,7 +8,7 @@ PHP_EXT_ZENDEXT="yes" [[ -z "${EACCELERATOR_CACHEDIR}" ]] && EACCELERATOR_CACHEDIR="/var/cache/eaccelerator-php5/" -inherit php-ext-source-r1 +inherit php-ext-source-r1 eutils depend.apache KEYWORDS="~amd64 ~sparc ~x86" @@ -22,11 +22,12 @@ IUSE="contentcache debug disassembler inode session sharedmem" DEPEND="!dev-php5/pecl-apc !dev-php5/xcache" RDEPEND="${DEPEND}" -# Webserver user and group, here for Apache. -HTTPD_USER="apache" -HTTPD_GROUP="apache" +# Webserver user and group, here for Apache by default +HTTPD_USER="${HTTPD_USER:-apache}" +HTTPD_GROUP="${HTTPD_GROUP:-apache}" need_php_by_category +want_apache pkg_setup() { has_php @@ -38,6 +39,27 @@ pkg_setup() { else require_php_with_use zlib fi + + if ! use apache2 ; then + if [[ ${HTTPD_USER} == "apache" ]] || [[ ${HTTPD_GROUP} == "apache" ]] ; then + eerror "You did not enable apache2 USE flag, so you need to define" + eerror "the user and group that will be used for ${PN} yourself." + eerror + eerror "This should (generally) match the user and group that your webserver uses, e.g.:" + eerror "HTTPD_USER=\"lighttpd\" HTTPD_GROUP=\"lighttpd\" if using www-servers/lighttpd" + eerror + die "Either enable USE=\"apache2\" or re-emerge this with HTTPD_USER and HTTPD_GROUP set" + else + enewgroup ${HTTPD_GROUP} + enewuser ${HTTPD_USER} -1 -1 /var/www ${HTTPD_GROUP} + fi + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-optimize-catch-exceptions.patch } src_compile() { |