# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ PHP_EXT_ZENDEXT="no" PHP_EXT_PECL_PKG="runkit" PHP_EXT_NAME="runkit" PHP_EXT_INI="yes" inherit php-ext-pecl-r1 eutils DESCRIPTION="Replace, rename, and remove user defined functions and classes. Define customized superglobal variables for general purpose use. Execute code in restricted environment (sandboxing)." SLOT="0" LICENSE="PHP" KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" need_php_by_category pkg_setup() { if [ "$( gcc-major-version )" -eq "4" ] ; then ewarn ewarn "PECL-RunKit 0.9 and previous releases can be compiled only" ewarn "with a gcc3 series, but your local profile use a gcc4 serie." ewarn "Before to continue, please switch to a correct gcc3 profile" ewarn "using the command \"gcc-config\"." ewarn "" einfo "for more infos about this problem, go to URI:" einfo " http://pecl.php.net/bugs/bug.php?id=8849" ebeep 5 die fi local missing_use=0 # Sandbox Support require dev-lang/php compiled with: # --enable-maintainer-zts # see README if ! PHPCHECKNODIE="yes" require_php_with_use threads; then echo eerror "Please re-install ${PHP_PKG} with the USE "threads" enabled." ebeep 3 missing_use=1 fi if ! built_with_use =`best_version 'net-www/apache'` threads; then echo eerror "Building pecl-runkit requires net-www/apache built with" eerror "the 'threads' USE flag." eerror "Please re-emerge net-www/apache with this USE flag enabled." ebeep 3 missing_use=1 fi if [[ ${missing_use} == 1 ]]; then die "missing USE flag" fi } src_compile() { has_php # PHP 5.2 changed the ABI for the Zend API zend_unmangle_property_name() # see http://pecl.php.net/bugs/bug.php?id=8306 if has_version =dev-lang/php-5.2* ; then epatch ${FILESDIR}/zend-api-5.2.patch || die "failed to patch." fi my_conf="--enable-runkit" php-ext-pecl-r1_src_compile }