All compiler work. All work except povray_wasm.
This commit is contained in:
commit
cc8c98a4c7
|
@ -0,0 +1 @@
|
|||
*.DS_Store
|
|
@ -0,0 +1 @@
|
|||
ffmpeg
|
|
@ -0,0 +1,12 @@
|
|||
#https://jeromewu.github.io/build-ffmpeg-webassembly-version-part-1-preparation/
|
||||
|
||||
FROM gcc:8
|
||||
|
||||
ENV FFMPEG_VERSION=n4.4
|
||||
|
||||
# Use depth=1 to download only the latest version
|
||||
RUN git clone --depth 1 --branch $FFMPEG_VERSION https://github.com/FFmpeg/FFmpeg /opt/ffmpeg
|
||||
|
||||
COPY build.sh /opt/ffmpeg/build.sh
|
||||
|
||||
RUN cd /opt/ffmpeg && bash build.sh
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash -x
|
||||
# gcc 8 is used in this tutorial, other versions may fail
|
||||
./configure --disable-x86asm
|
||||
make -j
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
FFMPEG_VERSION=n4.4
|
||||
|
||||
if [ ! -d ffmpeg ]; then
|
||||
git clone --depth 1 --branch $FFMPEG_VERSION https://github.com/FFmpeg/FFmpeg ffmpeg
|
||||
fi
|
||||
|
||||
cp build.sh ffmpeg/build.sh
|
||||
cd ffmpeg
|
||||
|
||||
docker pull gcc:8
|
||||
docker run \
|
||||
-v $PWD:/usr/src \
|
||||
gcc:8 \
|
||||
sh -c 'cd /usr/src && bash build.sh'
|
|
@ -0,0 +1 @@
|
|||
ffmpeg
|
|
@ -0,0 +1,9 @@
|
|||
FROM trzeci/emscripten:1.39.18-upstream
|
||||
|
||||
ENV FFMPEG_VERSION=n4.4
|
||||
|
||||
RUN git clone --depth 1 --branch $FFMPEG_VERSION https://github.com/FFmpeg/FFmpeg /opt/ffmpeg
|
||||
|
||||
COPY build.sh /opt/ffmpeg/build.sh
|
||||
|
||||
RUN cd /opt/ffmpeg && bash build.sh
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
# https://jeromewu.github.io/build-ffmpeg-webassembly-version-part-3-v0.1/
|
||||
|
||||
# verify Emscripten version
|
||||
emcc -v
|
||||
|
||||
# configure FFMpeg with Emscripten
|
||||
CFLAGS="-s USE_PTHREADS"
|
||||
LDFLAGS="$CFLAGS -s INITIAL_MEMORY=33554432" # 33554432 bytes = 32 MB
|
||||
CONFIG_ARGS=(
|
||||
--target-os=none # use none to prevent any os specific configurations
|
||||
--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
|
||||
)
|
||||
emconfigure ./configure "${CONFIG_ARGS[@]}"
|
||||
|
||||
# build dependencies
|
||||
emmake make -j
|
||||
|
||||
# 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[@]}"
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
#https://jeromewu.github.io/build-ffmpeg-webassembly-version-part-2-compile-with-emscripten/
|
||||
|
||||
FFMPEG_VERSION=n4.4
|
||||
EM_VERSION=1.39.18-upstream
|
||||
|
||||
if [ ! -d ffmpeg ]; then
|
||||
git clone --depth 1 --branch $FFMPEG_VERSION https://github.com/FFmpeg/FFmpeg ffmpeg
|
||||
fi
|
||||
|
||||
cp build.sh ffmpeg/build.sh
|
||||
cd ffmpeg
|
||||
|
||||
docker pull trzeci/emscripten:$EM_VERSION
|
||||
docker run \
|
||||
-v $PWD:/src \
|
||||
-v $PWD/cache-wasm:/emsdk_portable/.data/cache/wasm \
|
||||
trzeci/emscripten:$EM_VERSION \
|
||||
sh -c 'bash ./build.sh'
|
|
@ -0,0 +1 @@
|
|||
povray
|
|
@ -0,0 +1,5 @@
|
|||
FROM frolvlad/alpine-gxx
|
||||
|
||||
RUN apk update
|
||||
|
||||
RUN apk add --update boost-dev zlib-dev libpng-dev jpeg-dev tiff-dev openexr-dev autoconf automake make
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
EMAIL="himattmcwilliams@gmail.com"
|
||||
NAME="Matt McWilliams"
|
||||
|
||||
cd unix/
|
||||
sh prebuild.sh
|
||||
cd ../
|
||||
./configure COMPILED_BY="$NAME <$EMAIL>"
|
||||
make -j
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
POVRAY_VERSION=latest-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
|
||||
|
||||
docker build . -t povray_gcc
|
||||
|
||||
cd povray
|
||||
|
||||
docker run \
|
||||
-v $PWD:/usr/src \
|
||||
povray_gcc \
|
||||
sh -c 'cd /usr/src && sh build.sh'
|
|
@ -0,0 +1 @@
|
|||
povray
|
|
@ -0,0 +1,17 @@
|
|||
FROM emscripten/emsdk:2.0.26
|
||||
|
||||
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
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
EMAIL="himattmcwilliams@gmail.com"
|
||||
NAME="Matt McWilliams"
|
||||
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 -j
|
||||
|
||||
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[@]}"
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
#latest-stable
|
||||
POVRAY_VERSION=v3.7.0.0
|
||||
|
||||
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
|
||||
|
||||
docker build . -t povray_wasm
|
||||
|
||||
cd povray
|
||||
|
||||
docker run \
|
||||
-v $PWD:/usr/src \
|
||||
povray_wasm \
|
||||
sh -c 'cd /usr/src && bash build.sh'
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd povray
|
||||
|
||||
docker run -v $PWD:/usr/src povray_wasm sh -c "${1}"
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,151 @@
|
|||
`configure' configures POV-Ray 3.7.0.10 to adapt to many kinds of systems.
|
||||
|
||||
Usage: ./configure [OPTION]... [VAR=VALUE]...
|
||||
|
||||
To assign environment variables (e.g., CC, CFLAGS...), specify them as
|
||||
VAR=VALUE. See below for descriptions of some of the useful variables.
|
||||
|
||||
Defaults for the options are specified in brackets.
|
||||
|
||||
Configuration:
|
||||
-h, --help display this help and exit
|
||||
--help=short display options specific to this package
|
||||
--help=recursive display the short help of all the included packages
|
||||
-V, --version display version information and exit
|
||||
-q, --quiet, --silent do not print `checking ...' messages
|
||||
--cache-file=FILE cache test results in FILE [disabled]
|
||||
-C, --config-cache alias for `--cache-file=config.cache'
|
||||
-n, --no-create do not create output files
|
||||
--srcdir=DIR find the sources in DIR [configure dir or `..']
|
||||
|
||||
Installation directories:
|
||||
--prefix=PREFIX install architecture-independent files in PREFIX
|
||||
[/usr/local]
|
||||
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
||||
[PREFIX]
|
||||
|
||||
By default, `make install' will install all the files in
|
||||
`/usr/local/bin', `/usr/local/lib' etc. You can specify
|
||||
an installation prefix other than `/usr/local' using `--prefix',
|
||||
for instance `--prefix=$HOME'.
|
||||
|
||||
For better control, use the options below.
|
||||
|
||||
Fine tuning of the installation directories:
|
||||
--bindir=DIR user executables [EPREFIX/bin]
|
||||
--sbindir=DIR system admin executables [EPREFIX/sbin]
|
||||
--libexecdir=DIR program executables [EPREFIX/libexec]
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
|
||||
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
|
||||
--infodir=DIR info documentation [DATAROOTDIR/info]
|
||||
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
|
||||
--mandir=DIR man documentation [DATAROOTDIR/man]
|
||||
--docdir=DIR documentation root [DATAROOTDIR/doc/povray]
|
||||
--htmldir=DIR html documentation [DOCDIR]
|
||||
--dvidir=DIR dvi documentation [DOCDIR]
|
||||
--pdfdir=DIR pdf documentation [DOCDIR]
|
||||
--psdir=DIR ps documentation [DOCDIR]
|
||||
|
||||
Program names:
|
||||
--program-prefix=PREFIX prepend PREFIX to installed program names
|
||||
--program-suffix=SUFFIX append SUFFIX to installed program names
|
||||
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
|
||||
|
||||
X features:
|
||||
--x-includes=DIR X include files are in DIR
|
||||
--x-libraries=DIR X library files are in DIR
|
||||
|
||||
System types:
|
||||
--build=BUILD configure for building on BUILD [guessed]
|
||||
--host=HOST cross-compile to build programs to run on HOST [BUILD]
|
||||
|
||||
Optional Features:
|
||||
--disable-option-checking ignore unrecognized --enable/--with options
|
||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--enable-watch-cursor enable a watch cursor over the display while
|
||||
rendering (X Window only)
|
||||
--enable-debug enable compiler debugging mode
|
||||
--enable-profile enable program execution profiling
|
||||
--enable-static enable the linker to create static executable (no
|
||||
run-time dependancy to external libraries, larger
|
||||
binary)
|
||||
--disable-optimiz disable all compiler optimizations
|
||||
--disable-optimiz-arch disable architecture-specific compiler optimizations
|
||||
--disable-pipe disable usage of pipes during compilation (use
|
||||
temporary files instead)
|
||||
--disable-strip disable stripping all symbols from the object files
|
||||
(larger binary)
|
||||
--disable-shared disable linking with shared libraries (same as
|
||||
--enable-static)
|
||||
--disable-io-restrictions
|
||||
disable POV-Ray's mechanism for control of I/O
|
||||
operations
|
||||
--enable-silent-rules less verbose build output (undo: "make V=1")
|
||||
--disable-silent-rules verbose build output (undo: "make V=0")
|
||||
--enable-maintainer-mode
|
||||
enable make rules and dependencies not useful (and
|
||||
sometimes confusing) to the casual installer
|
||||
--enable-dependency-tracking
|
||||
do not reject slow dependency extractors
|
||||
--disable-dependency-tracking
|
||||
speeds up one-time build
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--without-cygwin-dll don't link with the Cygwin DLL (MinGW required)
|
||||
--with-zlib[=DIR] use the ZLIB library (in directory DIR)
|
||||
--with-libpng[=DIR] use the PNG library (in directory DIR)
|
||||
--with-libjpeg[=DIR] use the JPEG library (in directory DIR)
|
||||
--with-libtiff[=DIR] use the TIFF library (in directory DIR)
|
||||
--with-libsdl[=DIR] use the SDL library (in directory DIR)
|
||||
--with-libmkl[=DIR] use the Intel(R) Math Kernel Library (in directory
|
||||
DIR)
|
||||
--with-openexr[=DIR] use the OpenEXR library (in directory DIR)
|
||||
--with-boost[=ARG] use Boost library from a standard location
|
||||
(ARG=yes), from the specified location (ARG=<path>),
|
||||
or disable it (ARG=no) [ARG=yes]
|
||||
--with-boost-libdir=LIB_DIR
|
||||
Force given directory for boost libraries. Note that
|
||||
this will override library path detection, so use
|
||||
this parameter only if default library detection
|
||||
fails and you know exactly where your boost
|
||||
libraries are located.
|
||||
--with-boost-thread[=special-lib]
|
||||
use the Thread library from boost - it is possible
|
||||
to specify a certain library for the linker e.g.
|
||||
--with-boost-thread=boost_thread-gcc-mt
|
||||
--with-x use the X Window System
|
||||
|
||||
Some influential environment variables:
|
||||
COMPILED_BY customize the "unofficial version" message (required argument)
|
||||
NON_REDISTRIBUTABLE_BUILD
|
||||
see the installation documentation
|
||||
C99_COMPATIBLE_RADIOSITY
|
||||
adapt radiosity code to non-IEEE 754 floating point, requires
|
||||
ISO C99 compiler and library (see octree.cpp for details)
|
||||
CC C compiler command
|
||||
CFLAGS C compiler flags
|
||||
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
||||
nonstandard directory <lib dir>
|
||||
LIBS libraries to pass to the linker, e.g. -l<library>
|
||||
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
|
||||
you have headers in a nonstandard directory <include dir>
|
||||
CPP C preprocessor
|
||||
CXX C++ compiler command
|
||||
CXXFLAGS C++ compiler flags
|
||||
CXXCPP C++ preprocessor
|
||||
XMKMF Path to xmkmf, Makefile generator for X Window System
|
||||
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
|
||||
Report bugs to <unix-bugreports-2011@povray.org>.
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
cp build.sh povray/build.sh
|
||||
|
||||
cd povray
|
||||
|
||||
docker run -v $PWD:/usr/src povray_wasm sh -c 'cd /usr/src && EMCC_DEBUG=1 bash build.sh'
|
Loading…
Reference in New Issue