blob: 7f23929efb084137fc761fee235fcb606c75a4e9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
{ stdenv, fetchurl, pkgconfig, libpng, libtiff, lcms, cmake, glib/*passthru only*/ }:
stdenv.mkDerivation rec {
name = "openjpeg-2.0.0";
passthru = {
incDir = "openjpeg-2.0";
};
src = fetchurl {
url = "http://openjpeg.googlecode.com/files/${name}.tar.gz";
sha1 = "0af78ab2283b43421458f80373422d8029a9f7a7";
};
buildInputs = [ cmake ];
nativebuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ libpng libtiff lcms ]; # in closure anyway
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
'';
meta = {
homepage = http://www.openjpeg.org/;
description = "Open-source JPEG 2000 codec written in C language";
license = stdenv.lib.licenses.bsd2;
platforms = stdenv.lib.platforms.all;
};
}
|