[lgtk-cvs] CVS update: lgtk/INSTALL.txt lgtk/README.txt lgtk/lgtk.asd

Mario Mommer mmommer at common-lisp.net
Thu Dec 11 10:48:00 UTC 2003


Update of /project/lgtk/cvsroot/lgtk
In directory common-lisp.net:/tmp/cvs-serv31311/lgtk

Modified Files:
	INSTALL.txt README.txt lgtk.asd 
Log Message:
Merged back the sbcl-port branch

Date: Thu Dec 11 05:48:00 2003
Author: mmommer

Index: lgtk/INSTALL.txt
diff -u lgtk/INSTALL.txt:1.2 lgtk/INSTALL.txt:1.3
--- lgtk/INSTALL.txt:1.2	Wed Oct 29 12:20:44 2003
+++ lgtk/INSTALL.txt	Thu Dec 11 05:47:59 2003
@@ -1,11 +1,17 @@
 	How to install lgtk, a gtk+ interface for Common Lisp
       ---------------------------------------------------------
 
-You need the following things:
+If you want to use lgtk with SBCL, read
+
+     http://www.caddr.com/macho/archives/clump/2003-12/360.html
+
+for instructons.
+
+Otherwise, you will need the following things:
 
     * The source code.
 
-    * Preferably, CMUCL 19a.
+    * Preferably, CMUCL 19a, or an SBCL with callback support.
 
       Alternatively, you need a CMUCL 18e core with callback
       support. You should grab a copy of Helmut Eller's callback.lisp


Index: lgtk/README.txt
diff -u lgtk/README.txt:1.1.1.1 lgtk/README.txt:1.2
--- lgtk/README.txt:1.1.1.1	Mon Oct 27 14:14:40 2003
+++ lgtk/README.txt	Thu Dec 11 05:47:59 2003
@@ -33,8 +33,8 @@
 
     * Multithreading support.
 
-    * Portablilty. For now it only runs on CMUCL. It should not be too
-      difficult to port to other implementations, though.
+    * Portablilty. For now it only runs on CMUCL and SBCL. It should
+      not be too difficult to port to other implementations, though.
 
     * Add missing functionality. That is quite a bit at the moment.
 


Index: lgtk/lgtk.asd
diff -u lgtk/lgtk.asd:1.7 lgtk/lgtk.asd:1.8
--- lgtk/lgtk.asd:1.7	Sun Nov  9 12:32:45 2003
+++ lgtk/lgtk.asd	Thu Dec 11 05:47:59 2003
@@ -6,7 +6,7 @@
 ;; advertising clause"). See the file COPYING for details.
 
 (defpackage #:lgtk-asd
-  (:use :cl :asdf))
+  (:use :cl :asdf #+cmu :ext #+sbcl :sb-ext #+sbcl :sb-alien))
 
 (in-package :lgtk-asd)
 
@@ -31,14 +31,20 @@
 
       (cdr buf))))
 
+(defun pkg-config-lib-string ()
+  #+sbcl (run-program "pkg-config" '("--libs" "gtk+-2.0")
+		      :search t
+		      :output :stream)
+  #+cmu (ext:run-program "pkg-config" '("--libs" "gtk+-2.0")
+			  :output :stream))
+
 ;; Get the list of libraries.
 (defun get-gtk-libs-list ()
-  (let ((prc (ext:run-program "pkg-config" '("--libs" "gtk+-2.0")
-			  :output :stream)))
+  (let ((prc (pkg-config-lib-string)))
     (if (not prc)
-	(error "Could not run #\"pckg-config!")
-      (let ((str (ext:process-output prc))
-	    (ecode (ext:process-exit-code prc)))
+	(error "Could not run #\"pkg-config!")
+      (let ((str (process-output prc))
+	    (ecode (process-exit-code prc)))
 	(if (not (eql ecode 0))
 	    (error "Could not find gtk+-2.0")
 	  (remove-if ;; Remove options which do not specify a lib
@@ -47,13 +53,20 @@
 						   ;; insenitive.
 	   (splitatspc (read-line str))))))))
 
+
+(defun pkg-config-cflags-string ()
+  #+sbcl (run-program "pkg-config" '("--cflags" "gtk+-2.0")
+		      :search t
+		      :output :stream)
+  #+cmu (ext:run-program "pkg-config" '("--cflags" "gtk+-2.0")
+			  :output :stream))
+
 (defun get-gtk-cflags-list ()
-  (let ((prc (ext:run-program "pkg-config" '("--cflags" "gtk+-2.0")
-			  :output :stream)))
+  (let ((prc (pkg-config-cflags-string)))
     (if (not prc)
 	(error "Could not run #\"pckg-config!")
-      (let ((str (ext:process-output prc))
-	    (ecode (ext:process-exit-code prc)))
+      (let ((str (process-output prc))
+	    (ecode (process-exit-code prc)))
 	(if (not (eql ecode 0))
 	    (error "Could not find gtk+-2.0")
 	  (read-line str))))))
@@ -78,8 +91,8 @@
 
 (defmethod perform ((o load-op) (c gtk-libs-handle))
   (setf *source-dir* (pathname-directory (component-pathname c)))
-  (ext:load-foreign (namestring (car (output-files o c)))
-		    :libraries *gtklibs*))
+  (load-foreign (namestring (car (output-files o c)))
+		:libraries *gtklibs*))
 
 (defsystem lgtk
   :name "lgtk"
@@ -95,7 +108,7 @@
 	    ((:file "port")
 	     (:file "nexus" :depends-on ("port"))
 	     (:file "widgets" :depends-on ("nexus"))
-	     (:file "dynaslot" :depends-on ("bindings" "nexus"))
+	     (:file "dynaslot" :depends-on ("bindings" "nexus" "port"))
 	     (:file "enums" :depends-on ("bindings"))
 	     (:file "bindings" :depends-on ("port"))
 
@@ -114,3 +127,9 @@
 					       "libhandle"))
 	     (:file "gtknexus" :depends-on ("gtkbindings"))
 	     (:file "gtklisp" :depends-on ("gtknexus"))))))
+
+;; On 2003.12.10, load-foreign was put in deathrow by the sbcl
+;; developers. The following comment was made by Krystof_ and is
+;; probably going to help minimize the impact: "cmucl's load-foreign
+;; on linux runs ld -G -o /tmp/RANDOM --whole-archive file1.a file2.o
+;; file3.so --no-whole-archive -lfoo -lbar"





More information about the Lgtk-cvs mailing list