From d02aabaf1b57eda3ef052c70df1322f915e7c736 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 9 Sep 2017 22:56:54 +0200 Subject: gnu: Add foomatic-filters. * gnu/packages/cups.scm (foomatic-filters): New procedure. --- gnu/packages/cups.scm | 58 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index aba8ce7eb1..d9e92b6a8c 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 @@ -27,10 +27,14 @@ (define-module (gnu packages cups) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages algebra) + #:use-module (gnu packages autotools) #:use-module (gnu packages avahi) #:use-module (gnu packages compression) + #:use-module (gnu packages groff) #:use-module (gnu packages libusb) - #:use-module (gnu packages autotools) + #:use-module (gnu packages perl) + #:use-module (gnu packages pretty-print) #:use-module (gnu packages python) #:use-module (gnu packages scanner) #:use-module (gnu packages image) @@ -445,3 +449,53 @@ (define-public hplip ;; TODO: Make hp-setup find python-dbus. ("python-dbus" ,python-dbus))) (native-inputs `(("pkg-config" ,pkg-config))))) + +(define-public foomatic-filters + (package + (name "foomatic-filters") + (version "4.0.12") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.openprinting.org/download/foomatic/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "17w26r15094j4fqifa7f7i7jad4gsy9zdlq69kffrykcw31qx3q8")) + (patches + (search-patches "foomatic-filters-CVE-2015-8327.patch" + "foomatic-filters-CVE-2015-8560.patch")))) + (build-system gnu-build-system) + (home-page + "https://wiki.linuxfoundation.org/openprinting/database/foomatic") + (native-inputs + `(("perl" ,perl) + ("pkg-config" ,pkg-config))) + (inputs + `(("dbus" ,dbus) + ("a2ps" ,a2ps))) + (arguments + '( ;; Specify the installation directories. + #:configure-flags (list (string-append "ac_cv_path_CUPS_BACKENDS=" + (assoc-ref %outputs "out") + "/lib/cups/backend") + (string-append "ac_cv_path_CUPS_FILTERS=" + (assoc-ref %outputs "out") + "/lib/cups/filter") + (string-append "ac_cv_path_PPR_INTERFACES=" + (assoc-ref %outputs "out") + "/lib/ppr/interfaces") + (string-append "ac_cv_path_PPR_LIB=" + (assoc-ref %outputs "out") + "/lib/ppr/lib") + + ;; For some reason these are misdiagnosed. + "ac_cv_func_malloc_0_nonnull=yes" + "ac_cv_func_realloc_0_nonnull=yes") + #:test-target "tests")) + (synopsis "Convert PostScript to the printer's native format") + (description + "This package contains filter scripts used by the printer spoolers to +convert the incoming PostScript data into the printer's native format using a +printer/driver specific, but spooler-independent PPD file.") + (license license:gpl2+))) -- cgit v1.2.3 From 5db0a1cd5ac06259a3d0b220cc47cf7229ed0d3a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 9 Sep 2017 22:58:06 +0200 Subject: gnu: Add foo2zjs. * gnu/packages/cups.scm (foo2zjs): New variable. --- gnu/packages/cups.scm | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index d9e92b6a8c..cef586f763 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -499,3 +499,69 @@ (define-public foomatic-filters convert the incoming PostScript data into the printer's native format using a printer/driver specific, but spooler-independent PPD file.") (license license:gpl2+))) + +(define-public foo2zjs + (package + ;; The tarball is called "foo2zjs", but the web page talks about + ;; "foo2xqx". Go figure! + (name "foo2zjs") + (version "201709") + (source (origin + (method url-fetch) + ;; XXX: This is an unversioned URL! + (uri "http://foo2zjs.rkkda.com/foo2zjs.tar.gz") + (sha256 + (base32 + "0amjj3jr6s6h7crzxyx11v31sj0blz7k5c2vycz4gn8cxlmk3c7w")))) + (build-system gnu-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (substitute* (find-files "." "^Makefile$") + ;; Set the installation directory. + (("^PREFIX[[:blank:]]*=.*$") + (string-append "PREFIX = " + (assoc-ref outputs "out") + "\n")) + (("^UDEVBIN[[:blank:]]*=.*$") + "UDEVBIN = $(PREFIX)/bin\n") + ;; Don't try to chown/chgrp the installed files. + (("-oroot") + "") + (("-glp") + "") + ;; Placate the dependency checks. + (("/usr/include/stdio.h") + "/etc/passwd") + (("/usr/") + "$(PREFIX)/") + ;; Ensure fixed timestamps in man pages. + (("^MODTIME[[:blank:]]*=.*$") + "MODTIME = echo Thu Jan 01 01:00:00 1970\n")) + #t)) + (add-after 'install 'remove-pdf + (lambda* (#:key outputs #:allow-other-keys) + ;; Remove 'manual.pdf' which is (1) useless (it's a + ;; concatenation of man pages), and (2) not + ;; bit-reproducible due to . + (let ((out (assoc-ref outputs "out"))) + (for-each delete-file + (find-files out "^manual\\.pdf$")) + #t)))) + #:parallel-build? #f ;broken makefile + #:tests? #f ;no tests + #:make-flags '("CC=gcc"))) + (inputs + `(("ghostscript" ,ghostscript) + ("foomatic-filters" ,foomatic-filters))) ;for 'foomatic-rip' + (native-inputs + `(("bc" ,bc) + ("groff" ,groff))) + (home-page "http://foo2xqx.rkkda.com/") + (synopsis "Printer driver for XQX stream protocol") + (description + "This package provides a printer driver notably for the ZJS and XQX +protocols, which cover printers made by Konica, HP (LaserJet), Oki, Samsung, +and more. See @file{README} for details.") + (license license:gpl2+))) -- cgit v1.2.3