[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#53878] [PATCH v6 23/24] gnu: chez: Add 'chez-scheme-for-system'.
From: |
Philip McGrath |
Subject: |
[bug#53878] [PATCH v6 23/24] gnu: chez: Add 'chez-scheme-for-system'. |
Date: |
Sat, 26 Feb 2022 21:34:49 -0500 |
* gnu/packages/chez.scm (chez-scheme-for-system): New procedure.
(chez-srfi, chez-web, chez-sockets, chez-matchable, chez-irregex,
chez-fmt, chez-mit, chez-scmutils): Use 'chez-scheme-for-system'.
* gnu/packages/loko.scm (loko-scheme): Likewise.
* gnu/packages/emacs-xyz.scm (emacs-geiser-chez): Likewise
---
gnu/packages/chez.scm | 33 ++++++++++++++++++++++++---------
gnu/packages/emacs-xyz.scm | 2 +-
gnu/packages/loko.scm | 2 +-
3 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index e7ddab0d1f..b3aadf3a78 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -47,7 +47,8 @@ (define-module (gnu packages chez)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
- #:export (nix-system->chez-machine
+ #:export (chez-scheme-for-system
+ nix-system->chez-machine
chez-machine->nonthreaded
chez-machine->threaded
unpack-nanopass+stex))
@@ -67,6 +68,20 @@ (define-module (gnu packages chez)
;;
;; Code:
+(define* (chez-scheme-for-system #:optional
+ (system (or (%current-target-system)
+ (%current-system))))
+ "Return 'chez-scheme' unless only 'chez-scheme-for-racket' supports SYSTEM,
+including support for native threads."
+ (if (or
+ ;; full support upstream
+ (and=> (chez-upstream-features-for-system system)
+ (cut memq 'threads <>))
+ ;; no support anywhere
+ (not (nix-system->chez-machine system)))
+ chez-scheme
+ chez-scheme-for-racket))
+
(define (chez-machine->nonthreaded machine)
"Given a string MACHINE naming a Chez Scheme machine type, returns a string
naming the nonthreaded machine type for the same architecture and OS as
@@ -751,7 +766,7 @@ (define-public chez-srfi
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(arguments
(list #:make-flags (chez-make-flags name version)
#:test-target "test"
@@ -782,7 +797,7 @@ (define-public chez-web
(base32 "1dq25qygyncbfq4kwwqqgyyakfqjwhp5q23vrf3bff1p66nyfl3b"))))
(build-system gnu-build-system)
(native-inputs
- (list chez-scheme
+ (list (chez-scheme-for-system)
ghostscript
;; FIXME: This package fails to build with the error:
;; mktexpk: don't know how to create bitmap font for bchr8r
@@ -847,7 +862,7 @@ (define-public chez-sockets
(base32 "1n5fbwwz51fdzvjackgmnsgh363g9inyxv7kmzi0469cwavwcx5m"))))
(build-system gnu-build-system)
(native-inputs
- (list chez-scheme
+ (list (chez-scheme-for-system)
chez-web
(texlive-updmap.cfg (list texlive-pdftex))))
(arguments
@@ -933,7 +948,7 @@ (define-public chez-matchable
(inputs
(list chez-srfi)) ; for tests
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(arguments
(list #:make-flags (chez-make-flags name version)
#:test-target "test"
@@ -965,7 +980,7 @@ (define-public chez-irregex
(propagated-inputs
(list chez-srfi)) ; for irregex-utils
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(arguments
(list #:make-flags (chez-make-flags name version)
#:test-target "test"
@@ -996,7 +1011,7 @@ (define-public chez-fmt
(propagated-inputs
(list chez-srfi)) ; for irregex-utils
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(arguments
(list #:make-flags (chez-make-flags name version)
#:test-target "chez-check"
@@ -1059,7 +1074,7 @@ (define string->uninterned-symbol
(inputs
(list chez-srfi)) ; for tests
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(arguments
(list #:make-flags (chez-make-flags name version)
#:test-target "test"
@@ -1090,7 +1105,7 @@ (define-public chez-scmutils
(inputs
(list chez-srfi)) ; for tests
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(propagated-inputs
(list chez-mit chez-srfi))
(arguments
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ef98088100..df53df61c7 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -451,7 +451,7 @@ (define-public emacs-geiser-chez
(string-append
"(eval-after-load 'geiser-impl '" all ")"))))))))
(inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(propagated-inputs
(list emacs-geiser))
(home-page "https://nongnu.org/geiser/")
diff --git a/gnu/packages/loko.scm b/gnu/packages/loko.scm
index ef9312afe3..449c62f1f0 100644
--- a/gnu/packages/loko.scm
+++ b/gnu/packages/loko.scm
@@ -71,7 +71,7 @@ (define-public loko-scheme
#t)))))
(native-inputs
`(("akku" ,akku)
- ("chez-scheme" ,chez-scheme)
+ ("chez-scheme" ,(chez-scheme-for-system))
("struct" ,guile-struct-pack)
("laesare" ,guile-laesare)
("pfds" ,guile-pfds)
--
2.32.0
- [bug#53878] [PATCH v6 15/24] gnu: chez-scheme: Use "lib/chez-scheme" for search path., (continued)
- [bug#53878] [PATCH v6 15/24] gnu: chez-scheme: Use "lib/chez-scheme" for search path., Liliana Marie Prikler, 2022/02/27
- [bug#53878] [PATCH v6 14/24] gnu: chez-scheme: Use new style for Chez packages., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 16/24] gnu: chez-scheme: Use shared zlib and lz4., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 17/24] gnu: chez-scheme: Use new package style., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 20/24] gnu: chez-scheme: Explicitly package bootstrap bootfiles., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 21/24] gnu: chez-mit: Support chez-scheme-for-racket., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 18/24] gnu: Add stex., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 19/24] gnu: Add chez-nanopass., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 24/24] gnu: racket-vm-cs: Build with "--enable-scheme"., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 22/24] gnu: Add chez-scheme-for-racket., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 23/24] gnu: chez: Add 'chez-scheme-for-system'.,
Philip McGrath <=
- [bug#53878] [PATCH v7 00/24] Update Racket to 8.4. Adjust Chez Scheme packages., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 01/24] gnu: Use license prefix in (gnu packages racket)., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 03/24] gnu: racket: Use Git origins for Racket packages., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 05/24] gnu: racket-minimal: Don't configure non-existant catalogs., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 02/24] gnu: racket: Update to 8.4., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 06/24] gnu: racket-minimal: Change inheritance to follow bootstrapping., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 04/24] gnu: racket-minimal: Use new package style., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 07/24] gnu: racket-minimal: Adjust indentation., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 09/24] gnu: configure-layer.rkt: Adjust indentation., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 11/24] gnu: racket: Move Chez bootfiles to (gnu packages chez)., Philip McGrath, 2022/02/27