選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

73 行
2.9KB

  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. ubuntu2404:
  9. git clone -b v3.0.1 https://github.com/gurki/vivid
  10. bash ../ubuntu2404.sh make impl
  11. bash ../ubuntu2404.sh make impl-emscripten
  12. make package-ubuntu2404
  13. bash ../ubuntu2404.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  14. impl:
  15. git config --global --add safe.directory '*'
  16. switch-to-latest-clang
  17. # patch away issue of adding tests, currently catch is broken in clang 14.
  18. cat vivid/CMakeLists.txt | head -n -1 > vivid/CMakeLists.txt.new
  19. mv vivid/CMakeLists.txt.new vivid/CMakeLists.txt
  20. # build without tests for now
  21. mkdir -p vivid_out && \
  22. pushd vivid && \
  23. mkdir -p build && \
  24. pushd build && \
  25. cmake -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/../vivid_out .. && \
  26. make -j $$(nproc) && \
  27. make install
  28. impl-emscripten:
  29. git config --global --add safe.directory '*'
  30. switch-to-latest-clang
  31. # patch away issue of adding tests, currently catch is broken in clang 14.
  32. cat vivid/CMakeLists.txt | head -n -1 > vivid/CMakeLists.txt.new
  33. mv vivid/CMakeLists.txt.new vivid/CMakeLists.txt
  34. # build without tests for now
  35. mkdir -p vivid_out && \
  36. pushd vivid && \
  37. mkdir -p build2 && \
  38. pushd build2 && \
  39. CXX=/emsdk/upstream/emscripten/em++ cmake -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/../vivid_out2 .. && \
  40. make -j $$(nproc) && \
  41. make install
  42. package-ubuntu2204:
  43. rm -rf out
  44. mkdir -p out/opt/cppse/build/vivid/
  45. cp -prv vivid/vivid_out/* out/opt/cppse/build/vivid/
  46. # emscripten version
  47. cp -prv vivid/vivid_out2/lib/libvivid.a out/opt/cppse/build/vivid/lib/libvivid-em.a
  48. cp -prv vivid/build/_deps/glm-src/glm out/opt/cppse/build/vivid/include/
  49. rm -rf vivid_*_amd64.deb
  50. 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
  51. package-ubuntu2404:
  52. rm -rf out
  53. mkdir -p out/opt/cppse/build/vivid/
  54. cp -prv vivid/vivid_out/* out/opt/cppse/build/vivid/
  55. # emscripten version
  56. cp -prv vivid/vivid_out2/lib/libvivid.a out/opt/cppse/build/vivid/lib/libvivid-em.a
  57. cp -prv vivid/build/_deps/glm-src/glm out/opt/cppse/build/vivid/include/
  58. rm -rf vivid_*_amd64.deb
  59. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.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
  60. clean:
  61. rm -rf vivid
  62. rm -rf out
  63. shell:
  64. FLAGS="-i --privileged" bash ../ubuntu2204.sh /bin/bash