2005-10-12 16:00:20 +02:00
|
|
|
{ postscriptSupport ? true
|
|
|
|
, pdfSupport ? true
|
|
|
|
, pngSupport ? true
|
|
|
|
, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype
|
2008-10-14 16:46:56 +02:00
|
|
|
, zlib, libpng, pixman, libxcb, xcbutil
|
2005-10-12 16:00:20 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert postscriptSupport -> zlib != null;
|
|
|
|
assert pngSupport -> libpng != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2008-10-08 18:57:06 +02:00
|
|
|
name = "cairo-1.8.0";
|
2008-03-07 16:43:43 +01:00
|
|
|
|
2005-10-12 16:00:20 +02:00
|
|
|
src = fetchurl {
|
2008-10-08 18:57:06 +02:00
|
|
|
url = http://cairographics.org/releases/cairo-1.8.0.tar.gz;
|
|
|
|
sha1 = "8a689ca47c24216f37bb8cabae21ff08a7f47899";
|
2005-10-12 16:00:20 +02:00
|
|
|
};
|
2008-03-07 16:43:43 +01:00
|
|
|
|
2005-10-12 16:00:20 +02:00
|
|
|
buildInputs = [
|
2008-10-14 16:46:56 +02:00
|
|
|
pkgconfig x11 fontconfig freetype pixman libxcb xcbutil
|
2005-10-12 16:00:20 +02:00
|
|
|
];
|
2008-10-14 14:08:07 +02:00
|
|
|
|
2008-03-07 16:43:43 +01:00
|
|
|
propagatedBuildInputs =
|
|
|
|
stdenv.lib.optional postscriptSupport zlib ++
|
|
|
|
stdenv.lib.optional pngSupport libpng;
|
|
|
|
|
2008-10-14 16:46:56 +02:00
|
|
|
configureFlags = ["--disable-static" "--enable-xcb"] ++
|
2008-10-14 14:08:07 +02:00
|
|
|
stdenv.lib.optional pdfSupport "--enable-pdf";
|
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
|
|
|
}
|