Install-mac.txt 2.94 KB
Newer Older
cristy's avatar
cristy committed
1
Mac OS X-specific Build instructions
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

In order to install ImageMagick on OSX, you will first need Apple's "Xcode", 
which you can get by going to the AppStore and searching for "Xcode" and 
installing it.

Next, you will need to install the "Xcode Command Line Tools" which includes 
the compiler. You can install those by running the following command in the
Terminal:

    xcode-select --install

Now that you have the necessary tools, you have a choice of how to install 
ImageMagick. The simplest method is to use "homebrew", and that method is shown 
first below. The alternative method is to install from source, which is shown
afterwards.

################################################################################
Method 1: Using "homebrew"
################################################################################

Go to http://brew.sh and copy the one-liner that installs "homebrew".

Paste that into the Terminal and run it.

For the very simplest, fastest, most basic ImageMagick installation, run:

    brew install imagemagick

Test your installation by running:

    identify -version

If you want to add support for extra features, such as HDRI, Perl, JPEG2000, 
pango,fftw, TIFF or rsvg etc. you can find the necessary switches by running:

    brew options imagemagick

then find the options you need and apply them like this:

41
    brew reinstall imagemagick --with-jp2 --with-quantum-depth-16 --with-pango
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
 
If you have any problems with "homebrew", simply run:

    brew doctor

and follow the doctor's advice.


################################################################################
Method 2: Compile from source - not necessary if you used "homebrew" method
################################################################################


Perform these steps as an administrator or with the sudo command:
  
Install MacPorts. Download and install http://www.macports.org/ and type the
following commands:
cristy's avatar
cristy committed
59 60 61
  
    $magick> sudo port -v install freetype +bytecode
    $magick> sudo port -v install librsvg
cristy's avatar
cristy committed
62
    $magick> sudo port -v install graphviz +gs +wmf +jbig +jpeg2 +lcms
cristy's avatar
cristy committed
63
  
64 65
This installs many of the delegate libraries ImageMagick will utilize such as
JPEG and FreeType.
cristy's avatar
cristy committed
66
  
67
Use the port command to install any delegate libraries you require, for example:
cristy's avatar
cristy committed
68 69 70
  
    $magick> sudo port install jpeg
  
71
Now let's build ImageMagick:
cristy's avatar
cristy committed
72
  
73 74
Download the ImageMagick source distribution and verify the distribution
against its message digest.
cristy's avatar
cristy committed
75
  
76
Unpack and change into the top-level ImageMagick directory:
cristy's avatar
cristy committed
77
  
Cristy's avatar
Cristy committed
78 79
    $magick> tar xvfz ImageMagick-7.0.7-0.tar.gz 
    $magick> cd ImageMagick-7.0.7
cristy's avatar
cristy committed
80
  
81
Configure ImageMagick:
cristy's avatar
cristy committed
82 83
  
    $magick> ./configure --prefix=/opt --with-quantum-depth=16 \
84
      --disable-dependency-tracking --without-perl
cristy's avatar
cristy committed
85
  
86
Build ImageMagick:
cristy's avatar
cristy committed
87 88 89
  
    $magick> make
  
90
Install ImageMagick:
cristy's avatar
cristy committed
91 92 93
  
    $magick> sudo make install
  
94
To verify your install, type
cristy's avatar
cristy committed
95 96 97
  
    $magick> /opt/local/bin/identify -list font
  
98
to list all the fonts ImageMagick knows about.