blob: 0e47a3e6a53f400d790fe5917bc576eb8df7c70d [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001Mac OS X-specific Build instructions
dirkd2ad0242015-07-18 12:18:20 +00002
3In order to install ImageMagick on OSX, you will first need Apple's "Xcode",
4which you can get by going to the AppStore and searching for "Xcode" and
5installing it.
6
7Next, you will need to install the "Xcode Command Line Tools" which includes
8the compiler. You can install those by running the following command in the
9Terminal:
10
11 xcode-select --install
12
13Now that you have the necessary tools, you have a choice of how to install
14ImageMagick. The simplest method is to use "homebrew", and that method is shown
15first below. The alternative method is to install from source, which is shown
16afterwards.
17
18################################################################################
19Method 1: Using "homebrew"
20################################################################################
21
22Go to http://brew.sh and copy the one-liner that installs "homebrew".
23
24Paste that into the Terminal and run it.
25
26For the very simplest, fastest, most basic ImageMagick installation, run:
27
28 brew install imagemagick
29
30Test your installation by running:
31
32 identify -version
33
34If you want to add support for extra features, such as HDRI, Perl, JPEG2000,
35pango,fftw, TIFF or rsvg etc. you can find the necessary switches by running:
36
37 brew options imagemagick
38
39then find the options you need and apply them like this:
40
41 brew reinstall imagemagick --with-jp2 --with-librsvg --with-quantum-depth-16 --with-pango
42
43If you have any problems with "homebrew", simply run:
44
45 brew doctor
46
47and follow the doctor's advice.
48
49
50################################################################################
51Method 2: Compile from source - not necessary if you used "homebrew" method
52################################################################################
53
54
55Perform these steps as an administrator or with the sudo command:
cristyebe41ab2010-01-14 02:58:18 +000056
dirkd2ad0242015-07-18 12:18:20 +000057Install MacPorts. Download and install http://www.macports.org/ and type the
58following commands:
cristyebe41ab2010-01-14 02:58:18 +000059
60 $magick> sudo port -v install freetype +bytecode
61 $magick> sudo port -v install librsvg
cristy64da4432014-10-06 15:49:07 +000062 $magick> sudo port -v install graphviz +gs +wmf +jbig +jpeg2 +lcms
cristyebe41ab2010-01-14 02:58:18 +000063
dirkd2ad0242015-07-18 12:18:20 +000064This installs many of the delegate libraries ImageMagick will utilize such as
65JPEG and FreeType.
cristyebe41ab2010-01-14 02:58:18 +000066
dirkd2ad0242015-07-18 12:18:20 +000067Use the port command to install any delegate libraries you require, for example:
cristyebe41ab2010-01-14 02:58:18 +000068
69 $magick> sudo port install jpeg
70
dirkd2ad0242015-07-18 12:18:20 +000071Now let's build ImageMagick:
cristyebe41ab2010-01-14 02:58:18 +000072
dirkd2ad0242015-07-18 12:18:20 +000073Download the ImageMagick source distribution and verify the distribution
74against its message digest.
cristyebe41ab2010-01-14 02:58:18 +000075
dirkd2ad0242015-07-18 12:18:20 +000076Unpack and change into the top-level ImageMagick directory:
cristyebe41ab2010-01-14 02:58:18 +000077
dirkd2ad0242015-07-18 12:18:20 +000078 $magick> tar xvfz ImageMagick-6.5.9-0.tar.gz
79 $magick> cd ImageMagick-6.5.9
cristyebe41ab2010-01-14 02:58:18 +000080
dirkd2ad0242015-07-18 12:18:20 +000081Configure ImageMagick:
cristyebe41ab2010-01-14 02:58:18 +000082
83 $magick> ./configure --prefix=/opt --with-quantum-depth=16 \
dirkd2ad0242015-07-18 12:18:20 +000084 --disable-dependency-tracking --without-perl
cristyebe41ab2010-01-14 02:58:18 +000085
dirkd2ad0242015-07-18 12:18:20 +000086Build ImageMagick:
cristyebe41ab2010-01-14 02:58:18 +000087
88 $magick> make
89
dirkd2ad0242015-07-18 12:18:20 +000090Install ImageMagick:
cristyebe41ab2010-01-14 02:58:18 +000091
92 $magick> sudo make install
93
dirkd2ad0242015-07-18 12:18:20 +000094To verify your install, type
cristyebe41ab2010-01-14 02:58:18 +000095
96 $magick> /opt/local/bin/identify -list font
97
dirkd2ad0242015-07-18 12:18:20 +000098to list all the fonts ImageMagick knows about.