travis_linux_before_install.sh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. set -ev
  3. if [ $ANALYZE = "true" ]; then
  4. g++ --version
  5. cppcheck --version
  6. else
  7. cd $LOCAL_PKG
  8. # travis caches the $LOCAL_PKG dir. If it is loaded, we don't need to reinstall the packages
  9. if [ ! -f $LOCAL_PKG/.cached ]; then
  10. # Install newer valgrind
  11. mkdir -p $LOCAL_PKG/package && cd $LOCAL_PKG/package
  12. wget http://valgrind.org/downloads/valgrind-3.11.0.tar.bz2
  13. tar xf valgrind-3.11.0.tar.bz2
  14. cd valgrind-3.11.0
  15. ./configure --prefix=$LOCAL_PKG
  16. make -s -j8 install
  17. echo "\n### Installed valgrind version: $(valgrind --version)"
  18. cd $LOCAL_PKG
  19. # Install specific check version which is not yet in the apt package
  20. wget http://ftp.de.debian.org/debian/pool/main/c/check/check_0.10.0-3_amd64.deb
  21. dpkg -x check_0.10.0-3_amd64.deb $LOCAL_PKG/package
  22. # change pkg-config file path
  23. sed -i "s|prefix=/usr|prefix=${LOCAL_PKG}|g" $LOCAL_PKG/package/usr/lib/x86_64-linux-gnu/pkgconfig/check.pc
  24. sed -i 's|libdir=.*|libdir=${prefix}/lib|g' $LOCAL_PKG/package/usr/lib/x86_64-linux-gnu/pkgconfig/check.pc
  25. # move files to globally included dirs
  26. cp -R $LOCAL_PKG/package/usr/lib/x86_64-linux-gnu/* $LOCAL_PKG/lib/
  27. cp -R $LOCAL_PKG/package/usr/include/* $LOCAL_PKG/include/
  28. cp -R $LOCAL_PKG/package/usr/bin/* $LOCAL_PKG/
  29. # Install specific liburcu version which is not yet in the apt package
  30. wget https://launchpad.net/ubuntu/+source/liburcu/0.8.5-1ubuntu1/+build/6513813/+files/liburcu2_0.8.5-1ubuntu1_amd64.deb
  31. wget https://launchpad.net/ubuntu/+source/liburcu/0.8.5-1ubuntu1/+build/6513813/+files/liburcu-dev_0.8.5-1ubuntu1_amd64.deb
  32. dpkg -x liburcu2_0.8.5-1ubuntu1_amd64.deb $LOCAL_PKG/package
  33. dpkg -x liburcu-dev_0.8.5-1ubuntu1_amd64.deb $LOCAL_PKG/package
  34. # move files to globally included dirs
  35. cp -R $LOCAL_PKG/package/usr/lib/x86_64-linux-gnu/* $LOCAL_PKG/lib/
  36. cp -R $LOCAL_PKG/package/usr/include/* $LOCAL_PKG/include/
  37. # create cached flag
  38. touch $LOCAL_PKG/.cached
  39. else
  40. echo "\n## Using local packages from cache\n"
  41. fi
  42. pip install --user cpp-coveralls
  43. pip install --user sphinx
  44. pip install --user sphinx_rtd_theme
  45. fi