2018-02-24 13:06:44 +01:00
|
|
|
{ stdenv, fetchurl, libjpeg, libpng, libmng, lcms1, libtiff, openexr, libGL
|
2016-11-05 20:17:42 +01:00
|
|
|
, libX11, pkgconfig, OpenGL
|
2015-09-29 03:49:47 +02:00
|
|
|
}:
|
2012-02-02 21:30:55 +01:00
|
|
|
|
2010-11-13 08:47:04 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2016-11-05 20:17:42 +01:00
|
|
|
name = "libdevil-${version}";
|
2010-11-13 08:47:04 +01:00
|
|
|
version = "1.7.8";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/openil/DevIL-${version}.tar.gz";
|
|
|
|
sha256 = "1zd850nn7nvkkhasrv7kn17kzgslr5ry933v6db62s4lr0zzlbv8";
|
|
|
|
};
|
|
|
|
|
2016-11-05 20:17:42 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2018-02-24 13:06:44 +01:00
|
|
|
buildInputs = [ libjpeg libpng libmng lcms1 libtiff openexr libGL libX11 ]
|
2015-09-29 03:49:47 +02:00
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ OpenGL ];
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2012-02-02 21:30:55 +01:00
|
|
|
|
2010-11-13 08:47:04 +01:00
|
|
|
configureFlags = [ "--enable-ILU" "--enable-ILUT" ];
|
|
|
|
|
2014-08-24 08:15:23 +02: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 19:09:52 +01: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 08:15:23 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
sed -i '/RESTRICT_KEYWORD/d' include/IL/config.h
|
|
|
|
'';
|
|
|
|
|
2012-02-02 21:30:55 +01:00
|
|
|
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
|
2015-03-23 21:52:34 +01:00
|
|
|
./il_endian.h.patch
|
2012-02-02 21:30:55 +01:00
|
|
|
];
|
|
|
|
|
2016-11-05 20:17:42 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2010-11-13 08:47:04 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://openil.sourceforge.net/;
|
2012-02-02 21:30:55 +01:00
|
|
|
description = "An image library which can can load, save, convert, manipulate, filter and display a wide variety of image formats";
|
2010-11-13 08:47:04 +01:00
|
|
|
license = licenses.lgpl2;
|
2013-10-07 17:36:47 +02:00
|
|
|
platforms = platforms.mesaPlatforms;
|
2017-03-27 19:11:17 +02:00
|
|
|
maintainers = [ maintainers.phreedom ];
|
2010-11-13 08:47:04 +01:00
|
|
|
};
|
2012-02-02 21:30:55 +01:00
|
|
|
}
|