Commit | Line | Data |
---|---|---|
429b46bb S |
1 | #!/bin/bash |
2 | set -o errexit | |
3 | ||
4 | # Install build deps | |
5 | apt-get -y -q remove imagemagick | |
71c3c655 | 6 | apt-get -y -q install ghostscript gsfonts pkg-config autoconf libbz2-dev libjpeg-dev libtiff-dev libfreetype6-dev |
429b46bb S |
7 | |
8 | PREFIX=/usr/local | |
9 | WDIR=/tmp/imagemagick | |
10 | mkdir -p $WDIR | |
11 | ||
12 | # Build and install libpng | |
56032fc3 | 13 | git clone -b v1.6.34 https://github.com/glennrp/libpng.git $WDIR/libpng |
429b46bb S |
14 | cd $WDIR/libpng |
15 | ./autogen.sh | |
16 | ./configure --prefix=$PREFIX | |
17 | make all && make install | |
18 | ||
19 | # Build and install ImageMagick | |
f36dd31c | 20 | wget -O $WDIR/ImageMagick.tar.gz "https://github.com/ImageMagick/ImageMagick/archive/7.0.8-6.tar.gz" |
97001f25 | 21 | IMDIR=$WDIR/$(tar tzf $WDIR/ImageMagick.tar.gz --wildcards "ImageMagick-*/configure" |cut -d/ -f1) |
429b46bb S |
22 | tar zxf $WDIR/ImageMagick.tar.gz -C $WDIR |
23 | cd $IMDIR | |
71c3c655 | 24 | PKG_CONF_LIBDIR=$PREFIX/lib LDFLAGS=-L$PREFIX/lib CFLAGS=-I$PREFIX/include ./configure \ |
429b46bb S |
25 | --prefix=$PREFIX \ |
26 | --enable-static \ | |
27 | --enable-bounds-checking \ | |
28 | --enable-hdri \ | |
29 | --enable-hugepages \ | |
30 | --with-threads \ | |
31 | --with-modules \ | |
32 | --with-quantum-depth=16 \ | |
33 | --without-magick-plus-plus \ | |
34 | --with-bzlib \ | |
35 | --with-zlib \ | |
36 | --without-autotrace \ | |
37 | --with-freetype \ | |
38 | --with-jpeg \ | |
39 | --without-lcms \ | |
40 | --with-lzma \ | |
41 | --with-png \ | |
42 | --with-tiff | |
43 | make all && make install | |
44 | ||
45 | cd $HOME | |
46 | rm -rf $WDIR | |
97001f25 | 47 | ldconfig /usr/local/lib |