/[gentoo-x86]/dev-php5/eaccelerator/eaccelerator-0.9.5.3.ebuild
Gentoo

Contents of /dev-php5/eaccelerator/eaccelerator-0.9.5.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Aug 14 11:00:24 2009 UTC (8 years, 2 months ago) by a3li
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Non-maintainer commit: Revbump to remove the vulnerable encoder for security bug 277293.
(Portage version: 2.2_rc33/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-php5/eaccelerator/eaccelerator-0.9.5.3.ebuild,v 1.2 2009/05/26 17:00:42 arfrever Exp $
4
5 PHP_EXT_NAME="eaccelerator"
6 PHP_EXT_INI="yes"
7 PHP_EXT_ZENDEXT="yes"
8
9 [[ -z "${EACCELERATOR_CACHEDIR}" ]] && EACCELERATOR_CACHEDIR="/var/cache/eaccelerator-php5/"
10
11 inherit php-ext-source-r1 eutils depend.apache
12
13 KEYWORDS="~amd64 ~sparc ~x86"
14
15 DESCRIPTION="A PHP Accelerator & Encoder."
16 HOMEPAGE="http://www.eaccelerator.net/"
17 SRC_URI="http://bart.eaccelerator.net/source/${PV}/${P}.tar.bz2"
18 LICENSE="GPL-2"
19 SLOT="0"
20 IUSE="contentcache debug disassembler inode session sharedmem"
21
22 DEPEND="!dev-php5/pecl-apc !dev-php5/xcache"
23 RDEPEND="${DEPEND}"
24
25 # Webserver user and group, here for Apache by default
26 HTTPD_USER="${HTTPD_USER:-apache}"
27 HTTPD_GROUP="${HTTPD_GROUP:-apache}"
28
29 need_php_by_category
30 want_apache
31
32 pkg_setup() {
33 depend.apache_pkg_setup
34
35 has_php
36
37 require_php_sapi_from cgi apache2
38
39 if use session ; then
40 require_php_with_use session zlib
41 else
42 require_php_with_use zlib
43 fi
44
45 if ! use apache2 ; then
46 if [[ ${HTTPD_USER} == "apache" ]] || [[ ${HTTPD_GROUP} == "apache" ]] ; then
47 eerror "You did not enable apache2 USE flag, so you need to define"
48 eerror "the user and group that will be used for ${PN} yourself."
49 eerror
50 eerror "This should (generally) match the user and group that your webserver uses, e.g.:"
51 eerror "HTTPD_USER=\"lighttpd\" HTTPD_GROUP=\"lighttpd\" if using www-servers/lighttpd"
52 eerror
53 die "Either enable USE=\"apache2\" or re-emerge this with HTTPD_USER and HTTPD_GROUP set"
54 else
55 enewgroup ${HTTPD_GROUP}
56 enewuser ${HTTPD_USER} -1 -1 /var/www ${HTTPD_GROUP}
57 fi
58 fi
59 }
60
61 src_compile() {
62 has_php
63
64 my_conf="--enable-eaccelerator=shared --with-eaccelerator-userid=`id -u ${HTTPD_USER}`"
65
66 use contentcache && my_conf="${my_conf} --with-eaccelerator-content-caching"
67 use debug && my_conf="${my_conf} --with-eaccelerator-debug"
68 use disassembler && my_conf="${my_conf} --with-eaccelerator-disassembler"
69 ! use inode && my_conf="${my_conf} --without-eaccelerator-use-inode"
70 use session && my_conf="${my_conf} --with-eaccelerator-sessions"
71 use sharedmem && my_conf="${my_conf} --with-eaccelerator-shared-memory"
72
73 php-ext-source-r1_src_compile
74 }
75
76 src_install() {
77 php-ext-source-r1_src_install
78
79 keepdir "${EACCELERATOR_CACHEDIR}"
80 fowners ${HTTPD_USER}:${HTTPD_GROUP} "${EACCELERATOR_CACHEDIR}"
81 fperms 750 "${EACCELERATOR_CACHEDIR}"
82
83 insinto "/usr/share/${PN}-php5/"
84 doins -r doc/php/
85 dodoc-php AUTHORS ChangeLog COPYING NEWS README README.eLoader
86
87 php-ext-base-r1_addtoinifiles "eaccelerator.shm_size" '"28"'
88 php-ext-base-r1_addtoinifiles "eaccelerator.cache_dir" "\"${EACCELERATOR_CACHEDIR}\""
89 php-ext-base-r1_addtoinifiles "eaccelerator.enable" '"1"'
90 php-ext-base-r1_addtoinifiles "eaccelerator.optimizer" '"1"'
91 php-ext-base-r1_addtoinifiles "eaccelerator.debug" '"0"'
92 php-ext-base-r1_addtoinifiles ";eaccelerator.log_file" '"/var/log/eaccelerator_log"'
93 php-ext-base-r1_addtoinifiles "eaccelerator.check_mtime" '"1"'
94 php-ext-base-r1_addtoinifiles "eaccelerator.filter" '""'
95 php-ext-base-r1_addtoinifiles "eaccelerator.shm_max" '"0"'
96 php-ext-base-r1_addtoinifiles "eaccelerator.shm_ttl" '"0"'
97 php-ext-base-r1_addtoinifiles "eaccelerator.shm_prune_period" '"0"'
98 php-ext-base-r1_addtoinifiles "eaccelerator.shm_only" '"0"'
99 php-ext-base-r1_addtoinifiles "eaccelerator.compress" '"1"'
100 php-ext-base-r1_addtoinifiles "eaccelerator.compress_level" '"9"'
101 php-ext-base-r1_addtoinifiles "eaccelerator.keys" '"shm_and_disk"'
102 php-ext-base-r1_addtoinifiles "eaccelerator.sessions" '"shm_and_disk"'
103 php-ext-base-r1_addtoinifiles "eaccelerator.content" '"shm_and_disk"'
104 php-ext-base-r1_addtoinifiles ";eaccelerator.allowed_admin_path" '"/path/where/admin/files/shall/be/allowed"'
105 }
106
107 pkg_postinst() {
108 elog "Please see the files in ${ROOT}usr/share/${PN}-php5/ for some"
109 elog "examples and informations on how to use the functions that"
110 elog "eAccelerator adds to PHP."
111 }

  ViewVC Help
Powered by ViewVC 1.1.20