From ohauer@gmx.de  Thu May 13 22:06:32 2010
Return-Path: <ohauer@gmx.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 08064106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 May 2010 22:06:32 +0000 (UTC)
	(envelope-from ohauer@gmx.de)
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
	by mx1.freebsd.org (Postfix) with SMTP id 686718FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 May 2010 22:06:31 +0000 (UTC)
Received: (qmail invoked by alias); 13 May 2010 22:06:29 -0000
Received: from u18-124.dsl.vianetworks.de (EHLO u18-124.dsl.vianetworks.de) [194.231.39.124]
  by mail.gmx.net (mp066) with SMTP; 14 May 2010 00:06:29 +0200
Received: by u18-124.dsl.vianetworks.de (Postfix, from userid 1100)
	id DEEFB26236; Fri, 14 May 2010 00:06:24 +0200 (CEST)
Message-Id: <20100513220624.DEEFB26236@u18-124.dsl.vianetworks.de>
Date: Fri, 14 May 2010 00:06:24 +0200 (CEST)
From: olli hauer <ohauer@gmx.de>
Reply-To: olli hauer <ohauer@gmx.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ohauer@gmx.de
Subject: [patch] port graphics/pear-Image_Graph fix php53 issues
X-Send-Pr-Version: 3.113
X-GNATS-Notify: nick@foobar.org

>Number:         146555
>Category:       ports
>Synopsis:       [patch] port graphics/pear-Image_Graph fix php53 issues
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 13 22:10:08 UTC 2010
>Closed-Date:    Sat May 15 05:18:40 UTC 2010
>Last-Modified:  Sat May 15 05:20:03 UTC 2010
>Originator:     olli hauer <ohauer@gmx.de>
>Release:        
>Organization:
>Environment:
FreeBSD 7.3 (i386)
PHP 5.3.2


>Description:
pear-Image_Graph is broken with php 5.3 see http://pear.php.net/bugs/bug.php?id=16529


>How-To-Repeat:
Install php 5.3.x and pear-Image_Graph and apache

Enable web access to the following folder
 ${PREFIX}/share/doc/pear/Image_Graph/examples/

now open the index.html inside ${PREFIX}/share/doc/pear/Image_Graph/examples/
and watch the browser output and the httpd logs


>Fix:
The following patch makes pear-Image_Graph working again with php 5.3.

Additional only *.php files are processed by REINPLACE_CMD, no longer
all files (even graphics where changed with an additional newline)

I tested the patch with php 5.3 and 5.2 so I think it is save to
use '.if ${PHP_VER} != 4' as condition, but I suggest a further test.


--- patch_pear-Image_Graph.txt begins here ---
--- Makefile	2010/05/10 18:50:44	1.1
+++ Makefile	2010/05/13 20:07:18
@@ -17,6 +17,8 @@
 RUN_DEPENDS=	${PEARDIR}/Log.php:${PORTSDIR}/sysutils/pear-Log \
 		${PEARDIR}/Image/Canvas.php:${PORTSDIR}/graphics/pear-Image_Canvas
 
+USE_PHP=	yes
+
 CATEGORY=	Image
 FILES=		Graph.php Graph/Axis.php Graph/Common.php Graph/Config.php \
 		Graph/Constants.php Graph/DataPreprocessor.php \
@@ -163,12 +165,24 @@
 
 LATEST_LINK=	pear-Image_Graph
 
+.include <bsd.port.pre.mk>
 post-patch:
+# don't modify images
 .for file in ${FILES}
-	@${REINPLACE_CMD} -e "s|@package_version@|${DISTVERSION}|" ${WRKSRC}/${file}
+	@if ${ECHO_CMD} ${file} | ${GREP} -q -e "php$$" ; then \
+		${REINPLACE_CMD} -e "s|@package_version@|${DISTVERSION}|" ${WRKSRC}/${file}; \
+	fi
 .endfor
 
-.include <bsd.port.pre.mk>
+# fix for php5.3, see http://pear.php.net/bugs/bug.php?id=16529
+.if ${PHP_VER} != 4
+.for file in ${FILES}
+	@if ${ECHO_CMD} ${file} | ${GREP} -q -e "php$$" ; then \
+		${REINPLACE_CMD} -e 's|parent::Image[^(]*|parent::__construct|' ${WRKSRC}/${file}; \
+	fi
+.endfor
+.endif
+
 .include "${PORTSDIR}/devel/pear/bsd.pear.mk"
 
 .include <bsd.port.post.mk>
--- patch_pear-Image_Graph.txt ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu May 13 22:10:19 UTC 2010 
Responsible-Changed-Why:  
miwi@ wants this port PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=146555 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Thu May 13 22:10:22 UTC 2010 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: nick@foobar.org
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/146555: [patch] port graphics/pear-Image_Graph fix php53 issues
Date: Thu, 13 May 2010 22:10:21 UT

 Maintainer of graphics/pear-Image_Graph,
 
 Please note that PR ports/146555 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/146555
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Nick Hilliard <nick@foobar.org>
To: bug-followup@FreeBSD.ORG
Cc:  
Subject: Re: ports/146555: [patch] port graphics/pear-Image_Graph fix php53
 issues
Date: Fri, 14 May 2010 10:12:38 +0100

 I haven't used pear-Image_Graph for a couple of years, so can't test this.
  If someone else wants to take up maintainership of this package, please go
 ahead.
 
 Nick

From: olli hauer <ohauer@gmx.de>
To: bug-followup@FreeBSD.org
Cc: Olli Hauer <ohauer@gmx.de>
Subject: Re: ports/146555: [patch] port graphics/pear-Image_Graph fix php53
 issues
Date: Fri, 14 May 2010 14:02:09 +0200

 Please apply this second patch after the first one (to get rid off all those crlf).
 
 --- patch2_pear-Image_Graph.txt begins here ---
 --- Makefile
 +++ Makefile
 @@ -18,6 +18,7 @@
                  ${PEARDIR}/Image/Canvas.php:${PORTSDIR}/graphics/pear-Image_Canvas
 
   USE_PHP=       yes
 +USE_DOS2UNIX=  yes
 
   CATEGORY=      Image
   FILES=         Graph.php Graph/Axis.php Graph/Common.php Graph/Config.php \
 --- patch2_pear-Image_Graph.txt ends here ---
 
 
State-Changed-From-To: feedback->closed 
State-Changed-By: miwi 
State-Changed-When: Sat May 15 05:18:38 UTC 2010 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/146555: commit references a PR
Date: Sat, 15 May 2010 05:18:38 +0000 (UTC)

 miwi        2010-05-15 05:18:25 UTC
 
   FreeBSD ports repository
 
   Modified files:
     graphics/pear-Image_Graph Makefile 
   Log:
   - Fix php53 issus
   - Take over maintainership
   
   PR:             146555
   Submitted by:   olli hauer <ohauer@gmx.de>
   Approved by:    Nick Hilliard <nick@foobar.org> (prev. maintainer)
   
   Revision  Changes    Path
   1.9       +18 -4     ports/graphics/pear-Image_Graph/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
