summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Ullmann <jokey@gentoo.org>2007-08-20 21:00:40 +0000
committerMarkus Ullmann <jokey@gentoo.org>2007-08-20 21:00:40 +0000
commite712e3ff0c306774723f86d84ae1dc52c8b096ad (patch)
tree92024ddad5ddde7ba6c09480b7d30891165477e2 /dev-php4/eaccelerator/eaccelerator-0.9.5.1.ebuild
parentStable on x86 wrt bug #187234 (diff)
downloadgentoo-2-e712e3ff0c306774723f86d84ae1dc52c8b096ad.tar.gz
gentoo-2-e712e3ff0c306774723f86d84ae1dc52c8b096ad.tar.bz2
gentoo-2-e712e3ff0c306774723f86d84ae1dc52c8b096ad.zip
Porting from project overlay
(Portage version: 2.1.3.5)
Diffstat (limited to 'dev-php4/eaccelerator/eaccelerator-0.9.5.1.ebuild')
-rw-r--r--dev-php4/eaccelerator/eaccelerator-0.9.5.1.ebuild109
1 files changed, 109 insertions, 0 deletions
diff --git a/dev-php4/eaccelerator/eaccelerator-0.9.5.1.ebuild b/dev-php4/eaccelerator/eaccelerator-0.9.5.1.ebuild
new file mode 100644
index 000000000000..8452c41d696d
--- /dev/null
+++ b/dev-php4/eaccelerator/eaccelerator-0.9.5.1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-php4/eaccelerator/eaccelerator-0.9.5.1.ebuild,v 1.1 2007/08/20 21:00:40 jokey Exp $
+
+PHP_EXT_NAME="eaccelerator"
+PHP_EXT_INI="yes"
+PHP_EXT_ZENDEXT="yes"
+
+[[ -z "${EACCELERATOR_CACHEDIR}" ]] && EACCELERATOR_CACHEDIR="/var/cache/eaccelerator-php4/"
+
+inherit php-ext-source-r1 depend.apache
+
+KEYWORDS="~amd64 ~ppc64 ~sparc ~x86"
+
+DESCRIPTION="A PHP Accelerator & Encoder."
+HOMEPAGE="http://www.eaccelerator.net/"
+SRC_URI="mirror://sourceforge/eaccelerator/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="contentcache debug disassembler inode session sharedmem"
+
+DEPEND="!dev-php4/pecl-apc !dev-php4/xcache"
+RDEPEND="${DEPEND}"
+
+# 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
+
+ require_php_sapi_from cgi apache2
+
+ if use session ; then
+ require_php_with_use session zlib
+ 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_compile() {
+ has_php
+
+ my_conf="--enable-eaccelerator=shared --with-eaccelerator-userid=`id -u ${HTTPD_USER}`"
+
+ use contentcache && my_conf="${my_conf} --with-eaccelerator-content-caching"
+ 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 session && my_conf="${my_conf} --with-eaccelerator-sessions"
+ use sharedmem && my_conf="${my_conf} --with-eaccelerator-shared-memory"
+
+ php-ext-source-r1_src_compile
+}
+
+src_install() {
+ php-ext-source-r1_src_install
+
+ keepdir "${EACCELERATOR_CACHEDIR}"
+ fowners ${HTTPD_USER}:${HTTPD_GROUP} "${EACCELERATOR_CACHEDIR}"
+ fperms 750 "${EACCELERATOR_CACHEDIR}"
+
+ insinto "/usr/share/${PN}-php4/"
+ doins -r doc/php/
+ dodoc-php AUTHORS ChangeLog COPYING NEWS README README.eLoader
+
+ php-ext-base-r1_addtoinifiles "eaccelerator.shm_size" '"28"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.cache_dir" "\"${EACCELERATOR_CACHEDIR}\""
+ php-ext-base-r1_addtoinifiles "eaccelerator.enable" '"1"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.optimizer" '"1"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.debug" '"0"'
+ php-ext-base-r1_addtoinifiles ";eaccelerator.log_file" '"/var/log/eaccelerator_log"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.check_mtime" '"1"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.filter" '""'
+ php-ext-base-r1_addtoinifiles "eaccelerator.shm_max" '"0"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.shm_ttl" '"0"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.shm_prune_period" '"0"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.shm_only" '"0"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.compress" '"1"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.compress_level" '"9"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.keys" '"shm_and_disk"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.sessions" '"shm_and_disk"'
+ php-ext-base-r1_addtoinifiles "eaccelerator.content" '"shm_and_disk"'
+ php-ext-base-r1_addtoinifiles ";eaccelerator.allowed_admin_path" '"/path/where/admin/files/shall/be/allowed"'
+}
+
+pkg_postinst() {
+ elog "Please see the files in ${ROOT}usr/share/${PN}-php4/ for some"
+ elog "examples and informations on how to use the functions that"
+ elog "eAccelerator adds to PHP."
+}