unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: r: Add pango to inputs.
@ 2016-06-17 10:13 Ricardo Wurmus
  2016-06-17 10:13 ` Ricardo Wurmus
  2016-06-17 12:26 ` Ricardo Wurmus
  0 siblings, 2 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2016-06-17 10:13 UTC (permalink / raw)
  To: guix-devel

Hi Guix,

our R package is currently built with Cairo, which allows R to use the Cairo
rendering backend.  When R starts up and loads grDevices, however, it checks
for the availability of Pango, not Cairo.  So even though the Cairo backend
works just fine, R falls back to using the primitive Xlib backend.

You can confirm this by running this in R:

    getOption('bitmapType')
    options(bitmapType='cairo')

The first command should show you "Xlib" with R from Guix.  The second sets
the backend to Cairo, which works without problems.

I decided against patching the detection mechanism in R because I don't know
if R might use Pango features elsewhere.  Instead I opted to add Pango to the
inputs.  Pango pulls in Cairo, so the package closure is a little bigger than
before.  Pango makes up 0.7% of the total size, so I think that's okay.

~~ Ricardo

Ricardo Wurmus (1):
  gnu: r: Add pango to inputs.

 gnu/packages/statistics.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.8.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] gnu: r: Add pango to inputs.
  2016-06-17 10:13 [PATCH] gnu: r: Add pango to inputs Ricardo Wurmus
@ 2016-06-17 10:13 ` Ricardo Wurmus
  2016-06-17 15:18   ` Ludovic Courtès
  2016-06-17 12:26 ` Ricardo Wurmus
  1 sibling, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2016-06-17 10:13 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/statistics.scm (r)[inputs]: Remove cairo, add pango.
---
 gnu/packages/statistics.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 1288d9d..abc0c7e 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -165,7 +165,7 @@ be output in text, PostScript, PDF or HTML.")
        ("which" ,which) ; for tests/Examples/base-Ex.R
        ("xz" ,xz)))
     (inputs
-     `(("cairo" ,cairo)
+     `(("pango" ,pango)
        ("curl" ,curl)
        ("tzdata" ,tzdata)
        ("gfortran" ,gfortran)
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] gnu: r: Add pango to inputs.
  2016-06-17 10:13 [PATCH] gnu: r: Add pango to inputs Ricardo Wurmus
  2016-06-17 10:13 ` Ricardo Wurmus
@ 2016-06-17 12:26 ` Ricardo Wurmus
  1 sibling, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2016-06-17 12:26 UTC (permalink / raw)
  To: guix-devel


Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:

> Hi Guix,
>
> our R package is currently built with Cairo, which allows R to use the Cairo
> rendering backend.  When R starts up and loads grDevices, however, it checks
> for the availability of Pango, not Cairo.  So even though the Cairo backend
> works just fine, R falls back to using the primitive Xlib backend.
>
> You can confirm this by running this in R:
>
>     getOption('bitmapType')
>     options(bitmapType='cairo')
>
> The first command should show you "Xlib" with R from Guix.  The second sets
> the backend to Cairo, which works without problems.
>
> I decided against patching the detection mechanism in R because I don't know
> if R might use Pango features elsewhere.  Instead I opted to add Pango to the
> inputs.  Pango pulls in Cairo, so the package closure is a little bigger than
> before.  Pango makes up 0.7% of the total size, so I think that's okay.
>
> ~~ Ricardo

I also just stumbled upon an old message to the mailing list, which I
had completely forgotten about:

   http://lists.gnu.org/archive/html/guix-devel/2015-09/msg00279.html

This is the very same problem and it is solved by giving R what it
wants: Pango.

~~ Ricardo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gnu: r: Add pango to inputs.
  2016-06-17 10:13 ` Ricardo Wurmus
@ 2016-06-17 15:18   ` Ludovic Courtès
  2016-06-28  7:36     ` Ricardo Wurmus
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2016-06-17 15:18 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> * gnu/packages/statistics.scm (r)[inputs]: Remove cairo, add pango.
> ---
>  gnu/packages/statistics.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
> index 1288d9d..abc0c7e 100644
> --- a/gnu/packages/statistics.scm
> +++ b/gnu/packages/statistics.scm
> @@ -165,7 +165,7 @@ be output in text, PostScript, PDF or HTML.")
>         ("which" ,which) ; for tests/Examples/base-Ex.R
>         ("xz" ,xz)))
>      (inputs
> -     `(("cairo" ,cairo)
> +     `(("pango" ,pango)

Maybe mention “for the cairo BitmapType backend” in a comment so that
nobody views it as a thinko.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gnu: r: Add pango to inputs.
  2016-06-17 15:18   ` Ludovic Courtès
@ 2016-06-28  7:36     ` Ricardo Wurmus
  0 siblings, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2016-06-28  7:36 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Ludovic Courtès <ludo@gnu.org> writes:

> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
>
>> * gnu/packages/statistics.scm (r)[inputs]: Remove cairo, add pango.
>> ---
>>  gnu/packages/statistics.scm | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
>> index 1288d9d..abc0c7e 100644
>> --- a/gnu/packages/statistics.scm
>> +++ b/gnu/packages/statistics.scm
>> @@ -165,7 +165,7 @@ be output in text, PostScript, PDF or HTML.")
>>         ("which" ,which) ; for tests/Examples/base-Ex.R
>>         ("xz" ,xz)))
>>      (inputs
>> -     `(("cairo" ,cairo)
>> +     `(("pango" ,pango)
>
> Maybe mention “for the cairo BitmapType backend” in a comment so that
> nobody views it as a thinko.

Okay, I added a comment and pushed.  Thanks!

~~ Ricardo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-28  6:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-17 10:13 [PATCH] gnu: r: Add pango to inputs Ricardo Wurmus
2016-06-17 10:13 ` Ricardo Wurmus
2016-06-17 15:18   ` Ludovic Courtès
2016-06-28  7:36     ` Ricardo Wurmus
2016-06-17 12:26 ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).