guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#75051] [PATCH 11/14] gnu: sed: Fix cross-compiling to loongarch64.


From: Zheng Junjie
Subject: [bug#75051] [PATCH 11/14] gnu: sed: Fix cross-compiling to loongarch64.
Date: Tue, 24 Dec 2024 01:13:35 +0800

* gnu/packages/base.scm (sed)[native-inputs]: When cross-compiling to
loongarch64, add config.
[arguments]: When cross-compiling to loongarch64, Add update-config-scripts
phase.

Change-Id: I056d5004ec326f8c5b30853d5ea401ea12a949b7
---
 gnu/packages/base.scm | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 46390506236..df0a4e5aa1b 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -217,7 +217,25 @@ (define-public sed
             (modules '((guix build utils)))))
    (build-system gnu-build-system)
    (synopsis "Stream editor")
-   (native-inputs (list perl))                    ;for tests
+   (native-inputs (append (if (and (target-loongarch64?)
+                                   (%current-target-system))
+                              (list config)
+                              '())
+                          (list perl)))                    ;for tests
+    (arguments (if (and (target-loongarch64?)
+                        (%current-target-system))
+                   (list #:phases
+                         #~(modify-phases %standard-phases
+                             (add-after 'unpack 'update-config-scripts
+                               (lambda* (#:key inputs native-inputs 
#:allow-other-keys)
+                                 ;; Replace outdated config.guess and 
config.sub.
+                                 (for-each (lambda (file)
+                                             (install-file
+                                              (search-input-file
+                                               (or native-inputs inputs)
+                                               (string-append "/bin/" file)) 
"./build-aux"))
+                                           '("config.guess" "config.sub"))))))
+                   '()))
    (description
     "Sed is a non-interactive, text stream editor.  It receives a text
 input from a file or from standard input and it then applies a series of text
-- 
2.46.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]