| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-php/pecl-memcache/pecl-memcache-3.0.5-r1.ebuild,v 1.1 2011/08/17 18:13:51 olemarkus Exp $
|
| 4 |
|
| 5 |
EAPI="2"
|
| 6 |
PHP_EXT_NAME="memcache"
|
| 7 |
PHP_EXT_INI="yes"
|
| 8 |
PHP_EXT_ZENDEXT="no"
|
| 9 |
DOCS="README"
|
| 10 |
|
| 11 |
inherit php-ext-pecl-r2
|
| 12 |
|
| 13 |
KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
|
| 14 |
|
| 15 |
DESCRIPTION="PHP extension for using memcached."
|
| 16 |
LICENSE="PHP-3"
|
| 17 |
SLOT="0"
|
| 18 |
IUSE="+session"
|
| 19 |
|
| 20 |
DEPEND="sys-libs/zlib
|
| 21 |
dev-lang/php[session?]"
|
| 22 |
RDEPEND="${DEPEND}"
|
| 23 |
|
| 24 |
# upstream does not ship any testsuite, so the PHPize test-runner fails.
|
| 25 |
RESTRICT='test'
|
| 26 |
|
| 27 |
src_compile() {
|
| 28 |
my_conf="--enable-memcache --with-zlib-dir=/usr $(use_enable session memcache-session)"
|
| 29 |
php-ext-pecl-r2_src_compile
|
| 30 |
}
|
| 31 |
|
| 32 |
src_install() {
|
| 33 |
php-ext-pecl-r2_src_install
|
| 34 |
|
| 35 |
php-ext-source-r2_addtoinifiles "memcache.allow_failover" "true"
|
| 36 |
php-ext-source-r2_addtoinifiles "memcache.max_failover_attempts" "20"
|
| 37 |
php-ext-source-r2_addtoinifiles "memcache.chunk_size" "32768"
|
| 38 |
php-ext-source-r2_addtoinifiles "memcache.default_port" "11211"
|
| 39 |
php-ext-source-r2_addtoinifiles "memcache.hash_strategy" "consistent"
|
| 40 |
php-ext-source-r2_addtoinifiles "memcache.hash_function" "crc32"
|
| 41 |
php-ext-source-r2_addtoinifiles "memcache.redundancy" "1"
|
| 42 |
php-ext-source-r2_addtoinifiles "memcache.session_redundancy" "2"
|
| 43 |
php-ext-source-r2_addtoinifiles "memcache.protocol" "ascii"
|
| 44 |
}
|