rename package and load install plugins via 'module' function.

This commit is contained in:
SANO Masatoshi 2016-12-18 12:47:51 +09:00
parent c4a57da5c6
commit 3b43e0c08e
15 changed files with 163 additions and 33 deletions

View file

@ -1,7 +1,7 @@
(ros:include "util-install-quicklisp")
(defpackage :ros.install.7zip
(defpackage :roswell.install.7zip
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.7zip)
(in-package :roswell.install.7zip)
#-win32
(progn
(warn "7zip is only required on windows"))
@ -44,3 +44,8 @@
(cons t argv))
(push `("7zip" . ,(list '7z-help)) *help-cmds*)
(defun 7zip (type)
(case type
(:help '(7z-help))
(:install '(setup-7za))))

View file

@ -1,7 +1,7 @@
(ros:include "util-install-quicklisp")
(defpackage :ros.install.ffcall
(defpackage :roswell.install.ffcall
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.ffcall)
(in-package :roswell.install.ffcall)
(defvar *ffcall-version* "1.10")
(defun ffcall-setup (argv)
@ -56,3 +56,9 @@
(cons t argv))
(push `("ffcall+" . ,(list 'ffcall-help)) *help-cmds*)
(defun ffcall+ (type)
(case type
(:help '(ffcall-help))
(:install `(ffcall-setup))
#+nil(:list 'ffcall-get-version)))

View file

@ -1,7 +1,7 @@
(ros:include "util-install-quicklisp")
(defpackage :ros.install.msys2
(defpackage :roswell.install.msys2
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.msys2)
(in-package :roswell.install.msys2)
#-win32
(progn
(warn "msys2 is only required on windows"))
@ -56,3 +56,9 @@
(cons t argv))
(push `("msys2" . ,(list 'msys2-help)) *help-cmds*)
(defun msys2 (type)
(case type
(:help '(msys2-help))
(:install `(msys2-setup))
#+nil(:list 'msys2-get-version)))

View file

@ -1,7 +1,7 @@
(ros:include "util-install-quicklisp")
(defpackage :ros.install.sigsegv
(defpackage :roswell.install.sigsegv
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.sigsegv)
(in-package :roswell.install.sigsegv)
(defvar *sigsegv-version* "2.10")
@ -57,3 +57,8 @@
(cons t argv))
(push `("sigsegv+" . ,(list 'sigsegv-help)) *help-cmds*)
(defun sigsegv+ (type)
(case type
(:help '(sigsegv-help))
(:install '(sigsegv-setup))))

View file

@ -1,7 +1,7 @@
(ros:include "util-install-quicklisp")
(defpackage :ros.install.abcl-bin
(defpackage :roswell.install.abcl-bin
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.abcl-bin)
(in-package :roswell.install.abcl-bin)
(defvar *abcl-bin-get-version-cache* nil)
@ -81,3 +81,14 @@
abcl-bin-script
setup))
*install-cmds*)
(defun abcl-bin (type)
(case type
#+nil(:help '(abcl-bin-help))
(:install `(,(decide-version 'abcl-bin-get-version)
abcl-bin-argv-parse
,(decide-download 'abcl-bin-download)
abcl-bin-expand
abcl-bin-script
setup))
#+nil(:list 'abcl-bin-get-version)))

View file

@ -1,7 +1,7 @@
(ros:include "util-install-quicklisp")
(defpackage :ros.install.allegro
(defpackage :roswell.install.allegro
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.allegro)
(in-package :roswell.install.allegro)
(ros:quicklisp :environment nil)
(defun allegro-get-version ()
@ -90,3 +90,13 @@
(push `("allegro" . ,(list 'allegro-help)) *help-cmds*)
(push `("allegro" . allegro-get-version) *list-cmd*)
(defun allegro (type)
(case type
(:help '(allegro-help))
(:install `(,(decide-version 'allegro-get-version)
allegro-argv-parse
,(decide-download 'allegro-download)
allegro-expand
setup))
(:list 'allegro-get-version)))

View file

@ -1,7 +1,7 @@
(ros:include "util-install-quicklisp")
(defpackage :ros.install.ccl-bin
(defpackage :roswell.install.ccl-bin
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.ccl-bin)
(in-package :roswell.install.ccl-bin)
(defun ccl-bin-get-version ()
(let ((file (merge-pathnames "tmp/ccl-bin.html" (homedir))))
@ -80,3 +80,13 @@
(push `("ccl-bin" . ,(list 'ccl-bin-help)) *help-cmds*)
(push `("ccl-bin" . ccl-bin-get-version) *list-cmd*)
(defun ccl-bin (type)
(case type
(:help '(ccl-bin-help))
(:install `(,(decide-version 'ccl-bin-get-version)
ccl-bin-argv-parse
,(decide-download 'ccl-bin-download)
ccl-bin-expand
setup))
(:list 'ccl-bin-get-version)))

View file

@ -1,7 +1,7 @@
(ros:include "util-install-quicklisp")
(defpackage :ros.install.clisp
(defpackage :roswell.install.clisp
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.clisp)
(in-package :roswell.install.clisp)
(defun clisp-get-version ()
(let ((file (merge-pathnames "tmp/clisp.html" (homedir))))
@ -144,3 +144,20 @@
(push `("clisp" . ,(list 'clisp-help)) *help-cmds*)
(push `("clisp" . clisp-get-version) *list-cmd*)
(defun clisp (type)
(case type
(:help '(clisp-help))
(:install `(,(decide-version 'clisp-get-version)
clisp-argv-parse
start
,(decide-download 'clisp-download)
clisp-lib
clisp-expand
clisp-patch
clisp-config
clisp-make
clisp-install
clisp-clean
setup))
#+nil(:list 'clisp-get-version)))

View file

@ -1,7 +1,7 @@
(ros:include "util-install-quicklisp")
(defpackage :ros.install.cmu-bin
(defpackage :roswell.install.cmu-bin
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.cmu-bin)
(in-package :roswell.install.cmu-bin)
(defun cmu-bin-get-version ()
(let ((file (merge-pathnames "tmp/cmu-bin.html" (homedir))))
@ -84,3 +84,13 @@
(push `("cmu-bin" . ,(list 'cmu-bin-help)) *help-cmds*)
(push `("cmu-bin" . cmu-bin-get-version) *list-cmd*)
(defun cmu-bin (type)
(case type
(:help '(cmu-bin-help))
(:install `(,(decide-version 'cmu-bin-get-version)
cmu-bin-argv-parse
,(decide-download 'cmu-bin-download)
cmu-bin-expand
setup))
(:list 'cmu-bin-get-version)))

View file

@ -1,7 +1,7 @@
(ros:include "util-install-quicklisp")
(defpackage :ros.install.ecl
(defpackage :roswell.install.ecl
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.ecl)
(in-package :roswell.install.ecl)
(defvar *ecl-options*
'())
@ -134,3 +134,20 @@
ecl-clean
setup))
*install-cmds*)
(defun ecl (type)
(case type
(:help '())
(:install `(#+win32
ecl-msys
,(decide-version 'ecl-get-version)
ecl-argv-parse
start
,(decide-download 'ecl-download)
ecl-expand
ecl-config
ecl-make
ecl-install
ecl-clean
setup))
#+nil(:list 'ecl-get-version)))

View file

@ -1,7 +1,7 @@
(ros:include "util-install")
(defpackage :ros.install.quicklisp
(defpackage :roswell.install.quicklisp
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.quicklisp)
(in-package :roswell.install.quicklisp)
(defun quicklisp-help (argv)
(format *error-output* "no options for quicklisp~%")
@ -65,3 +65,10 @@
(push `("quicklisp" . (quicklisp-argv-parse
quicklisp-download
quicklisp-install)) *install-cmds*)
(defun quicklisp (type)
(case type
(:help '(quicklisp-help))
(:install '(quicklisp-argv-parse
quicklisp-download
quicklisp-install))))

View file

@ -1,7 +1,7 @@
(ros:include "util-install")
(defpackage :ros.install.sbcl-bin
(defpackage :roswell.install.sbcl-bin
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.sbcl-bin)
(in-package :roswell.install.sbcl-bin)
;; sbcl-bin is specially treated. Installation are mainly done by src/cmd-install-sbcl-bin.c.
@ -17,3 +17,8 @@
(push `("sbcl-bin" . (sbcl-bin-argv-parse))
*install-cmds*)
(defun sbcl-bin (type)
(case type
(:help '(sbcl-bin-help))
(:install '(sbcl-bin-argv-parse))))

View file

@ -1,7 +1,7 @@
(ros:include "util-install-quicklisp")
(defpackage :ros.install.sbcl
(defpackage :roswell.install.sbcl
(:use :cl :ros.install :ros.util :ros.locations))
(in-package :ros.install.sbcl)
(in-package :roswell.install.sbcl)
#|
:sb-source-locations
@ -124,7 +124,7 @@
(format nil "src/sbcl-~A/customize-target-features.lisp"
(getf argv :version)) (homedir)))
:direction :output :if-exists :supersede :if-does-not-exist :create)
(let ((*package* (find-package :ros.install.sbcl)))
(let ((*package* (find-package :roswell.install.sbcl)))
(format out "~s"
`(lambda (list)
(dolist (i ',(loop for (name default description sb-prefix) in *sbcl-options*
@ -328,3 +328,24 @@
(push `("sbcl" . ,(list 'sbcl-help)) *help-cmds*)
(push `("sbcl" . sbcl-get-version) *list-cmd*)
(defun sbcl (type)
(case type
(:help '(sbcl-help))
(:install `(,(decide-version 'sbcl-get-version)
sbcl-argv-parse
#+win32 sbcl-msys
sbcl-start
start
,(decide-download 'sbcl-download)
sbcl-expand
sbcl-patch
sbcl-config
sbcl-make
sbcl-install
#+win32 sbcl-install-win32
sbcl-backup-features
sbcl-make-archive
sbcl-clean
setup))
(:list 'sbcl-get-version)))

View file

@ -24,12 +24,11 @@ ARGV2 contains a (possibly modified) ARGV.")
(defvar *checkout-default* 'checkout-github)
(defun probe-impl (impl)
(or (progn
(module "install" impl)
(cdr (assoc impl *install-cmds* :test #'equal)))
(or (module "install" impl)
(and ;; before setup quicklisp
(find impl '("sbcl-bin" "quicklisp") :test 'equal)
(load (make-pathname :name (format nil "install-~A" impl) :type "lisp" :defaults *load-pathname*)))))
(load (make-pathname :name (format nil "install-~A" impl) :type "lisp" :defaults *load-pathname*))
(read-from-string (format nil "ros.~A.~A::~A" "install" impl impl)))))
(defun install-impl (impl version argv)
(let ((cmds (cdr (assoc impl *install-cmds* :test #'equal))))

View file

@ -33,11 +33,12 @@
(defun module (prefix name)
(ignore-errors
(read-call "ql:register-local-projects")
(let ((imp (format nil "roswell.~A.~A" prefix name)))
(let ((imp (format nil "roswell.~A.~A" prefix name))
(*read-eval*))
(and (or (read-call "ql-dist:find-system" imp)
(read-call "ql:where-is-system" imp))
(read-call "ql:quickload" imp :silent t))
(fdefinition (read-from-string (format nil "ros.~A.~A::~A" prefix name name))))))
(read-from-string (format nil "~A::~A" imp name)))))
(defun set-opt (item val)
(let ((found (assoc item (ros::ros-opts) :test 'equal)))