560af5c5 |
1 | ;;; -*- Mode: lisp -*- |
2 | |
3 | (setf |
4 | (logical-pathname-translations "clg") |
5 | '(("**;*.*.*" "/home/espen/src/clg/**/*.*.*"))) |
d67f8348 |
6 | |
7 | ;; Uncomment and edit the next line if pkg-config needs to search for |
8 | ;; .pc files in directories other than the default (/usr/lib/pkgconfig) |
f784870f |
9 | :(push '(:PKG_CONFIG_PATH . "/opt/gnome/lib/pkgconfig") ext:*environment-list*) |
560af5c5 |
10 | |
11 | (load "clg:tools;config") |
12 | (load "clg:tools;sharedlib") |
13 | |
14 | (import 'alien:load-shared-library) |
15 | |
d67f8348 |
16 | (defvar gtk-library-path (pkg-variable "gtk+-2.0" "libdir")) |
17 | (defvar cmucl-include-path "/usr/src/cmucl-2.4.20/src/lisp") |
18 | |
19 | |
3b211135 |
20 | ;; A hack to get around a bug in gdk's init code |
21 | (defvar argc (alien:make-alien c-call:int)) |
22 | (defvar progname (alien:make-alien c-call:char)) |
23 | (defvar argv0 (alien:make-alien (* c-call:char))) |
24 | (defvar argv (alien:make-alien (* (* c-call:char)))) |
25 | (setf (alien:deref argc) 1) |
26 | (setf (alien:deref progname) 0) |
27 | (setf (alien:deref argv0) progname) |
28 | (setf (alien:deref argv) argv0) |
29 | |
d67f8348 |
30 | (setq mk::*cmu-errors-to-file* nil) |
3b211135 |
31 | |
560af5c5 |
32 | (eval |
33 | `(mk:defsystem clg |
d67f8348 |
34 | :initially-do |
35 | (progn |
36 | (pkg-exists-p "glib-2.0" :atleast-version "1.3.9") |
37 | (pkg-exists-p "pango" :atleast-version "0.20") |
38 | (pkg-exists-p "gtk+-2.0" :atleast-version "1.3.9")) |
560af5c5 |
39 | :source-pathname "clg:" |
40 | :binary-pathname "clg:" |
41 | :components |
42 | ((:module tools |
43 | :components ("autoexport")) |
1cd312d1 |
44 | (:file "pcl" :source-pathname "glib;" :binary-pathname "glib;") |
560af5c5 |
45 | (:module glib |
46 | :initially-do |
47 | (progn |
d67f8348 |
48 | (load-shared-library "libglib-1.3.so") |
49 | (load-shared-library "libgobject-1.3.so" :init "g_type_init")) |
560af5c5 |
50 | :components |
522b39c1 |
51 | ((:file "callback" |
52 | :language :c |
d67f8348 |
53 | :source-extension "c" |
54 | :binary-extension "o" |
522b39c1 |
55 | :compiler-options |
85482331 |
56 | (:cflags ,(pkg-cflags "glib-2.0") |
522b39c1 |
57 | :optimize 2 |
58 | :definitions (#+cmu CMUCL) |
d67f8348 |
59 | :include-paths (,cmucl-include-path))) |
522b39c1 |
60 | (:file "glib-package") |
560af5c5 |
61 | (:file "gutils" :depends-on ("glib-package")) |
62 | (:file "gforeign" :depends-on ("gutils")) |
63 | (:file "glib" :depends-on ("gforeign")) |
85482331 |
64 | (:file "proxy" :depends-on ("glib")) |
65 | (:file "gtype" :depends-on ("proxy")) |
66 | (:file "gboxed" :depends-on ("gtype")) |
85482331 |
67 | (:file "genums" :depends-on ("gtype")) |
68 | (:file "gparam" :depends-on ("genums")) |
69 | (:file "gobject" :depends-on ("gparam")) |
3b211135 |
70 | (:file "gcallback" :depends-on ("gtype" "gparam" "gobject" "callback")) |
522b39c1 |
71 | (:file "glib-export" |
85482331 |
72 | :depends-on |
73 | ("gutils" "glib" "proxy" "gboxed" "gtype" "gparam" "gcallback" |
74 | "genums" "gobject"))) |
1cd312d1 |
75 | :depends-on (tools "pcl")) |
560af5c5 |
76 | (:file "gdkglue" |
77 | :source-pathname "gdk;" |
78 | :binary-pathname "gdk;" |
79 | :initially-do |
80 | (progn |
d67f8348 |
81 | (load-shared-library "libgdk_pixbuf-1.3.so") |
82 | (load-shared-library "libgdk-x11-1.3.so" |
85482331 |
83 | :init "gdk_init" |
560af5c5 |
84 | :prototype '(function |
3b211135 |
85 | c-call:void (* c-call:int) (* (* (* char)))) |
86 | :initargs (list argc argv))) |
560af5c5 |
87 | :language :c |
d67f8348 |
88 | :source-extension "c" |
89 | :binary-extension "o" |
85482331 |
90 | :compiler-options (:cflags ,(pkg-cflags "gtk+-2.0") |
91 | :optimize 2)) |
560af5c5 |
92 | (:module gdk |
85482331 |
93 | :components |
94 | ((:file "gdk-package") |
95 | (:file "gdk-export" :depends-on ("gdkevents" "gdktypes" "gdk")) |
96 | (:file "gdktypes" :depends-on ("gdk-package")) |
97 | (:file "gdkevents" :depends-on ("gdktypes")) |
98 | (:file "gdk" :depends-on ("gdkevents"))) |
99 | :depends-on (glib "gdkglue")) |
1cd312d1 |
100 | (:module pango |
d67f8348 |
101 | :initially-do (load-shared-library "libpango.so") |
1cd312d1 |
102 | :components |
103 | ((:file "pango-package") |
104 | (:file "pango" :depends-on ("pango-package")) |
105 | (:file "pango-export" :depends-on ("pango"))) |
106 | :depends-on (glib)) |
560af5c5 |
107 | (:file "gtkglue" |
108 | :source-pathname "gtk;" |
109 | :binary-pathname "gtk;" |
85482331 |
110 | :initially-do |
111 | (progn |
112 | (load-shared-library |
d67f8348 |
113 | "libgtk-x11-1.3.so" |
85482331 |
114 | :init "gtk_init" |
115 | :prototype '(function |
116 | c-call:void |
117 | alien:system-area-pointer |
118 | alien:system-area-pointer) |
119 | :initargs (list (system:int-sap 0) (system:int-sap 0)))) |
560af5c5 |
120 | :language :c |
d67f8348 |
121 | :source-extension "c" |
122 | :binary-extension "o" |
85482331 |
123 | :compiler-options (:cflags ,(pkg-cflags "gtk+-2.0") |
560af5c5 |
124 | :optimize 2 |
125 | :definitions (#+cmu CMUCL) |
d67f8348 |
126 | :include-paths (,cmucl-include-path))) |
560af5c5 |
127 | (:module gtk |
128 | :components |
129 | ((:file "gtk-package") |
1b1bddb3 |
130 | (:file "gtk-export" :depends-on ("gtktypes" "gtk")) |
1cd312d1 |
131 | (:file "gtkobject" :depends-on ("gtk-package")) |
132 | (:file "gtktypes" :depends-on ("gtkobject")) |
133 | (:file "gtkwidget" :depends-on ("gtktypes")) |
134 | (:file "gtkcontainer" :depends-on ("gtktypes")) |
1b1bddb3 |
135 | (:file "gtk" :depends-on ("gtktypes")) |
136 | (:file "gtkutils" :depends-on ("gtk"))) |
1cd312d1 |
137 | :depends-on (glib gdk pango "gtkglue"))))) |
560af5c5 |
138 | |
8eab371b |
139 | |
140 | |