2016-10-15 17:59:23 +02:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2017-05-26 17:03:46 +02:00
|
|
|
# Linux build only
|
|
|
|
install_linux_deps() {
|
2022-07-30 11:58:47 +02:00
|
|
|
local pkgs=(
|
2022-10-19 23:58:36 +02:00
|
|
|
cmake gettext postgresql
|
2024-08-11 14:27:41 +02:00
|
|
|
libpng-dev libjpeg-dev libgl1-mesa-dev libxi-dev libfreetype-dev
|
2022-07-30 11:58:47 +02:00
|
|
|
libsqlite3-dev libhiredis-dev libogg-dev libgmp-dev libvorbis-dev
|
|
|
|
libopenal-dev libpq-dev libleveldb-dev libcurl4-openssl-dev libzstd-dev
|
|
|
|
)
|
2020-04-08 21:05:27 +02:00
|
|
|
|
|
|
|
sudo apt-get update
|
2022-07-30 11:58:47 +02:00
|
|
|
sudo apt-get install -y --no-install-recommends "${pkgs[@]}" "$@"
|
2022-10-19 23:58:36 +02:00
|
|
|
|
2024-06-03 20:39:02 +02:00
|
|
|
# set up Postgres for unit tests
|
|
|
|
if [ -n "$MINETEST_POSTGRESQL_CONNECT_STRING" ]; then
|
|
|
|
sudo systemctl start postgresql.service
|
|
|
|
sudo -u postgres psql <<<"
|
|
|
|
CREATE USER minetest WITH PASSWORD 'minetest';
|
|
|
|
CREATE DATABASE minetest;
|
|
|
|
\c minetest
|
|
|
|
GRANT ALL ON SCHEMA public TO minetest;
|
|
|
|
"
|
|
|
|
fi
|
2017-05-26 17:03:46 +02:00
|
|
|
}
|
|
|
|
|
2022-07-30 11:58:47 +02:00
|
|
|
# macOS build only
|
|
|
|
install_macos_deps() {
|
|
|
|
local pkgs=(
|
|
|
|
cmake gettext freetype gmp jpeg-turbo jsoncpp leveldb
|
|
|
|
libogg libpng libvorbis luajit zstd
|
|
|
|
)
|
2023-10-27 18:38:13 +02:00
|
|
|
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
|
|
|
export HOMEBREW_NO_INSTALL_CLEANUP=1
|
|
|
|
# contrary to how it may look --auto-update makes brew do *less*
|
|
|
|
brew update --auto-update
|
|
|
|
brew install --display-times "${pkgs[@]}"
|
2022-07-30 11:58:47 +02:00
|
|
|
brew unlink $(brew ls --formula)
|
|
|
|
brew link "${pkgs[@]}"
|
2017-05-26 17:03:46 +02:00
|
|
|
}
|