-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild
More file actions
executable file
·27 lines (21 loc) · 850 Bytes
/
Copy pathbuild
File metadata and controls
executable file
·27 lines (21 loc) · 850 Bytes
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
#!/bin/bash -e
if [ ! -z ${SHALLOW_CLONE} ]; then
# Can't use --shallow-submodules because some bug in either Git or in the
# mupdf submodule setup makes the clone command fail.
SHALLOW_CLONE="--depth 1 --no-shallow-submodules"
fi
MUPDF_VERSION="1.14.0"
if [[ ! -d mupdf ]]; then
echo "Downloading muPDF..."
# Setting -j0 clones submodules with as many parallel jobs as possible
git clone --branch ${MUPDF_VERSION} ${SHALLOW_CLONE} --recurse-submodules=thirdparty -j0 https://github.com/ArtifexSoftware/mupdf.git
fi
echo "Building muPDF..."
# Pass -j to build using as many cores as possible
(cd mupdf; XCFLAGS="-g" make -j libs)
# Newer OSX needs an include path for OpenSSL
if [[ `uname -s` == "Darwin" ]]; then
export CGO_LDFLAGS="-L/usr/local/opt/openssl/lib"
fi
echo "Fetching Go dependencies and compiling code..."
go get -t ./...