From nobody@FreeBSD.org  Tue Sep  3 03:07:05 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id C7E45CF7
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  3 Sep 2013 03:07:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 9E8922F64
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  3 Sep 2013 03:07:05 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r83375QO062628
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 3 Sep 2013 03:07:05 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r833756J062616;
	Tue, 3 Sep 2013 03:07:05 GMT
	(envelope-from nobody)
Message-Id: <201309030307.r833756J062616@oldred.freebsd.org>
Date: Tue, 3 Sep 2013 03:07:05 GMT
From: Roberto de Iriarte <rdeiriar@spock.cl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: lang/hiphop-php fails to build with libgd-2.1
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         181772
>Category:       ports
>Synopsis:       lang/hiphop-php fails to build with libgd-2.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 03 03:10:00 UTC 2013
>Closed-Date:    Sat Feb 22 13:20:21 UTC 2014
>Last-Modified:  Sat Feb 22 13:20:21 UTC 2014
>Originator:     Roberto de Iriarte
>Release:        9.2-RC3
>Organization:
>Environment:
FreeBSD ip-10-245-2-162 9.2-RC3 FreeBSD 9.2-RC3 #0: Sun Aug 25 06:46:41 UTC 2013     ec2-user@ip-10-148-209-243:/usr/obj/mnt/md/src/sys/XENHVM  amd64

>Description:
lang/hiphop-php fails to build with the newly updated graphics/gd (libgd-2.1) in ports. 

>How-To-Repeat:
Update ports to last revision. 
Rebuild graphics/gd 
Build lang/hiphop-php
>Fix:
Revert back to gd-2.0.35 (Rev. 320987)

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mm 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Sep 3 03:10:08 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Roberto de Iriarte <rdeiriar@spock.cl>
To: bug-followup@FreeBSD.org, rdeiriar@spock.cl
Cc:  
Subject: Re: ports/181772: lang/hiphop-php fails to build with libgd-2.1
Date: Mon, 02 Sep 2013 23:15:10 -0400

 Same bug as detected in pointyhat
 
 http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.9.20130902072302.pointyhat/hiphop-php-2.1_3.log

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/181772: commit references a PR
Date: Wed,  4 Sep 2013 21:30:58 +0000 (UTC)

 Author: mm
 Date: Wed Sep  4 21:30:50 2013
 New Revision: 326329
 URL: http://svnweb.freebsd.org/changeset/ports/326329
 
 Log:
   Fix build with gd 2.1
   
   PR:	ports/181772
 
 Added:
   head/lang/hiphop-php/files/patch-hphp-runtime-ext-ext_image.cpp   (contents, props changed)
   head/lang/hiphop-php/files/patch-hphp-util-parser-parser.cpp   (contents, props changed)
 Modified:
   head/lang/hiphop-php/Makefile
 
 Modified: head/lang/hiphop-php/Makefile
 ==============================================================================
 --- head/lang/hiphop-php/Makefile	Wed Sep  4 21:15:21 2013	(r326328)
 +++ head/lang/hiphop-php/Makefile	Wed Sep  4 21:30:50 2013	(r326329)
 @@ -3,7 +3,7 @@
  
  PORTNAME=	hiphop-php
  PORTVERSION=	2.1
 -PORTREVISION=	3
 +PORTREVISION=	4
  CATEGORIES=	lang devel www
  MASTER_SITES=	https://github.com/facebook/hiphop-php/archive/:main \
  		http://unicode.org/Public/UNIDATA/:unidata \
 
 Added: head/lang/hiphop-php/files/patch-hphp-runtime-ext-ext_image.cpp
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/lang/hiphop-php/files/patch-hphp-runtime-ext-ext_image.cpp	Wed Sep  4 21:30:50 2013	(r326329)
 @@ -0,0 +1,63 @@
 +diff --git a/hphp/runtime/ext/ext_image.cpp b/hphp/runtime/ext/ext_image.cpp
 +index 3f471a3..7793ee3 100644
 +--- a/hphp/runtime/ext/ext_image.cpp
 ++++ hphp/runtime/ext/ext_image.cpp
 +@@ -2351,11 +2351,11 @@ static const char php_sig_gd2[3] = {'g', 'd', '2'};
 +    ** This way you gain a lot of flexibilty about how this package
 +    ** reads a wbmp file.
 +  */
 +-static int getmbi(int (*getin) (void *in), void *in) {
 ++static int getmbi(gdIOCtx *ctx) {
 +   int i, mbi = 0;
 + 
 +   do {
 +-    i = getin (in);
 ++    i = (ctx->getC)(ctx);
 +     if (i < 0)
 +       return (-1);
 +     mbi = (mbi << 7) | (i & 0x7f);
 +@@ -2369,11 +2369,11 @@ static int getmbi(int (*getin) (void *in), void *in) {
 +    ** Skips the ExtHeader. Not needed for the moment
 +    **
 +  */
 +-int skipheader (int (*getin) (void *in), void *in) {
 ++int skipheader (gdIOCtx *ctx) {
 +   int i;
 + 
 +   do {
 +-    i = getin (in);
 ++    i = (ctx->getC)(ctx);
 +     if (i < 0) return (-1);
 +   }
 +   while (i & 0x80);
 +@@ -2404,8 +2404,8 @@ static int _php_image_type (char data[8]) {
 +     gdIOCtx *io_ctx;
 +     io_ctx = gdNewDynamicCtxEx(8, data, 0);
 +     if (io_ctx) {
 +-      if (getmbi((int(*)(void *)) gdGetC, io_ctx) == 0 &&
 +-          skipheader((int(*)(void *)) gdGetC, io_ctx) == 0 ) {
 ++      if (getmbi(io_ctx) == 0 &&
 ++          skipheader(io_ctx) == 0 ) {
 + #if HAVE_LIBGD204
 +         io_ctx->gd_free(io_ctx);
 + #else
 +@@ -4200,8 +4200,8 @@ bool f_imagefilter(CResRef image, int filtertype,
 +   (src->trueColor?gdImageGetTrueColorPixel:gdImageGetPixel)
 + #endif
 + 
 +-static int gdImageConvolution(gdImagePtr src, float filter[3][3],
 +-                              float filter_div, float offset) {
 ++static int hphp_gdImageConvolution(gdImagePtr src, float filter[3][3],
 ++                                   float filter_div, float offset) {
 +   int x, y, i, j, new_a;
 +   float new_r, new_g, new_b;
 +   int new_pxl, pxl=0;
 +@@ -4290,7 +4290,7 @@ bool f_imageconvolution(CResRef image, CArrRef matrix,
 +       }
 +     }
 +   }
 +-  if (gdImageConvolution(im_src, mtx, div, offset)) {
 ++  if (hphp_gdImageConvolution(im_src, mtx, div, offset)) {
 +     return true;
 +   } else {
 +     return false;
 
 Added: head/lang/hiphop-php/files/patch-hphp-util-parser-parser.cpp
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/lang/hiphop-php/files/patch-hphp-util-parser-parser.cpp	Wed Sep  4 21:30:50 2013	(r326329)
 @@ -0,0 +1,12 @@
 +diff --git a/hphp/util/parser/parser.cpp b/hphp/util/parser/parser.cpp
 +index 72c11bb..0132a4b 100644
 +--- a/hphp/util/parser/parser.cpp
 ++++ hphp/util/parser/parser.cpp
 +@@ -186,6 +186,7 @@ void ParserBase::addLabel(const std::string &label,
 +   labelInfo.scopeId         = info.scopes.back();
 +   labelInfo.stmt            = extractStatement(stmt);
 +   labelInfo.loc             = loc;
 ++  labelInfo.inTryCatchBlock = false;
 +   info.labels[label]        = labelInfo;
 + }
 + 
 _______________________________________________
 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"
 
State-Changed-From-To: open->closed 
State-Changed-By: antoine 
State-Changed-When: Sat Feb 22 13:19:35 UTC 2014 
State-Changed-Why:  
Close as a patch was committed 

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