unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Zheng Junjie <zhengjunjie@iscas.ac.cn>
To: 69900@debbugs.gnu.org
Subject: [bug#69900] [PATCH 1/2] gnu: utf8proc: fix cross-compilation.
Date: Wed, 20 Mar 2024 00:38:16 +0800	[thread overview]
Message-ID: <daf8555cbcf7ee4131302bdeffb0095dee0bd796.1710866094.git.zhengjunjie@iscas.ac.cn> (raw)
In-Reply-To: <cover.1710866094.git.zhengjunjie@iscas.ac.cn>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2166 bytes --]

* 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(-)

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





  reply	other threads:[~2024-03-19 16:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 16:35 [bug#69900] [PATCH 0/2] Fix utf8proc and foot cross-compilation Zheng Junjie
2024-03-19 16:38 ` Zheng Junjie [this message]
2024-03-19 16:38 ` [bug#69900] [PATCH 2/2] gnu: foot: Fix cross-compilation Zheng Junjie
2024-05-13 16:38 ` bug#69900: [PATCH 0/2] Fix utf8proc and foot cross-compilation Zheng Junjie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=daf8555cbcf7ee4131302bdeffb0095dee0bd796.1710866094.git.zhengjunjie@iscas.ac.cn \
    --to=zhengjunjie@iscas.ac.cn \
    --cc=69900@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).