unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#69946] [PATCH] gnu: libatasmart: Fix cross-compiling to riscv64-linux.
@ 2024-03-22 16:44 Zheng Junjie
  2024-03-27 13:01 ` bug#69946: " Christopher Baines
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Junjie @ 2024-03-22 16:44 UTC (permalink / raw)
  To: 69946

* gnu/packages/freedesktop.scm (libatasmart)
[native-inputs]: When cross compiling to riscv64-linux-gnu, add config.
[arguments]: When target riscv64-linux-gnu, add update-config phase.

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

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 8a4f490be2..5518d38af5 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1525,7 +1525,25 @@ (define-public libatasmart
                 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
     (build-system gnu-build-system)
     (native-inputs
-     (list pkg-config))
+     (append (if (and (%current-target-system)
+                      (target-riscv64?))
+                 (list config)
+                 '())
+             (list pkg-config)))
+    (arguments
+     (if (and (%current-target-system)
+              (target-riscv64?))
+         (list #:phases
+               #~(modify-phases %standard-phases
+                   (add-after 'unpack 'update-config
+                     (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                       (for-each (lambda (file)
+                                   (install-file
+                                    (search-input-file
+                                     (or native-inputs inputs)
+                                     (string-append "/bin/" file)) "build-aux"))
+                                 '("config.guess" "config.sub"))))))
+         '()))
     (inputs
      (list eudev))
     (home-page "https://0pointer.de/blog/projects/being-smart.html")

base-commit: 40f53e8fb5b867e3a1e8fa798328423718282aac
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#69946: [PATCH] gnu: libatasmart: Fix cross-compiling to riscv64-linux.
  2024-03-22 16:44 [bug#69946] [PATCH] gnu: libatasmart: Fix cross-compiling to riscv64-linux Zheng Junjie
@ 2024-03-27 13:01 ` Christopher Baines
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Baines @ 2024-03-27 13:01 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: guix-patches, 69946-done

[-- Attachment #1: Type: text/plain, Size: 501 bytes --]


Zheng Junjie <zhengjunjie@iscas.ac.cn> writes:

> * gnu/packages/freedesktop.scm (libatasmart)
> [native-inputs]: When cross compiling to riscv64-linux-gnu, add config.
> [arguments]: When target riscv64-linux-gnu, add update-config phase.
>
> Change-Id: I491c43a6ce2c3fc3aed43ecab9d4a2ab251038bb
> ---
>  gnu/packages/freedesktop.scm | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)

Thanks! I've pushed this to master as
d9e693df75ffb8f0333c990d947540261613f72b.

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-27 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-22 16:44 [bug#69946] [PATCH] gnu: libatasmart: Fix cross-compiling to riscv64-linux Zheng Junjie
2024-03-27 13:01 ` bug#69946: " Christopher Baines

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).