(as of 2.7.1) configure has this option: --with-cairo use cairo (and pango) if available [yes] So currently it's an automagical dependency with is a Bad Thing (TM) :) and should be converted into a USE flag. And why is it useful? You can plot to for example png files on headless machine, which otherwise requires an X connection. Took me a while to find out why it somewhere works (Fedora, my Gentoo laptop) and somewhere not... and it's this automagic dependency. As help("png") says: R can be compiled without support for each of these devices: this will be reported if you attempt to use them on a system where they are not supported. For 'type = "Xlib"' they may not be usable unless the X11 display is available to the owner of the R process. 'type = "cairo"' requires cairo 1.2 or later. 'type = "quartz"' uses the 'quartz' device and so is only available where that is (on some Mac OS X) builds. It is at present experimental. And when testing this, I also noticed that cairo/pango needs to be built with X use flag, otherwise R configure script says "checking whether cairo including pango is >= 1.0 and works... no". So there would be a need for build_with_use, sadly. This adds some extra X library deps but still you don't need an X connection. I tested with latest stable versions of cairo/pango on amd64. I don't know what's the difference between having only cairo and both cairo/pango, probably doesn't need extra pango flag and cairo flag could depend on both.
Thanks much for pointing this out! I'll have a look. Best, Markus
I've added the cairo use flag and check for X to the ebuild. Thanks, Markus