Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libdevil / ftbfs-libpng15.patch
blob5fc53c2dc6a70f8e0833c87286be9cf45c5f68b1
1 Source: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649554
2 --- devil-1.7.8.orig/src-IL/src/il_icon.c
3 +++ devil-1.7.8/src-IL/src/il_icon.c
4 @@ -525,7 +525,11 @@
6 // Expand low-bit-depth grayscale images to 8 bits
7 if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
8 +#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
9 + png_set_expand_gray_1_2_4_to_8(ico_png_ptr);
10 +#else
11 png_set_gray_1_2_4_to_8(ico_png_ptr);
12 +#endif
15 // Expand RGB images with transparency to full alpha channels
16 only in patch2:
17 unchanged:
18 --- devil-1.7.8.orig/src-IL/src/il_png.c
19 +++ devil-1.7.8/src-IL/src/il_png.c
20 @@ -278,7 +278,11 @@
22 // Expand low-bit-depth grayscale images to 8 bits
23 if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
24 +#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
25 + png_set_expand_gray_1_2_4_to_8(png_ptr);
26 +#else
27 png_set_gray_1_2_4_to_8(png_ptr);
28 +#endif
31 // Expand RGB images with transparency to full alpha channels