wt.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. RETCODE=$(fw_exists wt)
  3. [ ! "$RETCODE" == 0 ] || { return 0; }
  4. # The commented code works. While we would love to get boost from source
  5. # so we know exactly what we are getting, it just takes too long. Also,
  6. # Ubuntu1204 can only run boost 1.48 and Ubuntu1404 can only run 1.54,
  7. # even if you compile from source. Apt supplies different boost version
  8. # numbers anyways (which is something it often does not do and one of the
  9. # main reasons for compilation from a specific source version), so we can
  10. # just use apt. See https://github.com/TechEmpower/FrameworkBenchmarks/issues/1013
  11. #
  12. #fw_get http://downloads.sourceforge.net/project/boost/boost/1.48.0/boost_1_48_0.tar.gz -O boost_1_48_0.tar.gz
  13. #fw_untar boost_1_48_0.tar.gz
  14. #cd boost_1_48_0
  15. #./bootstrap.sh --prefix=$IROOT/boost
  16. #./b2 install
  17. #cd ..
  18. # Instead of compiling from source, just use apt to install onto
  19. # host machine
  20. if [ "$TFB_DISTRIB_CODENAME" == "trusty" ]; then
  21. sudo apt-get -y install libboost1.54-all-dev
  22. elif [ "$TFB_DISTRIB_CODENAME" == "precise" ]; then
  23. sudo apt-get -y install libboost1.48-all-dev
  24. fi
  25. fw_get http://downloads.sourceforge.net/witty/wt-3.3.3.tar.gz -O wt-3.3.3.tar.gz
  26. fw_untar wt-3.3.3.tar.gz
  27. cd wt-3.3.3
  28. mkdir -p build
  29. cd build
  30. cmake .. -DWT_CPP_11_MODE=-std=c++0x -DCMAKE_BUILD_TYPE=Release \
  31. -DCMAKE_INSTALL_PREFIX=${IROOT}/wt -DCONFIGDIR=${IROOT}/wt/etc \
  32. -DCMAKE_CXX_COMPILER=$(which g++-4.8) -DDESTDIR=${IROOT}/wt \
  33. -DWEBUSER=$(id -u -n) -DWEBGROUP=$(id -g -n)
  34. make
  35. make install