gnu: kbd: Update to 2.4.0.

* gnu/packages/linux.scm (kbd): Update to 2.4.0.
[source](snippet): Remove obsolete substitution.
[native-inputs]: Add AUTOCONF.
[inputs]: Remove CHECK.  Add ZSTD and XZ.
[arguments]: Add absolute references to the new inputs.
(loadkeys-static)[arguments]: Add extra LDFLAGS.
This commit is contained in:
Marius Bakke 2021-05-18 20:38:27 +02:00
parent c2649f2811
commit 6f20fa3b8b
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -15,7 +15,7 @@
;;; Copyright © 2016, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 David Craven <david@craven.ch> ;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2016 John Darrington <jmd@gnu.org> ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2016, 2018 Rene Saavedra <pacoon@protonmail.com> ;;; Copyright © 2016, 2018 Rene Saavedra <pacoon@protonmail.com>
;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com> ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is> ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
@ -3227,40 +3227,36 @@ (define-public kbd-neo
(define-public kbd (define-public kbd
(package (package
(name "kbd") (name "kbd")
(version "2.0.4") (version "2.4.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-" (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
version ".tar.xz")) version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz")) "17wvrqz2kk0w87idinhyvd31ih1dp7ldfl2yfx7ailygb0279w2m"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin '(begin
(substitute* "tests/Makefile.in"
;; The '%: %.in' rule incorrectly uses @VERSION@.
(("@VERSION@")
"[@]VERSION[@]"))
(substitute* '("src/unicode_start" "src/unicode_stop") (substitute* '("src/unicode_start" "src/unicode_stop")
;; Assume the Coreutils are in $PATH. ;; Assume the Coreutils are in $PATH.
(("/usr/bin/tty") (("/usr/bin/tty")
"tty")) "tty"))))))
#t))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases '(#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'build 'pre-build (add-before 'build 'pre-build
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((gzip (assoc-ref %build-inputs "gzip")) (let ((bzip2 (assoc-ref inputs "bzip2"))
(bzip2 (assoc-ref %build-inputs "bzip2"))) (gzip (assoc-ref inputs "gzip"))
(substitute* "src/libkeymap/findfile.c" (xz (assoc-ref inputs "xz"))
(("gzip") (zstd (assoc-ref inputs "zstd")))
(string-append gzip "/bin/gzip")) (substitute* "src/libkbdfile/kbdfile.c"
(("bzip2") (("bzip2") (string-append bzip2 "/bin/bzip2"))
(string-append bzip2 "/bin/bzip2"))) (("gzip") (string-append gzip "/bin/gzip"))
#t))) (("xz -d") (string-append xz "/bin/xz -d"))
(("zstd") (string-append zstd "/bin/zstd"))))))
(add-after 'install 'post-install (add-after 'install 'post-install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
;; Make sure these programs find their comrades. ;; Make sure these programs find their comrades.
@ -3269,12 +3265,16 @@ (define-public kbd
(for-each (lambda (prog) (for-each (lambda (prog)
(wrap-program (string-append bin "/" prog) (wrap-program (string-append bin "/" prog)
`("PATH" ":" prefix (,bin)))) `("PATH" ":" prefix (,bin))))
'("unicode_start" "unicode_stop")) '("unicode_start" "unicode_stop"))))))))
#t)))))) (native-inputs
(inputs `(("check" ,check) `(("autoconf" ,autoconf)
("pkg-config" ,pkg-config)))
(inputs
`(("bzip2" ,bzip2)
("gzip" ,gzip) ("gzip" ,gzip)
("bzip2" ,bzip2) ("pam" ,linux-pam)
("pam" ,linux-pam))) ("xz" ,xz)
("zstd" ,zstd)))
(native-search-paths (native-search-paths
(list (search-path-specification (list (search-path-specification
(variable "LOADKEYS_KEYMAP_PATH") (variable "LOADKEYS_KEYMAP_PATH")
@ -3282,7 +3282,6 @@ (define-public kbd
;; run (for example) loadkeys en-latin9 instead of having to find ;; run (for example) loadkeys en-latin9 instead of having to find
;; and type i386/colemak/en-latin9 on a mislabelled keyboard. ;; and type i386/colemak/en-latin9 on a mislabelled keyboard.
(files (list "share/keymaps/**"))))) (files (list "share/keymaps/**")))))
(native-inputs `(("pkg-config" ,pkg-config)))
(home-page "http://kbd-project.org/") (home-page "http://kbd-project.org/")
(synopsis "Linux keyboard utilities and keyboard maps") (synopsis "Linux keyboard utilities and keyboard maps")
(description (description
@ -3303,7 +3302,7 @@ (define-public loadkeys-static
"--disable-libkeymap") "--disable-libkeymap")
,flags)) ,flags))
((#:make-flags flags ''()) ((#:make-flags flags ''())
`(cons "LDFLAGS=-all-static" ,flags)) `(cons "LDFLAGS=-all-static -lrt -lpthread" ,flags))
((#:phases phases '%standard-phases) ((#:phases phases '%standard-phases)
`(modify-phases ,phases `(modify-phases ,phases
(replace 'install (replace 'install
@ -3314,8 +3313,7 @@ (define-public loadkeys-static
(remove-store-references "src/loadkeys") (remove-store-references "src/loadkeys")
(install-file "src/loadkeys" (install-file "src/loadkeys"
(string-append out "/bin")) (string-append out "/bin")))))
#t)))
(delete 'post-install))) (delete 'post-install)))
((#:strip-flags _ '()) ((#:strip-flags _ '())
''("--strip-all")) ''("--strip-all"))