gnu: hplip: Update to 3.24.4 and fix build with gcc-14.

* gnu/packages/cups.scm (hplip): Update to 3.24.4.
[arguments]: Add "set-gcc-14-cflags" phase to relax gcc-14's strictness.

Change-Id: Ie753c9ebb51f08c4683e9a9762e9c269eceb5e22
This commit is contained in:
Janneke Nieuwenhuizen 2024-12-09 10:16:50 +01:00
parent ee21382230
commit 9a47b318fa
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -9,6 +9,7 @@
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2021, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -529,14 +530,14 @@ (define-public cups-pk-helper
(define-public hplip (define-public hplip
(package (package
(name "hplip") (name "hplip")
(version "3.23.12") (version "3.24.4")
(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
"1vb9irqsm3d4c2qdr4h6ia940x65bb99h4x31mgxn7dkvv42lv57")) "1yzil1fn9ib2hxmqh9in0apmmznvln0xahlxvyny59ck321l6xjx"))
(patches (search-patches "hplip-usb-timeout.patch")) (patches (search-patches "hplip-usb-timeout.patch"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
@ -599,6 +600,18 @@ (define-public hplip
"--disable-qt4") "--disable-qt4")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'set-gcc-14-cflags
;; We set CFLAGS here because adding setting it in
;; #:configure-flags or #:make-flags does not work.
(lambda _
(substitute* "Makefile.in"
(("CFLAGS = @CFLAGS@" all)
(string-append all
" -Wno-error=attributes"
" -Wno-error=implicit-function-declaration"
" -Wno-error=implicit-int"
" -Wno-error=incompatible-pointer-types"
" -Wno-error=return-mismatch")))))
(add-after 'unpack 'fix-hard-coded-file-names (add-after 'unpack 'fix-hard-coded-file-names
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out #$output) (let ((out #$output)