Skip to content

Caution Using brew 10.6

Cecil edited this page Nov 1, 2015 · 1 revision

Overview

This is mostly a rehash of things found at here

This is not simple or fast. Sorry, but that's just the way it is. Developers do the hard work so users don't have to. Here's the outline of what has to be done.

  • xcode
  • minimal homebrew
  • zlib
  • rvm
  • rebuild ruby
  • install Shoes dependencies
  • configure Rake files
  • Build Loose Shoes
  • Build Tight Shoes

xcode and the Command Line Tools

Some versions of OSX include Xcode and some versions of Xcode includes the Command Line Tools and some don't but you can get them if you install xcode. We don't use the xcode gui program for building shoes but we need the command line tools and we don't accept substitutes. Just grit your teeth and install it and if needed, use it to install the Command Line Tools.

The last 'free' xcode for Snow Leopard is 3.2.6. Download it from Apple. You do have to have a free developers account. If you happen to have a paid developer account then you can get xcode 4.2 and possibly adjust some things below.

Hackintosh Advice for VirtualBox

It can be done. Not Pretty. Not easy. Might be sucky. Kind of like all the advice here. Learn how to reboot when OSX tells you.

  • Install the 10,6.3 iso you found on the interwebs. Expect trouble and confusion. Inside your 10.6 VM
  • Download and install 10.6.8 Combo upgrade
  • Install updates from Apple
  • Download and install xcode 3.2.6
  • Turn off auto updates. Not that there ever will be any for such an old platform. You should upgrade. OK?

Homebrew

Shoes 3.2 uses homebrew to manage packages. If you insist on using MacPorts or Fink then the following is just a guideline. The Ruby that comes with OSX 10.6.8 is 1.8.7. Don't worry, about only brew is using that Ruby.

Install brew

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

$ brew doctor

$ brew install git

$ brew install gpg

That drags in openssl (on Snow Leopard), pgk-config, makedepend. We need that.

Zlib aka libz.dylib for 10.6

Yes, you already have one in /usr/lib and you **DO NOT ** want to replace it. 10.6 and 10.9 have different versions however and Ruby is built to link to libz.dylib so if you want to build Shoes from a 10.9 system that runs on 10.6 you need a newer libz that Ruby can use. Or build on 10.6 for 10.9. It's very confusing.

On your 10.6 system, download the source from zlib.net. Untar it, cd to the directory and do

$ ./configure --archs="-arch i386 -arch x86_64 -arch ppc"

and then a $ make
Now copy it where it doesn't get confu

Install RVM and Ruby

$ echo "gem: --no-document" >> ~/.gemrc

$ curl -L https://get.rvm.io | bash -s stable --auto-dotfiles --autolibs=enable --rails

Follow the instructions in the error message to get the correct key. Then redo the curl line and wait for the downloads and build. That got me Ruby 2.2.0. I wanted 2.1.5. No problem. Do the rvm stuff to to get your $PATH set correctly. In this case that was just logging out and opening a new terminal. Then install 2.1.5 with important options the Shoes needs.

$ rvm install 2.1.5 -C --enable-shared,--enable-load-relative

I chose to uninstall 2.2.0 because I don't need it.

$ rvm uninstall 2.2.0

Shoes dependencies

OSX 10.6 came with X11 in /usr/X11/lib. OSX 10.9 doesn't. If you don't have it, then you'll have to find xquartz and install it. That ends up in /opt/X11 on one my systems. We'll have to deal with the location later.

You can enter them all one line like show here or issue multiple brew installs which is what I really do because I like to write down any errors or what's that that might need fixing and there will be things to fix. Brew knows what's installed with various versions of OSX and if a install command would override what is in the running system then it's set to 'keg-only'. This is information you need to know if you want to build a Tight Shoes that you can distribute to others.

`brew install gettext glib libpng pixman cairo pango jpeg giflib sqlite3

Note: if you want to build 10.6 from 10.9 or 10.10, there is a rake file target, osx:setup:xsnow and you can populate the shoesdeps with precompiled brew, ruby, and X11 libs that you can download from here.

Clone this wiki locally