chiark / gitweb /
Added support for Atk and GInterface
[clg] / clg.system
CommitLineData
560af5c5 1;;; -*- Mode: lisp -*-
2
95f727fa 3(defpackage "CLG-SYSTEM"
4 (:use "COMMON-LISP" "EXTENSIONS" "ALIEN")
5 (:export "*GTK-LIBRARY-PATH*"))
6
7(in-package "CLG-SYSTEM")
8
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.
12;(setf
13; (logical-pathname-translations "clg")
14; '(("**;*.*.*" "/home/espen/src/clg/**/*.*.*")))
d67f8348 15
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)
95f727fa 18;(push '(:PKG_CONFIG_PATH . "/opt/gnome/lib/pkgconfig") ext:*environment-list*)
560af5c5 19
20(load "clg:tools;config")
21(load "clg:tools;sharedlib")
22
95f727fa 23(defvar *gtk-library-path* (pkg-variable "gtk+-2.0" "libdir"))
24(defvar *cmucl-include-path* (ext:unix-namestring "target:lisp"))
d67f8348 25
95f727fa 26;; Without this, MAKE uses "CLG:glib;.err" as a namestring, which fails.
27;; TODO: Find and fix the bug, then remove this.
d67f8348 28(setq mk::*cmu-errors-to-file* nil)
3b211135 29
560af5c5 30(eval
31 `(mk:defsystem clg
d67f8348 32 :initially-do
33 (progn
ee51436c 34 (pkg-exists-p "glib-2.0" :atleast-version "1.3.12")
35 (pkg-exists-p "pango" :atleast-version "0.23")
936b4446 36 (pkg-exists-p "atk" :atleast-version "0.8")
ee51436c 37 (pkg-exists-p "gtk+-2.0" :atleast-version "1.3.12"))
560af5c5 38 :source-pathname "clg:"
39 :binary-pathname "clg:"
40 :components
41 ((:module tools
42 :components ("autoexport"))
1cd312d1 43 (:file "pcl" :source-pathname "glib;" :binary-pathname "glib;")
560af5c5 44 (:module glib
45 :initially-do
46 (progn
d67f8348 47 (load-shared-library "libglib-1.3.so")
48 (load-shared-library "libgobject-1.3.so" :init "g_type_init"))
560af5c5 49 :components
522b39c1 50 ((:file "callback"
51 :language :c
d67f8348 52 :source-extension "c"
53 :binary-extension "o"
522b39c1 54 :compiler-options
85482331 55 (:cflags ,(pkg-cflags "glib-2.0")
522b39c1 56 :optimize 2
57 :definitions (#+cmu CMUCL)
95f727fa 58 :include-paths (,*cmucl-include-path*)))
522b39c1 59 (:file "glib-package")
560af5c5 60 (:file "gutils" :depends-on ("glib-package"))
61 (:file "gforeign" :depends-on ("gutils"))
62 (:file "glib" :depends-on ("gforeign"))
85482331 63 (:file "proxy" :depends-on ("glib"))
64 (:file "gtype" :depends-on ("proxy"))
65 (:file "gboxed" :depends-on ("gtype"))
85482331 66 (:file "genums" :depends-on ("gtype"))
67 (:file "gparam" :depends-on ("genums"))
936b4446 68 (:file "ginterface" :depends-on ("gtype"))
85482331 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
ee51436c 85 c-call:void
86 system-area-pointer
87 system-area-pointer)
88 :initargs (list (system:int-sap 0) (system:int-sap 0))))
560af5c5 89 :language :c
d67f8348 90 :source-extension "c"
91 :binary-extension "o"
85482331 92 :compiler-options (:cflags ,(pkg-cflags "gtk+-2.0")
93 :optimize 2))
560af5c5 94 (:module gdk
85482331 95 :components
96 ((:file "gdk-package")
97 (:file "gdk-export" :depends-on ("gdkevents" "gdktypes" "gdk"))
98 (:file "gdktypes" :depends-on ("gdk-package"))
99 (:file "gdkevents" :depends-on ("gdktypes"))
100 (:file "gdk" :depends-on ("gdkevents")))
101 :depends-on (glib "gdkglue"))
1cd312d1 102 (:module pango
d67f8348 103 :initially-do (load-shared-library "libpango.so")
1cd312d1 104 :components
105 ((:file "pango-package")
106 (:file "pango" :depends-on ("pango-package"))
107 (:file "pango-export" :depends-on ("pango")))
108 :depends-on (glib))
936b4446 109 (:module atk
110 :initially-do (load-shared-library "libatk.so")
111 :components
112 ((:file "atk-package")
113 (:file "atk" :depends-on ("atk-package"))
114 (:file "atk-export" :depends-on ("atk")))
115 :depends-on (glib))
560af5c5 116 (:file "gtkglue"
117 :source-pathname "gtk;"
118 :binary-pathname "gtk;"
85482331 119 :initially-do
120 (progn
121 (load-shared-library
d67f8348 122 "libgtk-x11-1.3.so"
85482331 123 :init "gtk_init"
124 :prototype '(function
125 c-call:void
95f727fa 126 system-area-pointer
127 system-area-pointer)
85482331 128 :initargs (list (system:int-sap 0) (system:int-sap 0))))
560af5c5 129 :language :c
d67f8348 130 :source-extension "c"
131 :binary-extension "o"
85482331 132 :compiler-options (:cflags ,(pkg-cflags "gtk+-2.0")
560af5c5 133 :optimize 2
134 :definitions (#+cmu CMUCL)
95f727fa 135 :include-paths (,*cmucl-include-path*)))
560af5c5 136 (:module gtk
137 :components
138 ((:file "gtk-package")
1b1bddb3 139 (:file "gtk-export" :depends-on ("gtktypes" "gtk"))
1cd312d1 140 (:file "gtkobject" :depends-on ("gtk-package"))
141 (:file "gtktypes" :depends-on ("gtkobject"))
142 (:file "gtkwidget" :depends-on ("gtktypes"))
143 (:file "gtkcontainer" :depends-on ("gtktypes"))
1b1bddb3 144 (:file "gtk" :depends-on ("gtktypes"))
145 (:file "gtkutils" :depends-on ("gtk")))
936b4446 146 :depends-on (glib gdk pango atk "gtkglue")))))