unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Zheng Junjie <zhengjunjie@iscas.ac.cn>
To: 75187@debbugs.gnu.org
Subject: [bug#75187] [PATCH] gnu: chibi-scheme: Fix cross-compilation.
Date: Mon, 30 Dec 2024 15:57:33 +0800	[thread overview]
Message-ID: <6995baa0afe1ad3b96e7b9bf0b00fa2854ecbde2.1735545453.git.zhengjunjie@iscas.ac.cn> (raw)

* gnu/packages/scheme.scm (chibi-scheme)[arguments]: Use G-expression.
<#:make-flags>:When cross-compilation, Set CHIBI.
[native-inputs]: When cross-compilation. Add this-package.

Change-Id: I424854d77e575f2e2aab8a5a9d32ef628c9db953
---
 gnu/packages/scheme.scm | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 490a09aa1ca..678ca9db064 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2024 Skylar Hill <stellarskylark@posteo.net>
 ;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -603,14 +604,24 @@ (define-public chibi-scheme
         (base32 "02zq35hdbi03rmmamx6ml4ihsigdl4mmbf6d9ysazv8ciiln5v4b"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (delete 'configure))           ; no configure script
-       #:make-flags (let ((out (assoc-ref %outputs "out")))
-                      (list (string-append "PREFIX=" out)
-                            (string-append "CC=" ,(cc-for-target))
-                            (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")))
-       #:test-target "test"))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure))           ; no configure script
+           #:make-flags
+           #~(list
+              #$@(if
+                  (%current-target-system)
+                  #~((string-append
+                      "CHIBI=" #+(this-package-native-input "chibi-scheme")
+                      "/bin/chibi-scheme"))
+                  #~())
+              (string-append "PREFIX=" #$output)
+              (string-append "CC=" #$(cc-for-target))
+              (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
+           #:test-target "test"))
+    (native-inputs (if (%current-target-system)
+                       (list this-package)
+                       (list)))
     (synopsis "Small embeddable Scheme implementation")
     (description
      "Chibi-Scheme is a very small library with no external dependencies

base-commit: a74324f31075f05e7464d23192b29967fa254f26
prerequisite-patch-id: 54256209498bcad438d9fe404caa48d0cdb1ad33
-- 
2.47.1





                 reply	other threads:[~2024-12-30  7:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=6995baa0afe1ad3b96e7b9bf0b00fa2854ecbde2.1735545453.git.zhengjunjie@iscas.ac.cn \
    --to=zhengjunjie@iscas.ac.cn \
    --cc=75187@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).