summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2013-04-25 12:04:26 +0000
committerJustin Lecher <jlec@gentoo.org>2013-04-25 12:04:26 +0000
commit8ddb10960a3617012c0cc3fd32252d8395b98a66 (patch)
tree9fdecf24ec7517c170b5ec6a121cb99c78c76c6c /dev-tcltk/tkimg/files
parentversion bump (diff)
downloadgentoo-2-8ddb10960a3617012c0cc3fd32252d8395b98a66.tar.gz
gentoo-2-8ddb10960a3617012c0cc3fd32252d8395b98a66.tar.bz2
gentoo-2-8ddb10960a3617012c0cc3fd32252d8395b98a66.zip
dev-tcltk/tkimg: Add patch for libpng-1.6, thanks Johan Hattne, #465828
(Portage version: 2.2.0_alpha173/cvs/Linux x86_64, signed Manifest commit with key 8009D6F070EB7916)
Diffstat (limited to 'dev-tcltk/tkimg/files')
-rw-r--r--dev-tcltk/tkimg/files/tkimg-1.4-png2.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch b/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch
new file mode 100644
index 000000000000..195e9be43fa7
--- /dev/null
+++ b/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch
@@ -0,0 +1,36 @@
+--- png/png.c.orig 2010-06-17 06:40:24.000000000 -0700
++++ png/png.c 2013-04-23 20:57:32.000000000 -0700
+@@ -332,6 +332,16 @@
+ png_set_expand(png_ptr);
+ }
+
++ if (png_get_sRGB && png_get_sRGB(png_ptr, info_ptr, &intent)) {
++ png_set_sRGB(png_ptr, info_ptr, intent);
++ } else if (png_get_gAMA) {
++ double gamma;
++ if (!png_get_gAMA(png_ptr, info_ptr, &gamma)) {
++ gamma = 0.45455;
++ }
++ png_set_gamma(png_ptr, 1.0, gamma);
++ }
++
+ png_read_update_info(png_ptr,info_ptr);
+ block.pixelSize = png_get_channels(png_ptr, info_ptr);
+ block.pitch = png_get_rowbytes(png_ptr, info_ptr);
+@@ -353,16 +363,6 @@
+ block.offset[3] = 0;
+ }
+
+- if (png_get_sRGB && png_get_sRGB(png_ptr, info_ptr, &intent)) {
+- png_set_sRGB(png_ptr, info_ptr, intent);
+- } else if (png_get_gAMA) {
+- double gamma;
+- if (!png_get_gAMA(png_ptr, info_ptr, &gamma)) {
+- gamma = 0.45455;
+- }
+- png_set_gamma(png_ptr, 1.0, gamma);
+- }
+-
+ png_data= (char **) ckalloc(sizeof(char *) * info_height +
+ info_height * block.pitch);
+