me
/
guix
Archived
1
0
Fork 0

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.
master
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
1 changed files with 13 additions and 14 deletions

View File

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