before_install.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash -e
  2. if [[ $CC == "clang" ]]; then
  3. export PATH="/usr/bin/:$PATH"
  4. sudo sh -c 'echo "deb http://ppa.launchpad.net/eudoxos/llvm-3.1/ubuntu precise main" >> /etc/apt/sources.list'
  5. sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-keys 92DE8183
  6. sudo apt-get update
  7. sudo apt-get install llvm-3.1
  8. sudo apt-get install clang
  9. fi
  10. sudo apt-get install p7zip-full
  11. if [[ $PLATFORM == "Linux" ]]; then
  12. sudo apt-get install libirrlicht-dev cmake libbz2-dev libpng12-dev \
  13. libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev \
  14. libhiredis-dev libogg-dev libgmp-dev libvorbis-dev libopenal-dev gettext
  15. # Linking to LevelDB is broken, use a custom build
  16. wget http://sfan5.pf-control.de/libleveldb-1.18-ubuntu12.04.7z
  17. sudo 7z x -o/usr libleveldb-1.18-ubuntu12.04.7z
  18. elif [[ $PLATFORM == "Win32" ]]; then
  19. wget http://sfan5.pf-control.de/mingw_w64_i686_ubuntu12.04_4.9.1.7z -O mingw.7z
  20. sed -e "s|%PREFIX%|i686-w64-mingw32|" \
  21. -e "s|%ROOTPATH%|/usr/i686-w64-mingw32|" \
  22. < util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw.cmake
  23. sudo 7z x -y -o/usr mingw.7z
  24. elif [[ $PLATFORM == "Win64" ]]; then
  25. wget http://sfan5.pf-control.de/mingw_w64_x86_64_ubuntu12.04_4.9.1.7z -O mingw.7z
  26. sed -e "s|%PREFIX%|x86_64-w64-mingw32|" \
  27. -e "s|%ROOTPATH%|/usr/x86_64-w64-mingw32|" \
  28. < util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw64.cmake
  29. sudo 7z x -y -o/usr mingw.7z
  30. fi