/[gentoo-x86]/dev-php4/pecl-apc/pecl-apc-3.0.9.ebuild
Gentoo

Contents of /dev-php4/pecl-apc/pecl-apc-3.0.9.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Mar 12 07:25:33 2006 UTC (8 years, 5 months ago) by sebastian
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump.
(Portage version: 2.1_pre6)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-php4/pecl-apc/pecl-apc-3.0.9.ebuild,v 1.1 2006/03/04 21:12:18 sebastian Exp $
4
5 PHP_EXT_NAME="apc"
6 PHP_EXT_PECL_PKG="APC"
7 PHP_EXT_INI="yes"
8 PHP_EXT_ZENDEXT="no"
9
10 inherit php-ext-pecl-r1 confutils
11
12 KEYWORDS="~ppc ~ppc64 ~sparc ~x86"
13 DESCRIPTION="The Alternative PHP Cache."
14 LICENSE="PHP"
15 SLOT="0"
16 IUSE="mmap"
17
18 DEPEND="${DEPEND}
19 !dev-php4/eaccelerator"
20
21 need_php_by_category
22
23 pkg_setup() {
24 has_php
25
26 require_php_sapi_from cgi apache apache2
27 }
28
29 src_compile() {
30 has_php
31
32 # PECL-APC does not work with Zend Thread Safety (ZTS)
33 # so abort if we are using PHP compiled with ZTS.
34 if has_zts ; then
35 eerror "PECL-APC doesn't work with a ZTS enabled PHP."
36 eerror "Please disable ZTS by turning the 'threads'"
37 eerror "USE flag off when you compile dev-lang/php."
38 die "PECL-APC does not support ZTS"
39 fi
40
41 my_conf="--enable-apc"
42 enable_extension_enable "apc-mmap" "mmap" 0
43 enable_extension_with_built_with =${PHP_PKG} apache2 apxs2 /usr/sbin/apxs2 "optimisation for apache2"
44 enable_extension_with_built_with =${PHP_PKG} apache apxs /usr/sbin/apxs "optimisation for apache1"
45
46 php-ext-pecl-r1_src_compile
47 }
48
49 src_install() {
50 php-ext-pecl-r1_src_install
51 dodoc-php CHANGELOG INSTALL LICENSE NOTICE
52
53 php-ext-base-r1_addtoinifiles "apc.enabled" '"1"'
54 php-ext-base-r1_addtoinifiles "apc.shm_segments" '"1"'
55 php-ext-base-r1_addtoinifiles "apc.shm_size" '"30"'
56 php-ext-base-r1_addtoinifiles "apc.optimization" '"0"'
57 php-ext-base-r1_addtoinifiles "apc.num_files_hint" '"1000"'
58 php-ext-base-r1_addtoinifiles "apc.ttl" '"0"'
59 php-ext-base-r1_addtoinifiles "apc.gc_ttl" '"3600"'
60 php-ext-base-r1_addtoinifiles "apc.cache_by_default" '"1"'
61 php-ext-base-r1_addtoinifiles "apc.filters" '""'
62 php-ext-base-r1_addtoinifiles "apc.mmap_file_mask" '""'
63 php-ext-base-r1_addtoinifiles "apc.slam_defense" '"0"'
64 php-ext-base-r1_addtoinifiles "apc.file_update_protection" '"2"'
65
66 dodir "${PHP_EXT_SHARED_DIR}"
67 insinto "${PHP_EXT_SHARED_DIR}"
68 doins apc.php
69 }
70
71 pkg_postinst() {
72 einfo "The apc.php file shipped with this release of PECL-APC was"
73 einfo "installed into /usr/share/php4/apc/."
74 }

  ViewVC Help
Powered by ViewVC 1.1.20