您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

43 行
1.9KB

  1. SHELL:=/bin/bash
  2. boost_:
  3. # below URL is unreliable
  4. # wget "https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.bz2"
  5. #tar -xf boost_1_72_0.tar.bz2
  6. git clone --branch boost-1.73.0 --recursive https://github.com/boostorg/boost
  7. bash ../ubuntu1804.sh make impl
  8. make package
  9. impl:
  10. update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
  11. update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
  12. update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
  13. update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
  14. update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
  15. pushd boost && \
  16. mkdir -p target && \
  17. CXX=$$(which c++) ./bootstrap.sh --prefix=$$PWD/target/ --with-toolset=clang && \
  18. ./b2 clean && \
  19. ./b2 --prefix=$$PWD/target/ toolset=clang cxxflags="-D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17" || true
  20. # with stdlib: \
  21. #./b2 --prefix=$$PWD/target/ toolset=clang cxxflags="-D_GLIBCXX_USE_CXX11_ABI=0 -stdlib=libc++ -std=c++17" linkflags="-stdlib=libc++" || true
  22. # without:
  23. #./b2 --prefix=$$PWD/target/ toolset=clang || true
  24. # ^ ||true because with clang I saw a few libraries not compile correctly, we can ignore those.
  25. #./b2 --with-program_options --prefix=$$PWD/target/ toolset=clang cxxflags="-stdlib=libc++ -std=c++17" linkflags="-stdlib=libc++"
  26. package:
  27. rm -rf out
  28. mkdir -p out/opt/cppse/build/boost/include/
  29. cp -prv boost/stage/lib out/opt/cppse/build/boost/
  30. cp -prv boost/boost out/opt/cppse/build/boost/include/
  31. rm -rf boost_*_amd64.deb
  32. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -v 1.1 -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
  33. clean:
  34. rm -rf boost
  35. rm -rf out
  36. shell:
  37. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash