3 (defpackage "CLG-SYSTEM"
4 (:use "COMMON-LISP" "EXTENSIONS" "ALIEN")
5 (:export "*GTK-LIBRARY-PATH*"))
7 (in-package "CLG-SYSTEM")
9 ;; We used to do this, but I think it's better if everybody puts such
10 ;; definitions in his/her own Lisp startup files so that clg.system
11 ;; can be used without local modifications.
13 ; (logical-pathname-translations "clg")
14 ; '(("**;*.*.*" "/home/espen/src/clg/**/*.*.*")))
16 ;; Uncomment and edit the next line if pkg-config needs to search for
17 ;; .pc files in directories other than the default (/usr/lib/pkgconfig)
18 ;(push '(:PKG_CONFIG_PATH . "/opt/gnome/lib/pkgconfig") ext:*environment-list*)
20 (load "clg:tools;config")
21 (load "clg:tools;sharedlib")
23 (defvar *gtk-library-path* (pkg-variable "gtk+-2.0" "libdir"))
24 (defvar *cmucl-include-path* (ext:unix-namestring "target:lisp"))
26 ;; A hack to get around a bug in gdk's init code
27 (defvar argc (make-alien c-call:int))
28 (defvar progname (make-alien c-call:char))
29 (defvar argv0 (make-alien (* c-call:char)))
30 (defvar argv (make-alien (* (* c-call:char))))
32 (setf (deref progname) 0)
33 (setf (deref argv0) progname)
34 (setf (deref argv) argv0)
36 ;; Without this, MAKE uses "CLG:glib;.err" as a namestring, which fails.
37 ;; TODO: Find and fix the bug, then remove this.
38 (setq mk::*cmu-errors-to-file* nil)
44 (pkg-exists-p "glib-2.0" :atleast-version "1.3.9")
45 (pkg-exists-p "pango" :atleast-version "0.20")
46 (pkg-exists-p "gtk+-2.0" :atleast-version "1.3.9"))
47 :source-pathname "clg:"
48 :binary-pathname "clg:"
51 :components ("autoexport"))
52 (:file "pcl" :source-pathname "glib;" :binary-pathname "glib;")
56 (load-shared-library "libglib-1.3.so")
57 (load-shared-library "libgobject-1.3.so" :init "g_type_init"))
64 (:cflags ,(pkg-cflags "glib-2.0")
66 :definitions (#+cmu CMUCL)
67 :include-paths (,*cmucl-include-path*)))
68 (:file "glib-package")
69 (:file "gutils" :depends-on ("glib-package"))
70 (:file "gforeign" :depends-on ("gutils"))
71 (:file "glib" :depends-on ("gforeign"))
72 (:file "proxy" :depends-on ("glib"))
73 (:file "gtype" :depends-on ("proxy"))
74 (:file "gboxed" :depends-on ("gtype"))
75 (:file "genums" :depends-on ("gtype"))
76 (:file "gparam" :depends-on ("genums"))
77 (:file "gobject" :depends-on ("gparam"))
78 (:file "gcallback" :depends-on ("gtype" "gparam" "gobject" "callback"))
81 ("gutils" "glib" "proxy" "gboxed" "gtype" "gparam" "gcallback"
83 :depends-on (tools "pcl"))
85 :source-pathname "gdk;"
86 :binary-pathname "gdk;"
89 (load-shared-library "libgdk_pixbuf-1.3.so")
90 (load-shared-library "libgdk-x11-1.3.so"
93 c-call:void (* c-call:int) (* (* (* char))))
94 :initargs (list argc argv)))
98 :compiler-options (:cflags ,(pkg-cflags "gtk+-2.0")
102 ((:file "gdk-package")
103 (:file "gdk-export" :depends-on ("gdkevents" "gdktypes" "gdk"))
104 (:file "gdktypes" :depends-on ("gdk-package"))
105 (:file "gdkevents" :depends-on ("gdktypes"))
106 (:file "gdk" :depends-on ("gdkevents")))
107 :depends-on (glib "gdkglue"))
109 :initially-do (load-shared-library "libpango.so")
111 ((:file "pango-package")
112 (:file "pango" :depends-on ("pango-package"))
113 (:file "pango-export" :depends-on ("pango")))
116 :source-pathname "gtk;"
117 :binary-pathname "gtk;"
123 :prototype '(function
127 :initargs (list (system:int-sap 0) (system:int-sap 0))))
129 :source-extension "c"
130 :binary-extension "o"
131 :compiler-options (:cflags ,(pkg-cflags "gtk+-2.0")
133 :definitions (#+cmu CMUCL)
134 :include-paths (,*cmucl-include-path*)))
137 ((:file "gtk-package")
138 (:file "gtk-export" :depends-on ("gtktypes" "gtk"))
139 (:file "gtkobject" :depends-on ("gtk-package"))
140 (:file "gtktypes" :depends-on ("gtkobject"))
141 (:file "gtkwidget" :depends-on ("gtktypes"))
142 (:file "gtkcontainer" :depends-on ("gtktypes"))
143 (:file "gtk" :depends-on ("gtktypes"))
144 (:file "gtkutils" :depends-on ("gtk")))
145 :depends-on (glib gdk pango "gtkglue")))))