unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Zheng Junjie <zhengjunjie@iscas.ac.cn>
To: 68082@debbugs.gnu.org
Subject: [bug#68082] [PATCH] gnu: libmng: Fix cross-compiling to riscv64-linux.
Date: Thu, 28 Dec 2023 21:57:58 +0800	[thread overview]
Message-ID: <e32c2ba645c2f7f62c3e239cfd23e53ae5ad66fd.1703771878.git.zhengjunjie@iscas.ac.cn> (raw)

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

Change-Id: I906a2b7b7691ae53592cfa35ba64fc7e7d735664
---
 gnu/packages/image.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index ebabd1c973..79f1a293ec 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1483,6 +1483,26 @@ (define-public libmng
                (base32
                 "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))
     (build-system gnu-build-system)
+    (arguments
+     (if (and (target-riscv64?)
+              (%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)) "."))
+                                 '("config.guess" "config.sub"))))))
+         '()))
+    (native-inputs
+     (if (and (target-riscv64?)
+              (%current-target-system))
+         (list config)
+         '()))
     (propagated-inputs
      ;; These are all in the 'Libs.private' field of libmng.pc.
      (list lcms libjpeg-turbo zlib))

base-commit: bc509aba838780502b83f7fc3d2aee72903656f2
-- 
2.41.0





             reply	other threads:[~2023-12-28 14:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 13:57 Zheng Junjie [this message]
2023-12-29 17:08 ` bug#68082: [PATCH] gnu: libmng: Fix cross-compiling to riscv64-linux Mathieu Othacehe

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=e32c2ba645c2f7f62c3e239cfd23e53ae5ad66fd.1703771878.git.zhengjunjie@iscas.ac.cn \
    --to=zhengjunjie@iscas.ac.cn \
    --cc=68082@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).