summary refs log tree commit diff
path: root/pkgs/development/libraries/libdevil/ftbfs-libpng15.patch
diff options
context:
space:
mode:
authorYury G. Kudryashov <urkud.urkud@gmail.com>2012-02-02 20:30:55 +0000
committerYury G. Kudryashov <urkud.urkud@gmail.com>2012-02-02 20:30:55 +0000
commit9758857fbe69d84e98e9ffd9a0f73e1ac94e4bac (patch)
treee833b09eaad609ac095936217d4f6ac438d642b4 /pkgs/development/libraries/libdevil/ftbfs-libpng15.patch
parent798890b819e188a8a70fd2ade1e9872addb19d19 (diff)
downloadnixlib-9758857fbe69d84e98e9ffd9a0f73e1ac94e4bac.tar
nixlib-9758857fbe69d84e98e9ffd9a0f73e1ac94e4bac.tar.gz
nixlib-9758857fbe69d84e98e9ffd9a0f73e1ac94e4bac.tar.bz2
nixlib-9758857fbe69d84e98e9ffd9a0f73e1ac94e4bac.tar.lz
nixlib-9758857fbe69d84e98e9ffd9a0f73e1ac94e4bac.tar.xz
nixlib-9758857fbe69d84e98e9ffd9a0f73e1ac94e4bac.tar.zst
nixlib-9758857fbe69d84e98e9ffd9a0f73e1ac94e4bac.zip
libdevil: pick a couple of debian patches
svn path=/nixpkgs/trunk/; revision=31986
Diffstat (limited to 'pkgs/development/libraries/libdevil/ftbfs-libpng15.patch')
-rw-r--r--pkgs/development/libraries/libdevil/ftbfs-libpng15.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libdevil/ftbfs-libpng15.patch b/pkgs/development/libraries/libdevil/ftbfs-libpng15.patch
new file mode 100644
index 000000000000..5fc53c2dc6a7
--- /dev/null
+++ b/pkgs/development/libraries/libdevil/ftbfs-libpng15.patch
@@ -0,0 +1,31 @@
+Source: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649554
+--- devil-1.7.8.orig/src-IL/src/il_icon.c
++++ devil-1.7.8/src-IL/src/il_icon.c
+@@ -525,7 +525,11 @@
+ 
+ 	// Expand low-bit-depth grayscale images to 8 bits
+ 	if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++		png_set_expand_gray_1_2_4_to_8(ico_png_ptr);
++#else
+ 		png_set_gray_1_2_4_to_8(ico_png_ptr);
++#endif
+ 	}
+ 
+ 	// Expand RGB images with transparency to full alpha channels
+only in patch2:
+unchanged:
+--- devil-1.7.8.orig/src-IL/src/il_png.c
++++ devil-1.7.8/src-IL/src/il_png.c
+@@ -278,7 +278,11 @@
+ 
+ 	// Expand low-bit-depth grayscale images to 8 bits
+ 	if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++		png_set_expand_gray_1_2_4_to_8(png_ptr);
++#else
+ 		png_set_gray_1_2_4_to_8(png_ptr);
++#endif
+ 	}
+ 
+ 	// Expand RGB images with transparency to full alpha channels