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 {
|
2008-03-07 16:43:43 +01:00
|
|
|
name = "cairo-1.4.14";
|
|
|
|
|
2005-10-12 16:00:20 +02:00
|
|
|
src = fetchurl {
|
2008-03-07 16:43:43 +01:00
|
|
|
url = http://cairographics.org/releases/cairo-1.4.14.tar.gz;
|
2007-05-13 23:45:43 +02:00
|
|
|
sha256 = "15l87pzmlwbxk6m4102g2zln4drq0l32qs60ccs5bpmcnky2lqya";
|
2005-10-12 16:00:20 +02:00
|
|
|
};
|
2008-03-07 16:43:43 +01:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# http://bugs.freedesktop.org/show_bug.cgi?id=10989
|
|
|
|
./isspace.patch
|
|
|
|
];
|
|
|
|
|
2005-10-12 16:00:20 +02:00
|
|
|
buildInputs = [
|
|
|
|
pkgconfig x11 fontconfig freetype
|
|
|
|
];
|
2008-03-07 16:43:43 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs =
|
|
|
|
stdenv.lib.optional postscriptSupport zlib ++
|
|
|
|
stdenv.lib.optional pngSupport libpng;
|
|
|
|
|
2005-10-12 16:00:20 +02:00
|
|
|
configureFlags =
|
|
|
|
(if pdfSupport then ["--enable-pdf"] else []);
|
2008-03-07 16:43:43 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A 2D graphics library with support for multiple output devices";
|
|
|
|
homepage = http://cairographics.org/;
|
|
|
|
};
|
2005-10-12 16:00:20 +02:00
|
|
|
}
|