diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2013-05-30 14:43:26 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2013-06-01 23:38:29 +0200 |
commit | 2e36aee50879e5cb6546813b239ce6b4474369fe (patch) | |
tree | 5dfaa659d8243ea283924324e9aa1b64a2ce3d66 /pkgs/development/libraries/cairo | |
parent | 14f36162d26d52667d3717dd6dd2bb1e9ffdb166 (diff) | |
download | nixlib-2e36aee50879e5cb6546813b239ce6b4474369fe.tar nixlib-2e36aee50879e5cb6546813b239ce6b4474369fe.tar.gz nixlib-2e36aee50879e5cb6546813b239ce6b4474369fe.tar.bz2 nixlib-2e36aee50879e5cb6546813b239ce6b4474369fe.tar.lz nixlib-2e36aee50879e5cb6546813b239ce6b4474369fe.tar.xz nixlib-2e36aee50879e5cb6546813b239ce6b4474369fe.tar.zst nixlib-2e36aee50879e5cb6546813b239ce6b4474369fe.zip |
cairo: expression refactoring, build OpenGL support by default
Mesa is now only a small dependency.
Diffstat (limited to 'pkgs/development/libraries/cairo')
-rw-r--r-- | pkgs/development/libraries/cairo/default.nix | 49 |
1 files changed, 19 insertions, 30 deletions
diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index 65f826c7ed43..a957a84c6a70 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -1,19 +1,13 @@ -{ postscriptSupport ? true -, pdfSupport ? true -, pngSupport ? true -, xcbSupport ? true # no longer experimental since 1.12 -, glSupport ? false +{ stdenv, fetchurl, pkgconfig, libiconvOrEmpty, libintlOrEmpty +, expat, zlib, libpng, pixman, fontconfig, freetype, xlibs , gobjectSupport ? true, glib -, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype, xlibs -, expat -, zlib, libpng, pixman, libxcb ? null, xcbutil ? null, mesa ? null -, libiconvOrEmpty, libintlOrEmpty +, xcbSupport ? true # no longer experimental since 1.12 +, glSupport ? true, mesa_noglu ? null # mesa is no longer a big dependency }: -assert postscriptSupport -> zlib != null; -assert pngSupport -> libpng != null; -assert xcbSupport -> libxcb != null && xcbutil != null; -assert glSupport -> mesa != null; +assert glSupport -> mesa_noglu != null; + +with { inherit (stdenv.lib) optional optionals; }; stdenv.mkDerivation rec { name = "cairo-1.12.14"; @@ -23,25 +17,20 @@ stdenv.mkDerivation rec { sha256 = "04xcykglff58ygs0dkrmmnqljmpjwp2qgwcz8sijqkdpz7ix3l4n"; }; - buildInputs = with xlibs; - [ pkgconfig x11 fontconfig expat ] - ++ stdenv.lib.optional (!stdenv.isDarwin) libXrender - ++ stdenv.lib.optionals xcbSupport [ libxcb xcbutil ] - ++ stdenv.lib.optionals glSupport [ mesa ] - ++ libintlOrEmpty - ++ libiconvOrEmpty; + nativeBuildInputs = [ pkgconfig ] ++ libintlOrEmpty ++ libiconvOrEmpty; propagatedBuildInputs = - [ freetype pixman ] ++ - stdenv.lib.optional gobjectSupport glib ++ - stdenv.lib.optional postscriptSupport zlib ++ - stdenv.lib.optional pngSupport libpng; - - configureFlags = - [ "--enable-tee" ] - ++ stdenv.lib.optional xcbSupport "--enable-xcb" - ++ stdenv.lib.optional glSupport "--enable-gl" - ++ stdenv.lib.optional pdfSupport "--enable-pdf"; + with xlibs; [ xlibs.xlibs fontconfig expat freetype pixman zlib libpng ] + ++ optional (!stdenv.isDarwin) libXrender + ++ optionals xcbSupport [ libxcb xcbutil ] + ++ optional gobjectSupport glib + ++ optionals glSupport [ mesa_noglu ] + ; + + configureFlags = [ "--enable-tee" ] + ++ optional xcbSupport "--enable-xcb" + ++ optional glSupport "--enable-gl" + ; preConfigure = # On FreeBSD, `-ldl' doesn't exist. |