summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-libs/webkit-gtk/ChangeLog6
-rw-r--r--net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch36
-rw-r--r--net-libs/webkit-gtk/webkit-gtk-1.2.7.ebuild4
3 files changed, 44 insertions, 2 deletions
diff --git a/net-libs/webkit-gtk/ChangeLog b/net-libs/webkit-gtk/ChangeLog
index 241d60e902fc..d36392bae8a9 100644
--- a/net-libs/webkit-gtk/ChangeLog
+++ b/net-libs/webkit-gtk/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-libs/webkit-gtk
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/ChangeLog,v 1.106 2011/03/13 15:47:19 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/ChangeLog,v 1.107 2011/04/04 20:48:14 ssuominen Exp $
+
+ 04 Apr 2011; Samuli Suominen <ssuominen@gentoo.org> webkit-gtk-1.2.7.ebuild,
+ +files/webkit-gtk-1.2.7-libpng15.patch:
+ Fix building with media-libs/libpng >= 1.5 wrt #355015 by Lars Wendler.
13 Mar 2011; Kacper Kowalik <xarthisius@gentoo.org> webkit-gtk-1.2.7.ebuild:
ppc64 stable wrt #354799
diff --git a/net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch b/net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch
new file mode 100644
index 000000000000..6a4f757f2de2
--- /dev/null
+++ b/net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch
@@ -0,0 +1,36 @@
+--- WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
++++ WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
+@@ -242,9 +242,9 @@
+ png_structp png = m_reader->pngPtr();
+ png_infop info = m_reader->infoPtr();
+- png_uint_32 width = png->width;
+- png_uint_32 height = png->height;
++ png_uint_32 width = png_get_image_width(png, info);
++ png_uint_32 height = png_get_image_height(png, info);
+
+ // Protect against large images.
+- if (png->width > cMaxPNGSize || png->height > cMaxPNGSize) {
++ if (width > cMaxPNGSize || height > cMaxPNGSize) {
+ longjmp(JMPBUF(png), 1);
+ return;
+@@ -319,7 +319,12 @@
+
+ if (m_reader->decodingSizeOnly()) {
+- // If we only needed the size, halt the reader.
++ // If we only needed the size, halt the reader.
++#if defined(PNG_LIBPNG_VER_MAJOR) && defined(PNG_LIBPNG_VER_MINOR) && (PNG_LIBPNG_VER_MAJOR > 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 5))
++ // '0' argument to png_process_data_pause means: Do not cache unprocessed data.
++ m_reader->setReadOffset(m_reader->currentBufferSize() - png_process_data_pause(png, 0));
++#else
+ m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size);
+ png->buffer_size = 0;
++#endif
+ }
+ }
+@@ -344,5 +349,5 @@
+ buffer.setOriginalFrameRect(IntRect(IntPoint(), size()));
+
+- if (m_reader->pngPtr()->interlaced)
++ if (png_get_interlace_type(m_reader->pngPtr(), m_reader->infoPtr()) != PNG_INTERLACE_NONE)
+ m_reader->createInterlaceBuffer((m_reader->hasAlpha() ? 4 : 3) * size().width() * size().height());
+ }
diff --git a/net-libs/webkit-gtk/webkit-gtk-1.2.7.ebuild b/net-libs/webkit-gtk/webkit-gtk-1.2.7.ebuild
index 1fc8f68c6851..661b2a3d0838 100644
--- a/net-libs/webkit-gtk/webkit-gtk-1.2.7.ebuild
+++ b/net-libs/webkit-gtk/webkit-gtk-1.2.7.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/net-libs/webkit-gtk/webkit-gtk-1.2.7.ebuild,v 1.6 2011/03/13 15:47:19 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-1.2.7.ebuild,v 1.7 2011/04/04 20:48:14 ssuominen Exp $
EAPI="3"
@@ -68,6 +68,8 @@ src_prepare() {
# Don't build tests if not needed, part of bug #343249
epatch "${FILESDIR}/${PN}-1.2.5-tests-build.patch"
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+
# Prevent maintainer mode from being triggered during make
AT_M4DIR=autotools eautoreconf
}