| 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-apc/pecl-apc-3.1.10.ebuild,v 1.2 2012/07/11 23:04:36 blueness Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
PHP_EXT_NAME="apc"
|
| 8 |
PHP_EXT_PECL_PKG="APC"
|
| 9 |
PHP_EXT_INI="yes"
|
| 10 |
PHP_EXT_ZENDEXT="no"
|
| 11 |
DOCS="CHANGELOG INSTALL NOTICE TECHNOTES.txt TODO"
|
| 12 |
|
| 13 |
PHP_EXT_INIFILE="${PN}.ini"
|
| 14 |
|
| 15 |
USE_PHP="php5-3 php5-4"
|
| 16 |
|
| 17 |
inherit php-ext-pecl-r2 confutils eutils
|
| 18 |
|
| 19 |
KEYWORDS="~amd64 ~mips ~ppc ~ppc64 ~x86"
|
| 20 |
|
| 21 |
DESCRIPTION="A free, open, and robust framework for caching and optimizing PHP code."
|
| 22 |
LICENSE="PHP-3.01"
|
| 23 |
SLOT="0"
|
| 24 |
IUSE="mmap"
|
| 25 |
|
| 26 |
DEPEND="!dev-php/eaccelerator !dev-php/xcache"
|
| 27 |
RDEPEND="${DEPEND}"
|
| 28 |
|
| 29 |
LOCKS="pthreadmutex pthreadrw spinlock semaphore"
|
| 30 |
|
| 31 |
LUSE=""
|
| 32 |
for l in ${LOCKS}; do
|
| 33 |
LUSE+="lock_${l} "
|
| 34 |
done
|
| 35 |
|
| 36 |
IUSE+=" ${LUSE/lock_pthreadmutex/+lock_pthreadmutex}"
|
| 37 |
|
| 38 |
REQUIRED_USE="^^ ( $LUSE )"
|
| 39 |
|
| 40 |
src_configure() {
|
| 41 |
my_conf="--enable-apc"
|
| 42 |
enable_extension_enable "apc-mmap" "mmap" 0
|
| 43 |
|
| 44 |
enable_extension_enable "apc-pthreadmutex" "lock_pthreadmutex" 0
|
| 45 |
enable_extension_enable "apc-pthreadrwlocks" "lock_pthreadrw" 0
|
| 46 |
enable_extension_enable "apc-spinlocks" "lock_spinlock" 0
|
| 47 |
enable_extension_enable "apc-sem" "lock_semaphore" 0
|
| 48 |
|
| 49 |
php-ext-source-r2_src_configure
|
| 50 |
}
|
| 51 |
|
| 52 |
src_install() {
|
| 53 |
php-ext-pecl-r2_src_install
|
| 54 |
|
| 55 |
dodir "${PHP_EXT_SHARED_DIR}"
|
| 56 |
insinto "${PHP_EXT_SHARED_DIR}"
|
| 57 |
doins apc.php
|
| 58 |
}
|
| 59 |
|
| 60 |
pkg_postinst() {
|
| 61 |
elog "The apc.php file shipped with this release of PECL-APC was"
|
| 62 |
elog "installed into ${PHP_EXT_SHARED_DIR}/."
|
| 63 |
}
|