Installing Image::Imlib2 on OS X Lion (10.7.5)

These are some rough notes on how I installed Image::Imlib2 on Mac OS X Lion. The notes assume that Homebrew and Perlbrew are already installed and working.

# Make sure that you *do not* have homebrew's libjpeg installed
brew rm libjpeg

# Install development libraries
brew install libtiff libfreetype

# Install libjpeg with version 80 support
cd /tmp

curl -O http://jpegclub.org/support/files/jpegsrc.v8d1.tar.gz
tar -xvzf jpegsrc.v8d1.tar.gz
cd jpeg-8d1/

./configure
make
make test
sudo make install

# Install imlib2
cd /tmp

curl -OJL http://sourceforge.net/projects/enlightenment/files/imlib2-src/1.4.6/imlib2-1.4.6.tar.gz/download

tar -xvzf imlib2-1.4.6.tar.gz
cd imlib2-1.4.6

sed -i '' 's/@my_libs@//' imlib2-config.in

./configure --disable-amd64
make
sudo make install

# Install Image::Imlib2
cd /tmp

curl -O https://cpan.metacpan.org/authors/id/L/LB/LBROCARD/Image-Imlib2-2.03.tar.gz

tar -xvzf Image-Imlib2-2.03.tar.gz
cd Image-Imlib2-2.03

perl Makefile.PL
CFLAGS=-Wno-comment make
make test
make install