-
Notifications
You must be signed in to change notification settings - Fork 27
/
Poppler-22.06.0_gnu-9.2.0_install
executable file
·55 lines (45 loc) · 1.52 KB
/
Poppler-22.06.0_gnu-9.2.0_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
#!/usr/bin/env bash
###############################################
# Installing Poppler 22.06.0 using GNU 9.2.0 for R 4.0.2
#
# by Brian Alston, June 2022
#
set -e
COMPILER_TAG=${COMPILER_TAG:-gnu-9.2.0}
VERSION=${VERSION:-22.06.0}
PDATA_VERSION=${PDATA_VERSION:-0.4.11}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/Poppler/$VERSION/$COMPILER_TAG}
MD5=${MD5:-cc4ea2ffeb482f8e05612a113fbf5328}
SRC_ARCHIVE=${SRC_ARCHIVE:-https://poppler.freedesktop.org/poppler-${VERSION}.tar.xz}
PDATA_ARCHIVE=${PDATA_ARCHIVE:-https://poppler.freedesktop.org/poppler-data-${PDATA_VERSION}.tar.gz}
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
require beta-modules
require gcc-libs/9.2.0
require compilers/gnu/9.2.0
require openblas/0.3.7-serial/gnu-4.9.2
require python3/recommended
require boost/1_63_0/gnu-4.9.2
temp_dir=`mktemp -d -p /dev/shm`
echo "Building in $temp_dir ..."
cd $temp_dir
wget --no-check-certificate $SRC_ARCHIVE
wget --no-check-certificate $PDATA_ARCHIVE
CHECKSUM=`md5sum poppler-${VERSION}.tar.xz | awk '{print $1}'`
if [ "$MD5" == "$CHECKSUM" ]
then
tar -xvf poppler-${VERSION}.tar.xz
cd poppler-${VERSION}
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_QT5=OFF -DENABLE_QT6=OFF -DENABLE_LIBOPENJPEG=unmaintained
make
make install
else
echo "Hash mismatch."
echo "Expected: $MD5"
echo "Got: $CHECKSUM"
fi