[PATCH 0/2] Fix utf8proc and foot cross-compilation.

  • Open
  • quality assurance status badge
Details
One participant
  • Zheng Junjie
Owner
unassigned
Submitted by
Zheng Junjie
Severity
normal
Z
Z
Zheng Junjie wrote on 19 Mar 17:35 +0100
(address . guix-patches@gnu.org)
cover.1710866094.git.zhengjunjie@iscas.ac.cn
Zheng Junjie (2):
gnu: utf8proc: fix cross-compilation.
gnu: foot: Fix cross-compilation.

gnu/packages/terminals.scm | 17 ++++++++++++-----
gnu/packages/textutils.scm | 13 +++++++++----
2 files changed, 21 insertions(+), 9 deletions(-)


base-commit: ee11b22fcc7d8b42847e9d940ce5be3bc0d4f880
--
2.41.0
Z
Z
Zheng Junjie wrote on 19 Mar 17:38 +0100
[PATCH 2/2] gnu: foot: Fix cross-compilation.
(address . 69900@debbugs.gnu.org)
c26b921750657b95b12225e0ff191e805037eba6.1710866094.git.zhengjunjie@iscas.ac.cn
* 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(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index f0ae4d4d4d..651e93b60f 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -36,7 +36,7 @@
;;; Copyright © 2022, 2023 jgart <jgart@dismail.de>
;;; Copyright © 2023 Aaron Covrig <aaron.covrig.us@ieee.org>
;;; 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 © 2024 Suhail <suhail@bayesians.ca>
;;; 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.
#: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 <https://bugs.gnu.org/22138>.
(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
--
2.41.0
Z
Z
Zheng Junjie wrote on 19 Mar 17:38 +0100
[PATCH 1/2] gnu: utf8proc: fix cross-compilation.
(address . 69900@debbugs.gnu.org)
daf8555cbcf7ee4131302bdeffb0095dee0bd796.1710866094.git.zhengjunjie@iscas.ac.cn
* gnu/packages/textutils.scm (utf8proc): fix cross-compilation.
[arguments]<#:make-flags>: Use CC-FOR-TARGET.
<#:phases>: When cross-compilation, Get test data from native-inputs.

Change-Id: I42699e62f28585cc215a8843b5daad9c52af44c9
---
gnu/packages/textutils.scm | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 25de916fcb..b4855392d6 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -27,7 +27,7 @@
;;; Copyright © 2022 Gabriel Wicki <gabriel@erlikon.ch>
;;; Copyright © 2023 Reza Housseini <reza@housseini.me>
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
-;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Timotej Lazar <timotej.lazar@araneo.si>;;
;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
;;;
@@ -197,15 +197,20 @@ (define-public utf8proc
;; For tests.
("perl" ,perl))))
(arguments
- '(#:make-flags (list "CC=gcc"
+ `(#:make-flags (list ,(string-append "CC=" (cc-for-target))
(string-append "prefix=" (assoc-ref %outputs "out")))
#:phases
(modify-phases %standard-phases
(delete 'configure)
(add-before 'check 'check-data
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda* (#:key ,@(if (%current-target-system)
+ '(native-inputs)
+ '())
+ inputs #:allow-other-keys)
(for-each (lambda (i)
- (copy-file (assoc-ref inputs i)
+ (copy-file (assoc-ref ,@(if (%current-target-system)
+ '((or native-inputs inputs))
+ '(inputs)) i)
(string-append "data/" i)))
'("NormalizationTest.txt" "GraphemeBreakTest.txt"))
(substitute* "data/GraphemeBreakTest.txt"
--
2.41.0
?