2005-10-12 16:00:20 +02:00
|
|
|
{ postscriptSupport ? true
|
|
|
|
, pdfSupport ? true
|
|
|
|
, pngSupport ? true
|
|
|
|
, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype
|
|
|
|
, zlib, libpng
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert postscriptSupport -> zlib != null;
|
|
|
|
assert pngSupport -> libpng != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2006-07-04 02:14:16 +02:00
|
|
|
name = "cairo-1.0.4";
|
2005-10-12 16:00:20 +02:00
|
|
|
src = fetchurl {
|
2006-05-01 19:57:42 +02:00
|
|
|
url = http://cairographics.org/releases/cairo-1.0.4.tar.gz;
|
|
|
|
sha1 = "89e72202e5b51a8914fce60f52f7c51ecdea982a";
|
2005-10-12 16:00:20 +02:00
|
|
|
};
|
|
|
|
buildInputs = [
|
|
|
|
pkgconfig x11 fontconfig freetype
|
|
|
|
(if pngSupport then libpng else null)
|
|
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
(if postscriptSupport then zlib else null)
|
|
|
|
];
|
|
|
|
configureFlags =
|
|
|
|
(if pdfSupport then ["--enable-pdf"] else []);
|
|
|
|
}
|