Patchwork [2/3] gnu: cups-filters: Use ghostscript with CUPS driver.

login
register
mail settings
Submitter Andy Wingo
Date Oct. 7, 2016, 8:24 p.m.
Message ID <20161007202424.26732-2-wingo@igalia.com>
Download mbox | patch
Permalink /patch/16357/
State New
Headers show

Comments

Andy Wingo - Oct. 7, 2016, 8:24 p.m.
* gnu/packages/cups.scm (ghostscript/cups): New variable.
  (cups-filters): Use ghostscript/cups.  Capture path to "gs" at
  compilation time.
---
 gnu/packages/cups.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
Ricardo Wurmus - Oct. 9, 2016, 2:17 p.m.
Andy Wingo <wingo@igalia.com> writes:

> * gnu/packages/cups.scm (ghostscript/cups): New variable.
>   (cups-filters): Use ghostscript/cups.  Capture path to "gs" at
>   compilation time.
> ---
>  gnu/packages/cups.scm | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
> index d22338d..8394bfb 100644
> --- a/gnu/packages/cups.scm
> +++ b/gnu/packages/cups.scm
> @@ -40,6 +40,14 @@
>    #:use-module (gnu packages pkg-config)
>    #:use-module (gnu packages tls))
>  
> +;; Delay to avoid module circularity problems.
> +(define ghostscript/cups
> +  (delay
> +    (package (inherit ghostscript)
> +      (name "ghostscript-with-cups")
> +      (inputs `(("cups" ,cups-minimal)
> +                ,@(package-inputs ghostscript))))))
> +
>  (define-public cups-filters
>    (package
>      (name "cups-filters")
> @@ -78,6 +86,9 @@
>         `(,(string-append "--with-test-font-path="
>                           (assoc-ref %build-inputs "font-dejavu")
>                           "/share/fonts/truetype/DejaVuSans.ttf")
> +         ,(string-append "--with-gs-path="
> +                         (assoc-ref %build-inputs "ghostscript")
> +                         "/bin/gsc")
>           ,(string-append "--with-rcdir="
>                           (assoc-ref %outputs "out") "/etc/rc.d"))))
>      (native-inputs
> @@ -87,7 +98,7 @@
>       `(("fontconfig"   ,fontconfig)
>         ("freetype"     ,freetype)
>         ("font-dejavu"  ,font-dejavu) ;needed by test suite
> -       ("ghostscript"  ,ghostscript)
> +       ("ghostscript"  ,(force ghostscript/cups))
>         ("ijs"          ,ijs)
>         ("dbus"         ,dbus)
>         ("lcms"         ,lcms)

This also looks good to me.

~~ Ricardo
Ludovic Courtès - Oct. 10, 2016, 12:50 p.m.
Andy Wingo <wingo@igalia.com> skribis:

> * gnu/packages/cups.scm (ghostscript/cups): New variable.
>   (cups-filters): Use ghostscript/cups.  Capture path to "gs" at
>   compilation time.

LGTM!

Because of the rebuild involved, I decided to go ahead and push it to
core-updates.

I haven’t looked at the other patches yet.

Thanks,
Ludo’.

Patch

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index d22338d..8394bfb 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -40,6 +40,14 @@ 
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls))
 
+;; Delay to avoid module circularity problems.
+(define ghostscript/cups
+  (delay
+    (package (inherit ghostscript)
+      (name "ghostscript-with-cups")
+      (inputs `(("cups" ,cups-minimal)
+                ,@(package-inputs ghostscript))))))
+
 (define-public cups-filters
   (package
     (name "cups-filters")
@@ -78,6 +86,9 @@ 
        `(,(string-append "--with-test-font-path="
                          (assoc-ref %build-inputs "font-dejavu")
                          "/share/fonts/truetype/DejaVuSans.ttf")
+         ,(string-append "--with-gs-path="
+                         (assoc-ref %build-inputs "ghostscript")
+                         "/bin/gsc")
          ,(string-append "--with-rcdir="
                          (assoc-ref %outputs "out") "/etc/rc.d"))))
     (native-inputs
@@ -87,7 +98,7 @@ 
      `(("fontconfig"   ,fontconfig)
        ("freetype"     ,freetype)
        ("font-dejavu"  ,font-dejavu) ;needed by test suite
-       ("ghostscript"  ,ghostscript)
+       ("ghostscript"  ,(force ghostscript/cups))
        ("ijs"          ,ijs)
        ("dbus"         ,dbus)
        ("lcms"         ,lcms)