unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#68082] [PATCH] gnu: libmng: Fix cross-compiling to riscv64-linux.
@ 2023-12-28 13:57 Zheng Junjie
  2023-12-29 17:08 ` bug#68082: " Mathieu Othacehe
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Junjie @ 2023-12-28 13:57 UTC (permalink / raw)
  To: 68082

* 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





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

* bug#68082: [PATCH] gnu: libmng: Fix cross-compiling to riscv64-linux.
  2023-12-28 13:57 [bug#68082] [PATCH] gnu: libmng: Fix cross-compiling to riscv64-linux Zheng Junjie
@ 2023-12-29 17:08 ` Mathieu Othacehe
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Othacehe @ 2023-12-29 17:08 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: 68082-done


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

Applied, thanks,

Mathieu




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

end of thread, other threads:[~2023-12-29 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-28 13:57 [bug#68082] [PATCH] gnu: libmng: Fix cross-compiling to riscv64-linux Zheng Junjie
2023-12-29 17:08 ` bug#68082: " Mathieu Othacehe

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