diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-04-22 15:36:13 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-04-23 10:12:29 +0000 |
commit | 1ab2a0d1102c29ae7dd5c52816c26ce93002d3b6 (patch) | |
tree | adbb74821dc71054a7d2341bcec6b6877b882987 /nixpkgs/pkgs/development/libraries/cairo | |
parent | 684bf817e76b76e543d8772e3ea21214f1ac9504 (diff) | |
download | nixlib-1ab2a0d1102c29ae7dd5c52816c26ce93002d3b6.tar nixlib-1ab2a0d1102c29ae7dd5c52816c26ce93002d3b6.tar.gz nixlib-1ab2a0d1102c29ae7dd5c52816c26ce93002d3b6.tar.bz2 nixlib-1ab2a0d1102c29ae7dd5c52816c26ce93002d3b6.tar.lz nixlib-1ab2a0d1102c29ae7dd5c52816c26ce93002d3b6.tar.xz nixlib-1ab2a0d1102c29ae7dd5c52816c26ce93002d3b6.tar.zst nixlib-1ab2a0d1102c29ae7dd5c52816c26ce93002d3b6.zip |
cairo: make freetype support optional
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/cairo')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/cairo/0001-test-don-t-always-build-FreeType-dependent-test.patch | 34 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/cairo/default.nix | 14 |
2 files changed, 44 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/libraries/cairo/0001-test-don-t-always-build-FreeType-dependent-test.patch b/nixpkgs/pkgs/development/libraries/cairo/0001-test-don-t-always-build-FreeType-dependent-test.patch new file mode 100644 index 000000000000..9688aca55ab9 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/cairo/0001-test-don-t-always-build-FreeType-dependent-test.patch @@ -0,0 +1,34 @@ +From 3910b1155f2d5a98142ade67e09f097cb94a2d2e Mon Sep 17 00:00:00 2001 +From: Alyssa Ross <hi@alyssa.is> +Date: Mon, 22 Apr 2019 09:53:54 +0000 +Subject: [PATCH 1/5] test: don't always build FreeType-dependent test + +This caused a build failure when attempting to build cairo without +FreeType available on the system. +--- + test/Makefile.sources | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/Makefile.sources b/test/Makefile.sources +index c47131faf..cc3d81f7e 100644 +--- a/test/Makefile.sources ++++ b/test/Makefile.sources +@@ -144,7 +144,6 @@ test_sources = \ + font-face-get-type.c \ + font-matrix-translation.c \ + font-options.c \ +- font-variations.c \ + glyph-cache-pressure.c \ + get-and-set.c \ + get-clip.c \ +@@ -399,6 +398,7 @@ pthread_test_sources = \ + + ft_font_test_sources = \ + bitmap-font.c \ ++ font-variations.c \ + ft-font-create-for-ft-face.c \ + ft-show-glyphs-positioning.c \ + ft-show-glyphs-table.c \ +-- +2.19.2 + diff --git a/nixpkgs/pkgs/development/libraries/cairo/default.nix b/nixpkgs/pkgs/development/libraries/cairo/default.nix index 9cc38d710fca..d5fbf5787051 100644 --- a/nixpkgs/pkgs/development/libraries/cairo/default.nix +++ b/nixpkgs/pkgs/development/libraries/cairo/default.nix @@ -1,6 +1,7 @@ -{ config, stdenv, fetchurl, fetchpatch, pkgconfig, libiconv -, libintl, expat, zlib, libpng, pixman, freetype, xorg -, fontconfigSupport ? true, fontconfig +{ config, stdenv, fetchurl, fetchpatch, pkgconfig, libiconv, autoreconfHook +, libintl, expat, zlib, libpng, pixman, xorg +, freetypeSupport ? true, freetype +, fontconfigSupport ? freetypeSupport, fontconfig , gobjectSupport ? true, glib , xcbSupport ? true # no longer experimental since 1.12 , libGLSupported @@ -10,6 +11,7 @@ , darwin }: +assert fontconfigSupport -> freetypeSupport; assert glSupport -> libGL != null; let @@ -34,12 +36,15 @@ in stdenv.mkDerivation rec { url = "https://gitlab.freedesktop.org/cairo/cairo/commit/6edf572ebb27b00d3c371ba5ae267e39d27d5b6d.patch"; sha256 = "112hgrrsmcwxh1r52brhi5lksq4pvrz4xhkzcf2iqp55jl2pb7n1"; }) + + ./0001-test-don-t-always-build-FreeType-dependent-test.patch ]; outputs = [ "out" "dev" "devdoc" ]; outputBin = "dev"; # very small nativeBuildInputs = [ + autoreconfHook pkgconfig ]; @@ -54,8 +59,9 @@ in stdenv.mkDerivation rec { ]); propagatedBuildInputs = - with xorg; [ libXext expat freetype pixman zlib libpng libXrender ] + with xorg; [ libXext expat pixman zlib libpng libXrender ] ++ optionals xcbSupport [ libxcb xcbutil ] + ++ optional freetypeSupport freetype ++ optional fontconfigSupport fontconfig ++ optional gobjectSupport glib ++ optional glSupport libGL |