gnu: r-maldiquant: Move to (gnu packages cran).
[jackhill/guix/guix.git] / gnu / packages / cups.scm
index 0f048bb..281c271 100644 (file)
@@ -5,7 +5,8 @@
 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -58,7 +59,7 @@
 (define-public cups-filters
   (package
     (name "cups-filters")
-    (version "1.25.11")
+    (version "1.27.4")
     (source(origin
               (method url-fetch)
               (uri
@@ -66,7 +67,7 @@
                               "cups-filters-" version ".tar.xz"))
               (sha256
                (base32
-                "0ni8krr4rf5833livn9401cd41gspjvxj0iiqnc1rfg3x90i0fxh"))
+                "110b1xhb5vfpcx0zq9kkas7pj281skx5dpnnr22idx509jfdzj8b"))
               (modules '((guix build utils)))
               (snippet
                ;; install backends, banners and filters to cups-filters output
                           (("/usr/local/lib/cups/filter")
                            (string-append out "/lib/cups/filter")))
                         #t)))
-                  (add-after 'unpack 'patch-for-poppler
-                    (lambda _
-                      (substitute* "filter/pdf.cxx"
-                        (("GooString \\*field_name;" m)
-                         (string-append "const " m)))
-                      #t))
                   (add-after 'install 'wrap-filters
                     (lambda* (#:key inputs outputs #:allow-other-keys)
                       ;; Some filters expect to find 'gs' in $PATH.  We cannot
        ("ijs"          ,ijs)
        ("dbus"         ,dbus)
        ("lcms"         ,lcms)
-       ("libjpeg"      ,libjpeg)
+       ("libjpeg"      ,libjpeg-turbo)
        ("libpng"       ,libpng)
        ("libtiff"      ,libtiff)
        ("glib"         ,glib)
@@ -187,7 +182,7 @@ filters for the PDF-centric printing workflow introduced by OpenPrinting.")
 (define-public cups-minimal
   (package
     (name "cups-minimal")
-    (version "2.3.0")
+    (version "2.3.3")
     (source
      (origin
        (method url-fetch)
@@ -195,7 +190,7 @@ filters for the PDF-centric printing workflow introduced by OpenPrinting.")
                            version "/cups-" version "-source.tar.gz"))
        (sha256
         (base32
-         "19d1jpdpxy0fclq37pchi7ldnw9dssxx3zskcgqai3h0rwlh5bxc"))))
+         "1vpk0b2vq830f8fvf9z8qjsm5k141i7pi8djbinpnr78pi4dj7r6"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
@@ -249,7 +244,7 @@ device-specific programs to convert and print many types of files.")
     (license license:asl2.0)))
 
 (define-public cups
-  (package (inherit cups-minimal)
+  (package/inherit cups-minimal
     (name "cups")
     (arguments
      `(;; Three tests fail:
@@ -420,14 +415,14 @@ should only be used as part of the Guix cups-pk-helper service.")
 (define-public hplip
   (package
     (name "hplip")
-    (version "3.19.12")
+    (version "3.20.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/hplip/hplip/" version
                                   "/hplip-" version ".tar.gz"))
               (sha256
                (base32
-                "0mdj0sqgfxjqa550adiw1gn4z9n6wcvn55slivgf0ndn5x89iwxp"))
+                "083w58wpvvm6sir6rf5dwx3r0rman9sv1zpl26chl0a88crjsjy6"))
               (modules '((guix build utils)))
               (patches (search-patches "hplip-remove-imageprocessor.patch"))
               (snippet
@@ -536,7 +531,27 @@ should only be used as part of the Guix cups-pk-helper service.")
                   (string-append "rulessystemdir = " out
                                  "/lib/systemd/system"))
                  (("/etc/sane.d")
-                  (string-append out "/etc/sane.d"))))))
+                  (string-append out "/etc/sane.d")))
+               #t)))
+         (add-before 'configure 'fix-build-with-python-3.8
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((python (assoc-ref inputs "python")))
+               ;; XXX: The configure script of looks for Python headers in the
+               ;; wrong places as of version 3.20.3.  Help it by adding the
+               ;; include directory on C_INCLUDE_PATH.
+               (when python
+                 (setenv "C_INCLUDE_PATH"
+                         (string-append python "/include/python"
+                                        (python:python-version python)
+                                        ":" (getenv "C_INCLUDE_PATH"))))
+               #t)))
+         (add-after 'install 'install-models-dat
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (models-dir (string-append out
+                                               "/share/hplip/data/models")))
+               (install-file "data/models/models.dat" models-dir))
+             #t))
          (add-after 'install 'wrap-binaries
            ;; Scripts in /bin are all symlinks to .py files in /share/hplip.
            ;; Symlinks are immune to the Python build system's 'WRAP phase,
@@ -578,7 +593,7 @@ should only be used as part of the Guix cups-pk-helper service.")
     (inputs
      `(("cups-minimal" ,cups-minimal)
        ("dbus" ,dbus)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libusb" ,libusb)
        ("python" ,python)
        ("python-dbus" ,python-dbus)
@@ -666,14 +681,14 @@ printer/driver specific, but spooler-independent PPD file.")
 (define-public foo2zjs
   (package
     (name "foo2zjs")
-    (version "20190909")
+    (version "20200610")
     (source (origin
               (method url-fetch)
               ;; XXX: This is an unversioned URL!
               (uri "http://foo2zjs.rkkda.com/foo2zjs.tar.gz")
               (sha256
                (base32
-                "1nn84c045mbv6yzpjfggc6152bvgrmcxiyvgz9v2w3sws7ihshrm"))))
+                "11ddx6wf8b5ksl4fqw6fnyz9m3y470lryyrskkya2bsch2bvj9lg"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases