0d07716f |
1 | ;;; -*- Mode: lisp -*- |
2 | |
ccd3f1eb |
3 | (defpackage "CLG-SYSTEM" |
4 | (:use "COMMON-LISP" "EXTENSIONS" "ALIEN") |
5 | (:export "*GTK-LIBRARY-PATH*")) |
6 | |
7 | (in-package "CLG-SYSTEM") |
8 | |
ea15befb |
9 | ;; Suggested by Marco Antoniotti |
10 | (eval-when (:load-toplevel :execute :compile-toplevel) |
11 | (unless (find-package "MAKE") |
12 | (error "CLG requires the MK:DEFSYSTEM to be properly compiled ~ |
13 | and loaded.~%~ |
14 | You can download MK:DEFSYSTEM from the CLOCC.~@ |
15 | <http://sourceforge.net/projects/clocc/."))) |
16 | |
17 | |
ccd3f1eb |
18 | ;; We used to do this, but I think it's better if everybody puts such |
19 | ;; definitions in his/her own Lisp startup files so that clg.system |
20 | ;; can be used without local modifications. |
21 | ;(setf |
22 | ; (logical-pathname-translations "clg") |
23 | ; '(("**;*.*.*" "/home/espen/src/clg/**/*.*.*"))) |
096f4d91 |
24 | |
25 | ;; Uncomment and edit the next line if pkg-config needs to search for |
26 | ;; .pc files in directories other than the default (/usr/lib/pkgconfig) |
ccd3f1eb |
27 | ;(push '(:PKG_CONFIG_PATH . "/opt/gnome/lib/pkgconfig") ext:*environment-list*) |
0d07716f |
28 | |
29 | (load "clg:tools;config") |
30 | (load "clg:tools;sharedlib") |
31 | |
ccd3f1eb |
32 | (defvar *gtk-library-path* (pkg-variable "gtk+-2.0" "libdir")) |
33 | (defvar *cmucl-include-path* (ext:unix-namestring "target:lisp")) |
096f4d91 |
34 | |
ccd3f1eb |
35 | ;; Without this, MAKE uses "CLG:glib;.err" as a namestring, which fails. |
36 | ;; TODO: Find and fix the bug, then remove this. |
096f4d91 |
37 | (setq mk::*cmu-errors-to-file* nil) |
edb133d2 |
38 | |
ea15befb |
39 | (mk:defsystem clg |
40 | :initially-do |
41 | (progn |
42 | (pkg-exists-p "glib-2.0" :atleast-version "2.0.0") |
43 | (pkg-exists-p "pango" :atleast-version "1.0.0") |
44 | (pkg-exists-p "atk" :atleast-version "1.0.0") |
45 | (pkg-exists-p "gtk+-2.0" :atleast-version "2.0.0")) |
46 | :source-pathname "clg:" |
47 | :binary-pathname "clg:" |
48 | :components |
49 | ((:module tools |
50 | :components ("autoexport")) |
51 | (:file "pcl" :source-pathname "glib;" :binary-pathname "glib;") |
52 | (:module glib |
53 | :initially-do |
54 | (progn |
55 | (load-shared-library "libglib-2.0.so") |
56 | (load-shared-library "libgobject-2.0.so" :init "g_type_init")) |
57 | :components |
58 | ((:file "callback" |
59 | :language :c |
60 | :source-extension "c" |
61 | :binary-extension "o" |
62 | :compiler-options (:cflags #.(pkg-cflags "glib-2.0") |
63 | :optimize 2 |
64 | :definitions (#+cmu CMUCL) |
65 | :include-paths (#.*cmucl-include-path*))) |
66 | (:file "glib-package") |
67 | (:file "gutils" :depends-on ("glib-package")) |
68 | (:file "gforeign" :depends-on ("gutils")) |
69 | (:file "glib" :depends-on ("gforeign")) |
70 | (:file "proxy" :depends-on ("glib")) |
71 | (:file "gtype" :depends-on ("proxy")) |
72 | (:file "gboxed" :depends-on ("gtype")) |
73 | (:file "genums" :depends-on ("gtype")) |
74 | (:file "gparam" :depends-on ("genums")) |
75 | (:file "ginterface" :depends-on ("gtype")) |
76 | (:file "gobject" :depends-on ("gparam")) |
77 | (:file "gcallback" :depends-on ("gtype" "gparam" "gobject" "callback")) |
78 | (:file "glib-export" :depends-on ("gutils" "glib" "proxy" "gboxed" "gtype" |
79 | "gparam" "gcallback" "genums" "gobject"))) |
80 | :depends-on (tools "pcl")) |
81 | (:file "gdkglue" |
82 | :source-pathname "gdk;" |
83 | :binary-pathname "gdk;" |
84 | :initially-do |
85 | (progn |
86 | (load-shared-library "libgdk_pixbuf-2.0.so") |
87 | (load-shared-library "libgdk-x11-2.0.so" |
88 | :init "gdk_init" |
89 | :prototype '(function |
90 | c-call:void |
91 | system-area-pointer |
92 | system-area-pointer) |
93 | :initargs (list (system:int-sap 0) (system:int-sap 0)))) |
94 | :language :c |
95 | :source-extension "c" |
96 | :binary-extension "o" |
97 | :compiler-options (:cflags #.(pkg-cflags "gtk+-2.0") |
98 | :optimize 2)) |
99 | (:module gdk |
100 | :components |
101 | ((:file "gdk-package") |
102 | (:file "gdk-export" :depends-on ("gdkevents" "gdktypes" "gdk")) |
103 | (:file "gdktypes" :depends-on ("gdk-package")) |
104 | (:file "gdkevents" :depends-on ("gdktypes")) |
105 | (:file "gdk" :depends-on ("gdkevents"))) |
106 | :depends-on (glib "gdkglue")) |
107 | (:module pango |
108 | :initially-do (load-shared-library "libpango-1.0.so") |
109 | :components |
110 | ((:file "pango-package") |
111 | (:file "pango" :depends-on ("pango-package")) |
112 | (:file "pango-export" :depends-on ("pango"))) |
113 | :depends-on (glib)) |
114 | (:module atk |
115 | :initially-do (load-shared-library "libatk-1.0.so") |
116 | :components |
117 | ((:file "atk-package") |
118 | (:file "atk" :depends-on ("atk-package")) |
119 | (:file "atk-export" :depends-on ("atk"))) |
120 | :depends-on (glib)) |
121 | (:file "gtkglue" |
122 | :source-pathname "gtk;" |
123 | :binary-pathname "gtk;" |
124 | :initially-do |
125 | (progn |
126 | (load-shared-library |
127 | "libgtk-x11-2.0.so" |
128 | :init "gtk_init" |
129 | :prototype '(function |
130 | c-call:void |
131 | system-area-pointer |
132 | system-area-pointer) |
133 | :initargs (list (system:int-sap 0) (system:int-sap 0)))) |
134 | :language :c |
135 | :source-extension "c" |
136 | :binary-extension "o" |
137 | :compiler-options (:cflags #.(pkg-cflags "gtk+-2.0") |
138 | :optimize 2 |
139 | :definitions (#+cmu CMUCL) |
140 | :include-paths (#.*cmucl-include-path*))) |
141 | (:module gtk |
142 | :components |
143 | ((:file "gtk-package") |
144 | (:file "gtk-export" :depends-on ("gtktypes" "gtk")) |
145 | (:file "gtkobject" :depends-on ("gtk-package")) |
146 | (:file "gtktypes" :depends-on ("gtkobject")) |
147 | (:file "gtkwidget" :depends-on ("gtktypes")) |
148 | (:file "gtkcontainer" :depends-on ("gtktypes")) |
149 | (:file "gtk" :depends-on ("gtktypes")) |
150 | (:file "gtkutils" :depends-on ("gtk"))) |
151 | :depends-on (glib gdk pango atk "gtkglue")))) |