Bug 231970 - dev-lang/R should have a cairo useflag
Bug#: 231970 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: sci@gentoo.org Reported By: caster@gentoo.org
Component: Ebuilds
URL: 
Summary: dev-lang/R should have a cairo useflag
Keywords:  
Status Whiteboard: 
Opened: 2008-07-16 14:24 0000
Description:   Opened: 2008-07-16 14:24 0000
(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.

------- Comment #1 From Markus Dittrich 2008-07-17 12:59:20 0000 -------
Thanks much for pointing this out! I'll have a look.

Best,
Markus

------- Comment #2 From Markus Dittrich 2008-07-18 12:47:06 0000 -------
I've added the cairo use flag and check for X to the ebuild.

Thanks,
Markus