common.sh 968 B

1234567891011121314151617181920212223242526272829303132333435
  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" == "--old-irr" ]]; then
  9. shift
  10. pkgs+=(libirrlicht-dev)
  11. else
  12. wget "https://github.com/minetest/irrlicht/releases/download/1.9.0mt4/ubuntu-bionic.tar.gz"
  13. sudo tar -xaf ubuntu-bionic.tar.gz -C /usr/local
  14. fi
  15. sudo apt-get update
  16. sudo apt-get install -y --no-install-recommends ${pkgs[@]} "$@"
  17. # workaround for bug with Github Actions' ubuntu-18.04 image
  18. sudo apt-get remove -y libgcc-11-dev gcc-11 || :
  19. }
  20. # Mac OSX build only
  21. install_macosx_deps() {
  22. brew update
  23. brew install freetype gettext hiredis irrlicht leveldb libogg libvorbis luajit
  24. if brew ls | grep -q jpeg; then
  25. brew upgrade jpeg
  26. else
  27. brew install jpeg
  28. fi
  29. #brew upgrade postgresql
  30. }