|
- SHELL:=/bin/bash
-
- ubuntu2204:
- git clone -b v3.0.1 https://github.com/gurki/vivid
- bash ../ubuntu2204.sh make impl
- bash ../ubuntu2204.sh make impl-emscripten
- make package-ubuntu2204
- bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions
-
- ubuntu2404:
- git clone -b v3.0.1 https://github.com/gurki/vivid
- bash ../ubuntu2404.sh make impl
- bash ../ubuntu2404.sh make impl-emscripten
- make package-ubuntu2404
- bash ../ubuntu2404.sh chown $$(id -u):$$(id -g) . -R # fix permissions
-
- impl:
- git config --global --add safe.directory '*'
- switch-to-latest-clang
- # patch away issue of adding tests, currently catch is broken in clang 14.
- cat vivid/CMakeLists.txt | head -n -1 > vivid/CMakeLists.txt.new
- mv vivid/CMakeLists.txt.new vivid/CMakeLists.txt
- # build without tests for now
- mkdir -p vivid_out && \
- pushd vivid && \
- mkdir -p build && \
- pushd build && \
- cmake -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/../vivid_out .. && \
- make -j $$(nproc) && \
- make install
-
- impl-emscripten:
- git config --global --add safe.directory '*'
- switch-to-latest-clang
- # patch away issue of adding tests, currently catch is broken in clang 14.
- cat vivid/CMakeLists.txt | head -n -1 > vivid/CMakeLists.txt.new
- mv vivid/CMakeLists.txt.new vivid/CMakeLists.txt
- # build without tests for now
- mkdir -p vivid_out && \
- pushd vivid && \
- mkdir -p build2 && \
- pushd build2 && \
- CXX=/emsdk/upstream/emscripten/em++ cmake -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/../vivid_out2 .. && \
- make -j $$(nproc) && \
- make install
-
- package-ubuntu2204:
- rm -rf out
- mkdir -p out/opt/cppse/build/vivid/
- cp -prv vivid/vivid_out/* out/opt/cppse/build/vivid/
- # emscripten version
- cp -prv vivid/vivid_out2/lib/libvivid.a out/opt/cppse/build/vivid/lib/libvivid-em.a
- cp -prv vivid/build/_deps/glm-src/glm out/opt/cppse/build/vivid/include/
- rm -rf vivid_*_amd64.deb
- 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
-
- package-ubuntu2404:
- rm -rf out
- mkdir -p out/opt/cppse/build/vivid/
- cp -prv vivid/vivid_out/* out/opt/cppse/build/vivid/
- # emscripten version
- cp -prv vivid/vivid_out2/lib/libvivid.a out/opt/cppse/build/vivid/lib/libvivid-em.a
- cp -prv vivid/build/_deps/glm-src/glm out/opt/cppse/build/vivid/include/
- rm -rf vivid_*_amd64.deb
- 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
-
- clean:
- rm -rf vivid
- rm -rf out
-
- shell:
- FLAGS="-i --privileged" bash ../ubuntu2204.sh /bin/bash
|