gnu: hplip: Update to 3.21.10.

* gnu/packages/cups.scm (hplip): Update to 3.21.10.
[snippet]: Make substitution patterns more specific.
[arguments]: Don't explicitly return #t from phases.
This commit is contained in:
Tobias Geerinckx-Rice 2021-11-08 01:03:46 +01:00
parent e46e144b42
commit e568b14076
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -490,14 +490,14 @@ (define-public cups-pk-helper
(define-public hplip
(package
(name "hplip")
(version "3.21.8")
(version "3.21.10")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/hplip/hplip/" version
"/hplip-" version ".tar.gz"))
(sha256
(base32
"076fjzgw86q817c660h1vzwdp00cyjr49b9bfi7qkhphq6am4gpi"))
"0q3adcp8iygravp4bq4gw14jk20c5rhnawj1333qyw8yvlghw8yy"))
(modules '((guix build utils)))
(snippet
'(begin
@ -512,9 +512,13 @@ (define-public hplip
(delete-file "prnt/hpcups/ImageProcessor.h")
(substitute* "Makefile.in"
((" -lImageProcessor ") " ")
(("(\\@HPLIP_BUILD_TRUE\\@[[:blank:]]*).*libImageProcessor.*"
;; Turn shell commands inside an if…fi into harmless no-ops.
(("^(\\@HPLIP_BUILD_TRUE\\@[[:blank:]]*).*libImageProcessor.*"
_ prefix)
(string-append prefix ":; \\\n")))
(string-append prefix ": ; \\\n"))
;; Remove the lines adding file targets altogether.
(("^\\@FULL_BUILD_TRUE\\@.*libImageProcessor.*")
""))
;; Install binaries under libexec/hplip instead of
;; share/hplip; that'll at least ensure they get stripped.
@ -523,8 +527,7 @@ (define-public hplip
(("^dat2drvdir =.*")
"dat2drvdir = $(pkglibexecdir)\n")
(("^locatedriverdir =.*")
"locatedriverdir = $(pkglibexecdir)\n"))
#t))))
"locatedriverdir = $(pkglibexecdir)\n"))))))
(build-system gnu-build-system)
(outputs (list "out" "ppd"))
(home-page "https://developers.hp.com/hp-linux-imaging-and-printing")
@ -613,8 +616,7 @@ (define-public hplip
(string-append "rulessystemdir = " out
"/lib/systemd/system"))
(("/etc/sane.d")
(string-append out "/etc/sane.d")))
#t)))
(string-append out "/etc/sane.d"))))))
(add-before 'configure 'fix-build-with-python-3.8
(lambda* (#:key inputs #:allow-other-keys)
(let ((python (assoc-ref inputs "python")))
@ -625,15 +627,13 @@ (define-public hplip
(setenv "C_INCLUDE_PATH"
(string-append python "/include/python"
(python:python-version python)
":" (getenv "C_INCLUDE_PATH"))))
#t)))
":" (getenv "C_INCLUDE_PATH")))))))
(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))
(install-file "data/models/models.dat" models-dir))))
(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,
@ -664,8 +664,7 @@ (define-public hplip
bin target)))
(chmod file #o755)))
(find-files "." (lambda (file stat)
(eq? 'symlink (stat:type stat)))))
#t)))))))
(eq? 'symlink (stat:type stat))))))))))))
;; Note that the error messages printed by the tools in the case of
;; missing dependencies are often downright misleading.