gnu: foot: Fix cross-compilation.

* gnu/packages/terminals.scm (foot): Fix cross-compilation.
[arguments]<#:configure-flags>: When cross-compilation, Remove -Db_lto=true.
[native-inputs]: When cross-compilation, Add wayland, pkg-config-for-build.
[inputs]: Add wayland-protocols.

Change-Id: Ia56d2583254bd9ab463e5b39859eae8eb5092c9b
This commit is contained in:
Zheng Junjie 2024-03-20 00:38:17 +08:00
parent 38598c693f
commit 40af021e28
No known key found for this signature in database
GPG key ID: 3B5AA993E1A2DFF0

View file

@ -36,7 +36,7 @@
;;; Copyright © 2022, 2023 jgart <jgart@dismail.de> ;;; Copyright © 2022, 2023 jgart <jgart@dismail.de>
;;; Copyright © 2023 Aaron Covrig <aaron.covrig.us@ieee.org> ;;; Copyright © 2023 Aaron Covrig <aaron.covrig.us@ieee.org>
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com> ;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com> ;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
;;; Copyright © 2024 Suhail <suhail@bayesians.ca> ;;; Copyright © 2024 Suhail <suhail@bayesians.ca>
;;; Copyright © 2024 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2024 Clément Lassieur <clement@lassieur.org>
@ -865,16 +865,23 @@ (define-public foot
;; also to address a GCC 10 issue when doing PGO builds. ;; also to address a GCC 10 issue when doing PGO builds.
#:build-type "release" #:build-type "release"
;; Enable LTO as recommended by INSTALL.md. ;; Enable LTO as recommended by INSTALL.md.
#:configure-flags #~'("-Db_lto=true"))) ;; when cross-compilation, enable lto will fail.
(native-inputs (list ncurses ;for 'tic' #:configure-flags (if (%current-target-system)
pkg-config scdoc wayland-protocols)) #~'()
#~'("-Db_lto=true"))))
(native-inputs (append
(if (%current-target-system)
(list wayland pkg-config-for-build)
'())
(list ncurses ;for 'tic'
pkg-config scdoc wayland-protocols)))
(native-search-paths (native-search-paths
;; FIXME: This should only be located in 'ncurses'. Nonetheless it is ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
;; provided for usability reasons. See <https://bugs.gnu.org/22138>. ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
(list (search-path-specification (list (search-path-specification
(variable "TERMINFO_DIRS") (variable "TERMINFO_DIRS")
(files '("share/terminfo"))))) (files '("share/terminfo")))))
(inputs (list fcft libxkbcommon wayland)) (inputs (list fcft libxkbcommon wayland wayland-protocols))
(synopsis "Wayland-native terminal emulator") (synopsis "Wayland-native terminal emulator")
(description (description
"@command{foot} is a terminal emulator for systems using the Wayland "@command{foot} is a terminal emulator for systems using the Wayland