about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/cairo
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-04-22 18:22:04 +0000
committerAlyssa Ross <hi@alyssa.is>2019-04-23 10:14:03 +0000
commit35cd31a9879309a57f499e3fd3c287d346c3aaff (patch)
tree9823245675fbcb05fe87fab3af9bb8394493cbe2 /nixpkgs/pkgs/development/libraries/cairo
parent5da1eabab7124791890627dde9a2883c05a39407 (diff)
downloadnixlib-35cd31a9879309a57f499e3fd3c287d346c3aaff.tar
nixlib-35cd31a9879309a57f499e3fd3c287d346c3aaff.tar.gz
nixlib-35cd31a9879309a57f499e3fd3c287d346c3aaff.tar.bz2
nixlib-35cd31a9879309a57f499e3fd3c287d346c3aaff.tar.lz
nixlib-35cd31a9879309a57f499e3fd3c287d346c3aaff.tar.xz
nixlib-35cd31a9879309a57f499e3fd3c287d346c3aaff.tar.zst
nixlib-35cd31a9879309a57f499e3fd3c287d346c3aaff.zip
cairo: make zlib support optional
The pdfSupport option didn't feel necessary any more, since it depends
on zlib.
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/cairo')
-rw-r--r--nixpkgs/pkgs/development/libraries/cairo/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/libraries/cairo/default.nix b/nixpkgs/pkgs/development/libraries/cairo/default.nix
index 0f2acbaff7b5..cb93b224df40 100644
--- a/nixpkgs/pkgs/development/libraries/cairo/default.nix
+++ b/nixpkgs/pkgs/development/libraries/cairo/default.nix
@@ -1,5 +1,6 @@
 { config, stdenv, fetchurl, fetchpatch, pkgconfig, libiconv, autoreconfHook
 , libintl, expat, zlib, libpng, pixman, xorg
+, zlibSupport ? true
 , pngSupport ? true
 , freetypeSupport ? true, freetype
 , fontconfigSupport ? freetypeSupport, fontconfig
@@ -10,7 +11,6 @@
 , libGLSupported
 , glSupport ? config.cairo.gl or (libGLSupported && stdenv.isLinux && !stdenv.isAarch32 && !stdenv.isMips)
 , libGL ? null # libGLU_combined is no longer a big dependency
-, pdfSupport ? true
 , darwin
 }:
 
@@ -66,7 +66,8 @@ in stdenv.mkDerivation rec {
   ]);
 
   propagatedBuildInputs =
-    with xorg; [ expat pixman zlib ]
+    with xorg; [ expat pixman ]
+    ++ optional zlibSupport zlib
     ++ optional pngSupport libpng
     ++ optionals xlibSupport [ libX11 libXext ]
     ++ optional xlibXrenderSupport libXrender
@@ -84,10 +85,15 @@ in stdenv.mkDerivation rec {
     "--enable-quartz-image"
     "--enable-ft"
   ] else ([ "--enable-tee" ]
+    ++ optionals (!zlibSupport) [
+      "--disable-script"
+      "--disable-ps"
+      "--disable-pdf"
+      "--disable-interpreter"
+    ]
     ++ optionals (!pngSupport) [ "--disable-png" "--disable-svg" ]
     ++ optional xcbSupport "--enable-xcb"
     ++ optional glSupport "--enable-gl"
-    ++ optional pdfSupport "--enable-pdf"
   );
 
   preConfigure =