Skip to content
Cecil edited this page Oct 31, 2015 · 1 revision

One can build gtk3 (and gtk2 tags along) without XQuartz. For Shoes 3.3 this would be important if it works. As of Shoes 3.2.23 OSX/Shoes is not built this way.

  • Install the gtk3 stuff
  • Install a custom Ruby
  • Fix Shoes/OSX to use new Ruby and GTK

Gtk 3

I started with these instructions Of course we already have a lot of those dependencies built already so I'll suggest a smaller.

brew install --build-from-source gtk+3 gtk+ librsvg gnome-icon-theme --without-x --without-x11 --with-gtk+3

Hopefully the existing freetype, fontconfig, pango & pangocairo and friends is usable. There were some updates to libraries that I know Shoes 3.2 links against but the above doesn't appear to harm building Shoes 3.2.23 OSX.

/usr/local/bin/gtk3-demo appears to work - mostly. Quitting with the apple keystroke doesn't work on the demo - the gtk2 demo is /usr/local/bin/gtk-demo

Custom Ruby

Even though we can use the RVM installed Ruby, we really should have a Shoes only Ruby to use when building Shoes for distribution. Might as well get current with Ruby 2.2.1.

Download and expand the tgz or tbz in a directory of your choice. For example, I used /Users/ccoupe/shoesdeps/10.10. In there, I created a file cfg-ruby-2.2.1.sh with this content

#!/bin/bash
export PREFIX=/opt/local
./configure \
  --enable-load-relative \
  --enable-shared \
  --disable-install-doc 

The PREFIX choice says where to install the ruby. In this example, I'm going to need to sudo to install and I'll need to set the PATH env properly to test it. The Shoes build just copies and doesn't need write permissions to where Ruby was installed. We will tell the Shoes build where the Ruby we want to use is in a env.rb file which loads a osxgtk-custom.yaml if it exists and it really should exist but that's later.

../cfg-ruby-2.2.1.sh 
make
sudo make install

If you haven't built Ruby before, don't worry if it goes wrong. Expect it. My 2.2.1 ended up in /usr/local/bin so I did something wrong with that PREFIX. I just over wrote the Ruby installed by homebrew. I'm not worried, It'll work out.

Rakefile osxgtk mods

env.rb is based on a linux build because it knows about gtk and EXT_RUBY and the tasks.rb from an osx build because it knows about the install-name-tool dance. What could go wrong?

Clone this wiki locally