From gasolwu@kkbox.com  Mon Oct  8 15:35:16 2012
Return-Path: <gasolwu@kkbox.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 5105D106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Oct 2012 15:35:16 +0000 (UTC)
	(envelope-from gasolwu@kkbox.com)
Received: from kkbox.com (mail-out-1.kkbox.com [203.69.67.210])
	by mx1.freebsd.org (Postfix) with ESMTP id 0A65C8FC1D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Oct 2012 15:35:15 +0000 (UTC)
Received: by goingmarry.kkbox.com (Postfix, from userid 1033)
	id 0A6F6747052; Mon,  8 Oct 2012 23:26:30 +0800 (CST)
Message-Id: <20121008152630.0A6F6747052@goingmarry.kkbox.com>
Date: Mon,  8 Oct 2012 23:26:30 +0800 (CST)
From: Gasol Wu <gasol.wu@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [NEW PORT] devel/pecl-test_helpers: An extension to ease testing of PHP code
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         172491
>Category:       ports
>Synopsis:       [NEW PORT] devel/pecl-test_helpers: An extension to ease testing of PHP code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 08 15:40:12 UTC 2012
>Closed-Date:    Sat Dec 29 12:19:19 UTC 2012
>Last-Modified:  Sat Dec 29 12:20:00 UTC 2012
>Originator:     Gasol Wu
>Release:        FreeBSD 9.1-RC1 amd64
>Organization:
>Environment:
System: FreeBSD goingmarry 9.1-RC1 FreeBSD 9.1-RC1 #0: Tue Aug 14 04:25:06 UTC 2012
>Description:

- patch based on https://github.com/sebastianbergmann/php-test-helpers/pull/16
- Add notes for combination with other extensions

test_helpers is an extension for the PHP Interpreter to ease testing of
PHP code.

WWW: https://github.com/sebastianbergmann/php-test-helpers

Generated with FreeBSD Port Tools 0.99_6 (mode: new)
>How-To-Repeat:
>Fix:

--- .shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	pecl-test_helpers
#	pecl-test_helpers/pkg-descr
#	pecl-test_helpers/Makefile
#	pecl-test_helpers/distinfo
#	pecl-test_helpers/files
#	pecl-test_helpers/files/pkg-message.in
#	pecl-test_helpers/files/patch-test_helpers.c
#
echo c - pecl-test_helpers
mkdir -p pecl-test_helpers > /dev/null 2>&1
echo x - pecl-test_helpers/pkg-descr
sed 's/^X//' >pecl-test_helpers/pkg-descr << '71ae18bc0471a94e4ff9aca960196657'
Xtest_helpers is an extension for the PHP Interpreter to ease testing of
XPHP code.
X
XWWW: https://github.com/sebastianbergmann/php-test-helpers
71ae18bc0471a94e4ff9aca960196657
echo x - pecl-test_helpers/Makefile
sed 's/^X//' >pecl-test_helpers/Makefile << '7b587f09c9aa5f15c8bc5d12732959ae'
X# Created by: Gasol Wu <gasol.wu@gmail.com>
X# $FreeBSD$
X
XPORTNAME=	test_helpers
XPORTVERSION=	1.1.0
XCATEGORIES=	devel pear
XMASTER_SITES=	http://pear.phpunit.de/get/
XPKGNAMEPREFIX=	pecl-
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	gasol.wu@gmail.com
XCOMMENT=	An extension to ease testing of PHP code
X
XCONFIGURE_ARGS=	--enable-test-helpers
XUSE_PHP=	yes
XUSE_PHPEXT=	yes
XUSE_PHPIZE=	yes
XSUB_FILES=	pkg-message
X
XPKGMESSAGE=	${WRKDIR}/pkg-message
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
7b587f09c9aa5f15c8bc5d12732959ae
echo x - pecl-test_helpers/distinfo
sed 's/^X//' >pecl-test_helpers/distinfo << '24dbb8f2a60c1115986ede3bef64b383'
XSHA256 (test_helpers-1.1.0.tgz) = 4fc53f6b8b7881dc3fbcfdaa08428dab59caf2e22c8df588eb5182055d095c6d
XSIZE (test_helpers-1.1.0.tgz) = 10370
24dbb8f2a60c1115986ede3bef64b383
echo c - pecl-test_helpers/files
mkdir -p pecl-test_helpers/files > /dev/null 2>&1
echo x - pecl-test_helpers/files/pkg-message.in
sed 's/^X//' >pecl-test_helpers/files/pkg-message.in << '3f0facb48a3f80c4de2dce10caf4455b'
X*****************************************************************************
XThe php extension 'test_helpers' has been installed successful.
XAdd a line containing
X
X	extension=%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/test_helpers.so
X
Xor
X
X	zend_extension=%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/test_helpers.so
X
XIf this extension is used in combination with other extensions, such as Xdebug,
Xwhich are also overloading the `ZEND_NEW` opcode you have to load it as 
X`zend_extension` after loading the conflicting extension. This can be done in 
Xyour `php.ini` like this:
X
X    zend_extension=xdebug.so
X    zend_extension=test-helpers.so
X
XPlease refer to `phpinfo()` to verify whether a conflict was detected and 
Xwhether the work-around was enabled.
X
X*****************************************************************************
3f0facb48a3f80c4de2dce10caf4455b
echo x - pecl-test_helpers/files/patch-test_helpers.c
sed 's/^X//' >pecl-test_helpers/files/patch-test_helpers.c << 'e1b322f2cdc0072bdff3769ce48dc39d'
X--- ./test_helpers.c.orig	2010-10-25 15:05:08.000000000 +0800
X+++ ./test_helpers.c	2012-10-08 17:41:40.355030000 +0800
X@@ -102,14 +102,30 @@
X 	case IS_CONST:
X 		return &(node->u.constant);
X 	case IS_VAR:
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+		return EX_T(node->u.op.var).var.ptr;
X+#else
X 		return EX_T(node->u.var).var.ptr;
X+#endif
X 	case IS_TMP_VAR:
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+		return (*freeval = &EX_T(node->u.op.var).tmp_var);
X+#else
X 		return (*freeval = &EX_T(node->u.var).tmp_var);
X+#endif
X 	case IS_CV:
X 		{
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+		zval ***ret = &execute_data->CVs[node->u.op.var];
X+#else
X 		zval ***ret = &execute_data->CVs[node->u.var];
X+#endif
X 		if (!*ret) {
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+				zend_compiled_variable *cv = &EG(active_op_array)->vars[node->u.op.var];
X+#else
X 				zend_compiled_variable *cv = &EG(active_op_array)->vars[node->u.var];
X+#endif
X 				if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void**)ret)==FAILURE) {
X 					zend_error(E_NOTICE, "Undefined variable: %s", cv->name);
X 					return &EG(uninitialized_zval);
X@@ -165,7 +181,11 @@
X 		}
X 	}
X 
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+	old_ce = EX_T(opline->op1.var).class_entry;
X+#else
X 	old_ce = EX_T(opline->op1.u.var).class_entry;
X+#endif
X 
X 	MAKE_STD_ZVAL(arg);
X 	ZVAL_STRINGL(arg, old_ce->name, old_ce->name_length, 1);
X@@ -189,7 +209,11 @@
X 	zval_ptr_dtor(&retval);
X 
X 
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+	EX_T(opline->op1.var).class_entry = *new_ce;
X+#else
X 	EX_T(opline->op1.u.var).class_entry = *new_ce;
X+#endif
X 
X 	if (old_new_handler) {
X 		return old_new_handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
e1b322f2cdc0072bdff3769ce48dc39d
exit
--- .shar ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Oct 8 15:40:33 UTC 2012 
Responsible-Changed-Why:  
miwi@ wants this port PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172491 
Responsible-Changed-From-To: miwi->freebsd-ports-bugs 
Responsible-Changed-By: bapt 
Responsible-Changed-When: Mon Oct 29 09:40:38 UTC 2012 
Responsible-Changed-Why:  
Reassign to the heap miwi being overloaded for now 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172491 
State-Changed-From-To: open->closed 
State-Changed-By: pawel 
State-Changed-When: Sat Dec 29 12:19:18 UTC 2012 
State-Changed-Why:  
New port added. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172491 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/172491: commit references a PR
Date: Sat, 29 Dec 2012 12:19:05 +0000 (UTC)

 Author: pawel
 Date: Sat Dec 29 12:18:56 2012
 New Revision: 309616
 URL: http://svnweb.freebsd.org/changeset/ports/309616
 
 Log:
   test_helpers is an extension for the PHP Interpreter to ease
   testing of PHP code.
   
   WWW: https://github.com/sebastianbergmann/php-test-helpers
   
   PR:		ports/172491
   Submitted by:	Gasol Wu <gasol.wu@gmail.com>
 
 Added:
   head/devel/pecl-test_helpers/
   head/devel/pecl-test_helpers/Makefile   (contents, props changed)
   head/devel/pecl-test_helpers/distinfo   (contents, props changed)
   head/devel/pecl-test_helpers/files/
   head/devel/pecl-test_helpers/files/patch-test_helpers.c   (contents, props changed)
   head/devel/pecl-test_helpers/files/pkg-message.in   (contents, props changed)
   head/devel/pecl-test_helpers/pkg-descr   (contents, props changed)
 Modified:
   head/devel/Makefile
 
 Modified: head/devel/Makefile
 ==============================================================================
 --- head/devel/Makefile	Sat Dec 29 10:07:58 2012	(r309615)
 +++ head/devel/Makefile	Sat Dec 29 12:18:56 2012	(r309616)
 @@ -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
 
 Added: head/devel/pecl-test_helpers/Makefile
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/devel/pecl-test_helpers/Makefile	Sat Dec 29 12:18:56 2012	(r309616)
 @@ -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>
 
 Added: head/devel/pecl-test_helpers/distinfo
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/devel/pecl-test_helpers/distinfo	Sat Dec 29 12:18:56 2012	(r309616)
 @@ -0,0 +1,2 @@
 +SHA256 (test_helpers-1.1.0.tgz) = 4fc53f6b8b7881dc3fbcfdaa08428dab59caf2e22c8df588eb5182055d095c6d
 +SIZE (test_helpers-1.1.0.tgz) = 10370
 
 Added: head/devel/pecl-test_helpers/files/patch-test_helpers.c
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/devel/pecl-test_helpers/files/patch-test_helpers.c	Sat Dec 29 12:18:56 2012	(r309616)
 @@ -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);
 
 Added: head/devel/pecl-test_helpers/files/pkg-message.in
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/devel/pecl-test_helpers/files/pkg-message.in	Sat Dec 29 12:18:56 2012	(r309616)
 @@ -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.
 +
 +*****************************************************************************
 
 Added: head/devel/pecl-test_helpers/pkg-descr
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/devel/pecl-test_helpers/pkg-descr	Sat Dec 29 12:18:56 2012	(r309616)
 @@ -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
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
