Update of /project/lgtk/cvsroot/lgtk In directory common-lisp.net:/tmp/cvs-serv31410
Modified Files: lgtk.asd Log Message: Fixed a few things, and added a bit of gtk functionality.
Date: Wed Nov 5 12:49:55 2003 Author: mmommer
Index: lgtk/lgtk.asd diff -u lgtk/lgtk.asd:1.3 lgtk/lgtk.asd:1.4 --- lgtk/lgtk.asd:1.3 Wed Oct 29 12:59:10 2003 +++ lgtk/lgtk.asd Wed Nov 5 12:49:55 2003 @@ -10,6 +10,8 @@
(in-package :lgtk-asd)
+(defvar *ccompiler* "cc") + ;; Split a string at whitespace. (defun splitatspc (str) (labels ((whitespace-p (c) @@ -45,7 +47,20 @@ ;; insenitive. (splitatspc (read-line str))))))))
-(defvar *ccompiler* "cc") +(defun get-gtk-cflags-list () + (let ((prc (ext:run-program "pkg-config" '("--cflags" "gtk+-2.0") + :output :stream))) + (if (not prc) + (error "Could not run #"pckg-config!") + (let ((str (ext:process-output prc)) + (ecode (ext:process-exit-code prc))) + (if (not (eql ecode 0)) + (error "Could not find gtk+-2.0") + (read-line str)))))) + +(defparameter *gtklibs* (get-gtk-libs-list)) +(defparameter *gtkcflags* (get-gtk-cflags-list)) +(defvar *source-dir* nil)
(defclass gtk-libs-handle (c-source-file) ())
@@ -62,8 +77,9 @@ (error 'operation-error :component c :operation o)))
(defmethod perform ((o load-op) (c gtk-libs-handle)) - (ext:load-foreign (namestring (car (output-files o c))) - :libraries (get-gtk-libs-list))) + (setf *source-dir* (pathname-directory (component-pathname c))) + (ext:load-foreign (namestring (car (output-files o c))) + :libraries *gtklibs*))
(defsystem lgtk :name "lgtk" @@ -79,7 +95,7 @@ ((:file "port") (:file "nexus" :depends-on ("port")) (:file "widgets" :depends-on ("nexus")) - (:file "enums") + (:file "enums" :depends-on ("bindings")) (:file "bindings" :depends-on ("port"))