diff options
author | Christoph Mende <angelos@gentoo.org> | 2011-06-19 16:26:16 +0000 |
---|---|---|
committer | Christoph Mende <angelos@gentoo.org> | 2011-06-19 16:26:16 +0000 |
commit | 1f8c58d010898c037f7909f750f7d35fdfc0e0a2 (patch) | |
tree | d16bc007b672b55aaa5ba3aef2a1d61bc7cd7eaf /net-libs/webkit-gtk | |
parent | sparc stable wrt #365337 (diff) | |
download | gentoo-2-1f8c58d010898c037f7909f750f7d35fdfc0e0a2.tar.gz gentoo-2-1f8c58d010898c037f7909f750f7d35fdfc0e0a2.tar.bz2 gentoo-2-1f8c58d010898c037f7909f750f7d35fdfc0e0a2.zip |
Fix building with libpng-1.5
(Portage version: 2.2.0_alpha41/cvs/Linux x86_64)
Diffstat (limited to 'net-libs/webkit-gtk')
-rw-r--r-- | net-libs/webkit-gtk/ChangeLog | 7 | ||||
-rw-r--r-- | net-libs/webkit-gtk/files/webkit-gtk-1.4.1-libpng15.patch | 57 | ||||
-rw-r--r-- | net-libs/webkit-gtk/webkit-gtk-1.4.1-r200.ebuild | 5 | ||||
-rw-r--r-- | net-libs/webkit-gtk/webkit-gtk-1.4.1-r300.ebuild | 5 |
4 files changed, 71 insertions, 3 deletions
diff --git a/net-libs/webkit-gtk/ChangeLog b/net-libs/webkit-gtk/ChangeLog index 179dca6535db..b35dd5138acd 100644 --- a/net-libs/webkit-gtk/ChangeLog +++ b/net-libs/webkit-gtk/ChangeLog @@ -1,6 +1,11 @@ # 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.111 2011/06/12 09:09:23 nirbheek Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/ChangeLog,v 1.112 2011/06/19 16:26:16 angelos Exp $ + + 19 Jun 2011; Christoph Mende <angelos@gentoo.org> + webkit-gtk-1.4.1-r200.ebuild, webkit-gtk-1.4.1-r300.ebuild, + +files/webkit-gtk-1.4.1-libpng15.patch: + Fix building with libpng-1.5 12 Jun 2011; Nirbheek Chauhan <nirbheek@gentoo.org> webkit-gtk-1.4.1-r200.ebuild, webkit-gtk-1.4.1-r300.ebuild: diff --git a/net-libs/webkit-gtk/files/webkit-gtk-1.4.1-libpng15.patch b/net-libs/webkit-gtk/files/webkit-gtk-1.4.1-libpng15.patch new file mode 100644 index 000000000000..75a0d84c5e29 --- /dev/null +++ b/net-libs/webkit-gtk/files/webkit-gtk-1.4.1-libpng15.patch @@ -0,0 +1,57 @@ +diff --git a/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp b/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp +index 8edfe36..44cb98c 100644 +--- a/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp ++++ b/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp +@@ -226,7 +226,11 @@ static ColorProfile readColorProfile(png_structp png, png_infop info) + #ifdef PNG_iCCP_SUPPORTED + char* profileName; + int compressionType; +- char* profile; ++#if (PNG_LIBPNG_VER < 10500) ++ png_charp profile; ++#else ++ png_bytep profile; ++#endif + png_uint_32 profileLength; + if (png_get_iCCP(png, info, &profileName, &compressionType, &profile, &profileLength)) { + ColorProfile colorProfile; +@@ -241,11 +245,11 @@ 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 (width > cMaxPNGSize || height > cMaxPNGSize) { + longjmp(JMPBUF(png), 1); + return; + } +@@ -318,9 +322,14 @@ void PNGImageDecoder::headerAvailable() + m_reader->setHasAlpha(channels == 4); + + 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 + } + } + +@@ -343,7 +352,7 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, + // For PNGs, the frame always fills the entire image. + 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.4.1-r200.ebuild b/net-libs/webkit-gtk/webkit-gtk-1.4.1-r200.ebuild index 7840f9ea5706..0430a433fa03 100644 --- a/net-libs/webkit-gtk/webkit-gtk-1.4.1-r200.ebuild +++ b/net-libs/webkit-gtk/webkit-gtk-1.4.1-r200.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.4.1-r200.ebuild,v 1.3 2011/06/12 09:09:23 nirbheek Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-1.4.1-r200.ebuild,v 1.4 2011/06/19 16:26:16 angelos Exp $ EAPI="4" @@ -73,6 +73,9 @@ src_prepare() { # XXX: Fails to apply #epatch "${FILESDIR}/${PN}-1.2.5-tests-build.patch" + # Fix compilation against libpng-1.5 + epatch "${FILESDIR}"/${P}-libpng15.patch + # Prevent maintainer mode from being triggered during make AT_M4DIR=Source/autotools eautoreconf } diff --git a/net-libs/webkit-gtk/webkit-gtk-1.4.1-r300.ebuild b/net-libs/webkit-gtk/webkit-gtk-1.4.1-r300.ebuild index 8464cd9ae3da..b820811081b8 100644 --- a/net-libs/webkit-gtk/webkit-gtk-1.4.1-r300.ebuild +++ b/net-libs/webkit-gtk/webkit-gtk-1.4.1-r300.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.4.1-r300.ebuild,v 1.3 2011/06/12 09:09:23 nirbheek Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-1.4.1-r300.ebuild,v 1.4 2011/06/19 16:26:16 angelos Exp $ EAPI="4" @@ -74,6 +74,9 @@ src_prepare() { # XXX: Fails to apply #epatch "${FILESDIR}/${PN}-1.2.5-tests-build.patch" + # Fix compilation against libpng-1.5 + epatch "${FILESDIR}"/${P}-libpng15.patch + # Prevent maintainer mode from being triggered during make AT_M4DIR=Source/autotools eautoreconf } |