1 { lib, stdenv, fetchurl, libjpeg, libpng, libmng, lcms1, libtiff, openexr, libGL
2 , libX11, pkg-config, OpenGL
5 stdenv.mkDerivation rec {
11 url = "mirror://sourceforge/openil/DevIL-${version}.tar.gz";
12 sha256 = "1zd850nn7nvkkhasrv7kn17kzgslr5ry933v6db62s4lr0zzlbv8";
15 outputs = [ "out" "dev" ];
17 buildInputs = [ libjpeg libpng libmng lcms1 libtiff openexr libGL libX11 ]
18 ++ lib.optionals stdenv.isDarwin [ OpenGL ];
19 nativeBuildInputs = [ pkg-config ];
21 configureFlags = [ "--enable-ILU" "--enable-ILUT" ];
24 sed -i 's, -std=gnu99,,g' configure
25 sed -i 's,malloc.h,stdlib.h,g' src-ILU/ilur/ilur.c
26 '' + lib.optionalString stdenv.cc.isClang ''
27 sed -i 's/libIL_la_CXXFLAGS = $(AM_CFLAGS)/libIL_la_CXXFLAGS =/g' lib/Makefile.in
31 sed -i '/RESTRICT_KEYWORD/d' include/IL/config.h
36 url = "https://sources.debian.org/data/main/d/devil/1.7.8-10/debian/patches/03_CVE-2009-3994.diff";
37 sha256 = "0qkx2qfv02igbrmsn6z5a3lbrbwjfh3rb0c2sj54wy0j1f775hbc";
39 ./ftbfs-libpng15.patch
43 enableParallelBuilding = true;
46 for a in test/Makefile.in test/format_test/format_checks.sh.in ; do
47 substituteInPlace $a \
48 --replace /bin/bash ${stdenv.shell}
53 homepage = "http://openil.sourceforge.net/";
54 description = "An image library which can can load, save, convert, manipulate, filter and display a wide variety of image formats";
55 license = licenses.lgpl2;
56 platforms = platforms.mesaPlatforms;