Clean up repo and use better names for files
This commit is contained in:
parent
1b2f685846
commit
f6883f107f
|
@ -15,9 +15,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y bash \
|
|||
RUN cd /opt && git clone https://github.com/boostorg/boost.git boost
|
||||
RUN cd /opt/boost && git submodule update --init --recursive
|
||||
|
||||
RUN mkdir -p /opt/libboost_build
|
||||
RUN mkdir -p /opt/libboost
|
||||
|
||||
RUN cd /opt/boost && ./bootstrap.sh
|
||||
|
||||
RUN cd /opt/boost && ./b2 -j4 toolset=emscripten \
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
FROM emscripten/emsdk:latest
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt install -y \
|
||||
bash \
|
||||
libz-dev \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libtiff-dev \
|
||||
libopenexr-dev \
|
||||
autoconf \
|
||||
automake \
|
||||
make
|
||||
|
||||
RUN cd /opt && git clone --recursive https://github.com/boostorg/boost.git
|
||||
|
||||
RUN echo "using emscripten : : em++ ;" > ~/user-config.jam
|
||||
|
||||
RUN mkdir -p /opt/libboost_build
|
||||
RUN mkdir -p /opt/libboost
|
||||
|
||||
RUN cd /opt/boost && ./bootstrap.sh --with-libraries=all --with-toolset=emscripten
|
||||
|
||||
RUN cd /opt/boost && ./b2 -j4 toolset=emscripten --test-config=/opt/user-config.jam --prefix=/opt/libboost --build-dir=/opt/libboost_build link=static variant=release address-model=64 architecture=x86
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
FROM emscripten/emsdk:latest
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt install -y \
|
||||
bash \
|
||||
libz-dev \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libtiff-dev \
|
||||
libopenexr-dev \
|
||||
autoconf \
|
||||
automake \
|
||||
make \
|
||||
libboost-all-dev
|
||||
|
||||
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
|
|
@ -1,73 +0,0 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
EMAIL="himattmcwilliams@gmail.com"
|
||||
NAME="Matt McWilliams"
|
||||
BOOST_ROOT="/lib/x86_64-linux-gnu/"
|
||||
#Build dir?
|
||||
#BOOST_ROOT=/opt/libboost/lib
|
||||
|
||||
# https://jeromewu.github.io/build-ffmpeg-webassembly-version-part-3-v0.1/
|
||||
# altered for povray
|
||||
|
||||
# verify Emscripten version
|
||||
emcc -v > build.log
|
||||
|
||||
cd unix/
|
||||
|
||||
sh prebuild.sh
|
||||
|
||||
# configure povray
|
||||
CFLAGS="-pthread -DBOOST_THREAD_USE_LIB -s USE_BOOST_HEADERS=1"
|
||||
LDFLAGS="$CFLAGS -s INITIAL_MEMORY=33554432" # 33554432 bytes = 32 MB
|
||||
CONFIG_ARGS=(
|
||||
--arch=x86_32 # use x86_32 to achieve minimal architectural optimization
|
||||
--enable-cross-compile # enable cross compile
|
||||
--disable-x86asm # disable x86 asm
|
||||
--disable-inline-asm # disable inline asm
|
||||
--disable-stripping # disable stripping
|
||||
--disable-programs # disable programs build (incl. ffplay, ffprobe & ffmpeg)
|
||||
--disable-doc # disable doc
|
||||
--extra-cflags="$CFLAGS"
|
||||
--extra-cxxflags="$CFLAGS"
|
||||
--extra-ldflags="$LDFLAGS"
|
||||
--nm="llvm-nm -g"
|
||||
--ar=emar
|
||||
--as=llvm-as
|
||||
--ranlib=llvm-ranlib
|
||||
--cc=emcc
|
||||
--cxx=em++
|
||||
--objcc=emcc
|
||||
--dep-cc=emcc
|
||||
)
|
||||
|
||||
ARGS=(
|
||||
LIBS="-lboost_system -lboost_thread -lboost_date_time"
|
||||
COMPILED_BY="$NAME <$EMAIL>"
|
||||
CC=emcc
|
||||
CXX=em++
|
||||
CFLAGS="$CFLAGS"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
LDFLAGS="$LDFLAGS"
|
||||
--host=wasm32
|
||||
)
|
||||
|
||||
BOOST_ROOT=$BOOST_ROOT emconfigure ./configure "${ARGS[@]}"
|
||||
|
||||
# build dependencies
|
||||
emmake make -j2
|
||||
|
||||
exit
|
||||
|
||||
# build ffmpeg.wasm
|
||||
mkdir -p wasm/dist
|
||||
ARGS=(
|
||||
-I. -I./fftools
|
||||
-Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample
|
||||
-Qunused-arguments
|
||||
-o wasm/dist/ffmpeg.js fftools/ffmpeg_opt.c fftools/ffmpeg_filter.c fftools/ffmpeg_hw.c fftools/cmdutils.c fftools/ffmpeg.c
|
||||
-lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -lm
|
||||
-s USE_SDL=2 # use SDL2
|
||||
-s USE_PTHREADS=1 # enable pthreads support
|
||||
-s INITIAL_MEMORY=33554432 # 33554432 bytes = 32 MB
|
||||
)
|
||||
emcc "${ARGS[@]}"
|
|
@ -5,4 +5,4 @@ bash ./build_docker.sh
|
|||
sudo docker run \
|
||||
-v $PWD:/usr/src/build \
|
||||
povray_wasm \
|
||||
sh -c 'cd /usr/src/povray && cp ../build/build_ubuntu.sh build.sh && bash build.sh'
|
||||
sh -c 'cd /usr/src/povray && cp ../build/build.sh build.sh && bash build.sh'
|
Loading…
Reference in New Issue