1#!/usr/bin/env bash 2 3set -e 4set -x 5 6# git clone https://github.com/ImageMagick/ImageMagick.git 7 8SRCFILE="ImageMagick-7.0.8-14" 9# SRCFILE="ImageMagick-7.0.1-0" 10# SRCFILE="ImageMagick-7.0.4-9" 11SRCFILE="ImageMagick-7.0.10-27" 12# SRCFILE="ImageMagick-7.0.10-10" 13 14tar -xzf /var/app/imagemagick_src/${SRCFILE}.tar.gz -C /var/app/imagemagick_src 15 16cd /var/app/imagemagick_src/${SRCFILE} 17 18./configure --with-quantum-depth=16 \ 19 --with-magick-plus-plus=no \ 20 --without-perl \ 21 --disable-docs \ 22 --with-jpeg=yes \ 23 --with-png=yes \ 24 --with-fontconfig=yes \ 25 --with-webp=yes 26 27 28# --with-urw-base35-font-dir=/usr/share/fonts/opentype/urw-base35 29 30 31# --disable-openmp 32 33# ImageMagick appears to not fully respect lib paths even when 34# setting `--libdir=/usr/local/lib` running this ldconfig command 35# is needed to avoid errors like: 36# convert -v 37# convert: error while loading shared libraries: libMagickCore-7.Q16HDRI.so.9: 38# cannot open shared object file: No such file or directory 39sudo ldconfig /usr/local/lib 40 41# If for some reason you can't run ldconfig, you could also symlink 42# the files directly. 43# ln -s /usr/local/lib/libMagickCore-7.Q16HDRI.so.0 /usr/lib/x86_64-linux-gnu/libMagickCore-7.Q16HDRI.so.0 44# ln -s /usr/local/lib/libMagickWand-7.Q16HDRI.so.0 /usr/lib/x86_64-linux-gnu/libMagickWand-7.Q16HDRI.so.0 45 46make install -j 4 47 48