unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Zheng Junjie <zhengjunjie@iscas.ac.cn>
To: 69946@debbugs.gnu.org
Subject: [bug#69946] [PATCH] gnu: libatasmart: Fix cross-compiling to riscv64-linux.
Date: Sat, 23 Mar 2024 00:44:20 +0800	[thread overview]
Message-ID: <2a5a54bdec875b00607eb33eb69f10493ec228f0.1711125850.git.zhengjunjie@iscas.ac.cn> (raw)

* 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





             reply	other threads:[~2024-03-22 17:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 16:44 Zheng Junjie [this message]
2024-03-27 13:01 ` bug#69946: [PATCH] gnu: libatasmart: Fix cross-compiling to riscv64-linux Christopher Baines

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=2a5a54bdec875b00607eb33eb69f10493ec228f0.1711125850.git.zhengjunjie@iscas.ac.cn \
    --to=zhengjunjie@iscas.ac.cn \
    --cc=69946@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).