common.sh 828 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash -e
  2. # Linux build only
  3. install_linux_deps() {
  4. local pkgs=(cmake libpng-dev \
  5. libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev \
  6. libhiredis-dev libogg-dev libgmp-dev libvorbis-dev libopenal-dev \
  7. gettext libpq-dev libleveldb-dev libcurl4-openssl-dev libzstd-dev)
  8. if [[ "$1" == "--no-irr" ]]; then
  9. shift
  10. else
  11. wget "https://github.com/minetest/irrlicht/releases/download/1.9.0mt6/ubuntu-bionic.tar.gz"
  12. sudo tar -xaf ubuntu-bionic.tar.gz -C /usr/local
  13. fi
  14. sudo apt-get update
  15. sudo apt-get install -y --no-install-recommends ${pkgs[@]} "$@"
  16. }
  17. # Mac OSX build only
  18. install_macosx_deps() {
  19. brew update
  20. brew install freetype gettext hiredis irrlicht leveldb libogg libvorbis luajit
  21. if brew ls | grep -q jpeg; then
  22. brew upgrade jpeg
  23. else
  24. brew install jpeg
  25. fi
  26. #brew upgrade postgresql
  27. }