diff options
author | Pawel Pekala <pawel@FreeBSD.org> | 2012-12-29 12:18:56 +0000 |
---|---|---|
committer | Pawel Pekala <pawel@FreeBSD.org> | 2012-12-29 12:18:56 +0000 |
commit | c9e60eb6251cf695d525932399b4a83751320dd0 (patch) | |
tree | 2a742c44e60806b0cc204a0deaf48a8aaf851eee | |
parent | b8b3f8c0ef4780b8f3b9f6649e3302dcc335eb95 (diff) | |
download | ports-c9e60eb6251cf695d525932399b4a83751320dd0.tar.gz ports-c9e60eb6251cf695d525932399b4a83751320dd0.zip |
Notes
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/pecl-test_helpers/Makefile | 25 | ||||
-rw-r--r-- | devel/pecl-test_helpers/distinfo | 2 | ||||
-rw-r--r-- | devel/pecl-test_helpers/files/patch-test_helpers.c | 57 | ||||
-rw-r--r-- | devel/pecl-test_helpers/files/pkg-message.in | 22 | ||||
-rw-r--r-- | devel/pecl-test_helpers/pkg-descr | 4 |
6 files changed, 111 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 52139f91520b..b7529ad6a2d6 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -3140,6 +3140,7 @@ SUBDIR += pecl-spread SUBDIR += pecl-statgrab SUBDIR += pecl-svn + SUBDIR += pecl-test_helpers SUBDIR += pecl-uploadprogress SUBDIR += pecl-uuid SUBDIR += pecl-vld diff --git a/devel/pecl-test_helpers/Makefile b/devel/pecl-test_helpers/Makefile new file mode 100644 index 000000000000..dcc91122cd53 --- /dev/null +++ b/devel/pecl-test_helpers/Makefile @@ -0,0 +1,25 @@ +# Created by: Gasol Wu <gasol.wu@gmail.com> +# $FreeBSD$ + +PORTNAME= test_helpers +PORTVERSION= 1.1.0 +CATEGORIES= devel pear +MASTER_SITES= http://pear.phpunit.de/get/ +PKGNAMEPREFIX= pecl- +EXTRACT_SUFX= .tgz + +MAINTAINER= gasol.wu@gmail.com +COMMENT= Extension to ease testing of PHP code + +CONFIGURE_ARGS= --enable-test-helpers +USE_PHP= yes +USE_PHPEXT= yes +USE_PHPIZE= yes +SUB_FILES= pkg-message + +PKGMESSAGE= ${WRKDIR}/pkg-message + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/devel/pecl-test_helpers/distinfo b/devel/pecl-test_helpers/distinfo new file mode 100644 index 000000000000..346de0b029c3 --- /dev/null +++ b/devel/pecl-test_helpers/distinfo @@ -0,0 +1,2 @@ +SHA256 (test_helpers-1.1.0.tgz) = 4fc53f6b8b7881dc3fbcfdaa08428dab59caf2e22c8df588eb5182055d095c6d +SIZE (test_helpers-1.1.0.tgz) = 10370 diff --git a/devel/pecl-test_helpers/files/patch-test_helpers.c b/devel/pecl-test_helpers/files/patch-test_helpers.c new file mode 100644 index 000000000000..894249e675c0 --- /dev/null +++ b/devel/pecl-test_helpers/files/patch-test_helpers.c @@ -0,0 +1,57 @@ +--- ./test_helpers.c.orig 2010-10-25 15:05:08.000000000 +0800 ++++ ./test_helpers.c 2012-10-08 17:41:40.355030000 +0800 +@@ -102,14 +102,30 @@ + case IS_CONST: + return &(node->u.constant); + case IS_VAR: ++#if ZEND_EXTENSION_API_NO >= 220100525 ++ return EX_T(node->u.op.var).var.ptr; ++#else + return EX_T(node->u.var).var.ptr; ++#endif + case IS_TMP_VAR: ++#if ZEND_EXTENSION_API_NO >= 220100525 ++ return (*freeval = &EX_T(node->u.op.var).tmp_var); ++#else + return (*freeval = &EX_T(node->u.var).tmp_var); ++#endif + case IS_CV: + { ++#if ZEND_EXTENSION_API_NO >= 220100525 ++ zval ***ret = &execute_data->CVs[node->u.op.var]; ++#else + zval ***ret = &execute_data->CVs[node->u.var]; ++#endif + if (!*ret) { ++#if ZEND_EXTENSION_API_NO >= 220100525 ++ zend_compiled_variable *cv = &EG(active_op_array)->vars[node->u.op.var]; ++#else + zend_compiled_variable *cv = &EG(active_op_array)->vars[node->u.var]; ++#endif + if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void**)ret)==FAILURE) { + zend_error(E_NOTICE, "Undefined variable: %s", cv->name); + return &EG(uninitialized_zval); +@@ -165,7 +181,11 @@ + } + } + ++#if ZEND_EXTENSION_API_NO >= 220100525 ++ old_ce = EX_T(opline->op1.var).class_entry; ++#else + old_ce = EX_T(opline->op1.u.var).class_entry; ++#endif + + MAKE_STD_ZVAL(arg); + ZVAL_STRINGL(arg, old_ce->name, old_ce->name_length, 1); +@@ -189,7 +209,11 @@ + zval_ptr_dtor(&retval); + + ++#if ZEND_EXTENSION_API_NO >= 220100525 ++ EX_T(opline->op1.var).class_entry = *new_ce; ++#else + EX_T(opline->op1.u.var).class_entry = *new_ce; ++#endif + + if (old_new_handler) { + return old_new_handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); diff --git a/devel/pecl-test_helpers/files/pkg-message.in b/devel/pecl-test_helpers/files/pkg-message.in new file mode 100644 index 000000000000..225c569fc2cb --- /dev/null +++ b/devel/pecl-test_helpers/files/pkg-message.in @@ -0,0 +1,22 @@ +***************************************************************************** +The php extension 'test_helpers' has been installed successful. +Add a line containing + + extension=%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/test_helpers.so + +or + + zend_extension=%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/test_helpers.so + +If this extension is used in combination with other extensions, such as Xdebug, +which are also overloading the `ZEND_NEW` opcode you have to load it as +`zend_extension` after loading the conflicting extension. This can be done in +your `php.ini` like this: + + zend_extension=xdebug.so + zend_extension=test-helpers.so + +Please refer to `phpinfo()` to verify whether a conflict was detected and +whether the work-around was enabled. + +***************************************************************************** diff --git a/devel/pecl-test_helpers/pkg-descr b/devel/pecl-test_helpers/pkg-descr new file mode 100644 index 000000000000..96686f608b8d --- /dev/null +++ b/devel/pecl-test_helpers/pkg-descr @@ -0,0 +1,4 @@ +test_helpers is an extension for the PHP Interpreter to ease +testing of PHP code. + +WWW: https://github.com/sebastianbergmann/php-test-helpers |