cairo: make OpenGL support require X11

If OpenGL is enabled without X11, the build fails with:

In file included from /nix/store/<...>-libglvnd-1.3.1-dev/include/EGL/egl.h:39,
                 from cairo-gl.h:130,
                 from cairo-gl-private.h:51,
                 from cairo-gl-composite.c:48:
/nix/store/<...>-libglvnd-1.3.1-dev/include/EGL/eglplatform.h:128:10: fatal error: X11/Xlib.h: No such file or directory
  128 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
gstqt5
Ben Wolsieffer 2020-08-01 17:00:42 -04:00 committed by Alyssa Ross
parent 7802608649
commit 98be04b83a
1 changed files with 2 additions and 2 deletions

View File

@ -4,13 +4,13 @@
, gobjectSupport ? true, glib
, xcbSupport ? x11Support, libxcb, xcbutil # no longer experimental since 1.12
, libGLSupported ? stdenv.lib.elem stdenv.hostPlatform.system stdenv.lib.platforms.mesaPlatforms
, glSupport ? config.cairo.gl or (libGLSupported && stdenv.isLinux)
, glSupport ? x11Support && config.cairo.gl or (libGLSupported && stdenv.isLinux)
, libGL ? null # libGLU libGL is no longer a big dependency
, pdfSupport ? true
, darwin
}:
assert glSupport -> libGL != null;
assert glSupport -> x11Support && libGL != null;
let
version = "1.16.0";