/[mcclim]/mcclim/mcclim.asd
ViewVC logotype

Contents of /mcclim/mcclim.asd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations)
Tue Apr 19 22:35:42 2005 UTC (8 years, 11 months ago) by afuchs
Branch: MAIN
Changes since 1.4: +17 -2 lines
Make Allegro CL a McCLIM/asdf-supported lisp.

Thanks for the patch go to rpgoldman.
1 ;;; -*- Mode: Lisp -*-
2
3 ;;; (c) copyright 1998,1999,2000 by Michael McDonald (mikemac@mikemac.com)
4 ;;; (c) copyright 2000 by
5 ;;; Robert Strandh (strandh@labri.u-bordeaux.fr)
6 ;;; (c) copyright 2005 by
7 ;;; Andreas Fuchs (asf@boinkor.net)
8 ;;;
9 ;;; This library is free software; you can redistribute it and/or
10 ;;; modify it under the terms of the GNU Library General Public
11 ;;; License as published by the Free Software Foundation; either
12 ;;; version 2 of the License, or (at your option) any later version.
13 ;;;
14 ;;; This library is distributed in the hope that it will be useful,
15 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ;;; Library General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU Library General Public
20 ;;; License along with this library; if not, write to the
21 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ;;; Boston, MA 02111-1307 USA.
23
24
25 ;;; Really, I wouldn't bother with anything but ASDF. Almost every lisp
26 ;;; ships with it, and it has the added benefit of ASDF-INSTALL.
27 ;;; Get ASDF, and be welcome to the 21st century. -- [2005-01-31:asf]
28
29 (defpackage :mcclim.system
30 (:use :asdf :cl))
31 (in-package :mcclim.system)
32
33 (defparameter *clim-directory* (directory-namestring *load-truename*))
34
35 ;;; Legacy CMUCL support stuff
36 #+cmu
37 (progn
38 (unless (fboundp 'ext:stream-read-char)
39 (unless (ignore-errors (ext:search-list "gray-streams:"))
40 (setf (ext:search-list "gray-streams:")
41 '("target:pcl/" "library:subsystems/")))
42 (if (fboundp 'extensions:without-package-locks)
43 (extensions:without-package-locks
44 (load "gray-streams:gray-streams-library"))
45 (load "gray-streams:gray-streams-library")))
46 #-clx
47 (require :clx)
48 #+mp (when (eq mp::*initial-process* mp::*current-process*)
49 (format t "~%~%You need to run (mp::startup-idle-and-top-level-loops) to start up the multiprocessing support.~%~%")))
50
51 ;;; Make CLX asdf-loadable on Allegro 6.2
52 ;;; possibly this should be further refined to funciton properly for
53 ;;; Allegro on Windows platforms. [2005/04/18:rpg]
54 #+allegro
55 (progn
56 (defclass requireable-system (asdf:system)
57 ())
58 (defmethod asdf:perform ((op asdf:load-op) (system requireable-system))
59 (require (intern (slot-value system 'asdf::name) "KEYWORD")))
60 (defmethod asdf::traverse ((op asdf:load-op) (system requireable-system))
61 (list (cons op system)))
62 (defsystem :clx
63 :class requireable-system))
64
65
66 (pushnew :clim *features*)
67 (pushnew :mcclim *features*)
68
69 (defmacro clim-defsystem ((module &key depends-on) &rest components)
70 `(progn
71 (asdf:defsystem ,module
72 ,@(and depends-on
73 `(:depends-on ,depends-on))
74 :serial t
75 :components
76 (,@(loop for c in components
77 for p = (merge-pathnames
78 (parse-namestring c)
79 (make-pathname :type "lisp"
80 :defaults *clim-directory*))
81 collect `(:file ,(pathname-name p) :pathname ,p))))))
82
83 (defsystem :clim-lisp
84 :components
85 (;; First possible patches
86 (:file "patch")
87 (:module "Lisp-Dep"
88 :depends-on ("patch")
89 :components
90 ((:file #+cmu "fix-cmu"
91 #+excl "fix-acl"
92 #+sbcl "fix-sbcl"
93 #+openmcl "fix-openmcl"
94 #+lispworks "fix-lispworks"
95 #+clisp "fix-clisp")))
96 (:file "package" :depends-on ("Lisp-Dep"))))
97
98 (defsystem :clim-core
99 :depends-on (:clim-lisp)
100 :components ((:file "decls")
101 (:module "Lisp-Dep"
102 :depends-on ("decls")
103 :components
104 ((:file #.(or
105 #+(and :cmu :mp (not :pthread)) "mp-cmu"
106 #+sb-thread "mp-sbcl"
107 #+excl "mp-acl"
108 #+openmcl "mp-openmcl"
109 #+lispworks "mp-lw"
110 #| fall back |# "mp-nil"))))
111 (:file "utils" :depends-on ("decls" "Lisp-Dep"))
112 (:file "design" :depends-on ("decls" "Lisp-Dep" "utils"))
113 (:file "X11-colors" :depends-on ("decls" "Lisp-Dep" "design"))
114 (:file "coordinates" :depends-on ("decls" "Lisp-Dep"))
115 (:file "setf-star" :depends-on ("decls" "Lisp-Dep"))
116 (:file "transforms" :depends-on ("decls" "Lisp-Dep" "coordinates" "utils"))
117 (:file "regions" :depends-on ("decls" "Lisp-Dep" "coordinates" "utils" "transforms" "setf-star" "design"))
118 (:file "sheets" :depends-on ("decls" "Lisp-Dep" "utils" "transforms" "regions"))
119 (:file "pixmap" :depends-on ("decls" "Lisp-Dep" "sheets" "transforms" "regions"))
120 (:file "events" :depends-on ("decls" "Lisp-Dep" "transforms" "sheets" "utils"))
121 (:file "ports" :depends-on ("decls" "Lisp-Dep" "events" "sheets" "pixmap" "utils"))
122 (:file "grafts" :depends-on ("decls" "Lisp-Dep" "sheets" "ports" "transforms" "regions"))
123 (:file "medium" :depends-on ("decls" "Lisp-Dep" "ports" "X11-colors" "utils" "pixmap" "regions"
124 "transforms" "design"))
125 (:file "output" :depends-on ("decls" "Lisp-Dep" "medium"))
126 (:file "input" :depends-on ("decls" "Lisp-Dep" "events" "regions" "sheets"))
127 (:file "repaint" :depends-on ("decls" "Lisp-Dep" "sheets" "events"))
128 (:file "graphics" :depends-on ("decls" "Lisp-Dep" "output" "utils" "medium" "sheets" "pixmap"
129 "regions" "design" "transforms"))
130 (:file "views" :depends-on ("utils"))
131 (:file "stream-output" :depends-on ("decls" "Lisp-Dep" "design" "utils" "X11-colors" "views"
132 "output" "sheets" "regions" "graphics"
133 "medium" "setf-star"))
134 (:file "recording" :depends-on ("decls" "Lisp-Dep" "output" "coordinates" "graphics" "design"
135 "medium" "transforms" "regions" "sheets"
136 "utils" "stream-output"))
137 (:file "encapsulate" :depends-on ("decls" "Lisp-Dep" "sheets" "graphics" "utils" "medium" "input"
138 "stream-output" "recording"))
139 (:file "stream-input" :depends-on ("decls" "Lisp-Dep" "input" "ports" "sheets" "events"
140 "encapsulate" "transforms" "utils"))
141 (:file "text-selection" :depends-on ("decls" "Lisp-Dep" "X11-colors" "medium" "output"
142 "transforms" "sheets" "stream-output"
143 "ports" "recording" "regions"
144 "events"))))
145
146 (defsystem :goatee-core
147 :depends-on (:clim-core)
148 :components
149 ((:module "Goatee"
150 :components
151 ((:file "conditions")
152 (:file "dbl-list")
153 (:file "flexivector" :depends-on ("conditions" "dbl-list"))
154 (:file "buffer" :depends-on ("conditions" "flexivector" "dbl-list"))
155 (:file "editable-buffer" :depends-on ("dbl-list" "flexivector" "buffer"))
156 (:file "editable-area" :depends-on ("flexivector" "editable-buffer" "dbl-list"
157 "buffer"))
158 (:file "clim-area" :depends-on ("flexivector" "dbl-list" "buffer"
159 "editable-area" "editable-buffer"))
160 (:file "kill-ring" :depends-on ("editable-buffer" "dbl-list" "flexivector"
161 "buffer"))
162 (:file "goatee-command" :depends-on ("conditions" "clim-area" "dbl-list"
163 "editable-buffer" "kill-ring"
164 "editable-area" "buffer" "flexivector"))
165 (:file "editing-stream" :depends-on ("goatee-command" "kill-ring" "dbl-list"
166 "conditions" "editable-buffer"
167 "flexivector" "clim-area" "buffer"))
168 (:file "presentation-history" :depends-on ("editing-stream" "buffer"
169 "flexivector" "editable-buffer"
170 "goatee-command"))))))
171
172 ;;; CLIM-PostScript is not a backend in the normal sense.
173 ;;; It is an extension (Chap. 35.1 of the spec) and is an
174 ;;; "included" part of McCLIM. Hence the defsystem is here.
175 (defsystem :clim-postscript
176 :depends-on (:clim-core)
177 :components
178 ((:module "Backends/PostScript"
179 :pathname #.(make-pathname :directory '(:relative "Backends" "PostScript"))
180 :components
181 ((:file "package")
182 (:file "encoding" :depends-on ("package"))
183 (:file "paper" :depends-on ("package"))
184 (:file "class" :depends-on ("paper" "package"))
185 (:file "font" :depends-on ("encoding" "class" "paper" "package"))
186 (:file "graphics" :depends-on ("encoding" "paper" "class" "font" "package"))
187 (:file "sheet" :depends-on ("paper" "class" "graphics" "package"))
188 (:file "afm" :depends-on ("class" "paper" "font" "package"))
189 (:file "standard-metrics" :depends-on ("font" "package"))))))
190
191 (defsystem :clim
192 :depends-on (:clim-core :goatee-core :clim-postscript)
193 :components
194 ((:file "text-formatting")
195 (:file "input-editing")
196 (:file "presentations")
197 (:file "defresource")
198 (:file "presentation-defs" :depends-on ("input-editing" "presentations"))
199 (:file "pointer-tracking" :depends-on ("input-editing"))
200 (:file "commands" :depends-on ("input-editing" "presentations" "presentation-defs"))
201 (:file "frames" :depends-on ("commands" "presentations" "presentation-defs"
202 "pointer-tracking"))
203 (:file "incremental-redisplay" :depends-on ("presentation-defs" "frames"))
204 (:file "panes" :depends-on ("incremental-redisplay" "presentations"
205 "presentation-defs" "input-editing" "frames"))
206 (:file "gadgets" :depends-on ("commands" "pointer-tracking" "input-editing"
207 "frames" "incremental-redisplay" "panes"))
208 (:file "menu" :depends-on ("panes" "commands" "gadgets"
209 "presentations" "frames"))
210 (:file "table-formatting" :depends-on ("presentation-defs" "panes"
211 "presentations" "input-editing"))
212 (:file "graph-formatting")
213 (:file "bordered-output" :depends-on ("input-editing" "incremental-redisplay"
214 "presentation-defs" "panes"))
215 (:file "dialog-views" :depends-on ("presentations" "incremental-redisplay"
216 "bordered-output" "presentation-defs"))
217 (:file "dialog" :depends-on ("panes" "frames" "incremental-redisplay"
218 "table-formatting" "presentations"
219 "bordered-output" "presentation-defs"
220 "dialog-views" "input-editing"
221 "commands"))
222 (:file "builtin-commands" :depends-on ("table-formatting" "commands" "presentations"
223 "presentation-defs" "input-editing"))
224 (:file "describe" :depends-on ("presentations" "presentation-defs" "table-formatting"))
225 (:file "Experimental/menu-choose" :depends-on ("commands" "table-formatting" "presentation-defs"
226 "panes" "frames" "pointer-tracking"
227 "presentations")
228 :pathname #.(make-pathname :directory '(:relative "Experimental") :name "menu-choose" :type "lisp"))
229 (:file "Goatee/presentation-history" :depends-on ("presentation-defs") ; XXX: this is loaded as part of the Goatee system. huh?
230 :pathname #.(make-pathname :directory '(:relative "Goatee") :name "presentation-history" :type "lisp"))
231 ))
232
233 (defsystem :clim-clx
234 :depends-on (:clim #+(or sbcl openmcl ecl allegro) :clx)
235 :components
236 ((:module "Backends/CLX"
237 :pathname #.(make-pathname :directory '(:relative "Backends" "CLX"))
238 :components
239 ((:file "package")
240 (:file "image" :depends-on ("package"))
241 (:file "keysyms-common" :depends-on ("package"))
242 (:file "keysyms" :depends-on ("keysyms-common" "package"))
243 (:file "keysymdef" :depends-on ("keysyms-common" "package"))
244 (:file "port" :depends-on ("keysyms-common" "keysyms" "package"))
245 (:file "medium" :depends-on ("port" "keysyms" "package"))
246 (:file "graft" :depends-on ("port" "package"))
247 (:file "frame-manager" :depends-on ("medium" "port" "package"))))))
248
249 ;;; TODO/asf: I don't have the required libs to get :clim-opengl to load. tough.
250 (clim-defsystem (:clim-opengl :depends-on (:clim))
251 "Backends/OpenGL/opengl-x-frame-manager"
252 "Backends/OpenGL/opengl-frame-manager"
253 "Backends/OpenGL/opengl-x-port-before"
254 "Backends/OpenGL/opengl-port"
255 "Backends/OpenGL/opengl-x-port-after"
256 "Backends/OpenGL/opengl-medium"
257 "Backends/OpenGL/opengl-x-graft")
258
259 ;;; TODO/asf: I don't have the required macintosh to get :clim-beagle to load.
260
261 (defsystem :clim-objc-support)
262 (defmethod perform ((op load-op) (c (eql (find-system :clim-objc-support))))
263 (require "OBJC-SUPPORT"))
264
265 (clim-defsystem (:clim-beagle :depends-on (:clim :clim-objc-support))
266 "Backends/beagle/package"
267 "Backends/beagle/lisp-window"
268 "Backends/beagle/lisp-window-delegate"
269 "Backends/beagle/lisp-view"
270 "Backends/beagle/lisp-view-additional"
271 "Backends/beagle/lisp-image"
272 "Backends/beagle/lisp-unmanaged-view"
273 "Backends/beagle/cocoa-util"
274 "Backends/beagle/port"
275 "Backends/beagle/frame-manager"
276 "Backends/beagle/medium"
277 "Backends/beagle/mirror"
278 "Backends/beagle/events"
279 "Backends/beagle/graft"
280 "Backends/beagle/fonts"
281 "Backends/beagle/image"
282 "Backends/beagle/keysymdef")
283
284 ;;; legacy system that loads :clim-beagle
285 (defsystem :beagle
286 :depends-on (:clim-beagle))
287
288 ;;; A system that loads the appropriate backend for the current
289 ;;; platform.
290 (defsystem :clim-looks
291 :depends-on (:clim
292 ;; If we're on an implementation that ships CLX, use
293 ;; it. Same if the user has loaded CLX already.
294 #+(or sbcl openmcl ecl clx allegro) :clim-clx
295 #+gl :clim-opengl
296 ;; OpenMCL and MCL support the beagle backend (native
297 ;; OS X look&feel on OS X).
298
299 ;; But until it's ready, it's no use forcing users to
300 ;; cope with possible bugs.
301 ;; #+(or openmcl mcl) :clim-beagle
302 )
303 :components ((:file "Looks/pixie"
304 :pathname #.(make-pathname :directory '(:relative "Looks") :name "pixie" :type "lisp"))))
305
306 ;;; name of :clim-clx-user chosen by mikemac for no good reason
307 (defsystem :clim-clx-user
308 :depends-on (:clim :clim-clx))
309
310 ;;; CLIM-Examples depends on having at least one backend loaded.
311 (defsystem :clim-examples
312 :depends-on (:clim :clim-looks)
313 :components
314 ((:module "Examples"
315 :components
316 ((:file "calculator")
317 (:file "colorslider")
318 (:file "address-book")
319 (:file "traffic-lights")
320 (:file "clim-fig")
321 (:file "postscript-test")
322 (:file "stream-test")
323 (:file "presentation-test")
324 #+clx (:file "gadget-test")
325 (:file "accepting-values")
326 (:file "method-browser")))))
327
328 ;;; This won't load in SBCL, either. I have really crappy code to
329 ;;; extract dependency information from :serial t ASDF systems, but
330 ;;; this comment is too narrow to contain it.
331 (clim-defsystem (:scigraph :depends-on (:clim :clim-looks))
332 ;; The DWIM part of SCIGRAPH
333 "Apps/Scigraph/dwim/package"
334 "Apps/Scigraph/dwim/feature-case"
335 "Apps/Scigraph/dwim/macros"
336 "Apps/Scigraph/dwim/tv"
337 "Apps/Scigraph/dwim/draw"
338 "Apps/Scigraph/dwim/present"
339 "Apps/Scigraph/dwim/extensions"
340 "Apps/Scigraph/dwim/wholine"
341 "Apps/Scigraph/dwim/export"
342 ;; The Scigraph part
343 "Apps/Scigraph/scigraph/package"
344 "Apps/Scigraph/scigraph/copy"
345 "Apps/Scigraph/scigraph/dump"
346 "Apps/Scigraph/scigraph/duplicate"
347 "Apps/Scigraph/scigraph/random"
348 "Apps/Scigraph/scigraph/menu-tools"
349 "Apps/Scigraph/scigraph/basic-classes"
350 "Apps/Scigraph/scigraph/draw"
351 "Apps/Scigraph/scigraph/mouse"
352 "Apps/Scigraph/scigraph/color"
353 "Apps/Scigraph/scigraph/basic-graph"
354 "Apps/Scigraph/scigraph/graph-mixins"
355 "Apps/Scigraph/scigraph/axis"
356 "Apps/Scigraph/scigraph/moving-object"
357 "Apps/Scigraph/scigraph/symbol"
358 "Apps/Scigraph/scigraph/graph-data"
359 "Apps/Scigraph/scigraph/legend"
360 "Apps/Scigraph/scigraph/graph-classes"
361 "Apps/Scigraph/scigraph/present"
362 "Apps/Scigraph/scigraph/annotations"
363 "Apps/Scigraph/scigraph/annotated-graph"
364 "Apps/Scigraph/scigraph/contour"
365 "Apps/Scigraph/scigraph/equation"
366 "Apps/Scigraph/scigraph/popup-accept"
367 "Apps/Scigraph/scigraph/popup-accept-methods"
368 "Apps/Scigraph/scigraph/duplicate-methods"
369 "Apps/Scigraph/scigraph/frame"
370 "Apps/Scigraph/scigraph/export"
371 "Apps/Scigraph/scigraph/demo-frame")
372
373 (defsystem :clim-listener
374 :depends-on (:clim :clim-looks #+sbcl :sb-posix)
375 :components
376 ((:file "Experimental/xpm"
377 :pathname #.(make-pathname :directory '(:relative "Experimental") :name "xpm" :type "lisp"))
378 (:module "Apps/Listener"
379 :pathname #.(make-pathname :directory '(:relative "Apps" "Listener"))
380 :depends-on ("Experimental/xpm")
381 :components
382 ((:file "package")
383 (:file "util" :depends-on ("package"))
384 (:file "icons" :depends-on ("package" "util"))
385 (:file "file-types" :depends-on ("package" "icons" "util"))
386 (:file "dev-commands" :depends-on ("package" "icons" "file-types" "util"))
387 (:file "listener" :depends-on ("package" "file-types" "icons" "dev-commands" "util"))
388 #+CMU (:file "cmu-hacks" :depends-on ("package"))))))
389
390
391 ;;; The actual McCLIM system that people should to use in their ASDF
392 ;;; package dependency lists.
393 (defsystem :mcclim
394 :depends-on (:clim-looks))

  ViewVC Help
Powered by ViewVC 1.1.5