From owner-svn-ports-all@FreeBSD.ORG Wed Dec 24 13:12:17 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 225A9C8F; Wed, 24 Dec 2014 13:12:17 +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 03A6F271E; Wed, 24 Dec 2014 13:12:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBODCGsU024304; Wed, 24 Dec 2014 13:12:16 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBODCGQd024301; Wed, 24 Dec 2014 13:12:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412241312.sBODCGQd024301@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 24 Dec 2014 13:12:16 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r375455 - in head/graphics/exact-image: . 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 13:12:17 -0000 Author: bapt Date: Wed Dec 24 13:12:15 2014 New Revision: 375455 URL: https://svnweb.freebsd.org/changeset/ports/375455 QAT: https://qat.redports.org/buildarchive/r375455/ Log: Properly support png 1.5 Obtained from: Gentoo Added: head/graphics/exact-image/files/patch-libpng14 (contents, props changed) head/graphics/exact-image/files/patch-libpng15 (contents, props changed) Deleted: head/graphics/exact-image/files/patch-codecs__png.cc Modified: head/graphics/exact-image/Makefile Modified: head/graphics/exact-image/Makefile ============================================================================== --- head/graphics/exact-image/Makefile Wed Dec 24 13:08:54 2014 (r375454) +++ head/graphics/exact-image/Makefile Wed Dec 24 13:12:15 2014 (r375455) @@ -16,7 +16,7 @@ BUILD_DEPENDS= swig:${PORTSDIR}/devel/sw LIB_DEPENDS= libagg.so:${PORTSDIR}/graphics/agg \ libjpeg.so:${PORTSDIR}/graphics/jpeg \ libtiff.so:${PORTSDIR}/graphics/tiff \ - libpng15.so:${PORTSDIR}/graphics/png \ + libpng.so:${PORTSDIR}/graphics/png \ libgif.so:${PORTSDIR}/graphics/giflib \ libjasper.so:${PORTSDIR}/graphics/jasper \ libIlmImf.so:${PORTSDIR}/graphics/OpenEXR \ @@ -26,7 +26,7 @@ LIB_DEPENDS= libagg.so:${PORTSDIR}/graph #hack to get custom exactcode configure script to enable tiff support with #broken headers on c++ in base system: -CPPFLAGS+= -fpermissive -I${LOCALBASE}/include -I${LOCALBASE}/include/libpng15 +CPPFLAGS+= -fpermissive -I${LOCALBASE}/include USES= gmake perl5 pkgconfig python tar:bzip2 USE_XORG= x11 HAS_CONFIGURE= yes Added: head/graphics/exact-image/files/patch-libpng14 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/exact-image/files/patch-libpng14 Wed Dec 24 13:12:15 2014 (r375455) @@ -0,0 +1,69 @@ +--- codecs/png.cc ++++ codecs/png.cc +@@ -71,7 +71,7 @@ + /* Allocate/initialize the memory for image information. REQUIRED. */ + info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) { +- png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL); ++ png_destroy_read_struct(&png_ptr, NULL, NULL); + return 0; + } + +@@ -82,7 +82,7 @@ + + if (setjmp(png_jmpbuf(png_ptr))) { + /* Free all of the memory associated with the png_ptr and info_ptr */ +- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); ++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + /* If we get here, we had a problem reading the file */ + return 0; + } +@@ -99,7 +99,7 @@ + png_read_info (png_ptr, info_ptr); + + png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, +- &interlace_type, int_p_NULL, int_p_NULL); ++ &interlace_type, NULL, NULL); + + image.w = width; + image.h = height; +@@ -132,7 +132,7 @@ + #if 0 // no longer needed + /* Expand grayscale images to the full 8 bits from 2, or 4 bits/pixel */ + if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth > 1 && bit_depth < 8) { +- png_set_gray_1_2_4_to_8(png_ptr); ++ png_set_expand_gray_1_2_4_to_8(png_ptr); + image.bps = 8; + } + #endif +@@ -196,11 +196,11 @@ + for (int pass = 0; pass < number_passes; ++pass) + for (unsigned int y = 0; y < height; ++y) { + row_pointers[0] = image.getRawData() + y * stride; +- png_read_rows(png_ptr, row_pointers, png_bytepp_NULL, 1); ++ png_read_rows(png_ptr, row_pointers, NULL, 1); + } + + /* clean up after the read, and free any memory allocated - REQUIRED */ +- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); ++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + + /* that's it */ + return true; +@@ -224,7 +224,7 @@ + /* Allocate/initialize the memory for image information. REQUIRED. */ + info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) { +- png_destroy_write_struct(&png_ptr, png_infopp_NULL); ++ png_destroy_write_struct(&png_ptr, NULL); + return false; + } + +@@ -244,7 +244,6 @@ + else if (quality > Z_BEST_COMPRESSION) quality = Z_BEST_COMPRESSION; + png_set_compression_level(png_ptr, quality); + +- png_info_init (info_ptr); + + /* Set up our STL stream output control */ + png_set_write_fn (png_ptr, stream, &stdstream_write_data, &stdstream_flush_data); Added: head/graphics/exact-image/files/patch-libpng15 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/exact-image/files/patch-libpng15 Wed Dec 24 13:12:15 2014 (r375455) @@ -0,0 +1,34 @@ +--- codecs/png.cc ++++ codecs/png.cc +@@ -16,6 +16,7 @@ + */ + + #include ++#include + #include + + #include +@@ -104,7 +105,7 @@ + image.w = width; + image.h = height; + image.bps = bit_depth; +- image.spp = info_ptr->channels; ++ image.spp = png_get_channels(png_ptr, info_ptr); + + png_uint_32 res_x, res_y; + res_x = png_get_x_pixels_per_meter(png_ptr, info_ptr); +@@ -120,10 +121,13 @@ + // png_set_packswap(png_ptr); + + /* Expand paletted colors into true RGB triplets */ ++ ++ int num_trans; ++ + if (color_type == PNG_COLOR_TYPE_PALETTE) { + png_set_palette_to_rgb(png_ptr); + image.bps = 8; +- if (info_ptr->num_trans) ++ if (num_trans) + image.spp = 4; + else + image.spp = 3;