From owner-svn-ports-head@FreeBSD.ORG Wed Dec 24 11:41:42 2014 Return-Path: Delivered-To: svn-ports-head@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 CFEEA4E1; Wed, 24 Dec 2014 11:41:42 +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 B0FBD6605B; Wed, 24 Dec 2014 11:41:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOBfgPl078180; Wed, 24 Dec 2014 11:41:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOBfgcX078175; Wed, 24 Dec 2014 11:41:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412241141.sBOBfgcX078175@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 11:41:42 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r375429 - in head/graphics/imlib: . 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: Wed, 24 Dec 2014 11:41:42 -0000 Author: bapt Date: Wed Dec 24 11:41:41 2014 New Revision: 375429 URL: https://svnweb.freebsd.org/changeset/ports/375429 QAT: https://qat.redports.org/buildarchive/r375429/ Log: Properly support png 1.5 Obtained from: Gentoo Added: head/graphics/imlib/files/patch-libpng15 (contents, props changed) Deleted: head/graphics/imlib/files/patch-io-png.c head/graphics/imlib/files/patch-load.c head/graphics/imlib/files/patch-save.c head/graphics/imlib/files/patch-utils.c Modified: head/graphics/imlib/Makefile Modified: head/graphics/imlib/Makefile ============================================================================== --- head/graphics/imlib/Makefile Wed Dec 24 10:49:24 2014 (r375428) +++ head/graphics/imlib/Makefile Wed Dec 24 11:41:41 2014 (r375429) @@ -12,7 +12,7 @@ DIST_SUBDIR= gnome MAINTAINER= gnome@FreeBSD.org COMMENT= Graphic library for enlightenment package -LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png \ +LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png \ libtiff.so:${PORTSDIR}/graphics/tiff \ libgif.so:${PORTSDIR}/graphics/giflib @@ -22,7 +22,8 @@ USE_GNOME= gtk12 GNU_CONFIGURE= yes USE_LDCONFIG= yes CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/imlib --disable-modules -CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/libpng15 +CPPFLAGS+= -I${LOCALBASE}/include LIBS+= -L${LOCALBASE}/lib +INSTALL_TARGET= install-strip .include Added: head/graphics/imlib/files/patch-libpng15 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/imlib/files/patch-libpng15 Wed Dec 24 11:41:41 2014 (r375429) @@ -0,0 +1,142 @@ +--- gdk_imlib/io-png.c ++++ gdk_imlib/io-png.c +@@ -40,13 +40,13 @@ + return NULL; + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- 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 NULL; +@@ -275,13 +275,13 @@ + return NULL; + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- 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 NULL; +@@ -301,6 +301,9 @@ + /* Setup Translators */ + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_expand(png_ptr); ++ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) ++ png_set_expand(png_ptr); ++ + png_set_strip_16(png_ptr); + png_set_packing(png_ptr); + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) +@@ -440,13 +443,13 @@ + return NULL; + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- 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 NULL; +@@ -635,7 +638,7 @@ + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + return 0; + } +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + fclose(f); + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); +--- Imlib/load.c ++++ Imlib/load.c +@@ -197,12 +197,12 @@ + png_destroy_read_struct(&png_ptr, NULL, NULL); + return NULL; + } +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } +- 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 NULL; +@@ -260,7 +260,8 @@ + png_read_image(png_ptr, lines); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + ptr = data; +- if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) ++ if (color_type == PNG_COLOR_TYPE_GRAY ++ || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + for (y = 0; y < *h; y++) + { +@@ -285,6 +286,7 @@ + } + } + } ++#if 0 + else if (color_type == PNG_COLOR_TYPE_GRAY) + { + for (y = 0; y < *h; y++) +@@ -300,6 +302,7 @@ + } + } + } ++#endif + else + { + for (y = 0; y < *h; y++) +--- Imlib/save.c ++++ Imlib/save.c +@@ -342,7 +342,7 @@ + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + return 0; + } +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + fclose(f); + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); +--- Imlib/utils.c ++++ Imlib/utils.c +@@ -1981,14 +1981,13 @@ + png_destroy_read_struct(&png_ptr, NULL, NULL); + return NULL; + } +- +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- 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 NULL;