From 40af021e28102d2f4b2e4b2b3c302f487cb1f591 Mon Sep 17 00:00:00 2001 From: Zheng Junjie Date: Wed, 20 Mar 2024 00:38:17 +0800 Subject: [PATCH] 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 --- gnu/packages/terminals.scm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index d18a042785..1c1294f663 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -36,7 +36,7 @@ ;;; Copyright © 2022, 2023 jgart ;;; Copyright © 2023 Aaron Covrig ;;; Copyright © 2023 Foundation Devices, Inc. -;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023 Jaeme Sifat ;;; Copyright © 2024 Suhail ;;; Copyright © 2024 Clément Lassieur @@ -865,16 +865,23 @@ eye-candy, customizable, and reasonably lightweight.") ;; also to address a GCC 10 issue when doing PGO builds. #:build-type "release" ;; Enable LTO as recommended by INSTALL.md. - #:configure-flags #~'("-Db_lto=true"))) - (native-inputs (list ncurses ;for 'tic' - pkg-config scdoc wayland-protocols)) + ;; when cross-compilation, enable lto will fail. + #:configure-flags (if (%current-target-system) + #~'() + #~'("-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 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is ;; provided for usability reasons. See . (list (search-path-specification (variable "TERMINFO_DIRS") (files '("share/terminfo"))))) - (inputs (list fcft libxkbcommon wayland)) + (inputs (list fcft libxkbcommon wayland wayland-protocols)) (synopsis "Wayland-native terminal emulator") (description "@command{foot} is a terminal emulator for systems using the Wayland