mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
Compare commits
31 commits
v24.10.115
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28e6455a3a | ||
|
|
0ed46fb92a | ||
|
|
267ff72edc | ||
|
|
05a2c2fa3b | ||
|
|
6c010f97d0 | ||
|
|
aa261f4e46 | ||
|
|
ac187eadaa | ||
|
|
c7170d4cb7 | ||
|
|
9709c0db0f | ||
|
|
d6d4a761f1 | ||
|
|
d6b5e2ad0e | ||
|
|
f10677c8e9 | ||
|
|
d0b368951c | ||
|
|
05c290ce48 | ||
|
|
aac28aaedd | ||
|
|
2a04f0314c | ||
|
|
b897695f19 | ||
|
|
bb4af5fc0e | ||
|
|
b31ff3aeb7 | ||
|
|
b2ecbe902e | ||
|
|
a776a353dd | ||
|
|
b16e0e7391 | ||
|
|
bae37247f1 | ||
|
|
e6ccbc4430 | ||
|
|
feb5647990 | ||
|
|
029e979374 | ||
|
|
82f902bf43 | ||
|
|
e2da0bf7bc | ||
|
|
b2286cf4f3 | ||
|
|
8c8da03e77 | ||
|
|
7d4262e76f |
2
.github/workflows/linux.yml
vendored
2
.github/workflows/linux.yml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
matrix:
|
||||
image: [musl64]
|
||||
variant: ['', '-musl', '-glibc2.31']
|
||||
target: ['x86-64', 'arm64', 'riscv64']
|
||||
target: ['x86_64', 'arm64', 'riscv64']
|
||||
include:
|
||||
# set default docker platform and image suffix.
|
||||
- {docker-platform: linux/amd64 ,docker-image-suffix: '', makeopts: musl }
|
||||
|
|
|
|||
2
.github/workflows/osx.yml
vendored
2
.github/workflows/osx.yml
vendored
|
|
@ -6,7 +6,7 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.target == 'arm64' && 'macos-14' || 'macOS-12' }}
|
||||
runs-on: ${{ matrix.target == 'arm64' && 'macos-14' || 'macos-15-intel' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
|
|||
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
|
|
@ -21,9 +21,16 @@ jobs:
|
|||
- ecl
|
||||
- clisp
|
||||
- ccl-bin
|
||||
- sbcl/1.4.0
|
||||
- sbcl/2.4.0
|
||||
- ccl32
|
||||
experimental: [false]
|
||||
exclude:
|
||||
- lisp: ccl-bin
|
||||
os: macos-latest
|
||||
- lisp: ccl32
|
||||
os: macos-latest
|
||||
- lisp: cmu-bin/2019-06
|
||||
os: macos-latest
|
||||
include:
|
||||
- lisp: mkcl
|
||||
os: macos-latest
|
||||
|
|
@ -64,5 +71,5 @@ jobs:
|
|||
ros version=t run
|
||||
ros install prove
|
||||
run-prove roswell-test.asd 2>&1
|
||||
ros -q run && [`ros -q run 2>&1` == ""]
|
||||
ros -q run && [ "$(ros -q run 2>&1)" = "" ]
|
||||
ros config
|
||||
|
|
|
|||
48
.github/workflows/windows.yml
vendored
48
.github/workflows/windows.yml
vendored
|
|
@ -63,3 +63,51 @@ jobs:
|
|||
shell: msys2 {0}
|
||||
run: |
|
||||
make -f scripts/Makefile latest-version win-upload
|
||||
|
||||
build-windows-arm64:
|
||||
runs-on: windows-11-arm
|
||||
timeout-minutes: 90
|
||||
env:
|
||||
RESULT_NAME: windows-aarch64
|
||||
RESULT_PATH: windows-aarch64
|
||||
RESULT_PATH_SUB: roswell
|
||||
|
||||
environment: SET_VERSION
|
||||
|
||||
steps:
|
||||
- run: git config --global core.autocrlf false
|
||||
- uses: actions/checkout@v2
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: CLANGARM64
|
||||
path-type: inherit
|
||||
release: true
|
||||
update: true
|
||||
install: >-
|
||||
base-devel
|
||||
p7zip
|
||||
autotools
|
||||
mingw-w64-clang-aarch64-toolchain
|
||||
mingw-w64-clang-aarch64-autotools
|
||||
- name: Run MSYS2 once
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
pwd
|
||||
echo $MSYSTEM
|
||||
echo $MSYSTEM_CARCH
|
||||
echo $PATH
|
||||
- name: Build
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
clang -v
|
||||
./bootstrap
|
||||
CC=clang ./configure
|
||||
make
|
||||
make install
|
||||
make pack.zip
|
||||
- name: Upload
|
||||
env:
|
||||
GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
make -f scripts/Makefile latest-version win-upload
|
||||
|
|
|
|||
11
ChangeLog
11
ChangeLog
|
|
@ -1,3 +1,14 @@
|
|||
roswell (26.02.116-1) unstable; urgency=low
|
||||
|
||||
* Fix: failure to load djula on sbcl 2.5.11 environment.
|
||||
* Fix: declaration-definition disagreement in src/cmd-run.h. (reported by ItsMeForLua and fixed by Trichiurus-lepturus)
|
||||
* Fix: support sbcl lisp-implementation-version returning '2.4.10.roswell'.
|
||||
* Change: Allegro CL upgraded to release 11.0express. (by Xiaming Chen)
|
||||
* Change: ros command return 1 when script file not found.
|
||||
* Change: ros fmt rewritten to use cl-indentify.
|
||||
|
||||
-- SANO,Masatoshi <snmsts@gmail.com> Tue, 24 Feb 2026 06:39:51 +0900
|
||||
|
||||
roswell (24.10.115-1) unstable; urgency=low
|
||||
|
||||
* New: tested on darwin/ppc environment.
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ LISPS = helper.el \
|
|||
install+7zip.lisp install-abcl-bin.lisp install-allegro.lisp \
|
||||
install-ccl-bin.lisp install-clasp-bin.lisp install-clasp.lisp \
|
||||
install-clisp.lisp install-clisp-head.lisp \
|
||||
install-cmu-bin.lisp install-ecl.lisp install-quicklisp.lisp \
|
||||
install-cmu-bin.lisp install-dotcl-bin.lisp install-ecl.lisp \
|
||||
install-quicklisp.lisp \
|
||||
install-sbcl-bin.lisp install-sbcl.lisp install-sbcl-source.lisp \
|
||||
install-sbcl-head.lisp \
|
||||
install-slime.lisp install-sly.lisp \
|
||||
|
|
@ -122,7 +123,7 @@ winrelease: roswell/Makefile
|
|||
cp lisp/*.lisp lisp/*.ros lisp/*.el roswell/lisp
|
||||
cd documents;MSYSTEM=MINGW64 make roswell.chm
|
||||
cp documents/roswell.chm roswell/documents
|
||||
7z a Roswell-`if [ "$$MSYSTEM" = "MINGW64" ];then echo x86_64 ;else echo i686; fi`.zip roswell/ros.exe roswell/lisp/*.* roswell/documents/roswell.chm
|
||||
7z a Roswell-`if [ "$$MSYSTEM" = "MINGW64" ];then echo x86_64 ;elif [ "$$MSYSTEM" = "CLANGARM64" ];then echo aarch64; else echo i686; fi`.zip roswell/ros.exe roswell/lisp/*.* roswell/documents/roswell.chm
|
||||
debian:
|
||||
ros debian/debian.ros all
|
||||
test:
|
||||
|
|
@ -171,7 +172,7 @@ $(PACK).tar.bz2: roswell/Makefile
|
|||
|
||||
pack: $(PACK).tar.bz2
|
||||
|
||||
WINPACK = roswell_$(VERSION)_$(shell if [ "$$MSYSTEM" = "MINGW64" ];then echo amd64 ;else echo i686; fi)
|
||||
WINPACK = roswell_$(VERSION)_$(shell if [ "$$MSYSTEM" = "MINGW64" ];then echo amd64 ;elif [ "$$MSYSTEM" = "CLANGARM64" ];then echo aarch64; else echo i686; fi)
|
||||
|
||||
pack.zip: $(PACK).tar.bz2
|
||||
7z a $(WINPACK).zip roswell
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.59])
|
||||
AC_INIT([roswell],[24.10.115],snmsts@gmail.com)
|
||||
AC_INIT([roswell],[26.02.116],snmsts@gmail.com)
|
||||
CFLAGS=${CFLAGS=""}
|
||||
CXXFLAGS=${CXXFLAGS=""}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,10 +126,14 @@ IR1 (deftransform), IR2 (VOP) information in the infodb."
|
|||
(setf (sb-impl::package-%shadowing-symbols package) nil)
|
||||
(format t ".")
|
||||
(setf (sb-impl::package-internal-symbols package)
|
||||
(sb-impl::make-package-hashtable 0))
|
||||
(if (fboundp 'sb-impl::make-symbol-table)
|
||||
(sb-impl::make-symbol-table 0)
|
||||
(sb-impl::make-package-hashtable 0)))
|
||||
(format t ".")
|
||||
(setf (sb-impl::package-external-symbols package)
|
||||
(sb-impl::make-package-hashtable 0))
|
||||
(if (fboundp 'sb-impl::make-symbol-table)
|
||||
(sb-impl::make-symbol-table 0)
|
||||
(sb-impl::make-package-hashtable 0)))
|
||||
(format t ".")
|
||||
(setf (sb-impl::package-tables package) #())
|
||||
(format t ".")
|
||||
|
|
|
|||
71
lisp/fmt.ros
71
lisp/fmt.ros
|
|
@ -5,17 +5,30 @@ exec ros -Q -N roswell -- $0 "$@"
|
|||
|#
|
||||
(progn ;;init forms
|
||||
(ros:ensure-asdf)
|
||||
#+quicklisp
|
||||
(progn
|
||||
(unless (ql:where-is-system :lem)
|
||||
(roswell:roswell '("git" "clone" "https://github.com/cxxxr/lem.git"))
|
||||
(roswell.util:read-call "roswell.util:local-project-build-hash" :rebuild t))
|
||||
(ql:quickload '("swank" "lem" "lem-lisp-syntax") :silent t)))
|
||||
#+sbcl (require "sb-introspect")
|
||||
#+quicklisp (ql:quickload '("cl-indentify") :silent t))
|
||||
|
||||
(defpackage :ros.script.fmt.3707812168
|
||||
(:use :cl))
|
||||
(in-package :ros.script.fmt.3707812168)
|
||||
|
||||
(defun function-lambda-list (fn)
|
||||
"Portably retrieve a function's lambda list."
|
||||
(ignore-errors
|
||||
#+sbcl
|
||||
(funcall (find-symbol "FUNCTION-LAMBDA-LIST" "SB-INTROSPECT") fn)
|
||||
#-sbcl nil))
|
||||
|
||||
(defun register-macro-templates ()
|
||||
"Auto-detect macros with &body and register cl-indentify templates."
|
||||
(do-all-symbols (sym)
|
||||
(when (macro-function sym)
|
||||
(let* ((arglist (function-lambda-list (macro-function sym)))
|
||||
(body-pos (position '&body arglist)))
|
||||
(when body-pos
|
||||
(setf (indentify:indent-template sym)
|
||||
`(:style :call :count ,body-pos)))))))
|
||||
|
||||
(defun system (path)
|
||||
(let ((* (when (and (probe-file path)
|
||||
(equal (pathname-type path) "asd"))
|
||||
|
|
@ -37,15 +50,39 @@ exec ros -Q -N roswell -- $0 "$@"
|
|||
(list c)))))
|
||||
(when *
|
||||
(ql:quickload * :silent (not (ros:verbose)))
|
||||
(lem-lisp-syntax.indent:indentation-update)
|
||||
(register-macro-templates)
|
||||
(r (asdf:find-system *))))))
|
||||
|
||||
(defun register-standard-templates ()
|
||||
"Override templates to match Lem/Emacs/SLIME indentation."
|
||||
;; if: (&rest nil) in Lem - all args aligned with first arg
|
||||
(setf (indentify:indent-template 'if) '(:count 3))
|
||||
;; case/typecase: (4 &rest (&whole 2 &rest 1)) - clause body at paren+1
|
||||
(dolist (sym '(case ccase ecase typecase ctypecase etypecase))
|
||||
(setf (indentify:indent-template sym)
|
||||
'(:count 1 :sub (nil nil (:style :list)))))
|
||||
;; cond: (&rest (&whole 2 &rest 1)) - clause body at paren+1
|
||||
(setf (indentify:indent-template 'cond)
|
||||
'(:count 0 :sub (nil (:style :list)))))
|
||||
|
||||
(defun format-file (file)
|
||||
(let ((result (with-output-to-string (out)
|
||||
(with-open-file (in file)
|
||||
(indentify:indentify in out)))))
|
||||
(with-open-file (out file :direction :output :if-exists :supersede)
|
||||
(with-input-from-string (in result)
|
||||
(loop for line = (read-line in nil)
|
||||
while line
|
||||
do (write-string (string-right-trim '(#\Space #\Tab) line) out)
|
||||
(terpri out))))))
|
||||
|
||||
(defun main (&rest argv)
|
||||
"go fmt like something"
|
||||
(indentify:load-default-templates)
|
||||
(register-standard-templates)
|
||||
(dolist (arg (if argv
|
||||
(prog1 (loop for arg in argv
|
||||
append (or (system arg) (list arg)))
|
||||
(lem-lisp-syntax:indentation-update))
|
||||
(loop for arg in argv
|
||||
append (or (system arg) (list arg)))
|
||||
(ignore-errors
|
||||
(let* ((name (first (last (pathname-directory *default-pathname-defaults*))))
|
||||
(path (probe-file (make-pathname :name name :type "asd"))))
|
||||
|
|
@ -53,18 +90,6 @@ exec ros -Q -N roswell -- $0 "$@"
|
|||
(append (directory "*.lisp")
|
||||
(directory "*.ros")))))))
|
||||
(if (probe-file arg)
|
||||
(let ((buffer (lem-base:find-file-buffer arg)))
|
||||
(setf (lem-base:buffer-syntax-table buffer)
|
||||
lem-lisp-syntax:*syntax-table*)
|
||||
(setf (lem-base:variable-value 'lem-base:calc-indent-function :buffer buffer)
|
||||
'lem-lisp-syntax:calc-indent)
|
||||
(lem-base:indent-points (lem-base:buffer-start-point buffer)
|
||||
(lem-base:buffer-end-point buffer))
|
||||
(loop with regexp = "[ ]+$" ;; remove trailing spaces.
|
||||
for start = (lem-base:search-forward-regexp (lem-base:copy-point (lem-base:buffer-start-point buffer)) regexp)
|
||||
while start
|
||||
for end = (lem-base:search-backward-regexp (lem-base:copy-point start) regexp)
|
||||
do (lem-base:delete-between-points start end))
|
||||
(lem-base:write-to-file buffer (lem-base:buffer-filename buffer)))
|
||||
(format-file arg)
|
||||
(format *error-output* "~A does not exist" arg))))
|
||||
;;; vim: set ft=lisp lisp:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
;; -*- lexical-binding: nil; -*-
|
||||
(defun roswell-configdir ()
|
||||
(substring (shell-command-to-string "ros roswell-internal-use version confdir") 0 -1))
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,8 @@ have the latest asdf, and this file has a workaround for this.
|
|||
(ext:run-shell-command (format nil "~{~A~^ ~}" args))))))
|
||||
|
||||
(defun exec (args)
|
||||
#+(and unix sbcl)
|
||||
#+(and unix sbcl
|
||||
(not haiku))
|
||||
(execvp (first args) args)
|
||||
#+(and unix ccl)
|
||||
(ignore-errors
|
||||
|
|
@ -174,8 +175,8 @@ have the latest asdf, and this file has a workaround for this.
|
|||
|
||||
(cond
|
||||
(is-quicklisp-already-available
|
||||
(unless (equal (opt "quicklisp")
|
||||
(namestring (symbol-value (read-from-string "ql:*quicklisp-home*"))))
|
||||
(unless (equal (ignore-errors (truename (pathname (opt "quicklisp"))))
|
||||
(ignore-errors (truename (symbol-value (read-from-string "ql:*quicklisp-home*")))))
|
||||
(setf *local-project-directories*
|
||||
(copy-list
|
||||
(symbol-value (read-from-string "ql:*local-project-directories*")))))
|
||||
|
|
@ -308,13 +309,25 @@ As a hacky side effect, files with the same name as PROVIDE is not loaded.
|
|||
(or *version-cache*
|
||||
(setf *version-cache* (roswell '("roswell-internal-use" "version") :string t)))))
|
||||
|
||||
(defun implementation-version ()
|
||||
"cut off after third? dot from lisp-implementation-version"
|
||||
(let ((version (lisp-implementation-version)))
|
||||
(loop with j = 0
|
||||
for i from 0 to (1- (length version))
|
||||
when (eql (aref version i) #\.)
|
||||
do (incf j)
|
||||
(when (= j 3)
|
||||
(return-from implementation-version (subseq version 0 i))))
|
||||
version))
|
||||
|
||||
|
||||
#+sbcl
|
||||
(when (ignore-errors (string-equal (opt "impl") "sbcl-bin" :end1 8))
|
||||
(flet ((source (version)
|
||||
(let ((path (merge-pathnames (format nil "src/sbcl-~A/" version) (opt "homedir"))))
|
||||
(when (probe-file path)
|
||||
(sb-ext:set-sbcl-source-location path)))))
|
||||
(or (source (lisp-implementation-version))
|
||||
(or (source (implementation-version))
|
||||
(source "git"))))
|
||||
|
||||
(defun source-registry (arg &rest rest)
|
||||
|
|
@ -433,7 +446,8 @@ As a hacky side effect, files with the same name as PROVIDE is not loaded.
|
|||
(with-open-file (in arg)
|
||||
(body in)))
|
||||
(*latest-system* (apply 'hook (cons arg *argv*)))
|
||||
(t (format t "script ~S does not exist~%" arg)))))
|
||||
(t (format t "script ~S does not exist~%" arg)
|
||||
(quit 1)))))
|
||||
|
||||
(defun stdin (arg &rest rest)
|
||||
(declare (ignorable arg rest))
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
(version (getf argv :version)))
|
||||
(let ((os (intern uname :keyword))
|
||||
(machine (intern uname-m :keyword)))
|
||||
(cond ((find version '("11.0bexpress"
|
||||
(cond ((find version '("11.0express"
|
||||
"10.1express")
|
||||
:test 'equal)
|
||||
(format nil "~@{~A~}"
|
||||
|
|
|
|||
|
|
@ -21,11 +21,31 @@
|
|||
(or (cdr (assoc (uname-m) *cmu-uname-m-alist* :test 'equal))
|
||||
(uname-m)))
|
||||
|
||||
(defun cmu-bin-directory-uri (version)
|
||||
(format nil "~@{~A~}" (cmu-bin-uri) (if (find #\- version) "snapshots/" "release/")
|
||||
(substitute #\/ #\- version) "/"))
|
||||
|
||||
(defun cmu-bin-archive-name (version extra)
|
||||
(format nil "~@{~A~}" "cmucl-" version "-" (cmu-uname-m) "-" (uname) (if extra ".extra" "")))
|
||||
|
||||
(defun cmu-bin-archive-type (version)
|
||||
"CMUCL was published as .tar.bz2 up to 21e and as .tar.xz from 21f on,
|
||||
so ask the download directory which one it has for VERSION."
|
||||
(let ((file (merge-pathnames (format nil "tmp/cmu-bin-~A.html" version) (homedir)))
|
||||
(name (cmu-bin-archive-name version nil)))
|
||||
(or (ignore-errors
|
||||
(download (cmu-bin-directory-uri version) file :interval (* 60 60))
|
||||
(loop for link in (get-elements-by-tag-name (plump:parse file) "a")
|
||||
for href = (plump:get-attribute link "href")
|
||||
thereis (and href
|
||||
(find-if (lambda (type)
|
||||
(equal href (format nil "~A~A" name type)))
|
||||
'(".tar.xz" ".tar.bz2")))))
|
||||
".tar.bz2")))
|
||||
|
||||
(defun cmu-bin-archive-uri (version extra)
|
||||
(let ((uname (uname))
|
||||
(cmu-uname-m (cmu-uname-m)))
|
||||
(format nil "~@{~A~}" (cmu-bin-uri) (if (find #\- version) "snapshots/" "release/")
|
||||
(substitute #\/ #\- version) "/cmucl-" version "-" cmu-uname-m "-" uname (if extra ".extra" "") ".tar.bz2")))
|
||||
(format nil "~@{~A~}" (cmu-bin-directory-uri version)
|
||||
(cmu-bin-archive-name version extra) (cmu-bin-archive-type version)))
|
||||
|
||||
(defun cmu-bin-argv-parse (argv)
|
||||
(format *error-output* "~&Installing cmu-bin/~A...~%" (getf argv :version))
|
||||
|
|
|
|||
95
lisp/install-dotcl-bin.lisp
Normal file
95
lisp/install-dotcl-bin.lisp
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
(roswell:include "util-install")
|
||||
(defpackage :roswell.install.dotcl-bin
|
||||
(:use :cl :roswell.install :roswell.util :roswell.locations))
|
||||
(in-package :roswell.install.dotcl-bin)
|
||||
|
||||
(defun dotcl-bin-impl ()
|
||||
(merge-pathnames (format nil "impls/~A/~A/dotcl-bin/" (uname-m) (uname)) (homedir)))
|
||||
|
||||
(defun dotcl-bin-rid ()
|
||||
(let* ((arch (uname-m))
|
||||
(os (uname))
|
||||
(arch-key (cond ((equal arch "x86-64") "x64")
|
||||
((equal arch "arm64") "arm64")
|
||||
(t (error "dotcl-bin: unsupported arch ~A" arch))))
|
||||
(os-key (cond ((equal os "linux") "linux")
|
||||
((equal os "darwin") "osx")
|
||||
((equal os "windows") "win")
|
||||
(t (error "dotcl-bin: unsupported os ~A" os)))))
|
||||
(format nil "~A-~A" os-key arch-key)))
|
||||
|
||||
(defvar *dotcl-bin-version-cache* nil)
|
||||
|
||||
(defun dotcl-bin-get-version ()
|
||||
(or *dotcl-bin-version-cache*
|
||||
(setf *dotcl-bin-version-cache*
|
||||
(let ((file (merge-pathnames "tmp/dotcl-bin.json" (homedir))))
|
||||
(format *error-output* "Checking version to install....~%")
|
||||
(download "https://api.github.com/repos/dotcl/dotcl/releases" file)
|
||||
(with-open-file (in file)
|
||||
(loop for line = (read-line in nil nil) while line
|
||||
for pos = (search "\"tag_name\"" line)
|
||||
when pos
|
||||
collect (let* ((q1 (position #\" line :start (+ pos 11)))
|
||||
(q2 (and q1 (position #\" line :start (1+ q1)))))
|
||||
(when (and q1 q2)
|
||||
(let ((tag (subseq line (1+ q1) q2)))
|
||||
(if (and (plusp (length tag)) (char= (aref tag 0) #\v))
|
||||
(subseq tag 1)
|
||||
tag))))))))))
|
||||
|
||||
(defun dotcl-bin-argv-parse (argv)
|
||||
(set-opt "prefix" (dotcl-bin-impl))
|
||||
(cons t argv))
|
||||
|
||||
(defun dotcl-bin-download (argv)
|
||||
(let ((rid (dotcl-bin-rid))
|
||||
(ver (version argv)))
|
||||
(set-opt "as" ver)
|
||||
(set-opt "download.uri"
|
||||
(format nil "https://github.com/dotcl/dotcl/releases/download/v~A/dotcl-~A-~A.tar.bz2"
|
||||
ver rid ver))
|
||||
(set-opt "download.archive"
|
||||
(let ((pos (position #\/ (opt "download.uri") :from-end t)))
|
||||
(when pos
|
||||
(merge-pathnames (format nil "archives/~A"
|
||||
(subseq (opt "download.uri") (1+ pos)))
|
||||
(homedir)))))
|
||||
`((,(opt "download.archive") ,(opt "download.uri")))))
|
||||
|
||||
(defun dotcl-bin-expand (argv)
|
||||
(format t "~%Extracting archive:~A~%" (opt "download.archive"))
|
||||
(let ((dest (merge-pathnames (format nil "~A/" (opt "as")) (dotcl-bin-impl))))
|
||||
(when (probe-file dest)
|
||||
(uiop/filesystem:delete-directory-tree dest :validate t))
|
||||
(ensure-directories-exist dest)
|
||||
(expand (opt "download.archive") dest)
|
||||
#-os-windows
|
||||
(let ((apphost (merge-pathnames "runtime" dest)))
|
||||
(when (probe-file apphost)
|
||||
(uiop:run-program (list "chmod" "+x" (namestring apphost))
|
||||
:ignore-error-status t))))
|
||||
(cons t argv))
|
||||
|
||||
(defun dotcl-bin-script (argv)
|
||||
(let* ((dotnet (which "dotnet"))
|
||||
(dir (merge-pathnames (format nil "~A/" (opt "as")) (dotcl-bin-impl))))
|
||||
(unless dotnet
|
||||
(format *error-output* "Error: 'dotnet' (.NET SDK 10+) was not found in PATH.~%")
|
||||
(format *error-output* " Install .NET SDK 10 from https://dotnet.microsoft.com/download~%")
|
||||
(format *error-output* " 'ros use dotcl-bin' will fail without dotnet.~%")
|
||||
(roswell:quit 1))
|
||||
(install-script
|
||||
(merge-pathnames "dotcl" dir)
|
||||
(format nil "exec \"~Aruntime\" \"$@\"" dir))
|
||||
(cons t argv)))
|
||||
|
||||
(defun dotcl-bin (type)
|
||||
(case type
|
||||
(:install `(,(decide-version 'dotcl-bin-get-version)
|
||||
dotcl-bin-argv-parse
|
||||
,(decide-download 'dotcl-bin-download)
|
||||
dotcl-bin-expand
|
||||
dotcl-bin-script
|
||||
setup))
|
||||
(:list 'dotcl-bin-get-version)))
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
(export
|
||||
(defvar *allegro-agreement-uri*
|
||||
'(#+darwin ("11.0bexpress" . "https://franz.com/ftp/pub/legal/ACL-Express-20170301.pdf")
|
||||
'(("11.0express" . "https://franz.com/ftp/pub/legal/ACL-Express-20170301.pdf")
|
||||
("10.1express" . #1="https://franz.com/ftp/pub/legal/ACL-Express-20170301.pdf")
|
||||
("100express" . #1#)
|
||||
("101b" . "http://franz.com/products/licensing/FSLA10.1.beta.pdf"))))
|
||||
|
|
|
|||
|
|
@ -26,10 +26,17 @@ exec ros -Q -m roswell -N roswell -- $0 "$@"
|
|||
;; update systems
|
||||
(dolist (alias argv)
|
||||
(loop
|
||||
with path = (ignore-errors
|
||||
(make-pathname
|
||||
:type nil :name nil
|
||||
:defaults (asdf:system-source-file (asdf:find-system alias))))
|
||||
with path = (or
|
||||
(and (find #\/ alias)
|
||||
(let ((dir (merge-pathnames
|
||||
(format nil "local-projects/~A/" alias)
|
||||
(roswell.util:homedir))))
|
||||
(when (probe-file (merge-pathnames ".git/" dir))
|
||||
dir)))
|
||||
(ignore-errors
|
||||
(make-pathname
|
||||
:type nil :name nil
|
||||
:defaults (asdf:system-source-file (asdf:find-system alias)))))
|
||||
for f in *update-functions*
|
||||
for r = (and path (funcall f path))
|
||||
when r do (roswell:roswell `("install" ,alias))
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#+ros.init
|
||||
(roswell:include '("util" "system") "util-template")
|
||||
#+quicklisp
|
||||
(ql:quickload '("uiop" "djula") :silent t)
|
||||
(ignore-errors (ql:quickload '("uiop" "djula") :silent t))
|
||||
(defpackage :roswell.util.template
|
||||
(:use :cl)
|
||||
(:export
|
||||
|
|
@ -113,7 +113,8 @@
|
|||
:name (format nil "roswell.init.~A" template-name)))
|
||||
|
||||
(defun apply-djula (template-string stream params)
|
||||
(apply 'djula::render-template* (djula::compile-string template-string) stream
|
||||
(apply (read-from-string "djula::render-template*")
|
||||
(read-call "djula::compile-string" template-string) stream
|
||||
`(,@params
|
||||
:author ,(author)
|
||||
:email ,(email)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
(defsystem "roswell"
|
||||
:version "24.10.115"
|
||||
:version "26.2.116"
|
||||
:author "SANO Masatoshi"
|
||||
:license "MIT"
|
||||
:depends-on ("simple-date-time" "split-sequence" "plump" "zip")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
ROSWELL_RELEASE_VERSION=24.10.115
|
||||
ROSWELL_RELEASE_VERSION=26.02.116
|
||||
ROSWELL_TARBALL_PATH=$HOME/roswell.tar.gz
|
||||
ROSWELL_DIR=$HOME/.roswell
|
||||
ROSWELL_REPO=${ROSWELL_REPO:-https://github.com/roswell/roswell}
|
||||
|
|
@ -33,10 +33,16 @@ log () {
|
|||
|
||||
fetch () {
|
||||
echo "Downloading $1..."
|
||||
if curl --no-progress-bar --retry 10 -o $2 -L $1; then
|
||||
return 0;
|
||||
if curl --no-progress-bar --retry 10 --connect-timeout 30 \
|
||||
--max-time 300 -o "$2" -L "$1" 2>&1; then
|
||||
echo "✓ Successfully downloaded $1"
|
||||
return 0
|
||||
else
|
||||
echo "Failed to download $1."
|
||||
code=$? # capture curl's exit code immediately
|
||||
echo "✗ Failed to download $1"
|
||||
echo " URL: $1"
|
||||
echo " Destination: $2"
|
||||
echo " Curl exit code: $code"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
|
@ -159,7 +165,7 @@ install_roswell_bin () {
|
|||
GNUMAKE=/usr/local/bin/gmake
|
||||
apt_unless_installed roswell
|
||||
elif [ `uname` = "Darwin" ] && [ $ROSWELL_BRANCH = release ]; then
|
||||
apt_unless_installed roswell
|
||||
brew upgrade roswell 2>/dev/null || brew install roswell
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
@ -202,8 +208,6 @@ install_sbcl_bin () {
|
|||
install_lisp_dependency () {
|
||||
case "$USE_LISP" in
|
||||
alisp|allegro)
|
||||
apt_unless_installed libc6-i386
|
||||
apt_unless_installed gcc-multilib
|
||||
USE_LISP=allegro
|
||||
;;
|
||||
cmu|cmucl|cmu-bin)
|
||||
|
|
@ -221,6 +225,13 @@ install_lisp_dependency () {
|
|||
apt_unless_installed gcc-multilib
|
||||
ros config set ccl.bit 32
|
||||
;;
|
||||
sbcl/*)
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
brew install zstd 2>/dev/null || true
|
||||
else
|
||||
apt_unless_installed libzstd-dev
|
||||
fi
|
||||
;;
|
||||
# 'sbcl-bin' is the default
|
||||
"")
|
||||
USE_LISP=sbcl-bin
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ exec ros -Q -L sbcl-bin -- $0 "$@"
|
|||
(d (multiple-value-list(decode-universal-time (get-universal-time)))))
|
||||
(setf (first version) (- (nth 5 d) 2000)
|
||||
(second version) (nth 4 d)
|
||||
(fourth version) (1+ (fourth version)))
|
||||
(first (last version)) (1+ (first (last version))))
|
||||
(format nil "~{~2,'0d~^.~}" version)))
|
||||
|
||||
(defun edit-file (path match replace version &key test)
|
||||
|
|
@ -179,7 +179,7 @@ exec ros -Q -L sbcl-bin -- $0 "$@"
|
|||
|
||||
(defun main (subcmd &rest argv)
|
||||
(declare (ignorable argv))
|
||||
(let ((subcmd (find subcmd '(prepare release release-push changelog release-ci)
|
||||
(let ((subcmd (find subcmd '(prepare release-commit release-push changelog release-ci)
|
||||
:test 'equal :key 'string-downcase)))
|
||||
(when subcmd
|
||||
(funcall subcmd argv))))
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ ros_SOURCES = main.c opt.c download.c download_windows.c archive.c archive_windo
|
|||
cmd-internal.c cmd-script.c \
|
||||
cmd-run.c cmd-run-sbcl.c cmd-run-ccl.c cmd-run-clasp.c cmd-run-clisp.c cmd-run-ecl.c \
|
||||
cmd-run-mkcl.c cmd-run-abcl.c cmd-run-cmu.c cmd-run-acl.c cmd-run-lispworks.c \
|
||||
cmd-run-npt.c \
|
||||
cmd-run-npt.c cmd-run-dotcl.c \
|
||||
cmd-install.c install-sbcl-bin.c install-sbcl-bin_windows.c
|
||||
|
||||
if WITH_WIN_ICON
|
||||
|
|
|
|||
45
src/cmd-run-dotcl.c
Normal file
45
src/cmd-run-dotcl.c
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#include "opt.h"
|
||||
|
||||
char** cmd_run_dotcl(int argc,char** argv,struct sub_command* cmd) {
|
||||
char* home=configdir();
|
||||
char* arch=uname_m();
|
||||
char* os=uname_s();
|
||||
char* impl=(char*)cmd->name;
|
||||
char* version=(char*)cmd->short_name;
|
||||
/*[apphost binary] --eval init.lisp --eval (ros:run '(...)) [repl] */
|
||||
int i;
|
||||
char* impl_path=impldir(arch,os,impl, version);
|
||||
char* help=get_opt("help",0);
|
||||
char* script=get_opt("script",0);
|
||||
char* program=get_opt("program",0);
|
||||
char* dotcl_version=get_opt("version",0);
|
||||
LVal ret=0;
|
||||
|
||||
s(arch),s(os);
|
||||
|
||||
ret=conss(cat(home,impl_path,DIRSEP,"runtime",EXE_EXTENTION,NULL),ret);
|
||||
|
||||
if(dotcl_version) {
|
||||
ret=conss(q("--eval"),ret);
|
||||
ret=conss(q("(progn (format t \"~A ~A~%\" (lisp-implementation-type) (lisp-implementation-version)) (dotcl:quit))"),ret);
|
||||
}
|
||||
ret=conss(q("--eval"),ret);
|
||||
ret=conss(s_cat(q("(progn #-ros.init(cl:load \""),s_escape_string(lispdir()),q("init.lisp"),q("\"))"),NULL),ret);
|
||||
ret=conss(q("--eval"),ret);
|
||||
ret=conss(s_cat(q("(ros:run '("),q(program?program:""),
|
||||
script?cat("(:script ",script,")","(:quit ())",NULL):q(""),
|
||||
q("))"),NULL),ret);
|
||||
|
||||
/* dotcl exits after --eval/--load by default; for interactive (no script)
|
||||
append the `repl` subcommand to keep the process alive. */
|
||||
if(!script) {
|
||||
ret=conss(q("repl"),ret);
|
||||
}
|
||||
|
||||
for(i=1;i<argc;++i)
|
||||
ret=conss(q(argv[i]),ret);
|
||||
|
||||
s(impl_path);
|
||||
cond_printf(1,"\nhelp=%s script=%s\n",help?"t":"nil",script?script:"nil");
|
||||
return stringlist_array(nreverse(ret));
|
||||
}
|
||||
|
|
@ -26,6 +26,8 @@ struct run_impl_t impls_to_run[]={
|
|||
{"lispworks",&cmd_run_lispworks},
|
||||
{"mkcl",&cmd_run_mkcl},
|
||||
{"npt",&cmd_run_npt},
|
||||
{"dotcl",&cmd_run_dotcl},
|
||||
{"dotcl-bin",&cmd_run_dotcl},
|
||||
};
|
||||
|
||||
struct proc_opt run;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ extern char** cmd_run_acl(int argc,char** argv,struct sub_command* cmd);
|
|||
extern char** cmd_run_lispworks(int argc,char** argv,struct sub_command* cmd);
|
||||
extern char** cmd_run_mkcl(int argc,char** argv,struct sub_command* cmd);
|
||||
extern char** cmd_run_npt(int argc,char** argv,struct sub_command* cmd);
|
||||
extern LVal register_runtime_options();
|
||||
extern char** cmd_run_dotcl(int argc,char** argv,struct sub_command* cmd);
|
||||
extern struct proc_opt* register_runtime_options(struct proc_opt* cmd);
|
||||
int setup(char* target,char* env,char* impl);
|
||||
#define SETUP_SYSTEM(sys,msg) {\
|
||||
cond_printf(0,"%s",msg); \
|
||||
|
|
|
|||
|
|
@ -23,12 +23,18 @@ char* uname_m(void) {
|
|||
return q("x86-64");
|
||||
if(carch && strcmp(carch,"i686")==0)
|
||||
return q("x86");
|
||||
if(carch && strcmp(carch,"aarch64")==0)
|
||||
return q("arm64");
|
||||
char* msystem=getenv("MSYSTEM");
|
||||
if(msystem && strcmp(msystem,"MINGW64")==0)
|
||||
return q("x86-64");
|
||||
if(msystem && strcmp(msystem,"MINGW32")==0)
|
||||
return q("x86");
|
||||
#if defined(_WIN64)
|
||||
if(msystem && strcmp(msystem,"CLANGARM64")==0)
|
||||
return q("arm64");
|
||||
#if defined(__aarch64__)
|
||||
return q("arm64");
|
||||
#elif defined(_WIN64)
|
||||
return q("x86-64");
|
||||
#elif defined(_WIN32)
|
||||
BOOL isWow64 = FALSE;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
(! "ros list")
|
||||
(! "ros list installed")
|
||||
(! "ros list dump")
|
||||
(! "ros swank install")
|
||||
(! "ros install slime")
|
||||
(! (format nil "ros help install ~A" (ros:opt "default.lisp")))
|
||||
|
||||
#+sbcl
|
||||
|
|
|
|||
Loading…
Reference in a new issue