anchor.diff:      "--disable-beos"
       "--disable-drm"
       "--disable-gallium"
  -    "--enable-libpng"
  -    "--enable-gl"
  -    "--disable-glesv2"
  -    # FIXME: cogl recursion
  -    "--disable-cogl"
  +    (enFlag "libpng" (libpng != null) null)
  +    # Only one OpenGL backend may be selected at compile time
  +    # OpenGL X (gl), or OpenGL ES 2.0 (glesv2)
  +    (enFlag "gl" (!gles2) null)
  +    (enFlag "glesv2" gles2 null)
  +    "--disable-cogl" # recursive dependency
       # FIXME: fix directfb mirroring
       "--disable-directfb"
       "--disable-vg"
  -    "--enable-egl"
  -    "--enable-glx"
  +    (enFlag "egl" (mesa_noglu != null) null)
  +    (enFlag "glx" (mesa_noglu != null) null)
       "--disable-wgl"
       "--enable-script"
       "--enable-ft"
  
positive.code:     "--without-gallium"
    ];
  
    preConfigure =
    /* Work around broken pkg-config `Requires.private' that prevents
       Freetype `-I' cflags from being propagated. */ ''
      sed -i src/cairo.pc.in \
        -e 's|^Cflags:\(.*\)$|Cflags: \1 -I${freetype}/include/freetype2 -I${freetype}/include|g'
    '';
  
    nativeBuildInputs = optionals (!stdenv.cc.isGNU) [
      libiconv
    ];
  
    buildInputs = [
      expat
      fontconfig
      freetype
      glib
      libpng
      libspectre
      lzo
      mesa_noglu
      pixman
      xorg.libX11
      xorg.libxcb
      xorg.libXext
      xorg.libXrender
      xorg.xcbutil
      zlib
    ];
  
    postInstall = ''
      rm -rvf $out/share/gtk-doc
    '' + glib.flattenInclude;
  
    enableParallelBuilding = true;
  
    meta = with stdenv.lib; {
      description = "A vector graphics library with cross-device output support";
  
negative.code: { stdenv
  , autoreconfHook
  , fetchTritonPatch
  , fetchurl
  , libiconv
  
  , cogl
  , fontconfig
  , freetype
  , glib
  