Workaround for bug in gdk's init code
[clg] / clg.system
CommitLineData
0d07716f 1;;; -*- Mode: lisp -*-
2
3(setf
4 (logical-pathname-translations "clg")
5 '(("**;*.*.*" "/home/espen/src/clg/**/*.*.*")))
6(setq mk::*cmu-errors-to-file* nil)
45eacdd2 7(push '(:PKG_CONFIG_PATH . "/opt/gnome/lib/pkgconfig") ext:*environment-list*)
0d07716f 8
9(load "clg:tools;config")
10(load "clg:tools;sharedlib")
11
12(import 'alien:load-shared-library)
13
edb133d2 14;; A hack to get around a bug in gdk's init code
15(defvar argc (alien:make-alien c-call:int))
16(defvar progname (alien:make-alien c-call:char))
17(defvar argv0 (alien:make-alien (* c-call:char)))
18(defvar argv (alien:make-alien (* (* c-call:char))))
19(setf (alien:deref argc) 1)
20(setf (alien:deref progname) 0)
21(setf (alien:deref argv0) progname)
22(setf (alien:deref argv) argv0)
23
24
0d07716f 25(eval
26 `(mk:defsystem clg
27 :source-pathname "clg:"
28 :binary-pathname "clg:"
29 :components
30 ((:module tools
31 :components ("autoexport"))
45eacdd2 32 (:file "pcl" :source-pathname "glib;" :binary-pathname "glib;")
0d07716f 33 (:module glib
34 :initially-do
35 (progn
edb133d2 36 (load-shared-library "libglib-1.3.so.9")
37 (load-shared-library "libgobject-1.3.so.9" :init "g_type_init"))
0d07716f 38 :components
552f98a1 39 ((:file "callback"
40 :language :c
41 :compiler-options
5ea59051 42 (:cflags ,(pkg-cflags "glib-2.0")
552f98a1 43 :optimize 2
44 :definitions (#+cmu CMUCL)
45 :include-paths ("/usr/src/cmucl-2.4.20/src/lisp")))
46 (:file "glib-package")
0d07716f 47 (:file "gutils" :depends-on ("glib-package"))
48 (:file "gforeign" :depends-on ("gutils"))
49 (:file "glib" :depends-on ("gforeign"))
5ea59051 50 (:file "proxy" :depends-on ("glib"))
51 (:file "gtype" :depends-on ("proxy"))
52 (:file "gboxed" :depends-on ("gtype"))
5ea59051 53 (:file "genums" :depends-on ("gtype"))
54 (:file "gparam" :depends-on ("genums"))
55 (:file "gobject" :depends-on ("gparam"))
edb133d2 56 (:file "gcallback" :depends-on ("gtype" "gparam" "gobject" "callback"))
552f98a1 57 (:file "glib-export"
5ea59051 58 :depends-on
59 ("gutils" "glib" "proxy" "gboxed" "gtype" "gparam" "gcallback"
60 "genums" "gobject")))
45eacdd2 61 :depends-on (tools "pcl"))
0d07716f 62 (:file "gdkglue"
63 :source-pathname "gdk;"
64 :binary-pathname "gdk;"
65 :initially-do
66 (progn
edb133d2 67 (load-shared-library "libgdk_pixbuf-1.3.so.9")
68 (load-shared-library "libgdk-x11-1.3.so.9"
5ea59051 69 :init "gdk_init"
0d07716f 70 :prototype '(function
edb133d2 71 c-call:void (* c-call:int) (* (* (* char))))
72 :initargs (list argc argv)))
0d07716f 73 :language :c
5ea59051 74 :compiler-options (:cflags ,(pkg-cflags "gtk+-2.0")
75 :optimize 2))
0d07716f 76 (:module gdk
5ea59051 77 :components
78 ((:file "gdk-package")
79 (:file "gdk-export" :depends-on ("gdkevents" "gdktypes" "gdk"))
80 (:file "gdktypes" :depends-on ("gdk-package"))
81 (:file "gdkevents" :depends-on ("gdktypes"))
82 (:file "gdk" :depends-on ("gdkevents")))
83 :depends-on (glib "gdkglue"))
45eacdd2 84 (:module pango
edb133d2 85 :initially-do (load-shared-library "libpango-0.20.so")
45eacdd2 86 :components
87 ((:file "pango-package")
88 (:file "pango" :depends-on ("pango-package"))
89 (:file "pango-export" :depends-on ("pango")))
90 :depends-on (glib))
0d07716f 91 (:file "gtkglue"
92 :source-pathname "gtk;"
93 :binary-pathname "gtk;"
5ea59051 94 :initially-do
95 (progn
96 (load-shared-library
edb133d2 97 "libgtk-x11-1.3.so.9"
5ea59051 98 :init "gtk_init"
99 :prototype '(function
100 c-call:void
101 alien:system-area-pointer
102 alien:system-area-pointer)
103 :initargs (list (system:int-sap 0) (system:int-sap 0))))
0d07716f 104 :language :c
5ea59051 105 :compiler-options (:cflags ,(pkg-cflags "gtk+-2.0")
0d07716f 106 :optimize 2
107 :definitions (#+cmu CMUCL)
108 :include-paths ("/usr/lib/cmucl")))
109 (:module gtk
110 :components
111 ((:file "gtk-package")
57398331 112 (:file "gtk-export" :depends-on ("gtktypes" "gtk"))
45eacdd2 113 (:file "gtkobject" :depends-on ("gtk-package"))
114 (:file "gtktypes" :depends-on ("gtkobject"))
115 (:file "gtkwidget" :depends-on ("gtktypes"))
116 (:file "gtkcontainer" :depends-on ("gtktypes"))
57398331 117 (:file "gtk" :depends-on ("gtktypes"))
118 (:file "gtkutils" :depends-on ("gtk")))
45eacdd2 119 :depends-on (glib gdk pango "gtkglue")))))
0d07716f 120
856e2b87 121
122