I just got this working and figured I would share. I already had gtk2, python25, py25-gtk, etc installed via MacPorts and hoped to find a way to get pyclutter installed and running using my existing environment.

Clutter revisions:
   clutter-0.8.4 (also tested with clutter-0.8.8)
   clutter-cairo-0.8.2
   clutter-gst-0.8.0
   clutter-gtk-0.8.2 (also tested with clutter-gtk-0.8.3)
   pyclutter-0.8.2
System info:
   Macbook Pro
   OS X Leopard 10.5.5
   XCode Tools and X11 installed
   Python 2.5.4 (via MacPorts)
Installed ports (partial list):
   cairo                          @1.8.6          graphics/cairo
   glib2                          @2.18.3         devel/glib2
   gst-plugins-base               @0.10.21        gnome/gst-plugins-base
   gstreamer                      @0.10.21        gnome/gstreamer
   gtk2                           @2.14.7         x11/gtk2
   pango                          @1.22.4         x11/pango
   py25-cairo                     @1.8.2          python/py25-cairo
   py25-gobject                   @2.16.0         python/py25-gobject
   py25-gtk                       @2.12.1         python/py25-gtk
   python25                       @2.5.4          lang/python25
   xorg-libX11                    @1.1.5          x11/xorg-libX11

1) Install clutter:

Because clutter-gtk requires either the glx or win32 backend, we need to build clutter with the glx backend. This requires some tweaking during the configure to use the Apple X11 implementation (originally described here: http://lists.o-hand.com/clutter/1185.html ). There is also an experimental patch to allow clutter-gtk to use the osx backend but I could not get it to work: http://lists.o-hand.com/clutter/1250.html .

a) Because I had the X11 related ports installed, I had to perform the fix described here in order for the X11 libs to link properly: http://trac.macports.org/ticket/17356 . They describe two solutions: rm /usr/X11/lib/*.la or upgrading XQuartz. I did the former. b) ./configure --prefix=/opt/local CFLAGS='-I/usr/X11/include -I/usr/local/include' LDFLAGS='-L/usr/X11/lib -L/opt/local/lib -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:'
c) make
d) sudo make install

2) Install clutter-cairo, clutter-gst, clutter-gtk, pyclutter (pyclutter must be last, obviously):

For each library:
a) ./configure --prefix=/opt/local CFLAGS='-I/usr/X11/include -I/usr/local/include' LDFLAGS='-L/usr/X11/lib -L/opt/local/lib'
b) make
c) sudo make install

Your ./configure for pyclutter should indicate that clutter-cairo, clutter-gst, and clutter-gtk are all enabled. For getting clutter-cairo support under pyclutter, I had problems with py25-cairo @1.8.2_0+darwin_9 and instead used py25-cairo @1.6.4_0+darwin_9. The pyclutter ./configure would not recognize pycairo with 1.8.2_0 installed. I also had trouble with getting pyclutter to detect clutter-cairo 0.8.0 so I ended up using 0.8.2 instead, which worked fine.

After all is said and done, all the examples in pyclutter/examples should work fine, including the gtk one.

Note: I had some trouble with the pyclutter-0.8.2 running clutter-0.8.4 or clutter-0.8.6 compiled --with-flavour=osx. The display rendered okay, but the stage.set_size() invocation in the examples would not work properly. Additionally, the pyclutter examples kept displaying this error:

(cluttertest.py:13372): ClutterOSX-CRITICAL **: clutter_stage_osx_realize: assertion `self->view == NULL && self->window == NULL' failed

This doesn't happen when running the glx flavour through Apple X11, or in pyclutter-0.6.2.

Hope this is useful to someone else!
- Steve
--
To unsubscribe send a mail to [email protected]

Reply via email to