helper_script.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. #/* Copyright (C) 2014 Carlos Aguilar Melchor, Joris Barrier, Marc-Olivier Killijian
  3. # * This file is part of XPIR.
  4. # *
  5. # * XPIR is free software: you can redistribute it and/or modify
  6. # * it under the terms of the GNU General Public License as published by
  7. # * the Free Software Foundation, either version 3 of the License, or
  8. # * (at your option) any later version.
  9. # *
  10. # * XPIR is distributed in the hope that it will be useful,
  11. # * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # * GNU General Public License for more details.
  14. # *
  15. # * You should have received a copy of the GNU General Public License
  16. # * along with XPIR. If not, see <http://www.gnu.org/licenses/>.
  17. #*/
  18. wget --no-check-certificate https://github.com/XPIR-team/XPIR-dependencies/raw/master/dependencies.tgz
  19. tar zxf dependencies.tgz
  20. rm dependencies.tgz
  21. mkdir local
  22. CONFIGURE="./configure CFLAGS=-I$PWD/local/include LDFLAGS=-L$PWD/local/lib --prefix=$PWD/local/"
  23. cd dependencies/mpfr-3.1.2 && $CONFIGURE && make && make install
  24. cd ../..
  25. cd dependencies/gmp-6.0.0 && $CONFIGURE --enable-cxx && make && make check && make install
  26. cd ../..
  27. LOCAL_PATH="$PWD/local/ "
  28. # Boostrap the build module
  29. cd dependencies/boost;
  30. ./bootstrap.sh
  31. ./bjam --prefix=$LOCAL_PATH install
  32. if [ `uname` = "Darwin" ]
  33. then
  34. cd ../../local/lib/
  35. install_name_tool -change libboost_system.dylib `pwd`/libboost_system.dylib libboost_thread.dylib
  36. fi
  37. cd ../..