2013-08-31 17:05:11 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libpng, libtiff, lcms, cmake, glib/*passthru only*/ }:
|
2012-10-03 17:35:30 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-08-31 17:05:11 +02:00
|
|
|
name = "openjpeg-2.0.0";
|
2013-02-16 18:13:05 +01:00
|
|
|
passthru = {
|
2013-08-31 17:05:11 +02:00
|
|
|
incDir = "openjpeg-2.0";
|
2013-02-16 18:13:05 +01:00
|
|
|
};
|
2010-08-09 22:59:38 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-10-03 17:35:30 +02:00
|
|
|
url = "http://openjpeg.googlecode.com/files/${name}.tar.gz";
|
2013-08-31 17:05:11 +02:00
|
|
|
sha1 = "0af78ab2283b43421458f80373422d8029a9f7a7";
|
2010-08-09 22:59:38 +02:00
|
|
|
};
|
|
|
|
|
2013-08-31 17:05:11 +02:00
|
|
|
buildInputs = [ cmake ];
|
2013-04-18 20:54:23 +02:00
|
|
|
nativebuildInputs = [ pkgconfig ];
|
2013-06-29 16:07:15 +02:00
|
|
|
propagatedBuildInputs = [ libpng libtiff lcms ]; # in closure anyway
|
2013-04-18 20:54:23 +02:00
|
|
|
|
2014-05-17 14:15:19 +02:00
|
|
|
postInstall = glib.flattenInclude + ''
|
|
|
|
mkdir -p "$out/lib/pkgconfig"
|
|
|
|
cat >"$out/lib/pkgconfig/libopenjp2.pc" <<EOF
|
|
|
|
prefix=$out
|
|
|
|
libdir=$out/lib
|
|
|
|
includedir=$out/include
|
|
|
|
|
|
|
|
Name: openjp2
|
|
|
|
Description: JPEG2000 library (Part 1 and 2)
|
|
|
|
URL: http://www.openjpeg.org/
|
|
|
|
Version: @OPENJPEG_VERSION@
|
|
|
|
Libs: -L$out/lib -lopenjp2
|
|
|
|
Cflags: -I$out/include
|
|
|
|
EOF
|
|
|
|
'';
|
2013-02-12 21:41:09 +01:00
|
|
|
|
2010-08-09 22:59:38 +02:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.openjpeg.org/;
|
|
|
|
description = "Open-source JPEG 2000 codec written in C language";
|
|
|
|
license = "BSD";
|
2010-09-22 20:04:47 +02:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2010-08-09 22:59:38 +02:00
|
|
|
};
|
|
|
|
}
|