Building Shoes on OS X (From Scratch)

Beware, these instructions are pretty long. First, try the BuildingShoes page for the quicker route to your own nightly build.

  1. Build pkg-config.
 #!ShellExample
 $ ./configure --prefix=/tmp/dep
 $ make && make install
 $ export MACOSX_DEPLOYMENT_TARGET=10.3
 $ export PATH=/tmp/dep/bin:$PATH
 $ export CFLAGS=-I/tmp/dep/include
 $ export LDFLAGS=-L/tmp/dep/lib
 $ export PKG_CONFIG_PATH=/tmp/dep/lib/pkgconfig
  1. Build libpng.
 #!ShellExample
 $ cp scripts/makefile.darwin makefile
 $ make prefix=/tmp/dep
 $ make prefix=/tmp/dep install

Newer libpng (1.2.15 and up) use the same ./configure; make; make install seen below.

  1. Build libjpeg.
 #!ShellExample
 $ ./configure --prefix=/tmp/dep --enable-shared
 $ ln -s `which glibtool` ./libtool
 $ make && make install
  1. Build giflib.
 #!ShellExample
 $ ./configure --prefix=/tmp/dep
 $ make && make install
  1. Build gettext.
 #!ShellExample
 $ ./configure --prefix=/tmp/dep
 $ make && make install
  1. Build Glib.
 #!ShellExample
 $ ./configure --prefix=/tmp/dep
 $ make && make install
  1. Build pixman.
 #!ShellExample
 $ ./configure --prefix=/tmp/dep
 $ make && make install
  1. Build Cairo >= 1.5.18. (To build on OSX, Cairo must have Quartz and CGFont support enabled:)
 #!ShellExample
 ./configure --prefix=/tmp/dep --enable-quartz=yes --enable-quartz-font=yes --enable-xlib=no
 make && make install
  1. Build Pango. (BE SURE CAIRO IS BUILT WITH THE FLAGS ABOVE BEFORE PROCEEDING!)
 #!ShellExample
 ./configure --prefix=/tmp/dep --with-x=no
 make && make install
  1. Build Ruby (with shared lib.)
 #!ShellExample
 $ ./configure --prefix=/tmp/dep --enable-shared
 $ make && make install
  1. Install RubyGems.
 #!ShellExample
 $ /tmp/dep/bin/ruby setup.rb
  1. gem install rake.
 #!ShellExample
 $ /tmp/dep/bin/gem install rake
  1. Run rake.
 #!ShellExample
 $ /tmp/dep/bin/rake

Cross-Compiling for PowerPC

To build all of the above for Mac OS X 10.3 (and higher) on PowerPC, run the configure script with some environment variable (as described in Technical Note TN2137.

 #!ShellExample
 $ env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -arch ppc" \
     LDFLAGS="-arch ppc" ./configure --prefix=/tmp/dep --disable-dependency-tracking

Building on OSX with MacPorts

Installing the dependencies using MacPorts is an alternative to the other methods. However, please keep in mind it isn't official supported.

First you have to install MacPorts.

 #!ShellExample
 $ sudo port install cairo +no_x11
 $ sudo port install pango +no_x11
 $ sudo port install ruby rb-rubygems
 $ sudo gem install rake --include-dependencies

Now you have your dependencies set up and you can build Shoes.

 #!ShellExample
 $ cd shoes
 $ rake
 $ Shoes.app/Contents/MacOS/shoes samples/timer.rb