From b9269d13a0f2761e99e3ec2a2fd3720bb4f87a9f Mon Sep 17 00:00:00 2001 From: mattmcw Date: Fri, 22 Jul 2022 14:11:29 -0400 Subject: [PATCH] Add a project for building povray from source on an ubuntu focal base. Using this to pull insights from povray_wasm project that has been languishing without resolution. --- povray_ubuntu_gcc/.gitignore | 2 ++ povray_ubuntu_gcc/Dockerfile | 34 +++++++++++++++++++++++++++++ povray_ubuntu_gcc/build_docker.sh | 3 +++ povray_ubuntu_gcc/cmd.sh | 7 ++++++ povray_ubuntu_gcc/compile.sh | 7 ++++++ povray_ubuntu_gcc/compile_povray.sh | 11 ++++++++++ 6 files changed, 64 insertions(+) create mode 100644 povray_ubuntu_gcc/.gitignore create mode 100644 povray_ubuntu_gcc/Dockerfile create mode 100644 povray_ubuntu_gcc/build_docker.sh create mode 100644 povray_ubuntu_gcc/cmd.sh create mode 100644 povray_ubuntu_gcc/compile.sh create mode 100644 povray_ubuntu_gcc/compile_povray.sh diff --git a/povray_ubuntu_gcc/.gitignore b/povray_ubuntu_gcc/.gitignore new file mode 100644 index 0000000..a87a34f --- /dev/null +++ b/povray_ubuntu_gcc/.gitignore @@ -0,0 +1,2 @@ +povray +bin \ No newline at end of file diff --git a/povray_ubuntu_gcc/Dockerfile b/povray_ubuntu_gcc/Dockerfile new file mode 100644 index 0000000..10cc7aa --- /dev/null +++ b/povray_ubuntu_gcc/Dockerfile @@ -0,0 +1,34 @@ +FROM ubuntu:focal + +RUN apt update + +RUN DEBIAN_FRONTEND=noninteractive apt install -y \ + git \ + bash \ + build-essential \ + coreutils \ + libboost-all-dev \ + libboost-date-time-dev \ + libz-dev \ + libpng-dev \ + libjpeg-dev \ + libtiff-dev \ + libopenexr-dev \ + libsdl-dev \ + libilmbase-dev \ + autoconf \ + pkg-config \ + automake \ + make + +WORKDIR /usr/src/ + +ENV POVRAY_VERSION=3.7-stable + +RUN cd /usr/src/ && git clone --depth 1 --branch $POVRAY_VERSION https://github.com/POV-Ray/povray povray + +WORKDIR /usr/src/povray + +COPY ./compile_povray.sh /usr/src/povray/compile_povray.sh + +RUN bash compile_povray.sh \ No newline at end of file diff --git a/povray_ubuntu_gcc/build_docker.sh b/povray_ubuntu_gcc/build_docker.sh new file mode 100644 index 0000000..6ca866d --- /dev/null +++ b/povray_ubuntu_gcc/build_docker.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +sudo docker build . -t povray_ubuntu_gcc \ No newline at end of file diff --git a/povray_ubuntu_gcc/cmd.sh b/povray_ubuntu_gcc/cmd.sh new file mode 100644 index 0000000..4ed1bf1 --- /dev/null +++ b/povray_ubuntu_gcc/cmd.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +sudo docker run \ + --cpus=2 \ + -v $PWD:/usr/src \ + povray_ubuntu_gcc \ + sh -c "${1}" diff --git a/povray_ubuntu_gcc/compile.sh b/povray_ubuntu_gcc/compile.sh new file mode 100644 index 0000000..2817c8d --- /dev/null +++ b/povray_ubuntu_gcc/compile.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +sudo docker run \ + --cpus=2 \ + -v $PWD/compile_povray.sh:/usr/src/povray/compile_povray.sh \ + povray_ubuntu_gcc \ + sh -c 'sh compile_povray.sh' \ No newline at end of file diff --git a/povray_ubuntu_gcc/compile_povray.sh b/povray_ubuntu_gcc/compile_povray.sh new file mode 100644 index 0000000..2ac774c --- /dev/null +++ b/povray_ubuntu_gcc/compile_povray.sh @@ -0,0 +1,11 @@ +#!/bin/bash -x + +EMAIL="hi@mmcwilliams.com" +NAME="Matt McWilliams" + +cd unix/ +./prebuild.sh +cd ../ +./configure COMPILED_BY="$NAME <$EMAIL>" +make +make install \ No newline at end of file