1 (defpackage :cl-postgres-system
2 (:use :common-lisp :asdf))
3 (in-package :cl-postgres-system)
5 ;; Change this to enable/disable unicode manually (mind that it won't
6 ;; work unless your implementation supports it).
7 (defparameter *unicode*
8 #+(or sb-unicode unicode ics openmcl-unicode-strings) t
9 #-(or sb-unicode unicode ics openmcl-unicode-strings) nil)
10 (defparameter *string-file* (if *unicode* "strings-utf-8" "strings-ascii"))
12 (defsystem :cl-postgres
13 :description "Low-level client library for PostgreSQL"
15 #-(or sbcl allegro ccl) :usocket
16 #+sbcl :sb-bsd-sockets)
18 ((:module :cl-postgres
19 :components ((:file "trivial-utf-8")
22 (:file "package" :depends-on ("features"))
23 (:file "errors" :depends-on ("package"))
24 (:file "sql-string" :depends-on ("package"))
25 (:file #.*string-file* :depends-on ("package" "trivial-utf-8"))
26 (:file "communicate" :depends-on (#.*string-file* "sql-string"))
27 (:file "messages" :depends-on ("communicate"))
28 (:file "oid" :depends-on ("package"))
29 (:file "interpret" :depends-on ("oid" "communicate" "ieee-floats"))
30 (:file "protocol" :depends-on ("interpret" "messages" "errors"))
31 (:file "public" :depends-on ("protocol"))
32 (:file "bulk-copy" :depends-on ("public")))))
33 :in-order-to ((test-op (test-op :cl-postgres-tests)
34 (test-op :cl-postgres-simple-date-tests))))
36 (defmethod perform :after ((op asdf:load-op) (system (eql (find-system :cl-postgres))))
37 (when (and (find-package :simple-date)
38 (not (find-symbol (symbol-name '#:+postgres-day-offset+) :simple-date)))
39 (asdf:oos 'asdf:load-op :simple-date-postgres-glue)))
41 (defsystem :cl-postgres-tests
42 :depends-on (:cl-postgres :fiveam)
44 ((:module :cl-postgres
45 :components ((:file "tests"))))
46 :perform (test-op (o c)
47 (uiop:symbol-call :cl-postgres-tests '#:prompt-connection)
48 (uiop:symbol-call :fiveam '#:run! :cl-postgres)))
50 (defsystem :cl-postgres-simple-date-tests
51 :depends-on (:cl-postgres :cl-postgres-tests :fiveam :simple-date)
53 ((:module :cl-postgres
54 :components ((:file "simple-date-tests"))))
55 :perform (test-op (o c)
56 (uiop:symbol-call :cl-postgres-simple-date-tests '#:prompt-connection)
57 (uiop:symbol-call :fiveam '#:run! :cl-postgres-simple-date)))