nixpkgs/pkgs/development/libraries/libdevil/default.nix

60 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, libjpeg, libpng, libmng, lcms1, libtiff, openexr, libGL
2016-11-05 19:17:42 +00:00
, libX11, pkgconfig, OpenGL
2015-09-29 02:49:47 +01:00
}:
stdenv.mkDerivation rec {
2016-11-05 19:17:42 +00:00
name = "libdevil-${version}";
version = "1.7.8";
src = fetchurl {
url = "mirror://sourceforge/openil/DevIL-${version}.tar.gz";
sha256 = "1zd850nn7nvkkhasrv7kn17kzgslr5ry933v6db62s4lr0zzlbv8";
};
2016-11-05 19:17:42 +00:00
outputs = [ "out" "dev" ];
buildInputs = [ libjpeg libpng libmng lcms1 libtiff openexr libGL libX11 ]
2015-09-29 02:49:47 +01:00
++ stdenv.lib.optionals stdenv.isDarwin [ OpenGL ];
nativeBuildInputs = [ pkgconfig ];
configureFlags = [ "--enable-ILU" "--enable-ILUT" ];
2014-08-24 07:15:23 +01:00
preConfigure = ''
sed -i 's, -std=gnu99,,g' configure
sed -i 's,malloc.h,stdlib.h,g' src-ILU/ilur/ilur.c
2015-11-25 18:09:52 +00:00
'' + stdenv.lib.optionalString stdenv.cc.isClang ''
sed -i 's/libIL_la_CXXFLAGS = $(AM_CFLAGS)/libIL_la_CXXFLAGS =/g' lib/Makefile.in
2014-08-24 07:15:23 +01:00
'';
postConfigure = ''
sed -i '/RESTRICT_KEYWORD/d' include/IL/config.h
'';
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
./il_endian.h.patch
];
2016-11-05 19:17:42 +00:00
enableParallelBuilding = true;
2018-08-08 19:45:08 +01:00
postPatch = ''
for a in test/Makefile.in test/format_test/format_checks.sh.in ; do
substituteInPlace $a \
--replace /bin/bash ${stdenv.shell}
done
'';
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";
license = licenses.lgpl2;
2013-10-07 16:36:47 +01:00
platforms = platforms.mesaPlatforms;
maintainers = [ maintainers.phreedom ];
};
}