[mcclim-devel] trivial sbcl/osx gtkairo patch

Cyrus Harmon ch-mcclim at bobobeach.com
Wed May 3 16:53:02 UTC 2006


The following patch allows me to at least launch climacs w/ gtkairo.  
It doesn't quite work as the Escape key maps to { instead of Escape  
for some reason, but it looks pretty.

Oh, the /opt/local/lib/ is the darwinports lib location. The CFFI  
guys probably have a better way to do this.

Cyrus


Index: Backends/gtkairo/gtk-ffi.lisp
===================================================================
RCS file: /project/mcclim/cvsroot/mcclim/Backends/gtkairo/gtk-ffi.lisp,v
retrieving revision 1.5
diff -u -r1.5 gtk-ffi.lisp
--- Backends/gtkairo/gtk-ffi.lisp       2 May 2006 13:00:12  
-0000       1.5
+++ Backends/gtkairo/gtk-ffi.lisp       3 May 2006 16:44:41 -0000
@@ -19,12 +19,19 @@
(in-package :clim-gtkairo)
-#-(or win32 mswindows windows)
+#-(or win32 mswindows windows darwin)
(eval-when (:compile-toplevel :load-toplevel :execute)
    (cffi:load-foreign-library "libcairo.so")
    (cffi:load-foreign-library "libgthread-2.0.so")
    (cffi:load-foreign-library "libgtk-x11-2.0.so"))
+#+darwin
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (pushnew "/opt/local/lib/" cffi:*foreign-library-directories*)
+  (cffi:load-foreign-library "libcairo.dylib")
+  (cffi:load-foreign-library "libgthread-2.0.dylib")
+  (cffi:load-foreign-library "libgtk-x11-2.0.dylib"))
+
#+(or win32 mswindows windows)
(eval-when (:compile-toplevel :load-toplevel :execute)
    (cffi:load-foreign-library "libcairo-2.dll")




More information about the mcclim-devel mailing list