summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Markus With <olemarkus@gentoo.org>2011-03-13 08:44:57 +0000
committerOle Markus With <olemarkus@gentoo.org>2011-03-13 08:44:57 +0000
commitfa96345f4245a6f5e79479ea1455b345a6a1be73 (patch)
tree1ea1ad63977cc360ce18f9030c70eb037da6c002 /dev-php/eaccelerator
parentppc/ppc64 stable wrt #353436 (diff)
downloadgentoo-2-fa96345f4245a6f5e79479ea1455b345a6a1be73.tar.gz
gentoo-2-fa96345f4245a6f5e79479ea1455b345a6a1be73.tar.bz2
gentoo-2-fa96345f4245a6f5e79479ea1455b345a6a1be73.zip
Added patch that fixes an open_basedir issue. Bug 356425
(Portage version: 2.1.9.41/cvs/Linux x86_64)
Diffstat (limited to 'dev-php/eaccelerator')
-rw-r--r--dev-php/eaccelerator/ChangeLog10
-rw-r--r--dev-php/eaccelerator/eaccelerator-0.9.6.1-r4.ebuild98
-rw-r--r--dev-php/eaccelerator/files/eaccelerator-openbasedir.patch15
3 files changed, 121 insertions, 2 deletions
diff --git a/dev-php/eaccelerator/ChangeLog b/dev-php/eaccelerator/ChangeLog
index 3c469a84eb22..b41676290a00 100644
--- a/dev-php/eaccelerator/ChangeLog
+++ b/dev-php/eaccelerator/ChangeLog
@@ -1,6 +1,12 @@
-# ChangeLog for dev-php5/eaccelerator
+# ChangeLog for dev-php/eaccelerator
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/ChangeLog,v 1.20 2011/03/13 08:08:22 olemarkus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/ChangeLog,v 1.21 2011/03/13 08:44:57 olemarkus Exp $
+
+*eaccelerator-0.9.6.1-r4 (13 Mar 2011)
+
+ 13 Mar 2011; <olemarkus@gentoo.org> +eaccelerator-0.9.6.1-r4.ebuild,
+ +files/eaccelerator-openbasedir.patch:
+ Added patch that fixes an open_basedir issue. Bug 356425
*eaccelerator-0.9.6.1-r3 (05 Jan 2011)
diff --git a/dev-php/eaccelerator/eaccelerator-0.9.6.1-r4.ebuild b/dev-php/eaccelerator/eaccelerator-0.9.6.1-r4.ebuild
new file mode 100644
index 000000000000..ecfdcedb4df9
--- /dev/null
+++ b/dev-php/eaccelerator/eaccelerator-0.9.6.1-r4.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/eaccelerator-0.9.6.1-r4.ebuild,v 1.1 2011/03/13 08:44:57 olemarkus Exp $
+
+PHP_EXT_NAME="eaccelerator"
+PHP_EXT_INI="yes"
+PHP_EXT_ZENDEXT="no"
+
+EAPI="2"
+
+[[ -z "${EACCELERATOR_CACHEDIR}" ]] && EACCELERATOR_CACHEDIR="/var/cache/eaccelerator-php5/"
+
+inherit php-ext-source-r2 eutils depend.apache
+
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="A PHP Accelerator & Encoder."
+HOMEPAGE="http://www.eaccelerator.net/"
+SRC_URI="http://bart.eaccelerator.net/source/${PV}/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug disassembler inode doccommentinclusion session"
+
+DEPEND="!dev-php5/pecl-apc !dev-php5/xcache"
+RDEPEND="${DEPEND}
+ >=dev-lang/php-5.1[zlib,session?]
+ virtual/httpd-php
+"
+
+# Webserver user and group, here for Apache by default
+HTTPD_USER="${HTTPD_USER:-apache}"
+HTTPD_GROUP="${HTTPD_GROUP:-apache}"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+
+ 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_prepare() {
+ epatch "${FILESDIR}/eaccelerator-openbasedir.patch"
+ php-ext-source-r2_src_prepare
+}
+
+src_configure() {
+ my_conf="--enable-eaccelerator=shared --with-eaccelerator-userid=`id -u ${HTTPD_USER}`"
+ use debug && my_conf="${my_conf} --with-eaccelerator-debug"
+ use disassembler && my_conf="${my_conf} --with-eaccelerator-disassembler"
+ ! use inode && my_conf="${my_conf} --without-eaccelerator-use-inode"
+ use doccommentinclusion && my_conf="${my_conf} --with-eaccelerator-doc-comment-inclusion"
+ php-ext-source-r2_src_configure
+}
+
+src_install() {
+ php-ext-source-r2_src_install
+
+ keepdir "${EACCELERATOR_CACHEDIR}"
+ fowners ${HTTPD_USER}:${HTTPD_GROUP} "${EACCELERATOR_CACHEDIR}"
+ fperms 750 "${EACCELERATOR_CACHEDIR}"
+
+ insinto "/usr/share/${PF}"
+ doins -r doc/php/
+ dodoc AUTHORS ChangeLog NEWS README
+
+ php-ext-source-r2_addtoinifiles "eaccelerator.shm_size" '"28"'
+ php-ext-source-r2_addtoinifiles "eaccelerator.cache_dir" "\"${EACCELERATOR_CACHEDIR}\""
+ php-ext-source-r2_addtoinifiles "eaccelerator.enable" '"1"'
+ php-ext-source-r2_addtoinifiles "eaccelerator.optimizer" '"1"'
+ php-ext-source-r2_addtoinifiles "eaccelerator.debug" '"0"'
+ php-ext-source-r2_addtoinifiles ";eaccelerator.log_file" '"/var/log/eaccelerator_log"'
+ php-ext-source-r2_addtoinifiles "eaccelerator.check_mtime" '"1"'
+ php-ext-source-r2_addtoinifiles "eaccelerator.filter" '""'
+ php-ext-source-r2_addtoinifiles "eaccelerator.shm_ttl" '"0"'
+ php-ext-source-r2_addtoinifiles "eaccelerator.shm_prune_period" '"0"'
+ php-ext-source-r2_addtoinifiles "eaccelerator.shm_only" '"0"'
+ php-ext-source-r2_addtoinifiles ";eaccelerator.allowed_admin_path" '"/path/where/admin/files/shall/be/allowed"'
+}
+
+pkg_postinst() {
+ elog "Please see the files in ${ROOT}usr/share/${PF}/ for some"
+ elog "examples and informations on how to use the functions that"
+ elog "eAccelerator adds to PHP."
+}
diff --git a/dev-php/eaccelerator/files/eaccelerator-openbasedir.patch b/dev-php/eaccelerator/files/eaccelerator-openbasedir.patch
new file mode 100644
index 000000000000..27f2c484fbe4
--- /dev/null
+++ b/dev-php/eaccelerator/files/eaccelerator-openbasedir.patch
@@ -0,0 +1,15 @@
+Fixes issue with open_basedir
+Gentoo bug: 356425
+Upstream bug: http://eaccelerator.net/ticket/396
+
+--- eaccelerator.c.old 2010-05-31 23:21:14.000000000 +0300
++++ eaccelerator.c 2010-09-23 10:42:11.218144970 +0300
+@@ -864,7 +864,7 @@
+ EACCELERATOR_PROTECT();
+ if (p != NULL && p->op_array != NULL) {
+ /* only restore file when open_basedir allows it */
+- if (php_check_open_basedir(realname TSRMLS_CC)) {
++ if (php_check_open_basedir(p->realfilename TSRMLS_CC)) {
+ return NULL;
+ }
+ EAG(class_entry) = NULL;