546f03e8 |
1 | ;;; -*- Mode: lisp -*- |
2 | |
3 | (asdf:oos 'asdf:load-op :clg-tools) |
4 | |
5 | (defpackage "GLIB-SYSTEM" |
6baf860c |
6 | (:use "COMMON-LISP" "ASDF" "PKG-CONFIG")) |
546f03e8 |
7 | |
3d36c5d6 |
8 | #+cmu(ext:unlock-all-packages) |
9 | #+sbcl |
10 | (progn |
11 | (sb-ext:unlock-package "COMMON-LISP") |
12 | (sb-ext:unlock-package "SB-PCL")) |
546f03e8 |
13 | |
14 | ;;; Better put this in ~/.cmucl-init.lisp or some other file read at startup |
15 | ;; (setf |
16 | ;; (logical-pathname-translations "clg") |
17 | ;; '(("**;*.*.*" "/home/espen/src/clg/**/"))) |
18 | |
546f03e8 |
19 | (in-package "GLIB-SYSTEM") |
20 | |
21 | (pkg-exists-p "glib-2.0" :atleast-version "2.4.0") |
22 | |
0b311c61 |
23 | (when (pkg-exists-p "glib-2.0" :atleast-version "2.6.0" :error nil) |
2a98be27 |
24 | (push :glib2.6 *features*)) |
546f03e8 |
25 | |
0b311c61 |
26 | (when (pkg-exists-p "glib-2.0" :atleast-version "2.8.0" :error nil) |
2db5185d |
27 | (push :glib2.8 *features*)) |
28 | |
3d2378de |
29 | #+sbcl |
a968b115 |
30 | (progn |
0b311c61 |
31 | (when (sbcl>= 0 9 8) |
a968b115 |
32 | (push :sbcl>=0.9.8 *features*)) |
0b311c61 |
33 | (when (sbcl>= 0 9 10) |
a968b115 |
34 | (push :sbcl>=0.9.10 *features*))) |
3d2378de |
35 | |
ee878ebf |
36 | #+(and sbcl (not alien-callbacks)) |
37 | (eval-when (:compile-toplevel :load-toplevel :execute) |
38 | (unless (find-symbol "DEFINE-ALIEN-FUNCTION" "SB-ALIEN") |
39 | (error "You need to upgrade SBCL to a version with native C callback support or see the README file about how to add third party callbacks to your current SBCL version."))) |
40 | |
41 | #+(and sbcl alien-callbacks) |
42 | (eval-when (:compile-toplevel :load-toplevel :execute) |
43 | (when (find-symbol "DEFINE-ALIEN-FUNCTION" "SB-ALIEN") |
44 | (error "Third party C callback code detected in a SBCL image with native callback support. As clg now uses native callbacks when available, you need to use a \"clean\" core file."))) |
45 | |
46 | |
546f03e8 |
47 | (defsystem glib |
48 | :depends-on (clg-tools) |
49 | :components ((:file "defpackage") |
0259416b |
50 | #+(and cmu (not non-broken-pcl) (not cmu19b))(:file "pcl") |
2a98be27 |
51 | ;; For preloading to work in glib 2.6, the library needs to |
52 | ;; be configured and build with '--disable-visibility' |
53 | (:unix-dso "preload" |
54 | :components ((:c-source-file "logging" |
55 | :cflags #.(pkg-cflags "glib-2.0")))) |
32e57b64 |
56 | (:library "libglib-2.0" |
2a98be27 |
57 | :libdir #.(pkg-variable "glib-2.0" "libdir") |
58 | :depends-on ("preload")) |
32e57b64 |
59 | (:library "libgobject-2.0" |
60 | :libdir #.(pkg-variable "glib-2.0" "libdir") |
61 | :depends-on ("libglib-2.0")) |
3d36c5d6 |
62 | (:unix-dso "alien" |
63 | :components ((:c-source-file "callback" |
64 | :cflags #.(pkg-cflags "glib-2.0")) |
65 | (:c-source-file "gobject" |
66 | :cflags #.(pkg-cflags "glib-2.0"))) |
67 | :depends-on ("libgobject-2.0")) |
546f03e8 |
68 | (:file "utils" :depends-on ("defpackage")) |
32e57b64 |
69 | (:file "ffi" :depends-on ("utils")) |
70 | (:file "glib" :depends-on ("ffi" "libglib-2.0")) |
0259416b |
71 | (:file "proxy" :depends-on (#+(and cmu (not non-broken-pcl) (not cmu19b))"pcl" "glib")) |
3d36c5d6 |
72 | (:file "gtype" :depends-on ("proxy" "alien" "libgobject-2.0")) |
546f03e8 |
73 | (:file "gboxed" :depends-on ("gtype")) |
74 | (:file "genums" :depends-on ("gtype")) |
75 | (:file "gparam" :depends-on ("genums")) |
546f03e8 |
76 | (:file "gobject" :depends-on ("gparam")) |
32e57b64 |
77 | (:file "ginterface" :depends-on ("gobject")) |
546f03e8 |
78 | (:file "gcallback" :depends-on ("gtype" "gparam" "gobject" "alien")) |
2a98be27 |
79 | (:file "gerror" :depends-on ("gcallback")) |
80 | (:file "export" :depends-on ("utils" "glib" "proxy" "gboxed" "gtype" "gparam" "gcallback" "genums" "gobject" "gerror")))) |