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

56 行
2.1KB

  1. SHELL:=/bin/bash
  2. ubuntu2204:
  3. git clone -b v3.0.1 https://github.com/gurki/vivid
  4. bash ../ubuntu2204.sh make impl
  5. bash ../ubuntu2204.sh make impl-emscripten
  6. make package-ubuntu2204
  7. bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  8. impl:
  9. git config --global --add safe.directory '*'
  10. switch-to-latest-clang
  11. # patch away issue of adding tests, currently catch is broken in clang 14.
  12. cat vivid/CMakeLists.txt | head -n -1 > vivid/CMakeLists.txt.new
  13. mv vivid/CMakeLists.txt.new vivid/CMakeLists.txt
  14. # build without tests for now
  15. mkdir -p vivid_out && \
  16. pushd vivid && \
  17. mkdir -p build && \
  18. pushd build && \
  19. cmake -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/../vivid_out .. && \
  20. make -j $$(nproc) && \
  21. make install
  22. impl-emscripten:
  23. git config --global --add safe.directory '*'
  24. switch-to-latest-clang
  25. # patch away issue of adding tests, currently catch is broken in clang 14.
  26. cat vivid/CMakeLists.txt | head -n -1 > vivid/CMakeLists.txt.new
  27. mv vivid/CMakeLists.txt.new vivid/CMakeLists.txt
  28. # build without tests for now
  29. mkdir -p vivid_out && \
  30. pushd vivid && \
  31. mkdir -p build2 && \
  32. pushd build2 && \
  33. CXX=/emsdk/upstream/emscripten/em++ cmake -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/../vivid_out2 .. && \
  34. make -j $$(nproc) && \
  35. make install
  36. package-ubuntu2204:
  37. rm -rf out
  38. mkdir -p out/opt/cppse/build/vivid/
  39. cp -prv vivid/vivid_out/* out/opt/cppse/build/vivid/
  40. # emscripten version
  41. cp -prv vivid/vivid_out2/lib/libvivid.a out/opt/cppse/build/vivid/lib/libvivid-em.a
  42. cp -prv vivid/build/_deps/glm-src/glm out/opt/cppse/build/vivid/include/
  43. rm -rf vivid_*_amd64.deb
  44. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:22.04 fpm -v 1.1.1 -s dir -t deb -n vivid --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "vivid - build dependency" --url "https://github.com/gurki/vivid.git" --deb-generate-changes -C /src/out
  45. clean:
  46. rm -rf vivid
  47. rm -rf out
  48. shell:
  49. FLAGS="-i --privileged" bash ../ubuntu2204.sh /bin/bash