From mm@mail2.vx.sk  Wed Mar 31 17:52:26 2010
Return-Path: <mm@mail2.vx.sk>
Received:
Message-Id: <20100331175220.789BD23EF1@mail2.vx.sk>
Date: Wed, 31 Mar 2010 19:52:20 +0200 (CEST)
From: Martin Matuska <mm@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] graphics/php5-gd: png v14 fix
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         145247
>Category:       ports
>Synopsis:       [PATCH] graphics/php5-gd: png v14 fix
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    dinoex
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 31 18:00:18 UTC 2010
>Closed-Date:    Mon Apr 05 20:58:15 CEST 2010
>Last-Modified:  Wed May 12 17:00:13 UTC 2010
>Originator:     Martin Matuska
>Release:        FreeBSD 8.0-RELEASE-p2 amd64
>Organization:
>Environment:
System: FreeBSD neo.vx.sk 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #16: Fri Jan 15 21:10:48 CET 2010
>Description:
- Fix unresolved symbol after png v14 API change

Added file(s):
- files/patch-libgd-gd_png.c

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- .patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/graphics/php5-gd/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	29 Dec 2009 14:39:10 -0000	1.5
+++ Makefile	31 Mar 2010 17:50:38 -0000
@@ -5,6 +5,8 @@
 # $FreeBSD: ports/graphics/php5-gd/Makefile,v 1.5 2009/12/29 14:39:10 ale Exp $
 #
 
+PORTREVISION=	1
+
 CATEGORIES=	graphics
 
 MASTERDIR=	${.CURDIR}/../../lang/php5
Index: files/patch-libgd-gd_png.c
===================================================================
RCS file: files/patch-libgd-gd_png.c
diff -N files/patch-libgd-gd_png.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-libgd-gd_png.c	31 Mar 2010 17:50:38 -0000
@@ -0,0 +1,11 @@
+--- libgd/gd_png.c.orig	2009-03-14 17:48:42.000000000 +0000
++++ libgd/gd_png.c	2010-03-31 17:42:38.379221901 +0000
+@@ -139,7 +139,7 @@
+ 		return NULL;
+ 	}
+ 
+-	if (!png_check_sig (sig, 8)) { /* bad signature */
++	if (!(png_sig_cmp(sig, 0, 8) == 0)) { /* bad signature */
+ 		return NULL;
+ 	}
+ 
--- .patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Mar 31 18:00:31 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145247 
Responsible-Changed-From-To: ale->dinoex 
Responsible-Changed-By: dinoex 
Responsible-Changed-When: Mon Apr 5 20:33:56 CEST 2010 
Responsible-Changed-Why:  
I will take care of it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145247 
State-Changed-From-To: open->closed 
State-Changed-By: dinoex 
State-Changed-When: Mon Apr 5 20:58:02 CEST 2010 
State-Changed-Why:  
committed, thanks. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/145247: commit references a PR
Date: Mon,  5 Apr 2010 18:57:48 +0000 (UTC)

 dinoex      2010-04-05 18:57:39 UTC
 
   FreeBSD ports repository
 
   Modified files:
     lang/php4            Makefile 
     lang/php5            Makefile 
   Added files:
     graphics/php4-gd/files patch-libgd_gd_png.c 
     graphics/php5-gd/files patch-libgd_gd_png.c 
   Log:
   - fix build for png-1.4.1
   - bump PORTREVISION
   PR:     145247
   
   Revision  Changes    Path
   1.1       +14 -0     ports/graphics/php4-gd/files/patch-libgd_gd_png.c (new)
   1.1       +14 -0     ports/graphics/php5-gd/files/patch-libgd_gd_png.c (new)
   1.127     +1 -1      ports/lang/php4/Makefile
   1.143     +1 -1      ports/lang/php5/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"
 

From: "Eugene Krivoruchko" <admin@presidentpmr.org>
To: <bug-followup@FreeBSD.org>, <mm@FreeBSD.org>
Cc:  
Subject: Re: ports/145247: [PATCH] graphics/php5-gd: png v14 fix
Date: Tue, 6 Apr 2010 15:56:26 +0400

 This is a multi-part message in MIME format.
 
 ------=_NextPart_000_000D_01CAD5A1.BB58F260
 Content-Type: text/plain;
 	charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 
 This path not work!
 
 After this patch have: Abort (core dumped)
 
 Before: /libexec/ld-elf.so.1: /usr/local/lib/php/20060613/gd.so: Undefined
 symbol "png_check_sig"
 
 
 ------=_NextPart_000_000D_01CAD5A1.BB58F260
 Content-Type: text/html;
 	charset="us-ascii"
 Content-Transfer-Encoding: quoted-printable
 
 <html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
 xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
 xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
 xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
 xmlns=3D"http://www.w3.org/TR/REC-html40">
 
 <head>
 <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
 charset=3Dus-ascii">
 <meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
 <style>
 <!--
  /* Font Definitions */
  @font-face
 	{font-family:"Cambria Math";
 	panose-1:2 4 5 3 5 4 6 3 2 4;}
 @font-face
 	{font-family:Calibri;
 	panose-1:2 15 5 2 2 2 4 3 2 4;}
  /* Style Definitions */
  p.MsoNormal, li.MsoNormal, div.MsoNormal
 	{margin:0cm;
 	margin-bottom:.0001pt;
 	font-size:11.0pt;
 	font-family:"Calibri","sans-serif";}
 a:link, span.MsoHyperlink
 	{mso-style-priority:99;
 	color:blue;
 	text-decoration:underline;}
 a:visited, span.MsoHyperlinkFollowed
 	{mso-style-priority:99;
 	color:purple;
 	text-decoration:underline;}
 span.a
 	{mso-style-type:personal-compose;
 	font-family:"Calibri","sans-serif";
 	color:windowtext;}
 .MsoChpDefault
 	{mso-style-type:export-only;}
 @page Section1
 	{size:612.0pt 792.0pt;
 	margin:2.0cm 42.5pt 2.0cm 3.0cm;}
 div.Section1
 	{page:Section1;}
 -->
 </style>
 <!--[if gte mso 9]><xml>
  <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
 </xml><![endif]--><!--[if gte mso 9]><xml>
  <o:shapelayout v:ext=3D"edit">
   <o:idmap v:ext=3D"edit" data=3D"1" />
  </o:shapelayout></xml><![endif]-->
 </head>
 
 <body lang=3DRU link=3Dblue vlink=3Dpurple>
 
 <div class=3DSection1>
 
 <p class=3DMsoNormal><span lang=3DEN-US>This path not =
 work!<o:p></o:p></span></p>
 
 <p class=3DMsoNormal><span lang=3DEN-US>After this patch have: Abort =
 (core dumped)<o:p></o:p></span></p>
 
 <p class=3DMsoNormal><span lang=3DEN-US>Before: /libexec/ld-elf.so.1:
 /usr/local/lib/php/20060613/gd.so: Undefined symbol =
 &quot;png_check_sig&quot;<o:p></o:p></span></p>
 
 </div>
 
 </body>
 
 </html>
 
 ------=_NextPart_000_000D_01CAD5A1.BB58F260--
 

From: David Croal <davidc@sentex.net>
To: bug-followup@FreeBSD.org, mm@FreeBSD.org
Cc:  
Subject: Re: ports/145247: [PATCH] graphics/php5-gd: png v14 fix
Date: Wed, 12 May 2010 12:39:47 -0400

 This patch worked for me.
 PHP 5.2.12
 Apache/2.0.63
 FreeBSD 6.4-STABLE
 
 The function throwing the error was imagecreatefrompng
 The error was
 /libexec/ld-elf.so.1: /usr/local/lib/php/20060613/gd.so: Undefined 
 symbol "png_check_sig"
 
 -- 
 David Croal, Technical Support, Sentex Communications
 Voice: (519) 651-3400 x204  Toll Free 1-888-4-SENTEX (1-888-473-6839)
 Fax: (519) 651-2215                   http://www.sentex.net
>Unformatted:
