From 1728c411718e3b358c06561d6e80b47d7b331617 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 12 Sep 2017 23:07:41 +0200 Subject: gnu: cups-filters: Make sure filters find Ghostscript. * gnu/packages/cups.scm (cups-filters)[arguments]: Add 'patch-foomatic-hardcoded-file-names' and 'wrap-filters' phases. --- gnu/packages/cups.scm | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index aba8ce7eb1..879ec42a88 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Ricardo Wurmus -;;; Copyright © 2015, 2016 Ludovic Courtès +;;; Copyright © 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2015, 2016, 2017 Efraim Flashner ;;; Copyright © 2016 Danny Milosavljevic ;;; Copyright © 2017 Leo Famulari @@ -99,7 +99,34 @@ (define-public cups-filters (assoc-ref %build-inputs "bash") "/bin/bash") ,(string-append "--with-rcdir=" - (assoc-ref %outputs "out") "/etc/rc.d")))) + (assoc-ref %outputs "out") "/etc/rc.d")) + + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-foomatic-hardcoded-file-names + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Foomatic has hardcoded file names we need to fix. + (let ((out (assoc-ref outputs "out")) + (gs (assoc-ref inputs "ghostscript"))) + (substitute* "filter/foomatic-rip/foomaticrip.c" + (("/usr/local/lib/cups/filter") + (string-append out "/lib/cups/filter"))) + #t))) + (add-after 'install 'wrap-filters + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Some filters expect to find 'gs' in $PATH. We cannot + ;; just hard-code its absolute file name in the source + ;; because foomatic-rip, for example, has tests like + ;; 'startswith(cmd, "gs")'. + (let ((out (assoc-ref outputs "out")) + (ghostscript (assoc-ref inputs "ghostscript"))) + (for-each (lambda (file) + (wrap-program file + `("PATH" ":" prefix + (,(string-append ghostscript + "/bin"))))) + (find-files (string-append + out "/lib/cups/filter"))) + #t)))))) (native-inputs `(("glib" ,glib "bin") ; for gdbus-codegen ("pkg-config" ,pkg-config))) -- cgit v1.2.3 From b263967018bd8d32578c4075d68c1d94664fc29a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 12 Sep 2017 23:15:54 +0200 Subject: gnu: cups-filters: Pass "--localstatedir". * gnu/packages/cups.scm (cups-filters)[arguments]: Pass --localstatedir. --- gnu/packages/cups.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 879ec42a88..0e7fcce749 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -89,6 +89,10 @@ (define-public cups-filters #:configure-flags `("--disable-driverless" ; TODO: enable this "--disable-mutool" ; depends on yet another PDF library (mupdf) + + ;; Look for the "domain socket of CUPS" in /var/run/cups. + "--localstatedir=/var" + ,(string-append "--with-test-font-path=" (assoc-ref %build-inputs "font-dejavu") "/share/fonts/truetype/DejaVuSans.ttf") -- cgit v1.2.3 From f40aef6b3b56e1e5fb6e6ac29bd372000e13982f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 12 Sep 2017 23:17:50 +0200 Subject: gnu: cups-filters: Remove reference to "acroread". * gnu/packages/cups.scm (cups-filters)[arguments]: Pass "--with-acroread-path". --- gnu/packages/cups.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 0e7fcce749..0ecfd288c4 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -93,6 +93,9 @@ (define-public cups-filters ;; Look for the "domain socket of CUPS" in /var/run/cups. "--localstatedir=/var" + ;; Free software for the win. + "--with-acroread-path=evince" + ,(string-append "--with-test-font-path=" (assoc-ref %build-inputs "font-dejavu") "/share/fonts/truetype/DejaVuSans.ttf") -- cgit v1.2.3 From 3d695e6ae4909d012ea18828945ef4f4d73b22e3 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 20 Sep 2017 20:20:19 +0200 Subject: gnu: cups-filters: Update to 1.17.7. * gnu/packages/cups.scm (cups-filters): Update to 1.17.7. --- gnu/packages/cups.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 452f670090..d629e38032 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -57,7 +57,7 @@ (define ghostscript/cups (define-public cups-filters (package (name "cups-filters") - (version "1.14.1") + (version "1.17.7") (source(origin (method url-fetch) (uri @@ -65,7 +65,7 @@ (define-public cups-filters "cups-filters-" version ".tar.xz")) (sha256 (base32 - "0175jhqpsyn7bkh7w43ydhyws5zsdak05hr1fsadvzslvwqkffgi")) + "1mg397kgfx0rs9j852f8ppmvaz2al5l75ildbgiqg6j3gwq5jssw")) (modules '((guix build utils))) (snippet ;; install backends, banners and filters to cups-filters output -- cgit v1.2.3