diff --git a/povray_wasm/build_ubuntu.sh b/povray_wasm/build_ubuntu.sh new file mode 100644 index 0000000..3425bbe --- /dev/null +++ b/povray_wasm/build_ubuntu.sh @@ -0,0 +1,15 @@ +#!/bin/bash -x + +EMAIL="hi@mmcwilliams.com" +NAME="Matt McWilliams" +#CPPFLAGS="-Wall -Wextra -Werror -I/usr/include/OpenEXR" +#CPPFLAGS="-pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -Wno-non-template-friend -s -O3 -ffast-math -march=native" +CPPFLAGS="-include uint-hack.h -I/usr/include/OpenEXR" + +cd unix/ +./prebuild.sh +cd ../ +emconfigure ./configure COMPILED_BY="$NAME <$EMAIL>" LDFLAGS="-Wl,-V" +echo "typedef unsigned int uint;" > uint-hack.h +emmake make -j CPPFLAGS="${CPPFLAGS}" +#make install \ No newline at end of file diff --git a/povray_wasm/compile.sh b/povray_wasm/compile.sh index 448c002..6721493 100644 --- a/povray_wasm/compile.sh +++ b/povray_wasm/compile.sh @@ -1,19 +1,8 @@ #!/bin/bash -#latest-stable#v3.7.0.0 -POVRAY_VERSION=3.7-stable - -if [ ! -d povray ]; then - git clone --depth 1 --branch $POVRAY_VERSION https://github.com/POV-Ray/povray povray -fi - -cp build.sh povray/build.sh - -sudo docker build . -t povray_wasm - -cd povray +bash ./build_docker.sh sudo docker run \ - -v $PWD:/usr/src \ + -v $PWD:/usr/src/build \ povray_wasm \ - sh -c 'cd /usr/src && bash build.sh' \ No newline at end of file + sh -c 'cd /usr/src/povray && cp ../build/build_ubuntu.sh build.sh && bash build.sh' \ No newline at end of file