mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-17 01:47:34 +02:00
Add support for Ypsilon in snow-chibi
This commit is contained in:
parent
0ba31582c8
commit
a48123bd44
4 changed files with 31 additions and 1 deletions
|
@ -1670,4 +1670,5 @@ installed. The following are currently supported:
|
||||||
\item{racket - version >= 8.16 with the \scheme{r7rs} pkg}
|
\item{racket - version >= 8.16 with the \scheme{r7rs} pkg}
|
||||||
\item{sagittarius - version >= 0.98}
|
\item{sagittarius - version >= 0.98}
|
||||||
\item{stklos - version > 2.10}
|
\item{stklos - version > 2.10}
|
||||||
|
\item{ypsilon - version > 2.0.8}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1423,6 +1423,15 @@
|
||||||
(make-path
|
(make-path
|
||||||
(process->string
|
(process->string
|
||||||
'(racket -I racket/base -e "(display (find-system-path 'collects-dir))")))))
|
'(racket -I racket/base -e "(display (find-system-path 'collects-dir))")))))
|
||||||
|
((ypsilon)
|
||||||
|
(call-with-temp-file "snow-ypsilon.scm"
|
||||||
|
(lambda (tmp-path out preserve)
|
||||||
|
(with-output-to-file tmp-path
|
||||||
|
(lambda ()
|
||||||
|
(display "(import (core))")
|
||||||
|
(newline)
|
||||||
|
(display "(display (car (scheme-library-paths)))")))
|
||||||
|
(list (make-path (process->string `(ypsilon --r7rs ,tmp-path)))))))
|
||||||
(else
|
(else
|
||||||
(list (make-path (or (conf-get cfg 'install-prefix) "/usr/local")
|
(list (make-path (or (conf-get cfg 'install-prefix) "/usr/local")
|
||||||
"share/snow"
|
"share/snow"
|
||||||
|
@ -1527,6 +1536,10 @@
|
||||||
(if lib-path
|
(if lib-path
|
||||||
`(stklos -A ,install-dir -A ,lib-path ,file)
|
`(stklos -A ,install-dir -A ,lib-path ,file)
|
||||||
`(stklos -A ,install-dir ,file)))
|
`(stklos -A ,install-dir ,file)))
|
||||||
|
((ypsilon)
|
||||||
|
(if lib-path
|
||||||
|
`(ypsilon --sitelib ,install-dir --sitelib ,lib-path ,file)
|
||||||
|
`(ypsilon --sitelib ,install-dir ,file)))
|
||||||
(else
|
(else
|
||||||
#f))))))
|
#f))))))
|
||||||
|
|
||||||
|
@ -1738,6 +1751,7 @@
|
||||||
((eq? impl 'sagittarius) (get-install-library-dir impl cfg))
|
((eq? impl 'sagittarius) (get-install-library-dir impl cfg))
|
||||||
((eq? impl 'racket) (get-install-library-dir impl cfg))
|
((eq? impl 'racket) (get-install-library-dir impl cfg))
|
||||||
((eq? impl 'stklos) (get-install-library-dir impl cfg))
|
((eq? impl 'stklos) (get-install-library-dir impl cfg))
|
||||||
|
((eq? impl 'ypsilon) (get-install-library-dir impl cfg))
|
||||||
((conf-get cfg 'install-source-dir))
|
((conf-get cfg 'install-source-dir))
|
||||||
((conf-get cfg 'install-prefix)
|
((conf-get cfg 'install-prefix)
|
||||||
=> (lambda (prefix) (make-path prefix "share/snow" impl)))
|
=> (lambda (prefix) (make-path prefix "share/snow" impl)))
|
||||||
|
@ -1752,6 +1766,7 @@
|
||||||
((eq? impl 'sagittarius) (get-install-library-dir impl cfg))
|
((eq? impl 'sagittarius) (get-install-library-dir impl cfg))
|
||||||
((eq? impl 'racket) (get-install-library-dir impl cfg))
|
((eq? impl 'racket) (get-install-library-dir impl cfg))
|
||||||
((eq? impl 'stklos) (get-install-library-dir impl cfg))
|
((eq? impl 'stklos) (get-install-library-dir impl cfg))
|
||||||
|
((eq? impl 'ypsilon) (get-install-library-dir impl cfg))
|
||||||
((conf-get cfg 'install-data-dir))
|
((conf-get cfg 'install-data-dir))
|
||||||
((conf-get cfg 'install-prefix)
|
((conf-get cfg 'install-prefix)
|
||||||
=> (lambda (prefix) (make-path prefix "share/snow" impl)))
|
=> (lambda (prefix) (make-path prefix "share/snow" impl)))
|
||||||
|
@ -1781,6 +1796,8 @@
|
||||||
(car (get-install-dirs impl cfg)))
|
(car (get-install-dirs impl cfg)))
|
||||||
((eq? impl 'stklos)
|
((eq? impl 'stklos)
|
||||||
(car (get-install-dirs impl cfg)))
|
(car (get-install-dirs impl cfg)))
|
||||||
|
((eq? impl 'ypsilon)
|
||||||
|
(car (get-install-dirs impl cfg)))
|
||||||
((conf-get cfg 'install-prefix)
|
((conf-get cfg 'install-prefix)
|
||||||
=> (lambda (prefix) (make-path prefix "lib" impl)))
|
=> (lambda (prefix) (make-path prefix "lib" impl)))
|
||||||
(else snow-binary-module-directory)))
|
(else snow-binary-module-directory)))
|
||||||
|
|
|
@ -56,7 +56,18 @@
|
||||||
(stklos "stklos" (stklos --version) #f
|
(stklos "stklos" (stklos --version) #f
|
||||||
,(delay
|
,(delay
|
||||||
(process->sexp
|
(process->sexp
|
||||||
'(stklos -e "(write (features))"))))))
|
'(stklos -e "(write (features))"))))
|
||||||
|
(ypsilon "ypsilon" (ypsilon --version) #f
|
||||||
|
,(delay
|
||||||
|
(call-with-temp-file "snow-ypsilon"
|
||||||
|
(lambda (tmp-path out preserve)
|
||||||
|
(with-output-to-file tmp-path
|
||||||
|
(lambda ()
|
||||||
|
(display "(import (scheme base) (scheme write) (mosh config))")
|
||||||
|
(newline)
|
||||||
|
(display "(display (features))")))
|
||||||
|
(process->sexp
|
||||||
|
`(ypsilon --r7rs ,tmp-path))))))))
|
||||||
|
|
||||||
(define (impl->version impl cmd)
|
(define (impl->version impl cmd)
|
||||||
(let* ((lines (process->string-list cmd))
|
(let* ((lines (process->string-list cmd))
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
(chibi pathname)
|
(chibi pathname)
|
||||||
(chibi process)
|
(chibi process)
|
||||||
(chibi string)
|
(chibi string)
|
||||||
|
(chibi temp-file)
|
||||||
(chibi uri))
|
(chibi uri))
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(chibi (import (chibi io)))
|
(chibi (import (chibi io)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue