tbackward-driver.lisp - clic - Clic is an command line interactive client for gopher written in Common LISP
(HTM) git clone git://bitreich.org/clic/ git://hg6vgqziawt5s4dj.onion/clic/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) LICENSE
---
tbackward-driver.lisp (3399B)
---
1 ;;; -------------------------------------------------------------------------
2 ;;; Hacks for backward-compatibility with older versions of UIOP
3
4 (uiop/package:define-package :uiop/backward-driver
5 (:recycle :uiop/backward-driver :asdf/backward-driver :uiop)
6 (:use :uiop/common-lisp :uiop/package :uiop/utility :uiop/version
7 :uiop/pathname :uiop/stream :uiop/os :uiop/image
8 :uiop/run-program :uiop/lisp-build :uiop/configuration)
9 (:export
10 #:coerce-pathname
11 #:user-configuration-directories #:system-configuration-directories
12 #:in-first-directory #:in-user-configuration-directory #:in-system-configuration-directory
13 #:version-compatible-p))
14 (in-package :uiop/backward-driver)
15
16 (eval-when (:compile-toplevel :load-toplevel :execute)
17 (with-deprecation ((version-deprecation *uiop-version* :style-warning "3.2" :warning "3.4"))
18 ;; Backward compatibility with ASDF 2.000 to 2.26
19
20 ;; For backward-compatibility only, for people using internals
21 ;; Reported users in quicklisp 2015-11: hu.dwim.asdf (removed in next release)
22 ;; Will be removed after 2015-12.
23 (defun coerce-pathname (name &key type defaults)
24 "DEPRECATED. Please use UIOP:PARSE-UNIX-NAMESTRING instead."
25 (parse-unix-namestring name :type type :defaults defaults))
26
27 ;; Backward compatibility for ASDF 2.27 to 3.1.4
28 (defun user-configuration-directories ()
29 "Return the current user's list of user configuration directories
30 for configuring common-lisp.
31 DEPRECATED. Use UIOP:XDG-CONFIG-PATHNAMES instead."
32 (xdg-config-pathnames "common-lisp"))
33 (defun system-configuration-directories ()
34 "Return the list of system configuration directories for common-lisp.
35 DEPRECATED. Use UIOP:CONFIG-SYSTEM-PATHNAMES instead."
36 (system-config-pathnames "common-lisp"))
37 (defun in-first-directory (dirs x &key (direction :input))
38 "Finds the first appropriate file named X in the list of DIRS for I/O
39 in DIRECTION \(which may be :INPUT, :OUTPUT, :IO, or :PROBE).
40 If direction is :INPUT or :PROBE, will return the first extant file named
41 X in one of the DIRS.
42 If direction is :OUTPUT or :IO, will simply return the file named X in the
43 first element of DIRS that exists. DEPRECATED."
44 (find-preferred-file
45 (mapcar #'(lambda (dir) (subpathname (ensure-directory-pathname dir) x)) dirs)
46 :direction direction))
47 (defun in-user-configuration-directory (x &key (direction :input))
48 "Return the file named X in the user configuration directory for common-lisp.
49 DEPRECATED."
50 (xdg-config-pathname `("common-lisp" ,x) direction))
51 (defun in-system-configuration-directory (x &key (direction :input))
52 "Return the pathname for the file named X under the system configuration directory
53 for common-lisp. DEPRECATED."
54 (find-preferred-file (system-config-pathnames "common-lisp" x) :direction direction))
55
56
57 ;; Backward compatibility with ASDF 1 to ASDF 2.32
58
59 (defun version-compatible-p (provided-version required-version)
60 "Is the provided version a compatible substitution for the required-version?
61 If major versions differ, it's not compatible.
62 If they are equal, then any later version is compatible,
63 with later being determined by a lexicographical comparison of minor numbers.
64 DEPRECATED."
65 (let ((x (parse-version provided-version nil))
66 (y (parse-version required-version nil)))
67 (and x y (= (car x) (car y)) (lexicographic<= '< (cdr y) (cdr x)))))))
68