Skip to content

Instantly share code, notes, and snippets.

@soffes
Forked from mislav/_notes.md
Created November 2, 2009 16:27
Show Gist options
  • Save soffes/224259 to your computer and use it in GitHub Desktop.
Save soffes/224259 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Install ImageMagick on Snow Leopard: by kain, improved by mislav and samsoffes
# http://www.icoretech.org/2009/08/install-imagemagick-in-leopard-snow-leopard/
# Work with 64bit kernel mode
set -e
PREFIX=/usr/local
# Passenger users: amend your Apache global configuration with the following directive
# SetEnv PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
# The Apache config file is located at /etc/apache2/httpd.conf
# FreeType
wget http://sourceforge.net/projects/freetype/files/freetype2/2.3.9/freetype-2.3.9.tar.gz/download -O- | tar xz
cd freetype-2.3.9
./configure --prefix=$PREFIX
make
sudo make install
cd ..
# libpng
wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.40.tar.bz2 -O- | tar xj
cd libpng-1.2.40
./configure --prefix=$PREFIX
make
sudo make install
cd ..
# jpeg
wget http://www.ijg.org/files/jpegsrc.v7.tar.gz -O- | tar xz
cd jpeg-7
ln -s `which glibtool` ./libtool
export MACOSX_DEPLOYMENT_TARGET=10.6
./configure --enable-shared --prefix=$PREFIX
make
sudo make install
cd ..
# libtiff
wget http://dl.maptools.org/dl/libtiff/tiff-3.8.2.tar.gz -O- | tar xz
cd tiff-3.8.2
./configure --prefix=$PREFIX
make
sudo make install
cd ..
# libwmf
wget http://sourceforge.net/projects/wvware/files/libwmf/0.2.8.4/libwmf-0.2.8.4.tar.gz/download -O- | tar xz
cd libwmf-0.2.8.4
./configure --prefix=$PREFIX
make
sudo make install
cd ..
# LittleCms
wget http://www.littlecms.com/lcms-1.18a.tar.gz -O- | tar xz
cd lcms-1.18
./configure --prefix=$PREFIX
make
sudo make install
cd ..
# Ghostscript
wget http://ghostscript.com/releases/ghostscript-8.70.tar.gz -O- | tar xz
cd ghostscript-8.70
./configure --prefix=$PREFIX
make
sudo make install
cd ..
# Ghostscript Fonts
wget http://sourceforge.net/projects/gs-fonts/files/gs-fonts/8.11%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-8.11.tar.gz/download -O- | tar xz
sudo mv -f fonts $PREFIX/share/ghostscript
# ImageMagick
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.5.7-4.tar.gz -O- | tar xz
cd ImageMagick-6.5.7-4
export CPPFLAGS=-I$PREFIX/include
export LDFLAGS=-L$PREFIX/lib
./configure --prefix=$PREFIX --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --with-gs-font-dir=$PREFIX/share/ghostscript/fonts
make
sudo make install
cd ..
# Clean up
rm -rf freetype-2.3.9 libpng-1.2.40 jpeg-7 tiff-3.8.2 libwmf-0.2.8.4 lcms-1.18 ghostscript-8.70 ImageMagick-6.5.7-4
@stitch112
Copy link

Do not forget line 86 libpng-1.2.40 also need to change.

@firecall
Copy link

Line 56: wget http://www.littlecms.com/lcms-1.18a.tar.gz -O- | tar xz

Source no longer exists. Latest is here: http://sourceforge.net/projects/lcms/files/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment