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-03-21 20:43:20 +01:00
|
|
|
libpng-dev libjpeg-dev libgl1-mesa-dev libsdl2-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
|
|
|
|
|
|
|
sudo systemctl start postgresql.service
|
|
|
|
sudo -u postgres psql <<<"
|
|
|
|
CREATE USER minetest WITH PASSWORD 'minetest';
|
|
|
|
CREATE DATABASE minetest;
|
|
|
|
"
|
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
|
|
|
}
|