1 ;;;; -*- Mode: LISP; Syntax: Ansi-Common-Lisp; Base: 10; -*-
3 (defpackage :cl-postgres-system
4 (:use :common-lisp :asdf))
5 (in-package :cl-postgres-system)
7 ;; Change this to enable/disable unicode manually (mind that it won't
8 ;; work unless your implementation supports it).
9 (defparameter *unicode*
10 #+(or sb-unicode unicode ics openmcl-unicode-strings abcl) t
11 #-(or sb-unicode unicode ics openmcl-unicode-strings abcl) nil)
12 (defparameter *string-file* (if *unicode* "strings-utf-8" "strings-ascii"))
14 (defsystem "cl-postgres"
15 :description "Low-level client library for PostgreSQL"
16 :author "Marijn Haverbeke <marijnh@gmail.com>"
17 :maintainer "Sabra Crolleton <sabra.crolleton@gmail.com>"
20 :depends-on ("md5" "split-sequence" "ironclad" "cl-base64" "uax-15"
21 (:feature (:or :allegro :ccl :clisp :genera
22 :armedbear :cmucl :lispworks :ecl)
24 (:feature :sbcl (:require :sb-bsd-sockets)))
26 ((:module "cl-postgres"
27 :components ((:file "package")
30 (:file "oid" :depends-on ("package" "config"))
31 (:file "errors" :depends-on ("package"))
32 (:file "data-types" :depends-on ("package" "config"))
33 (:file "sql-string" :depends-on ("package" "config" "data-types"))
34 (:file "trivial-utf-8" :depends-on ("package" "config"))
35 (:file #.*string-file*
36 :depends-on ("package" "trivial-utf-8" "config"))
38 :depends-on (#.*string-file* "sql-string" "config"))
39 (:file "messages" :depends-on ("communicate" "config"))
40 (:file "ieee-floats" :depends-on ("config"))
42 :depends-on ("oid" "communicate" "ieee-floats" "config"))
43 (:file "saslprep" :depends-on ("package" "config"))
45 :depends-on ("package" "messages" "errors" "saslprep"
46 "trivial-utf-8" "config"))
48 :depends-on ("package" "interpret" "messages" "errors" "scram"
49 "saslprep" "trivial-utf-8" "config"))
50 (:file "public" :depends-on ("package" "protocol" "features" "config"))
52 :depends-on ("package" "public" "trivial-utf-8")))))
53 :in-order-to ((test-op (test-op "cl-postgres/tests")
54 (test-op "cl-postgres/simple-date-tests"))))
56 (defsystem "cl-postgres/tests"
57 :depends-on ("cl-postgres" "fiveam" "uiop")
59 ((:module "cl-postgres/tests"
60 :components ((:file "test-package")
61 (:file "tests" :depends-on ("test-package"))
62 (:file "test-binary-parameters" :depends-on ("test-package" "tests"))
63 (:file "test-oids" :depends-on ("test-package" "tests"))
64 (:file "test-ieee-float" :depends-on ("test-package" "tests"))
65 (:file "test-clp-utf8" :depends-on ("test-package" "tests"))
66 (:file "test-data-types" :depends-on ("test-package" "tests"))
67 (:file "test-communicate" :depends-on ("test-package" "tests"))
68 (:file "tests-scram" :depends-on ("test-package" "tests"))
69 (:file "tests-saslprep" :depends-on ("test-package")))))
71 :perform (test-op (o c)
72 (uiop:symbol-call :cl-postgres-tests '#:prompt-connection)
73 (uiop:symbol-call :fiveam '#:run! :cl-postgres)))
75 (defsystem "cl-postgres/simple-date-tests"
76 :depends-on ("cl-postgres" "cl-postgres/tests" "fiveam" "simple-date"
77 "simple-date/postgres-glue")
79 ((:module "cl-postgres/tests"
80 :components ((:file "test-package")
81 (:file "simple-date-tests"))))
82 :perform (test-op (o c)
83 (uiop:symbol-call :cl-postgres-simple-date-tests
85 (uiop:symbol-call :fiveam '#:run! :cl-postgres-simple-date)))
88 ;; The definitions below should work, unlike the bogus method they replace;
89 ;; but I recommend instead explicit dependency on simple-date/postgres-glue.
90 (load-system "asdf-system-connections")
91 (defsystem-connection "postgres/with-simple-date"
92 :requires ("simple-date" "cl-postgres")
93 :depends-on ("simple-date/postgres-glue"))