-
Notifications
You must be signed in to change notification settings - Fork 27
/
ImageMagick-7.1.1_install
executable file
·75 lines (63 loc) · 2.01 KB
/
ImageMagick-7.1.1_install
1
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env bash
###############################################
# Installing ImageMagick 7.1.1 for use with R 4.3.3
#
# by Brian Alston, April 2024
#
# Using Ian's require function to load modules
#
#
export PATH=$INSTALL_PREFIX/bin:$PATH
dirname=$(dirname $0 2>/dev/null || pwd)
INCLUDES_DIR=${INCLUDES_DIR:-${dirname}/includes}
source ${INCLUDES_DIR}/module_maker_inc.sh
source ${INCLUDES_DIR}/require_inc.sh
# Load required modules - note these are the same as needed for
# building/running R
require gcc-libs/10.2.0
require compilers/gnu/10.2.0
require fftw/3.3.9/gnu-10.2.0
require flex/2.5.39
require perl/5.22.0
require freetype/2.8.1/gnu-4.9.2
require ghostscript/9.19/gnu-4.9.2
# Use serial OoenBLAS again?
# require openblas/0.3.13-serial/gnu-10.2.0
# require java/1.8.0_92
# require texinfo/6.6/gnu-4.9.2
# require texlive/2019
# require gsl/2.7/gnu-10.2.0
# require hdf/5-1.10.6/gnu-10.2.0
# require udunits/2.2.28/gnu-10.2.0
# require netcdf/4.8.1/gnu-10.2.0
# require pcre2/10.37/gnu-10.2.0
VERSION=${VERSION:-7.1.1}
VER_TAG=${VER_TAG:-31}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/ImageMagick/${VERSION}-${VER_TAG}/${COMPILER_TAG}}
MD5=${MD5:-68b2390cb7d2dbb7388078ed27c2e4bb}
SRC_ARCHIVE=${SRC_ARCHIVE:-https://github.com/ImageMagick/ImageMagick/archive/refs/tags/${VERSION}-${VER_TAG}.tar.gz}
LOCAL_ARCHIVE=${LOCAL_ARCHIVE:-${VERSION}-${VER_TAG}.tar.gz}
# temp_dir=`mktemp -d -p /dev/shm`
temp_dir='/home/ccspapp/Scratch/ImageMagick/build'
mkdir -p $temp_dir
echo "Building in $temp_dir ..."
cd $temp_dir
module list
# read -p "Press [Enter] key to start ..."
wget $SRC_ARCHIVE
CHECKSUM=`md5sum ${LOCAL_ARCHIVE} | awk '{print $1}'`
if [[ "$MD5" == "$CHECKSUM" ]]
then
tar -xvf ${LOCAL_ARCHIVE}
cd ImageMagick-${VERSION}-${VER_TAG}
./configure --prefix=${INSTALL_PREFIX} --enable-shared \
--with-perl=/shared/ucl/apps/perl/perlbrewroot/perls/perl-5.22.0/bin/perl \
--with-fftw=yes
make
make install
make check
else
echo "***** Hash mismatch,"
echo " Expected: $MD5"
echo " Got: $CHECKSUM"
fi