Categories
Tools

Installing RMagick on OS X Leopard

After the last time, I swore I’d never fall prey to RMagick’s convoluted and painful installation process. Unfortunately, to paraphrase the Giant – it happened again.

So, after beating my head against my desk for hours while banging out permutations of “sudo port install ImageMagick” and “sudo gem install rmagick”, I have news for you, my devoted audience of 1.5 pygmy marmosets, – it can be done!

What you need to do is go back to the basics and install everything from source. I found a nice script here, but that only got me part of the way. Here’s how I did it:

mkdir src
cd src

curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz
tar xzvf freetype-2.3.5.tar.gz
cd freetype-2.3.5
./configure --prefix=/usr/local
make
sudo make install
cd ..

curl -O http://superb-west.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.22.tar.bz2
tar jxvf libpng-1.2.22.tar.bz2
cd libpng-1.2.22
./configure --prefix=/usr/local
make
sudo make install
cd ..

curl -O ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
tar xzvf jpegsrc.v6b.tar.gz
cd jpeg-6b
ln -s `which glibtool` ./libtool
export MACOSX_DEPLOYMENT_TARGET=10.5
./configure --enable-shared --prefix=/usr/local
make
sudo make install
cd ..

curl -O ftp://ftp.remotesensing.org/libtiff/tiff-3.8.2.tar.gz
tar xzvf tiff-3.8.2.tar.gz
cd tiff-3.8.2
./configure --prefix=/usr/local
make
sudo make install
cd ..

curl -O http://jaist.dl.sourceforge.net/sourceforge/wvware/libwmf-0.2.8.4.tar.gz
tar xzvf libwmf-0.2.8.4.tar.gz
cd libwmf-0.2.8.4
make clean
./configure
make
sudo make install
cd ..

curl -O http://www.littlecms.com/lcms-1.17.tar.gz
tar xzvf lcms-1.17.tar.gz
cd lcms-1.17
make clean
./configure
make
sudo make install
cd ..

curl -O http://mirror.switch.ch/ftp/mirror/ghost/GPL/gs861/ghostscript-8.61.tar.gz
tar zxvf ghostscript-8.61.tar.gz
cd ghostscript-8.61/
./configure  --prefix=/usr/local
make
sudo make install
cd ..

curl -O http://mirror.switch.ch/ftp/mirror/ghost/GPL/gs861/ghostscript-fonts-std-8.11.tar.gz
tar zxvf ghostscript-fonts-std-8.11.tar.gz
sudo mv fonts /usr/local/share/ghostscript

curl -O ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar xzvf ImageMagick.tar.gz
cd ImageMagick-6.4.0
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --with-gs-font-dir=/usr/local/share/ghostscript/fonts
make
sudo make install
cd ..

curl -O http://rubyforge.rubyuser.de/rmagick/RMagick-1.15.13.tar.gz
tar zxvf RMagick-1.15.13.tar.gz
cd RMagick-1.15.13
./configure  --prefix=/usr/local
make
sudo make install
cd ..

If you’d like to download the entire script and run it yourself – you can grab it here:

rmagick_install.sh

The trick for me was compiling the RMagick gem from source. Every single time I relied on @#@# rubygems, it failed. This script may fail after a while if some of the hardcoded paths change or if newer versions of the packages come out, so if it breaks for some reason, modify it to accomodate whatever version of RMagick / Freetype / Ghostscript is needed.

I hope this helps somebody else out there and reduces your head banging time to a minimum.

Technorati Tags: , ,

Categories
Fun

The iPhone SDK

fakesteve on the SDK:

Seriously, folks, it’s game over. This announcement today is as big as the announcement of the original Macintosh in 1984. At airports all around the world they put flights on hold so that people could stay in the terminal and watch the news as it was announced. In Canada they declared a national day of mourning for RIM. It’s that huge. Today, frankly, is a day that will live in the history of our industry. It’s a classic inflection point. Massive disruption. Schumpeter-esque creative destruction. I am sitting here just watching the trailer for “Ironman” with the volume cranked on my stereo and I’m running around going “I … am … Ironman …” in that weird computer voice. Truly, I am invincible. I rule the world. I am the greatest human being that ever lived. I feel just like that friggin Ironman guy, honestly. Bullets cannot pierce my iron skin. Apple is the greatest company in the world. We rock so hard it’s amazing.

Technorati Tags: , ,

Categories
Fun

Pick me! Pick me! Come see my panel at SXSWi.

Panel Surrounded

As you can see from the tiny image segment I grabbed from the wonderful sched.org SXSW organizer, if you’re attending, you’re going to be spoiled for choice this year.

So, when it comes round to deciding what to do on Monday 10 March at 11:30am, if you’re interested in finding out about the most interesting, unexpected or downright bizarre ways that people are using mobile phones around the world, why don’t you stop by and check out “Mobile Phones: International Devices of Mystery”. We’ve got a great cast of fantastic speakers – including Jonathan Donner, Nathan Eagle, Neil Churcher and Jennifer Bove – and all we need are some thought provoking questions from you – in the audience.

Find out more on the Socialight blog. See you there!

Technorati Tags: , , , ,

Categories
Life

Tetris Ice Cubes

The ultimate in geek cool[sic]?

Tet2

Tet3-1

Categories
Supercool Tools

Shifd launches!

Shifd-Indexlogo
I knew that Shifd – Nick Bilton and Michael Young’s Yahoo Hack Day-winning project was something special, so I’m stoked that they got a chance to take another crack at it and build it bigger, albeit with slightly less RFID. Fittingly, I read about their launch in the Times piece on Adobe AIR – which they used to create the desktop interface for Shifd.

I was using Instapaper to capture all my private links, but I’ve since switched to Shifd. Why? One reason – the bookmarklet is much faster. The Instapaper bookmarklet hangs around on screen for a good second or two after posting the link to offer some form of confirmation, but I really don’t miss it with Shifd’s lightning fast posting. More on this later.