Author: urkud
Date: Thu Feb 2 20:30:55 2012
New Revision: 31986
URL: https://nixos.org/websvn/nix/?rev=31986&sc=1
Log:
libdevil: pick a couple of debian patches
Added:
nixpkgs/trunk/pkgs/development/libraries/libdevil/ftbfs-libpng15.patch
Modified:
nixpkgs/trunk/pkgs/development/libraries/libdevil/default.nix
Modified: nixpkgs/trunk/pkgs/development/libraries/libdevil/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/libdevil/default.nix Thu Feb
2 17:03:01 2012 (r31985)
+++ nixpkgs/trunk/pkgs/development/libraries/libdevil/default.nix Thu Feb
2 20:30:55 2012 (r31986)
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl
-, libjpeg ? null, libpng ? null, libmng ? null, lcms1 ? null, libtiff ? null,
openexr ? null, mesa ? null, xlibs ? null }:
+{ stdenv, fetchurl, libjpeg, libpng, libmng, lcms1, libtiff, openexr, mesa
+, libX11, pkgconfig }:
+
stdenv.mkDerivation rec {
name ="libdevil-${version}";
@@ -10,14 +11,24 @@
sha256 = "1zd850nn7nvkkhasrv7kn17kzgslr5ry933v6db62s4lr0zzlbv8";
};
- buildInputs = [ libjpeg libpng libmng lcms1 libtiff openexr mesa
xlibs.libX11 ];
+ buildInputs = [ libjpeg libpng libmng lcms1 libtiff openexr mesa libX11 ];
+ buildNativeInputs = [ pkgconfig ];
+
configureFlags = [ "--enable-ILU" "--enable-ILUT" ];
+ patches =
+ [ ( fetchurl {
+ url =
http://patch-tracker.debian.org/patch/series/dl/devil/1.7.8-6.1/03_CVE-2009-3994.diff;
+ sha256 = "0qkx2qfv02igbrmsn6z5a3lbrbwjfh3rb0c2sj54wy0j1f775hbc";
+ } )
+ ./ftbfs-libpng15.patch
+ ];
+
meta = with stdenv.lib; {
homepage = http://openil.sourceforge.net/;
- description = "An image library which can can load, save, convert,
manipulate,
- filter and display a wide variety of image formats.";
+ description = "An image library which can can load, save, convert,
manipulate, filter and display a wide variety of image formats";
license = licenses.lgpl2;
- maintainers = [ maintainers.phreedom ];
+ platforms = platforms.all;
+ maintainers = [ maintainers.phreedom maintainers.urkud ];
};
-}
\ No newline at end of file
+}
Added: nixpkgs/trunk/pkgs/development/libraries/libdevil/ftbfs-libpng15.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/development/libraries/libdevil/ftbfs-libpng15.patch
Thu Feb 2 20:30:55 2012 (r31986)
@@ -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
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits