summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hill <dirtyepic@gentoo.org>2011-03-19 17:20:02 +0000
committerRyan Hill <dirtyepic@gentoo.org>2011-03-19 17:20:02 +0000
commit1e2927ece33c1581b7d08158ec43d39af94b42cb (patch)
tree3fe9ec5e71336f8d22247d2785daf901715d6170 /x11-libs/wxGTK/files
parentVersion bump (diff)
downloadgentoo-2-1e2927ece33c1581b7d08158ec43d39af94b42cb.tar.gz
gentoo-2-1e2927ece33c1581b7d08158ec43d39af94b42cb.tar.bz2
gentoo-2-1e2927ece33c1581b7d08158ec43d39af94b42cb.zip
Add patch fixing build with libpng-1.5 (bug #355035).
(Portage version: 2.2.0_alpha28/cvs/Linux x86_64)
Diffstat (limited to 'x11-libs/wxGTK/files')
-rw-r--r--x11-libs/wxGTK/files/wxGTK-2.8.11-libpng15.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/x11-libs/wxGTK/files/wxGTK-2.8.11-libpng15.patch b/x11-libs/wxGTK/files/wxGTK-2.8.11-libpng15.patch
new file mode 100644
index 000000000000..56abde593155
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-2.8.11-libpng15.patch
@@ -0,0 +1,36 @@
+diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp
+index 7891ff8..197bda5 100644
+--- a/src/common/imagpng.cpp
++++ b/src/common/imagpng.cpp
+@@ -529,7 +529,7 @@ wxPNGHandler::LoadFile(wxImage *image,
+ png_structp png_ptr = png_create_read_struct
+ (
+ PNG_LIBPNG_VER_STRING,
+- (voidp) NULL,
++ NULL,
+ wx_png_error,
+ wx_png_warning
+ );
+@@ -586,16 +586,18 @@ wxPNGHandler::LoadFile(wxImage *image,
+ #if wxUSE_PALETTE
+ if (color_type == PNG_COLOR_TYPE_PALETTE)
+ {
+- const size_t ncolors = info_ptr->num_palette;
++ int ncolors = 0;
++ png_colorp palette;
++ png_get_PLTE( png_ptr, info_ptr, &palette, &ncolors);
+ unsigned char* r = new unsigned char[ncolors];
+ unsigned char* g = new unsigned char[ncolors];
+ unsigned char* b = new unsigned char[ncolors];
+
+ for (size_t j = 0; j < ncolors; j++)
+ {
+- r[j] = info_ptr->palette[j].red;
+- g[j] = info_ptr->palette[j].green;
+- b[j] = info_ptr->palette[j].blue;
++ r[j] = palette[j].red;
++ g[j] = palette[j].green;
++ b[j] = palette[j].blue;
+ }
+
+ image->SetPalette(wxPalette(ncolors, r, g, b));