Add WITH-POINTER-TO-VECTOR-DATA for Clasp (#385)
[cffi.git] / cffi.asd
bloba9794dbc1478242e8a413afc3c05f0cd7b0d47fe
1 ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; cffi.asd --- ASDF system definition for CFFI.
4 ;;;
5 ;;; Copyright (C) 2005-2006, James Bielman  <jamesjb@jamesjb.com>
6 ;;; Copyright (C) 2005-2010, Luis Oliveira  <loliveira@common-lisp.net>
7 ;;;
8 ;;; Permission is hereby granted, free of charge, to any person
9 ;;; obtaining a copy of this software and associated documentation
10 ;;; files (the "Software"), to deal in the Software without
11 ;;; restriction, including without limitation the rights to use, copy,
12 ;;; modify, merge, publish, distribute, sublicense, and/or sell copies
13 ;;; of the Software, and to permit persons to whom the Software is
14 ;;; furnished to do so, subject to the following conditions:
15 ;;;
16 ;;; The above copyright notice and this permission notice shall be
17 ;;; included in all copies or substantial portions of the Software.
18 ;;;
19 ;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 ;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 ;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 ;;; NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23 ;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24 ;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 ;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26 ;;; DEALINGS IN THE SOFTWARE.
27 ;;;
29 (in-package :asdf)
31 #-(or openmcl mcl sbcl cmucl scl clisp lispworks ecl allegro cormanlisp abcl mkcl clasp)
32 (error "Sorry, this Lisp is not yet supported.  Patches welcome!")
34 (defsystem "cffi"
35   :description "The Common Foreign Function Interface"
36   :author "James Bielman  <jamesjb@jamesjb.com>"
37   :maintainer "Luis Oliveira  <loliveira@common-lisp.net>"
38   :licence "MIT"
39   :depends-on (:uiop :alexandria :trivial-features :babel)
40   :in-order-to ((test-op (load-op :cffi-tests)))
41   :perform (test-op (o c) (operate 'asdf:test-op :cffi-tests))
42   :components
43   ((:module "src"
44     :serial t
45     :components
46     ((:file "package")
47      (:file "sys-utils")
48      (:file "cffi-openmcl" :if-feature :openmcl)
49      (:file "cffi-mcl" :if-feature :mcl)
50      (:file "cffi-sbcl" :if-feature :sbcl)
51      (:file "cffi-cmucl" :if-feature :cmucl)
52      (:file "cffi-scl" :if-feature :scl)
53      (:file "cffi-clisp" :if-feature :clisp)
54      (:file "cffi-lispworks" :if-feature :lispworks)
55      (:file "cffi-ecl" :if-feature :ecl)
56      (:file "cffi-allegro" :if-feature :allegro)
57      (:file "cffi-corman" :if-feature :cormanlisp)
58      (:file "cffi-abcl" :if-feature :abcl)
59      (:file "cffi-mkcl" :if-feature :mkcl)
60      (:file "cffi-clasp" :if-feature :clasp)
61      (:file "utils")
62      (:file "libraries")
63      (:file "early-types")
64      (:file "types")
65      (:file "enum")
66      (:file "strings")
67      (:file "structures")
68      (:file "functions")
69      (:file "foreign-vars")
70      (:file "features")))))
72 ;; when you get CFFI from git, its defsystem doesn't have a version,
73 ;; so we assume it satisfies any version requirements whatsoever.
74 (defmethod version-satisfies ((c (eql (find-system :cffi))) version)
75   (declare (ignorable version))
76   (or (null (component-version c))
77       (call-next-method)))
79 (defsystem "cffi/c2ffi"
80   :description "CFFI definition generator from the FFI spec generated by c2ffi. This system can be used through ASDF's :DEFSYSTEM-DEPENDS-ON."
81   :author "Attila Lendvai <attila@lendvai.name>"
82   :depends-on (:alexandria
83                :cffi)
84   :licence "MIT"
85   :components
86   ((:module "src/c2ffi"
87     :components
88     ((:file "package")
89      (:file "c2ffi" :depends-on ("package"))
90      (:file "asdf" :depends-on ("package" "c2ffi"))))))
92 (defsystem "cffi/c2ffi-generator"
93   :description "This system gets loaded lazily when the CFFI bindings need to be regenerated. This only happens if the developer chose not to include the generated binding files, or the spec file generated by c2ffi has been modified."
94   :author "Attila Lendvai <attila@lendvai.name>"
95   :depends-on (:cffi/c2ffi
96                :cl-ppcre
97                :cl-json)
98   :licence "MIT"
99   :components
100   ((:module "src/c2ffi"
101     :components
102     ((:file "generator")))))