Sat Jan 15 14:51:26 2011 UTC ()
Previous png-1.5 fix was incorrect, try again.
Bump PKGREVISION.


(wiz)
diff -r1.33 -r1.34 pkgsrc/www/webkit-gtk/Makefile
diff -r1.23 -r1.24 pkgsrc/www/webkit-gtk/distinfo
diff -r1.3 -r1.4 pkgsrc/www/webkit-gtk/patches/patch-ab

cvs diff -r1.33 -r1.34 pkgsrc/www/webkit-gtk/Makefile (expand / switch to unified diff)

--- pkgsrc/www/webkit-gtk/Makefile 2011/01/13 13:36:13 1.33
+++ pkgsrc/www/webkit-gtk/Makefile 2011/01/15 14:51:26 1.34
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.33 2011/01/13 13:36:13 wiz Exp $ 1# $NetBSD: Makefile,v 1.34 2011/01/15 14:51:26 wiz Exp $
2 2
3DISTNAME= webkit-1.2.6 3DISTNAME= webkit-1.2.6
4PKGNAME= ${DISTNAME:S/webkit/webkit-gtk/} 4PKGNAME= ${DISTNAME:S/webkit/webkit-gtk/}
5PKGREVISION= 1 5PKGREVISION= 2
6CATEGORIES= www 6CATEGORIES= www
7MASTER_SITES= http://www.webkitgtk.org/ 7MASTER_SITES= http://www.webkitgtk.org/
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://www.webkitgtk.org/ 10HOMEPAGE= http://www.webkitgtk.org/
11COMMENT= GTK2 port of the WebKit browser engine 11COMMENT= GTK2 port of the WebKit browser engine
12 12
13USE_LANGUAGES= c c++ 13USE_LANGUAGES= c c++
14USE_LIBTOOL= yes 14USE_LIBTOOL= yes
15USE_TOOLS+= bison gmake perl:build pkg-config msgfmt 15USE_TOOLS+= bison gmake perl:build pkg-config msgfmt
16 16
17PKGCONFIG_OVERRIDE= WebKit/gtk/webkit.pc.in 17PKGCONFIG_OVERRIDE= WebKit/gtk/webkit.pc.in
18 18

cvs diff -r1.23 -r1.24 pkgsrc/www/webkit-gtk/distinfo (expand / switch to unified diff)

--- pkgsrc/www/webkit-gtk/distinfo 2011/01/14 12:34:25 1.23
+++ pkgsrc/www/webkit-gtk/distinfo 2011/01/15 14:51:26 1.24
@@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
1$NetBSD: distinfo,v 1.23 2011/01/14 12:34:25 wiz Exp $ 1$NetBSD: distinfo,v 1.24 2011/01/15 14:51:26 wiz Exp $
2 2
3SHA1 (webkit-1.2.6.tar.gz) = 0dcfbf7cedda400567f2e081b12987b9d82b33eb 3SHA1 (webkit-1.2.6.tar.gz) = 0dcfbf7cedda400567f2e081b12987b9d82b33eb
4RMD160 (webkit-1.2.6.tar.gz) = 84d7101c84f2735744f08b5e8ed684ccf05a59dd 4RMD160 (webkit-1.2.6.tar.gz) = 84d7101c84f2735744f08b5e8ed684ccf05a59dd
5Size (webkit-1.2.6.tar.gz) = 6613589 bytes 5Size (webkit-1.2.6.tar.gz) = 6613589 bytes
6SHA1 (patch-ab) = 460fd1a9f6c407141f29829ce2ddaee760d98087 6SHA1 (patch-ab) = b28dbc942c3ddcb6309d7c8d3f40871d6d679884
7SHA1 (patch-ad) = a5edd3fbff91488d220a3bfeb506865883c912cb 7SHA1 (patch-ad) = a5edd3fbff91488d220a3bfeb506865883c912cb
8SHA1 (patch-af) = 971258e19192d058c4ca580abcbeb3b02f3bf6ce 8SHA1 (patch-af) = 971258e19192d058c4ca580abcbeb3b02f3bf6ce
9SHA1 (patch-ba) = 4de4994b4e27db0243cca5a2cf409495c3fd382f 9SHA1 (patch-ba) = 4de4994b4e27db0243cca5a2cf409495c3fd382f
10SHA1 (patch-bb) = 7199554b39664df9a6310106f7a03d632731105a 10SHA1 (patch-bb) = 7199554b39664df9a6310106f7a03d632731105a

cvs diff -r1.3 -r1.4 pkgsrc/www/webkit-gtk/patches/Attic/patch-ab (expand / switch to unified diff)

--- pkgsrc/www/webkit-gtk/patches/Attic/patch-ab 2011/01/14 12:34:25 1.3
+++ pkgsrc/www/webkit-gtk/patches/Attic/patch-ab 2011/01/15 14:51:26 1.4
@@ -1,80 +1,123 @@ @@ -1,80 +1,123 @@
1$NetBSD: patch-ab,v 1.3 2011/01/14 12:34:25 wiz Exp $ 1$NetBSD: patch-ab,v 1.4 2011/01/15 14:51:26 wiz Exp $
2 2
3Fix build with png-1.5. 3Fix build with png-1.5.
4 4
5--- WebCore/platform/image-decoders/png/PNGImageDecoder.cpp.orig 2010-12-28 12:28:51.000000000 +0000 5--- WebCore/platform/image-decoders/png/PNGImageDecoder.cpp.orig 2010-12-28 12:28:51.000000000 +0000
6+++ WebCore/platform/image-decoders/png/PNGImageDecoder.cpp 6+++ WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
7@@ -60,7 +60,11 @@ const unsigned long cMaxPNGSize = 100000 7@@ -60,7 +60,11 @@ const unsigned long cMaxPNGSize = 100000
8 // Called if the decoding of the image fails. 8 // Called if the decoding of the image fails.
9 static void PNGAPI decodingFailed(png_structp png, png_const_charp) 9 static void PNGAPI decodingFailed(png_structp png, png_const_charp)
10 { 10 {
11+#if (PNG_LIBPNG_VER < 10500) 11+#if (PNG_LIBPNG_VER < 10500)
12 longjmp(JMPBUF(png), 1); 12 longjmp(JMPBUF(png), 1);
13+#else 13+#else
14+ png_longjmp(png, 1); 14+ png_longjmp(png, 1);
15+#endif 15+#endif
16 } 16 }
17  17
18 // Callbacks given to the read struct. The first is for warnings (we want to 18 // Callbacks given to the read struct. The first is for warnings (we want to
19@@ -216,18 +220,26 @@ void PNGImageDecoder::headerAvailable() 19@@ -139,14 +143,31 @@ public:
 20
 21 const char* segment;
 22 while (unsigned segmentLength = data.getSomeData(segment, m_readOffset)) {
 23- m_readOffset += segmentLength;
 24- m_currentBufferSize = m_readOffset;
 25- png_process_data(m_png, m_info, reinterpret_cast<png_bytep>(const_cast<char*>(segment)), segmentLength);
 26- // We explicitly specify the superclass isSizeAvailable() because we
 27- // merely want to check if we've managed to set the size, not
 28- // (recursively) trigger additional decoding if we haven't.
 29- if (sizeOnly ? decoder->ImageDecoder::isSizeAvailable() : decoder->isComplete())
 30- return;
 31+ if (sizeOnly) {
 32+ while (segmentLength > 0) {
 33+ // Unfortunately if we read the image at this point it will be ignored,
 34+ // therefore take small steps through the data until the head is read.
 35+ // This is crude but effective.
 36+ m_currentBufferSize = ++m_readOffset;
 37+ png_process_data(m_png, m_info, reinterpret_cast<png_bytep>(const_cast<char*>(segment)), 1);
 38+
 39+ // We explicitly specify the superclass isSizeAvailable() because we
 40+ // merely want to check if we've managed to set the size, not
 41+ // (recursively) trigger additional decoding if we haven't.
 42+ if (decoder->ImageDecoder::isSizeAvailable())
 43+ return;
 44+
 45+ --segmentLength;
 46+ ++segment;
 47+ }
 48+ } else {
 49+ // Just process the whole segment at once:
 50+ m_readOffset += segmentLength;
 51+ m_currentBufferSize = m_readOffset;
 52+ png_process_data(m_png, m_info, reinterpret_cast<png_bytep>(const_cast<char*>(segment)), segmentLength);
 53+ if (decoder->isComplete())
 54+ return;
 55+ }
 56 }
 57 if (!decoder->isComplete() && decoder->isAllDataReceived())
 58 decoder->pngComplete();
 59@@ -216,18 +237,26 @@ void PNGImageDecoder::headerAvailable()
20 { 60 {
21 png_structp png = m_reader->pngPtr(); 61 png_structp png = m_reader->pngPtr();
22 png_infop info = m_reader->infoPtr(); 62 png_infop info = m_reader->infoPtr();
23- png_uint_32 width = png->width; 63- png_uint_32 width = png->width;
24- png_uint_32 height = png->height; 64- png_uint_32 height = png->height;
25+ png_uint_32 width = png_get_image_width(png, info); 65+ png_uint_32 width = png_get_image_width(png, info);
26+ png_uint_32 height = png_get_image_height(png, info); 66+ png_uint_32 height = png_get_image_height(png, info);
27  67
28 // Protect against large images. 68 // Protect against large images.
29- if (png->width > cMaxPNGSize || png->height > cMaxPNGSize) { 69- if (png->width > cMaxPNGSize || png->height > cMaxPNGSize) {
30+ if (png_get_image_width(png, info) > cMaxPNGSize || png_get_image_height(png, info) > cMaxPNGSize) { 70+ if (width > cMaxPNGSize || height > cMaxPNGSize) {
31+#if (PNG_LIBPNG_VER < 10500) 71+#if (PNG_LIBPNG_VER < 10500)
32 longjmp(JMPBUF(png), 1); 72 longjmp(JMPBUF(png), 1);
33+#else 73+#else
34+ png_longjmp(png, 1); 74+ png_longjmp(png, 1);
35+#endif 75+#endif
36 return; 76 return;
37 } 77 }
38  78
39 // We can fill in the size now that the header is available. 79 // We can fill in the size now that the header is available.
40 if (!setSize(width, height)) { 80 if (!setSize(width, height)) {
41+#if (PNG_LIBPNG_VER < 10500) 81+#if (PNG_LIBPNG_VER < 10500)
42 longjmp(JMPBUF(png), 1); 82 longjmp(JMPBUF(png), 1);
43+#else 83+#else
44+ png_longjmp(png, 1); 84+ png_longjmp(png, 1);
45+#endif 85+#endif
46 return; 86 return;
47 } 87 }
48  88
49@@ -277,8 +289,8 @@ void PNGImageDecoder::headerAvailable() 89@@ -274,12 +303,6 @@ void PNGImageDecoder::headerAvailable()
 90 ASSERT(channels == 3 || channels == 4);
50  91
51 if (m_reader->decodingSizeOnly()) { 92 m_reader->setHasAlpha(channels == 4);
52 // If we only needed the size, halt the reader.  93-
 94- if (m_reader->decodingSizeOnly()) {
 95- // If we only needed the size, halt the reader.
53- m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size); 96- m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size);
54- png->buffer_size = 0; 97- png->buffer_size = 0;
55+ m_reader->setReadOffset(m_reader->currentBufferSize() - png_get_compression_buffer_size(png)); 98- }
56+ png_set_compression_buffer_size(png, 0); 
57 } 
58 } 99 }
59  100
60@@ -291,7 +303,11 @@ void PNGImageDecoder::rowAvailable(unsig 101 void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, int interlacePass)
 102@@ -291,7 +314,11 @@ void PNGImageDecoder::rowAvailable(unsig
61 RGBA32Buffer& buffer = m_frameBufferCache[0]; 103 RGBA32Buffer& buffer = m_frameBufferCache[0];
62 if (buffer.status() == RGBA32Buffer::FrameEmpty) { 104 if (buffer.status() == RGBA32Buffer::FrameEmpty) {
63 if (!buffer.setSize(scaledSize().width(), scaledSize().height())) { 105 if (!buffer.setSize(scaledSize().width(), scaledSize().height())) {
64+#if (PNG_LIBPNG_VER < 10500) 106+#if (PNG_LIBPNG_VER < 10500)
65 longjmp(JMPBUF(m_reader->pngPtr()), 1); 107 longjmp(JMPBUF(m_reader->pngPtr()), 1);
66+#else 108+#else
67+ png_longjmp(m_reader->pngPtr(), 1); 109+ png_longjmp(m_reader->pngPtr(), 1);
68+#endif 110+#endif
69 return; 111 return;
70 } 112 }
71 buffer.setStatus(RGBA32Buffer::FramePartial); 113 buffer.setStatus(RGBA32Buffer::FramePartial);
72@@ -300,7 +316,7 @@ void PNGImageDecoder::rowAvailable(unsig 114@@ -300,7 +327,8 @@ void PNGImageDecoder::rowAvailable(unsig
73 // For PNGs, the frame always fills the entire image. 115 // For PNGs, the frame always fills the entire image.
74 buffer.setRect(IntRect(IntPoint(), size())); 116 buffer.setRect(IntRect(IntPoint(), size()));
75  117
76- if (m_reader->pngPtr()->interlaced) 118- if (m_reader->pngPtr()->interlaced)
77+ if (png_get_interlace_type(m_reader->pngPtr(), m_reader->infoPtr()) != PNG_INTERLACE_NONE) 119+ if (png_get_interlace_type(m_reader->pngPtr(), m_reader->infoPtr())
 120+ != PNG_INTERLACE_NONE)
78 m_reader->createInterlaceBuffer((m_reader->hasAlpha() ? 4 : 3) * size().width() * size().height()); 121 m_reader->createInterlaceBuffer((m_reader->hasAlpha() ? 4 : 3) * size().width() * size().height());
79 } 122 }
80  123