You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 line
1.7KB

  1. SHELL:=/bin/bash
  2. boost:
  3. wget "https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.bz2"
  4. tar -xf boost_1_72_0.tar.bz2
  5. bash ../ubuntu1804.sh make impl
  6. make package
  7. impl:
  8. update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-9 40
  9. update-alternatives --install /usr/bin/cc cc /usr/bin/clang-9 40
  10. update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 40
  11. update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 40
  12. update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-9 40
  13. pushd boost_1_72_0 && \
  14. mkdir -p target && \
  15. CXX=$$(which c++) ./bootstrap.sh --prefix=$$PWD/target/ --with-toolset=clang && \
  16. ./b2 clean && \
  17. ./b2 --prefix=$$PWD/target/ toolset=clang cxxflags="-D_GLIBCXX_USE_CXX11_ABI=0 -stdlib=libc++ -std=c++17" linkflags="-stdlib=libc++" || true
  18. #./b2 --prefix=$$PWD/target/ toolset=clang || true
  19. # ^ ||true because with clang I saw a few libraries not compile correctly, we can ignore those.
  20. #./b2 --with-program_options --prefix=$$PWD/target/ toolset=clang cxxflags="-stdlib=libc++ -std=c++17" linkflags="-stdlib=libc++"
  21. package:
  22. rm -rf out
  23. mkdir -p out/opt/cppse/build/boost/include/
  24. cp -prv boost_1_72_0/stage/lib out/opt/cppse/build/boost/
  25. cp -prv boost_1_72_0/boost out/opt/cppse/build/boost/include/
  26. rm -rf boost_1.0_amd64.deb
  27. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -s dir -t deb -n boost --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "boost - build dependency" --url "https://github.com/liballeg/boost.git" --deb-generate-changes -C /src/out
  28. clean:
  29. rm -rf boost_1_72_0
  30. rm -rf out
  31. shell:
  32. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash