How to install ImageScience on Leopard

  1. Download the latest FreeImage source from this link

  2. Unzip and edit Makefile.osx with the following changes (replace the lines). Here’s a pastie link for easier copy/pasting too:

    INCLUDE_PPC = -isysroot /Developer/SDKs/MacOSX10.5.sdk INCLUDE_I386 = -isysroot /Developer/SDKs/MacOSX10.5.sdk
    LIBRARIES_PPC = -Wl,-syslibroot /Developer/SDKs/MacOSX10.5.sdk
    LIBRARIES_I386 = -Wl,-syslibroot /Developer/SDKs/MacOSX10.5.sdk

  3. Build and install FreeImage :

    make
    sudo make install

  4. Install the ImageScience gem :

    sudo gem install image_science

  5. Profit!

Notes