-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathsetup_development.sh
More file actions
executable file
·48 lines (36 loc) · 1.13 KB
/
setup_development.sh
File metadata and controls
executable file
·48 lines (36 loc) · 1.13 KB
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
#!/usr/bin/env bash
set -eou pipefail
LIBVIPS_VERSION="8.17.1"
echo "Fetching libvips submodule..."
# Grab correct version of libvips in submodule, if not already fetched
git submodule set-branch --branch "tags/v$LIBVIPS_VERSION" -- libvips
git submodule sync
pushd libvips
git checkout "tags/v$LIBVIPS_VERSION"
popd
git add libvips
# If on macOS, grab latest version available in Homebrew for best-effort dependencies
if [ "$(uname -sr)" == "Darwin*" ]; then
echo "Installing libvips homebrew formula..."
brew install libvips
fi
echo "Displaying submodule status..."
git submodule status libvips
# Build libvips
pushd libvips
echo "Building libvips..."
echo "Clearing build cache..."
rm -rf build && mkdir -p build
echo "Setting up Meson build..."
PREFIX_PATH=$(realpath "release")
echo "Prefix path: $PREFIX_PATH"
export CC=clang
export CXX=clang++
meson setup build --prefix $PREFIX_PATH
echo "Compiling..."
meson compile -C build
echo "Installing..."
meson install -C build
(release/bin/vips --version | grep $LIBVIPS_VERSION) || (echo "libvips version not as expected" && exit 1)
popd
echo "libvips $LIBVIPS_VERSION built successfully 🎉"