summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2013-04-27 10:25:22 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2013-04-27 10:25:22 +0000
commitf0bbb03aaa86e75db2b1c9edfc8c0346df9ea267 (patch)
tree3ccc921ca6b66a293f49423d1cc471a828d70e62 /x11-libs/cairo/files/cairo-1.12.14-libpng16.patch
parentsys-fs/aufs3: Bump to latest aufs3 release (diff)
downloadhistorical-f0bbb03aaa86e75db2b1c9edfc8c0346df9ea267.tar.gz
historical-f0bbb03aaa86e75db2b1c9edfc8c0346df9ea267.tar.bz2
historical-f0bbb03aaa86e75db2b1c9edfc8c0346df9ea267.zip
Backport upstream compability patch for libpng16 wrt #465658 by Richard Grenville
Package-Manager: portage-2.2.0_alpha173/cvs/Linux x86_64 Manifest-Sign-Key: 0x4868F14D
Diffstat (limited to 'x11-libs/cairo/files/cairo-1.12.14-libpng16.patch')
-rw-r--r--x11-libs/cairo/files/cairo-1.12.14-libpng16.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/x11-libs/cairo/files/cairo-1.12.14-libpng16.patch b/x11-libs/cairo/files/cairo-1.12.14-libpng16.patch
new file mode 100644
index 000000000000..c16317811982
--- /dev/null
+++ b/x11-libs/cairo/files/cairo-1.12.14-libpng16.patch
@@ -0,0 +1,40 @@
+From 2dd2c826a5b367d32cf2d48ed69754795990c5db Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Tue, 16 Apr 2013 09:58:56 +0000
+Subject: png: Avoid marking the surface as in error after a png warning
+
+It turns out that libpng will continue to load an image after throwing a
+warning, and that libpng16 now throws warnings for images that libpng15
+and earlier loaded without error. As we were happily loading those
+images into cairo surfaces before, we are therefore being overzealous
+in throwing an error now - so just squelch the warning.
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairo-png.c b/src/cairo-png.c
+index e74a4a8..068617d 100644
+--- a/src/cairo-png.c
++++ b/src/cairo-png.c
+@@ -149,13 +149,13 @@ static void
+ png_simple_warning_callback (png_structp png,
+ png_const_charp error_msg)
+ {
+- cairo_status_t *error = png_get_error_ptr (png);
+-
+- /* default to the most likely error */
+- if (*error == CAIRO_STATUS_SUCCESS)
+- *error = _cairo_error (CAIRO_STATUS_NO_MEMORY);
+-
+- /* png does not expect to abort and will try to tidy up after a warning */
++ /* png does not expect to abort and will try to tidy up and continue
++ * loading the image after a warning. So we also want to return the
++ * (incorrect?) surface.
++ *
++ * We use our own warning callback to squelch any attempts by libpng
++ * to write to stderr as we may not be in control of that output.
++ */
+ }
+
+
+--
+cgit v0.9.0.2-2-gbebe