Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

39 lines
1.8KB

  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 -std=c++17" | true
  18. # ./b2 --prefix=$$PWD/target/ toolset=clang cxxflags="-D_GLIBCXX_USE_CXX11_ABI=0 -stdlib=libc++ -std=c++17" linkflags="-stdlib=libc++" || true
  19. #./b2 --prefix=$$PWD/target/ toolset=clang || true
  20. # ^ ||true because with clang I saw a few libraries not compile correctly, we can ignore those.
  21. #./b2 --with-program_options --prefix=$$PWD/target/ toolset=clang cxxflags="-stdlib=libc++ -std=c++17" linkflags="-stdlib=libc++"
  22. package:
  23. rm -rf out
  24. mkdir -p out/opt/cppse/build/boost/include/
  25. cp -prv boost_1_72_0/stage/lib out/opt/cppse/build/boost/
  26. cp -prv boost_1_72_0/boost out/opt/cppse/build/boost/include/
  27. rm -rf boost_1.0_amd64.deb
  28. 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
  29. clean:
  30. rm -rf boost_1_72_0
  31. rm -rf out
  32. shell:
  33. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash