summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2011-08-25 17:22:18 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2011-08-25 17:22:18 +0000
commit877a0edf9a3629010f5dc5dc7d3c3176c3f96d2d (patch)
treed52671a8c0ab66e42cc06f80256c03beb3edb705 /sci-misc
parentStable for HPPA (bug #369065). (diff)
downloadgentoo-2-877a0edf9a3629010f5dc5dc7d3c3176c3f96d2d.tar.gz
gentoo-2-877a0edf9a3629010f5dc5dc7d3c3176c3f96d2d.tar.bz2
gentoo-2-877a0edf9a3629010f5dc5dc7d3c3176c3f96d2d.zip
Fix building with libpng-1.5 wrt #378919 by Diego Elio Pettenò <flameeyes@gentoo.org>. Add explicit dependency on sys-libs/zlib
(Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
Diffstat (limited to 'sci-misc')
-rw-r--r--sci-misc/h5utils/ChangeLog7
-rw-r--r--sci-misc/h5utils/files/h5utils-1.12.1-png15.patch43
-rw-r--r--sci-misc/h5utils/h5utils-1.12.1-r2.ebuild6
3 files changed, 53 insertions, 3 deletions
diff --git a/sci-misc/h5utils/ChangeLog b/sci-misc/h5utils/ChangeLog
index 893590242491..6cfe0cd804d1 100644
--- a/sci-misc/h5utils/ChangeLog
+++ b/sci-misc/h5utils/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-misc/h5utils
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-misc/h5utils/ChangeLog,v 1.13 2011/08/25 16:47:50 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-misc/h5utils/ChangeLog,v 1.14 2011/08/25 17:22:18 xarthisius Exp $
+
+ 25 Aug 2011; Kacper Kowalik <xarthisius@gentoo.org> h5utils-1.12.1-r2.ebuild,
+ +files/h5utils-1.12.1-png15.patch:
+ Fix building with libpng-1.5 wrt #378919 by Diego Elio Pettenò
+ <flameeyes@gentoo.org>. Add explicit dependency on sys-libs/zlib
*h5utils-1.12.1-r2 (25 Aug 2011)
diff --git a/sci-misc/h5utils/files/h5utils-1.12.1-png15.patch b/sci-misc/h5utils/files/h5utils-1.12.1-png15.patch
new file mode 100644
index 000000000000..e611310145eb
--- /dev/null
+++ b/sci-misc/h5utils/files/h5utils-1.12.1-png15.patch
@@ -0,0 +1,43 @@
+Fix build with png-1.5.
+
+https://bugs.gentoo.org/show_bug.cgi?id=378919
+
+Patch stolen from NetBSD
+--- writepng.c
++++ writepng.c
+@@ -240,6 +240,8 @@ void writepng(char *filename,
+ double skewsin = sin(skew), skewcos = cos(skew);
+ REAL minoverlay = 0, maxoverlay = 0;
+ png_byte mask_byte;
++ png_colorp palette = NULL;
++
+
+ /* we must use direct color for translucent overlays */
+ if (overlay)
+@@ -309,7 +311,7 @@ void writepng(char *filename,
+ }
+ /* Set error handling. REQUIRED if you aren't supplying your own *
+ * error hadnling functions in the png_create_write_struct() call. */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* If we get here, we had a problem reading the file */
+ fclose(fp);
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+@@ -334,8 +336,6 @@ void writepng(char *filename,
+ PNG_INTERLACE_NONE,
+ PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+ else {
+- png_colorp palette;
+-
+ png_set_IHDR(png_ptr, info_ptr, width, height, 8 /* bit_depth */ ,
+ PNG_COLOR_TYPE_PALETTE,
+ PNG_INTERLACE_NONE,
+@@ -434,7 +434,7 @@ void writepng(char *filename,
+ png_write_end(png_ptr, info_ptr);
+
+ /* if you malloced the palette, free it here */
+- free(info_ptr->palette);
++ free(palette);
+
+ /* if you allocated any text comments, free them here */
+
diff --git a/sci-misc/h5utils/h5utils-1.12.1-r2.ebuild b/sci-misc/h5utils/h5utils-1.12.1-r2.ebuild
index b9497503360f..90bbe17f54eb 100644
--- a/sci-misc/h5utils/h5utils-1.12.1-r2.ebuild
+++ b/sci-misc/h5utils/h5utils-1.12.1-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-misc/h5utils/h5utils-1.12.1-r2.ebuild,v 1.1 2011/08/25 16:47:50 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-misc/h5utils/h5utils-1.12.1-r2.ebuild,v 1.2 2011/08/25 17:22:18 xarthisius Exp $
EAPI=4
@@ -18,6 +18,7 @@ SLOT="0"
DEPEND="media-libs/libpng
sci-libs/hdf5
+ sys-libs/zlib
hdf? (
sci-libs/hdf
virtual/jpeg
@@ -25,7 +26,8 @@ DEPEND="media-libs/libpng
RDEPEND="${DEPEND}"
src_prepare() {
- epatch "${FILESDIR}"/${P}-automagic.patch
+ epatch "${FILESDIR}"/${P}-automagic.patch \
+ "${FILESDIR}"/${P}-png15.patch
eautoreconf
}