Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install rmagick without fink or macport

Install rmagick without fink or macports

Requirements: Mac OS X >= 10.5.2, XCode 3.1, X11

Install freetype

cd /usr/local/src
wget http://mirror.lihnidos.org/GNU/savannah/freetype/freetype-2.3.12.tar.gz
tar xzvf freetype-2.3.12.tar.gz
cd freetype-2.3.12
./configure --prefix=/usr/local
make
sudo make install
cd ..

Install ghostscript fonts

wget 'ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/fonts/ghostscript-fonts-std-8.11.tar.gz'
tar xzvf ghostscript-fonts-std-8.*.tar.gz
sudo mkdir -p /usr/local/share/ghostscript/
sudo mv fonts/ /usr/local/share/ghostscript/fonts/

Install libjpeg (10.5 libjpeg won't work)

wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz
tar xzvf jpegsrc.v8b.tar.gz
cd jpeg-8b
ln -s `which glibtool` ./libtool
export MACOSX_DEPLOYMENT_TARGET=10.5
./configure --enable-shared --prefix=/usr/local/libjpeg
make
sudo mkdir -p /usr/local/libjpeg/include
sudo mkdir -p /usr/local/libjpeg/lib
sudo mkdir -p /usr/local/libjpeg/bin
sudo mkdir -p /usr/local/libjpeg/man/man1
sudo make install
cd ..

Install libpng (10.5 libpng won't work)

wget http://sourceforge.net/projects/libpng/files/01-libpng-master/1.4.2/libpng-1.4.2.tar.gz/download
tar xzvf libpng-1.4.2.tar.gz
cd libpng-1.4.2/
./configure --enable-shared --prefix=/usr/local/libpng
make
sudo make install
cd ..

Finally: Install ImageMagick and set correct symlinks

wget http://image_magick.veidrodis.com/image_magick/ImageMagick-6.6.2-4.tar.gz  
tar xzvf ImageMagick-6.6.2-4.tar.gz
cd ImageMagick-6.6.2-4
export CPPFLAGS="-I/usr/local/libjpeg/include -I/usr/local/libpng/include -I/usr/local/include"
export LDFLAGS="-L/usr/local/libjpeg/lib -L/usr/local/libpng/lib -L/usr/local/lib -lpng"
./configure --prefix=/usr/local --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 ..
sudo ln -s /usr/local/lib/libMagickCore.la /usr/local/lib/libMagick.la
sudo ln -s /usr/local/lib/libMagickCore.dylib /usr/local/lib/libMagick.dylib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment