From owner-svn-ports-head@FreeBSD.ORG Thu Dec 25 13:26:43 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B0BB9A1; Thu, 25 Dec 2014 13:26:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 569933398; Thu, 25 Dec 2014 13:26:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPDQhlV007512; Thu, 25 Dec 2014 13:26:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPDQgKx007510; Thu, 25 Dec 2014 13:26:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412251326.sBPDQgKx007510@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 Dec 2014 13:26:42 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r375548 - in head/graphics/EZWGL: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 13:26:43 -0000 Author: bapt Date: Thu Dec 25 13:26:41 2014 New Revision: 375548 URL: https://svnweb.freebsd.org/changeset/ports/375548 QAT: https://qat.redports.org/buildarchive/r375548/ Log: Properly support png 1.5 Added: head/graphics/EZWGL/files/patch-lib_EZ__Png.c (contents, props changed) Deleted: head/graphics/EZWGL/files/patch-lib__EZ_Png.c Modified: head/graphics/EZWGL/Makefile Modified: head/graphics/EZWGL/Makefile ============================================================================== --- head/graphics/EZWGL/Makefile Thu Dec 25 13:24:16 2014 (r375547) +++ head/graphics/EZWGL/Makefile Thu Dec 25 13:26:41 2014 (r375548) @@ -12,12 +12,12 @@ MAINTAINER= ports@FreeBSD.org COMMENT= EZ Widget and Graphics Library LIB_DEPENDS= libtiff.so:${PORTSDIR}/graphics/tiff \ - libpng15.so:${PORTSDIR}/graphics/png + libpng.so:${PORTSDIR}/graphics/png USE_XORG= x11 xext USE_LDCONFIG= yes GNU_CONFIGURE= yes -CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/libpng15 +CPPFLAGS+= -I${LOCALBASE}/include LIBS+= -L${LOCALBASE}/lib PORTDOCS= * PORTEXAMPLES= * Added: head/graphics/EZWGL/files/patch-lib_EZ__Png.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/EZWGL/files/patch-lib_EZ__Png.c Thu Dec 25 13:26:41 2014 (r375548) @@ -0,0 +1,58 @@ +--- lib/EZ_Png.c.orig 1999-12-03 21:49:22 UTC ++++ lib/EZ_Png.c +@@ -61,14 +61,14 @@ static int EZ_ReadPng(fname, w_ret, h_re + fclose(fp); + return(0); + } +- if(setjmp(png_ptr->jmpbuf)) ++ if(setjmp(png_jmpbuf(png_ptr))) + { + fclose(fp); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return(0); + } + +- if(info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) ++ if(png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return(0); +@@ -77,15 +77,22 @@ static int EZ_ReadPng(fname, w_ret, h_re + png_read_info(png_ptr, info_ptr); /* header */ + png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type, &interlace_type, NULL, NULL); + +- if(info_ptr->bit_depth < 8) png_set_packing(png_ptr); ++ if(png_get_bit_depth(png_ptr, info_ptr) < 8) png_set_packing(png_ptr); + if(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) png_set_expand(png_ptr); + png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); + +- if(info_ptr->valid & PNG_INFO_gAMA) png_set_gamma(png_ptr, 2.2, info_ptr->gamma); ++ if(png_get_valid(png_ptr, info_ptr, PNG_INFO_gAMA)) { ++ double gamma; ++ png_get_gAMA(png_ptr, info_ptr, &gamma); ++ png_set_gamma(png_ptr, 2.2, gamma); ++ } + else png_set_gamma(png_ptr, 2.2, 0.45); + +- if(info_ptr->valid & PNG_INFO_bKGD) +- png_set_background(png_ptr, &info_ptr->background, PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); ++ if(png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD)) { ++ png_color_16 my_background; ++ png_get_bKGD(png_ptr, info_ptr, &my_background); ++ png_set_background(png_ptr, &my_background, PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); ++ } + else + { + png_color_16 my_background; +@@ -93,9 +100,9 @@ static int EZ_ReadPng(fname, w_ret, h_re + png_set_background(png_ptr, &my_background, PNG_BACKGROUND_GAMMA_SCREEN, 0, 2.2); + } + +- if(info_ptr->bit_depth == 16) png_set_strip_16(png_ptr); ++ if(png_get_bit_depth(png_ptr, info_ptr) == 16) png_set_strip_16(png_ptr); + +- if(info_ptr->color_type == PNG_COLOR_TYPE_GRAY || info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) ++ if(png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY || png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_expand(png_ptr); + + if((data = (unsigned char *)my_malloc( 4 * w * (h+1)* sizeof(unsigned char), _PNG_IMAGE_)) == NULL)