From root@Leo.mi.chu.edu.tw  Sun May 20 15:38:14 2012
Return-Path: <root@Leo.mi.chu.edu.tw>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 13656106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 May 2012 15:38:14 +0000 (UTC)
	(envelope-from root@Leo.mi.chu.edu.tw)
Received: from Leo.mi.chu.edu.tw (Leo.mi.chu.edu.tw [140.126.143.63])
	by mx1.freebsd.org (Postfix) with ESMTP id CEDE88FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 May 2012 15:38:13 +0000 (UTC)
Received: from Leo.mi.chu.edu.tw (localhost [127.0.0.1])
	by Leo.mi.chu.edu.tw (Postfix) with ESMTP id 85B094DFC28
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 May 2012 23:29:50 +0800 (CST)
Received: from Leo.mi.chu.edu.tw ([127.0.0.1])
	by Leo.mi.chu.edu.tw (Leo.mi.chu.edu.tw [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id qm9qvyykfKih for <FreeBSD-gnats-submit@freebsd.org>;
	Sun, 20 May 2012 23:29:50 +0800 (CST)
Received: by Leo.mi.chu.edu.tw (Postfix, from userid 0)
	id 505544DFC27; Sun, 20 May 2012 23:29:50 +0800 (CST)
Message-Id: <20120520152950.505544DFC27@Leo.mi.chu.edu.tw>
Date: Sun, 20 May 2012 23:29:50 +0800 (CST)
From: Joe Horn <joehorn@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [MAINTAINER] databases/php-adodb-ext: Fix for building failed with PHP 5.4
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         168168
>Category:       ports
>Synopsis:       [MAINTAINER] databases/php-adodb-ext: Fix for building failed with PHP 5.4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    scheidell
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 20 15:40:01 UTC 2012
>Closed-Date:    Thu May 24 13:21:54 UTC 2012
>Last-Modified:  Thu May 24 13:21:54 UTC 2012
>Originator:     Joe Horn
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
Taiwanese User
>Environment:
System: FreeBSD joehorn.idv.tw 9.0-RELEASE FreeBSD 9.0-RELEASE #3: Mon Jan  9 22:14:09 CST
>Description:
- Fix for building failed with PHP 5.4

Added file(s):
- files/extra-patch-php54-adodb.c

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)
>How-To-Repeat:
>Fix:

--- php-adodb-ext-5.04_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/databases/php-adodb-ext/Makefile ./Makefile
--- /usr/ports/databases/php-adodb-ext/Makefile	2012-05-20 23:27:12.000000000 +0800
+++ ./Makefile	2012-05-20 23:28:24.000000000 +0800
@@ -7,7 +7,7 @@
 
 PORTNAME=	adodb-ext
 PORTVERSION=	5.04
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	databases
 MASTER_SITES=	http://phplens.com/lens/dl/
 PKGNAMEPREFIX=	php-
@@ -31,7 +31,9 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${PHP_VER} != "52"
+.if ${PHP_VER} == "5"
+EXTRA_PATCHES=	${PATCHDIR}/extra-patch-php54-adodb.c
+.elif ${PHP_VER} != "52"
 EXTRA_PATCHES=	${PATCHDIR}/extra-patch-adodb.c
 .endif
 
diff -ruN --exclude=CVS /usr/ports/databases/php-adodb-ext/files/extra-patch-php54-adodb.c ./files/extra-patch-php54-adodb.c
--- /usr/ports/databases/php-adodb-ext/files/extra-patch-php54-adodb.c	1970-01-01 08:00:00.000000000 +0800
+++ ./files/extra-patch-php54-adodb.c	2012-05-20 23:24:38.000000000 +0800
@@ -0,0 +1,37 @@
+--- adodb.c.orig	2012-05-20 14:42:41.000000000 +0000
++++ adodb.c	2012-05-20 14:41:28.000000000 +0000
+@@ -108,7 +108,7 @@
+ }; 
+ #else
+ /* PHP 5 */
+-function_entry adodb_functions[] = {
++zend_function_entry adodb_functions[] = {
+    	PHP_FE(adodb_movenext,NULL) 
+ 	PHP_FE(adodb_getall,NULL)   
+ 	{NULL, NULL, NULL} 
+@@ -159,11 +159,11 @@
+ 
+ static void adodb_init_zval(zval *v, char *s)
+ {
+-	v->type = IS_STRING;
+-	v->value.str.val = s;
+-	v->value.str.len = strlen(s);
+-	v->is_ref = 0;
+-	v->refcount = 1;
++	Z_TYPE_P(v) = IS_STRING;
++	Z_STRVAL_P(v) = s;
++	Z_STRLEN_P(v) = strlen(s);
++	Z_UNSET_ISREF_P(v);
++	Z_SET_REFCOUNT_P(v, 1);
+ }
+ 
+ /* {{{ PHP_MINIT_FUNCTION
+@@ -277,7 +277,7 @@
+ 	fci.function_table = EG(function_table);
+ 	fci.function_name = &adodb_zvals[zval_ocifetch];
+ 	fci.symbol_table = NULL;
+-	fci.object_pp = NULL;
++	fci.object_ptr = NULL;
+ 	fci.retval_ptr_ptr = &retval;
+ 	fci.param_count = 2;
+ 	fci.params = &params[1];
--- php-adodb-ext-5.04_2.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->scheidell 
Responsible-Changed-By: scheidell 
Responsible-Changed-When: Wed May 23 19:53:28 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168168 
State-Changed-From-To: open->feedback 
State-Changed-By: scheidell 
State-Changed-When: Wed May 23 19:56:40 UTC 2012 
State-Changed-Why:  
Can you doublecheck this logic? 

IGNORE_WITH_PHP=5 
[snip] 
.include <bsd.port.pre.mk> 

.if ${PHP_VER} == "5" 


if PHP_VER == 5, this will not only NOT apply patch, but does this: 

make -V PHP_VER 
5 
%su 
Password: 
scanner.secnap.net# make fetch 
===>  php-adodb-ext-5.04_2 cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 5). 
*** Error code 1 

Stop in /usr/home/scheidell/ports/ports/databases/php-adodb-ext. 


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

From: Joe Horn <joehorn@gmail.com>
To: bug-followup@freebsd.org
Cc: scheidell@freebsd.org
Subject: Re: ports/168168: [MAINTAINER] databases/php-adodb-ext: Fix for
 building failed with PHP 5.4
Date: Thu, 24 May 2012 11:45:30 +0800

 --bcaec554deb24d65ad04c0c0155d
 Content-Type: text/plain; charset=UTF-8
 
 Please close this PR, thanks.
 I'll send new one.
 
 2012/5/24 <scheidell@freebsd.org>
 
 > Synopsis: [MAINTAINER] databases/php-adodb-ext: Fix for building failed
 > with PHP 5.4
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: scheidell
 > State-Changed-When: Wed May 23 19:56:40 UTC 2012
 > State-Changed-Why:
 > Can you doublecheck this logic?
 >
 > IGNORE_WITH_PHP=5
 > [snip]
 > .include <bsd.port.pre.mk>
 >
 > .if ${PHP_VER} == "5"
 >
 >
 > if PHP_VER == 5, this will not only NOT apply patch, but does this:
 >
 > make -V PHP_VER
 > 5
 > %su
 > Password:
 > scanner.secnap.net# make fetch
 > ===>  php-adodb-ext-5.04_2 cannot install: doesn't work with PHP version :
 > 5 (Doesn't support PHP 5).
 > *** Error code 1
 >
 > Stop in /usr/home/scheidell/ports/ports/databases/php-adodb-ext.
 >
 >
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=168168
 >
 
 --bcaec554deb24d65ad04c0c0155d
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable
 
 Please close this PR, thanks.<div>I&#39;ll send new one.<br><br><div class=
 =3D"gmail_quote">2012/5/24  <span dir=3D"ltr">&lt;<a href=3D"mailto:scheide=
 ll@freebsd.org" target=3D"_blank">scheidell@freebsd.org</a>&gt;</span><br><=
 blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
  #ccc solid;padding-left:1ex">
 Synopsis: [MAINTAINER] databases/php-adodb-ext: Fix for building failed wit=
 h PHP 5.4<br>
 <br>
 State-Changed-From-To: open-&gt;feedback<br>
 State-Changed-By: scheidell<br>
 State-Changed-When: Wed May 23 19:56:40 UTC 2012<br>
 State-Changed-Why:<br>
 Can you doublecheck this logic?<br>
 <br>
 IGNORE_WITH_PHP=3D5<br>
 [snip]<br>
 .include &lt;<a href=3D"http://bsd.port.pre.mk" target=3D"_blank">bsd.port.=
 pre.mk</a>&gt;<br>
 <br>
 .if ${PHP_VER} =3D=3D &quot;5&quot;<br>
 <br>
 <br>
 if PHP_VER =3D=3D 5, this will not only NOT apply patch, but does this:<br>
 <br>
 make -V PHP_VER<br>
 5<br>
 %su<br>
 Password:<br>
 <a href=3D"http://scanner.secnap.net#" target=3D"_blank">scanner.secnap.net=
 #</a> make fetch<br>
 =3D=3D=3D&gt; =C2=A0php-adodb-ext-5.04_2 cannot install: doesn&#39;t work w=
 ith PHP version : 5 (Doesn&#39;t support PHP 5).<br>
 *** Error code 1<br>
 <br>
 Stop in /usr/home/scheidell/ports/ports/databases/php-adodb-ext.<br>
 <br>
 <br>
 <a href=3D"http://www.freebsd.org/cgi/query-pr.cgi?pr=3D168168" target=3D"_=
 blank">http://www.freebsd.org/cgi/query-pr.cgi?pr=3D168168</a><br>
 </blockquote></div><br></div>
 
 --bcaec554deb24d65ad04c0c0155d--
State-Changed-From-To: feedback->closed 
State-Changed-By: scheidell 
State-Changed-When: Thu May 24 13:21:53 UTC 2012 
State-Changed-Why:  
Closed at submitters request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168168 
>Unformatted:
