1 | (in-package #:asdf-install) |
---|
2 | |
---|
3 | (defun directorify (name) |
---|
4 | ;; input name may or may not have a trailing #\/, but we know we |
---|
5 | ;; want a directory |
---|
6 | (let ((path (pathname name))) |
---|
7 | (if (pathname-name path) |
---|
8 | (merge-pathnames |
---|
9 | (make-pathname :directory `(:relative ,(pathname-name path)) |
---|
10 | :name "") |
---|
11 | path) |
---|
12 | path))) |
---|
13 | |
---|
14 | #+:digitool |
---|
15 | (defparameter *home-volume-name* |
---|
16 | (second (pathname-directory (truename (user-homedir-pathname)))) |
---|
17 | "Digitool MCL retains the OS 9 convention that ALL volumes have a |
---|
18 | name which includes the startup volume. OS X doesn't know about this. |
---|
19 | This figures in the home path and in the normalization for system |
---|
20 | namestrings.") |
---|
21 | |
---|
22 | (defvar *proxy* (get-env-var "http_proxy")) |
---|
23 | |
---|
24 | (defvar *proxy-user* nil) |
---|
25 | |
---|
26 | (defvar *proxy-passwd* nil) |
---|
27 | |
---|
28 | (defvar *trusted-uids* nil) |
---|
29 | |
---|
30 | (defvar *verify-gpg-signatures* t |
---|
31 | "Can be t, nil, or :unknown-locations. If true, then the signature of all packages will be checked. If nil, then no signatures will be checked. If :unkown-locations, then only packages whose location is not a prefix of any `*safe-url-prefixes*` will be tested.") |
---|
32 | |
---|
33 | (defvar *safe-url-prefixes* nil) |
---|
34 | |
---|
35 | (defvar *preferred-location* nil) |
---|
36 | |
---|
37 | (defvar *cclan-mirror* |
---|
38 | (or (get-env-var "CCLAN_MIRROR") |
---|
39 | "http://ftp.linux.org.uk/pub/lisp/cclan/")) |
---|
40 | |
---|
41 | #+(or :win32 :mswindows) |
---|
42 | (defvar *cygwin-bin-directory* |
---|
43 | (pathname "C:\\PROGRA~1\\Cygwin\\bin\\")) |
---|
44 | |
---|
45 | #+(or :win32 :mswindows) |
---|
46 | (defvar *cygwin-bash-program* |
---|
47 | "C:\\PROGRA~1\\Cygwin\\bin\\bash.exe") |
---|
48 | |
---|
49 | ;; bin first |
---|
50 | (defvar *shell-search-paths* '((:absolute "bin") |
---|
51 | (:absolute "usr" "bin")) |
---|
52 | "A list of places to look for shell commands.") |
---|
53 | |
---|
54 | (defvar *gnu-tar-program* |
---|
55 | #-(or :netbsd :freebsd :solaris) "tar" |
---|
56 | #+(or :netbsd :freebsd :solaris) "gtar" |
---|
57 | "Path to the GNU tar program") |
---|
58 | |
---|
59 | (eval-when (:compile-toplevel :load-toplevel :execute) |
---|
60 | (defparameter *supported-defsystems* |
---|
61 | (list :mk-defsystem |
---|
62 | :asdf |
---|
63 | |
---|
64 | ;; Add others. |
---|
65 | ;; #+lispworks :common-defsystem |
---|
66 | ;; #+gbbopen :mini-module |
---|
67 | )) |
---|
68 | (unless (some (lambda (defsys-tag) |
---|
69 | (member defsys-tag *features*)) |
---|
70 | *features*) |
---|
71 | (error "ASDF-INSTALL requires one of the following \"defsystem\" utilities to work: ~A" |
---|
72 | *supported-defsystems*))) |
---|
73 | |
---|
74 | (defvar *asdf-install-dirs* |
---|
75 | (directorify (or #+sbcl (get-env-var "SBCL_HOME") |
---|
76 | (get-env-var "ASDF_INSTALL_DIR") |
---|
77 | (make-pathname :directory |
---|
78 | `(:absolute |
---|
79 | #+digitool ,*home-volume-name* |
---|
80 | "usr" "local" "asdf-install"))))) |
---|
81 | |
---|
82 | (defvar *private-asdf-install-dirs* |
---|
83 | #+:sbcl |
---|
84 | (merge-pathnames (make-pathname :directory '(:relative ".sbcl")) |
---|
85 | (truename (user-homedir-pathname))) |
---|
86 | #-:sbcl |
---|
87 | (cond ((get-env-var "PRIVATE_ASDF_INSTALL_DIR") |
---|
88 | (directorify (get-env-var "PRIVATE_ASDF_INSTALL_DIR"))) |
---|
89 | (t |
---|
90 | (merge-pathnames (make-pathname |
---|
91 | :directory '(:relative ".asdf-install-dir")) |
---|
92 | (truename (user-homedir-pathname)))))) |
---|
93 | |
---|
94 | (defparameter *locations* |
---|
95 | `((,(merge-pathnames (make-pathname :directory '(:relative "site")) |
---|
96 | *asdf-install-dirs*) |
---|
97 | ,(merge-pathnames (make-pathname :directory '(:relative "site-systems")) |
---|
98 | *asdf-install-dirs*) |
---|
99 | "System-wide install") |
---|
100 | (,(merge-pathnames (make-pathname :directory '(:relative "site")) |
---|
101 | *private-asdf-install-dirs*) |
---|
102 | ,(merge-pathnames (make-pathname :directory '(:relative "systems")) |
---|
103 | *private-asdf-install-dirs*) |
---|
104 | "Personal installation"))) |
---|
105 | |
---|
106 | (defvar *tar-extractors* |
---|
107 | '(extract-using-tar)) |
---|
108 | |
---|
109 | (defvar *systems-installed-this-time* nil |
---|
110 | "Used during installation propagation \(see *propagate-installation*\) to keep track off which systems have been installed during the current call to install.") |
---|
111 | |
---|
112 | (defvar *propagate-installation* nil |
---|
113 | "If true, then every required system will be re-asdf-installed.") |
---|
114 | |
---|
115 | (defvar *temporary-directory* |
---|
116 | (pathname-sans-name+type (user-homedir-pathname))) |
---|
117 | |
---|
118 | (defvar *gpg-command* "gpg" |
---|
119 | "Location of the gpg binary, if for some reason, it does appear in |
---|
120 | the default path for /bin/sh.") |
---|
121 | |
---|
122 | |
---|