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

89 行
2.5KB

  1. SHELL:=/bin/bash
  2. UBUNTU_VERSION ?= 2404
  3. CODENAME ?= noble
  4. VERSION:=1.86.0
  5. build: $(CODENAME)/cppse-boost_$(VERSION)_amd64.deb
  6. $(CODENAME)/cppse-boost_$(VERSION)_amd64.deb:
  7. mkdir -p $(CODENAME)
  8. make ubuntu$(UBUNTU_VERSION)
  9. bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R
  10. ubuntu$(UBUNTU_VERSION):
  11. git clone --branch boost-1.86.0 --recursive https://github.com/boostorg/boost
  12. bash ../ubuntu$(UBUNTU_VERSION).sh make impl
  13. make package-ubuntu$(UBUNTU_VERSION)
  14. bash ../ubuntu$(UBUNTU_VERSION).sh chown $$(id -u):$$(id -g) . -R
  15. impl:
  16. switch-to-latest-clang
  17. pushd boost && \
  18. mkdir -p target && \
  19. CXX=$$(which c++) ./bootstrap.sh --prefix=$$PWD/target/ --with-toolset=clang && \
  20. ./b2 clean && \
  21. ./b2 --prefix=$$PWD/target/ toolset=clang cxxflags="-std=c++17 -stdlib=libstdc++ -fPIC" linkflags="-stdlib=libstdc++" --with-program_options \
  22. --with-system \
  23. --with-date_time \
  24. --with-thread \
  25. --with-chrono || true
  26. # do not use -D_GLIBCXX_USE_CXX11_ABI=0 , other libs I now compile with libstdc++ don't do it either.
  27. # with stdlib: \
  28. #./b2 --prefix=$$PWD/target/ toolset=clang cxxflags="-D_GLIBCXX_USE_CXX11_ABI=0 -stdlib=libc++ -std=c++17" linkflags="-stdlib=libc++" || true
  29. # without:
  30. #./b2 --prefix=$$PWD/target/ toolset=clang || true
  31. # ^ ||true because with clang I saw a few libraries not compile correctly, we can ignore those.
  32. #./b2 --with-program_options --prefix=$$PWD/target/ toolset=clang cxxflags="-stdlib=libc++ -std=c++17" linkflags="-stdlib=libc++"
  33. # also from; ./b2 --show-libraries && \
  34. #- atomic
  35. #- container
  36. #- context
  37. #- contract
  38. #- coroutine
  39. #- exception
  40. #- fiber
  41. #- filesystem
  42. #- graph
  43. #- graph_parallel
  44. #- headers
  45. #- iostreams
  46. #- locale
  47. #- log
  48. #- math
  49. #- mpi
  50. #- nowide
  51. #- python
  52. #- random
  53. #- regex
  54. #- serialization
  55. #- stacktrace
  56. #- test
  57. #- timer
  58. #- type_erasure
  59. #- wave
  60. package-ubuntu$(UBUNTU_VERSION):
  61. rm -rf out
  62. mkdir -p out/opt/cppse/build/boost/include/
  63. cp -L -prv boost/stage/lib out/opt/cppse/build/boost/
  64. cp -L -prv boost/boost out/opt/cppse/build/boost/include/
  65. rm -rf $(CODENAME)/cppse-boost_*_amd64.deb
  66. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -f -v $(VERSION) --iteration $(CODENAME) -s dir -t deb -n cppse-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
  67. cp -prv cppse-boost_*_amd64.deb $(CODENAME)/
  68. clean:
  69. rm -rf boost
  70. rm -rf out
  71. shell:
  72. FLAGS="-i --privileged" bash ../ubuntu2404.sh /bin/bash