diff options
author | wiz <wiz@pkgsrc.org> | 2011-01-14 11:54:04 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2011-01-14 11:54:04 +0000 |
commit | 8a1765f57d234b2b9c17f353d4f6590a7d3510c4 (patch) | |
tree | 47aefac5023eaaf7bda4a65ceb434f721bd11ec4 /www/webkit-gtk | |
parent | 45b274147a7fb6630ddf14e984cf970123dc5e39 (diff) | |
download | pkgsrc-8a1765f57d234b2b9c17f353d4f6590a7d3510c4.tar.gz |
Fix build with png-1.5.
Diffstat (limited to 'www/webkit-gtk')
-rw-r--r-- | www/webkit-gtk/distinfo | 3 | ||||
-rw-r--r-- | www/webkit-gtk/patches/patch-ab | 80 |
2 files changed, 82 insertions, 1 deletions
diff --git a/www/webkit-gtk/distinfo b/www/webkit-gtk/distinfo index 68fd02494b4..53357e349d0 100644 --- a/www/webkit-gtk/distinfo +++ b/www/webkit-gtk/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.22 2011/01/08 14:24:10 drochner Exp $ +$NetBSD: distinfo,v 1.23 2011/01/14 12:34:25 wiz Exp $ SHA1 (webkit-1.2.6.tar.gz) = 0dcfbf7cedda400567f2e081b12987b9d82b33eb RMD160 (webkit-1.2.6.tar.gz) = 84d7101c84f2735744f08b5e8ed684ccf05a59dd Size (webkit-1.2.6.tar.gz) = 6613589 bytes +SHA1 (patch-ab) = 460fd1a9f6c407141f29829ce2ddaee760d98087 SHA1 (patch-ad) = a5edd3fbff91488d220a3bfeb506865883c912cb SHA1 (patch-af) = 971258e19192d058c4ca580abcbeb3b02f3bf6ce SHA1 (patch-ba) = 4de4994b4e27db0243cca5a2cf409495c3fd382f diff --git a/www/webkit-gtk/patches/patch-ab b/www/webkit-gtk/patches/patch-ab new file mode 100644 index 00000000000..41e8cb82f83 --- /dev/null +++ b/www/webkit-gtk/patches/patch-ab @@ -0,0 +1,80 @@ +$NetBSD: patch-ab,v 1.3 2011/01/14 12:34:25 wiz Exp $ + +Fix build with png-1.5. + +--- WebCore/platform/image-decoders/png/PNGImageDecoder.cpp.orig 2010-12-28 12:28:51.000000000 +0000 ++++ WebCore/platform/image-decoders/png/PNGImageDecoder.cpp +@@ -60,7 +60,11 @@ const unsigned long cMaxPNGSize = 100000 + // Called if the decoding of the image fails. + static void PNGAPI decodingFailed(png_structp png, png_const_charp) + { ++#if (PNG_LIBPNG_VER < 10500) + longjmp(JMPBUF(png), 1); ++#else ++ png_longjmp(png, 1); ++#endif + } + + // Callbacks given to the read struct. The first is for warnings (we want to +@@ -216,18 +220,26 @@ void PNGImageDecoder::headerAvailable() + { + 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 (png_get_image_width(png, info) > cMaxPNGSize || png_get_image_height(png, info) > cMaxPNGSize) { ++#if (PNG_LIBPNG_VER < 10500) + longjmp(JMPBUF(png), 1); ++#else ++ png_longjmp(png, 1); ++#endif + return; + } + + // We can fill in the size now that the header is available. + if (!setSize(width, height)) { ++#if (PNG_LIBPNG_VER < 10500) + longjmp(JMPBUF(png), 1); ++#else ++ png_longjmp(png, 1); ++#endif + return; + } + +@@ -277,8 +289,8 @@ void PNGImageDecoder::headerAvailable() + + if (m_reader->decodingSizeOnly()) { + // If we only needed the size, halt the reader. +- m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size); +- png->buffer_size = 0; ++ m_reader->setReadOffset(m_reader->currentBufferSize() - png_get_compression_buffer_size(png)); ++ png_set_compression_buffer_size(png, 0); + } + } + +@@ -291,7 +303,11 @@ void PNGImageDecoder::rowAvailable(unsig + RGBA32Buffer& buffer = m_frameBufferCache[0]; + if (buffer.status() == RGBA32Buffer::FrameEmpty) { + if (!buffer.setSize(scaledSize().width(), scaledSize().height())) { ++#if (PNG_LIBPNG_VER < 10500) + longjmp(JMPBUF(m_reader->pngPtr()), 1); ++#else ++ png_longjmp(m_reader->pngPtr(), 1); ++#endif + return; + } + buffer.setStatus(RGBA32Buffer::FramePartial); +@@ -300,7 +316,7 @@ void PNGImageDecoder::rowAvailable(unsig + // For PNGs, the frame always fills the entire image. + buffer.setRect(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()); + } + |