Update PostgreSQL to 9.5 in base image.
[discourse_docker.git] / image / base / install-imagemagick
1 #!/bin/bash
2 set -o errexit
3
4 # Install build deps
5 apt-get -y -q remove imagemagick
6 apt-get -y -q install ghostscript gsfonts autoconf libbz2-dev libjpeg-dev libtiff-dev libfreetype6-dev
7
8 PREFIX=/usr/local
9 WDIR=/tmp/imagemagick
10 mkdir -p $WDIR
11
12 # Build and install libpng
13 git clone -b v1.6.19 git://git.code.sf.net/p/libpng/code $WDIR/libpng
14 cd $WDIR/libpng
15 ./autogen.sh
16 ./configure --prefix=$PREFIX
17 make all && make install
18
19 # Build and install ImageMagick
20 wget -O $WDIR/ImageMagick.tar.gz "http://www.imagemagick.org/download/ImageMagick-6.9.4-1.tar.gz"
21 IMDIR=$WDIR/$(tar tzf $WDIR/ImageMagick.tar.gz --wildcards "ImageMagick-*/configure" |cut -d/ -f1)
22 tar zxf $WDIR/ImageMagick.tar.gz -C $WDIR
23 cd $IMDIR
24 LDFLAGS=-L$PREFIX/lib CFLAGS=-I$PREFIX/include ./configure \
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
47 ldconfig