Migrate all libs (remove fdk-aac due to license issue and wavpack as no longer supported)
This commit is contained in:
27
build/aom.sh
Executable file
27
build/aom.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CM_FLAGS=(
|
||||
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR # assign lib and include install path
|
||||
-DCMAKE_TOOLCHAIN_FILE=$EM_TOOLCHAIN_FILE # use emscripten toolchain file
|
||||
-DBUILD_SHARED_LIBS=0 # disable shared library build
|
||||
-DAOM_TARGET_CPU=generic # use generic cpu
|
||||
-DENABLE_DOCS=0 # disable docs
|
||||
-DENABLE_TESTS=0 # disable tests
|
||||
-DENABLE_EXAMPLES=0 # disable examples
|
||||
-DENABLE_TOOLS=0 # disable tools
|
||||
-DCONFIG_RUNTIME_CPU_DETECT=0 # disable cpu detect
|
||||
-DCONFIG_WEBM_IO=0 # disable libwebm support
|
||||
)
|
||||
|
||||
CMBUILD_DIR=cmbuild
|
||||
rm -rf $CMBUILD_DIR
|
||||
mkdir -p $CMBUILD_DIR
|
||||
cd $CMBUILD_DIR
|
||||
|
||||
emmake cmake .. \
|
||||
-DAOM_EXTRA_C_FLAGS="$CFLAGS" \
|
||||
-DAOM_EXTRA_CXX_FLAGS="$CFLAGS" \
|
||||
${CM_FLAGS[@]}
|
||||
emmake make install -j
|
||||
@@ -15,7 +15,7 @@ CONF_FLAGS=(
|
||||
--disable-autodetect # disable env auto detect
|
||||
|
||||
# assign toolchains and extra flags
|
||||
--nm="llvm-nm"
|
||||
--nm=emnm
|
||||
--ar=emar
|
||||
--ranlib=emranlib
|
||||
--cc=emcc
|
||||
|
||||
15
build/freetype2.sh
Executable file
15
build/freetype2.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CONF_FLAGS=(
|
||||
--prefix=$INSTALL_DIR # install library in a build directory for FFmpeg to include
|
||||
--host=x86_64-gnu # use i686 linux
|
||||
--enable-shared=no # not to build shared library
|
||||
--without-harfbuzz # disable harfbuzz as incompatible
|
||||
)
|
||||
emconfigure ./autogen.sh
|
||||
emconfigure ./configure "${CONF_FLAGS[@]}"
|
||||
# build apinames manually to prevent it built by emcc
|
||||
gcc -o objs/apinames src/tools/apinames.c
|
||||
emmake make install -j
|
||||
16
build/fribidi.sh
Executable file
16
build/fribidi.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CONF_FLAGS=(
|
||||
--prefix=$INSTALL_DIR # install library in a build directory for FFmpeg to include
|
||||
--host=x86_64-linux
|
||||
--enable-shared=no # not to build shared library
|
||||
--enable-static=yes
|
||||
--disable-dependency-tracking
|
||||
--disable-debug
|
||||
)
|
||||
emconfigure ./autogen.sh "${CONF_FLAGS[@]}"
|
||||
# A hacky to fix "Too many symbolic links" error
|
||||
emmake make install -j || true
|
||||
mkdir -p $INSTALL_DIR/lib/pkgconfig && cp fribidi.pc $INSTALL_DIR/lib/pkgconfig/
|
||||
22
build/harfbuzz.sh
Executable file
22
build/harfbuzz.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CFLAGS="$CFLAGS -DHB_NO_PRAGMA_GCC_DIAGNOSTIC_ERROR"
|
||||
|
||||
# A hacky way to disable pthread
|
||||
if [[ "$FFMPEG_ST" == "yes" ]]; then
|
||||
sed -i 's#\[have_pthread=true\]#\[have_pthread=false\]#g' configure.ac
|
||||
else
|
||||
sed -i 's#\[have_pthread=false\]#\[have_pthread=true\]#g' configure.ac
|
||||
fi
|
||||
CXXFLAGS=$CFLAGS
|
||||
CONF_FLAGS=(
|
||||
--prefix=$INSTALL_DIR # install library in a build directory for FFmpeg to include
|
||||
--host=i686-gnu # use i686 linux
|
||||
--enable-shared=no # not to build shared library
|
||||
--enable-static
|
||||
)
|
||||
|
||||
emconfigure ./autogen.sh "${CONF_FLAGS[@]}"
|
||||
emmake make install -j
|
||||
16
build/libass.sh
Executable file
16
build/libass.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CONF_FLAGS=(
|
||||
--prefix=$INSTALL_DIR # install library in a build directory for FFmpeg to include
|
||||
--host=i686-gnu # use i686 linux
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--disable-asm # disable asm optimization
|
||||
--disable-fontconfig
|
||||
--disable-require-system-font-provider
|
||||
)
|
||||
|
||||
./autogen.sh && emconfigure ./configure "${CONF_FLAGS[@]}"
|
||||
emmake make install -j
|
||||
22
build/libvpx.sh
Executable file
22
build/libvpx.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CONF_FLAGS=(
|
||||
--prefix=$INSTALL_DIR # install library in a build directory for FFmpeg to include
|
||||
--target=generic-gnu # target with miminal features
|
||||
--disable-install-bins # not to install bins
|
||||
--disable-examples # not to build examples
|
||||
--disable-tools # not to build tools
|
||||
--disable-docs # not to build docs
|
||||
--disable-unit-tests # not to do unit tests
|
||||
--disable-dependency-tracking # speed up one-time build
|
||||
--extra-cflags="$CFLAGS" # flags to use pthread and code optimization
|
||||
--extra-cxxflags="$CXXFLAGS" # flags to use pthread and code optimization
|
||||
${FFMPEG_ST:+ --disable-multithread}
|
||||
)
|
||||
|
||||
emconfigure ./configure "${CONF_FLAGS[@]}"
|
||||
emmake make install -j
|
||||
# Fix ffmpeg configure error: "libvpx enabled but no supported decoders found"
|
||||
emranlib $INSTALL_DIR/lib/libvpx.a
|
||||
26
build/libwebp.sh
Executable file
26
build/libwebp.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CM_FLAGS=(
|
||||
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR
|
||||
-DCMAKE_TOOLCHAIN_FILE=$EM_TOOLCHAIN_FILE
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DZLIB_LIBRARY=$INSTALL_DIR/lib
|
||||
-DZLIB_INCLUDE_DIR=$INSTALL_DIR/include
|
||||
-DWEBP_ENABLE_SIMD=ON
|
||||
-DWEBP_BUILD_ANIM_UTILS=OFF
|
||||
-DWEBP_BUILD_CWEBP=OFF
|
||||
-DWEBP_BUILD_DWEBP=OFF
|
||||
-DWEBP_BUILD_GIF2WEBP=OFF
|
||||
-DWEBP_BUILD_IMG2WEBP=OFF
|
||||
-DWEBP_BUILD_VWEBP=OFF
|
||||
-DWEBP_BUILD_WEBPINFO=OFF
|
||||
-DWEBP_BUILD_WEBPMUX=OFF
|
||||
-DWEBP_BUILD_EXTRAS=OFF
|
||||
)
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
emmake cmake .. -DCMAKE_C_FLAGS="$CXXFLAGS" ${CM_FLAGS[@]}
|
||||
emmake make install
|
||||
15
build/ogg.sh
Executable file
15
build/ogg.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CONF_FLAGS=(
|
||||
--prefix=$INSTALL_DIR # install library in a build directory for FFmpeg to include
|
||||
--host=i686-linux # use i686 linux
|
||||
--disable-shared # disable shared library
|
||||
--disable-dependency-tracking # speed up one-time build
|
||||
--disable-maintainer-mode
|
||||
)
|
||||
|
||||
emconfigure ./autogen.sh
|
||||
emconfigure ./configure "${CONF_FLAGS[@]}"
|
||||
emmake make install -j
|
||||
18
build/opus.sh
Executable file
18
build/opus.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CONF_FLAGS=(
|
||||
--prefix=$INSTALL_DIR # install library in a build directory for FFmpeg to include
|
||||
--host=i686-gnu # use i686 linux
|
||||
--enable-shared=no # not to build shared library
|
||||
--disable-asm # not to use asm
|
||||
--disable-rtcd # not to detect cpu capabilities
|
||||
--disable-doc # not to build docs
|
||||
--disable-extra-programs # not to build demo and tests
|
||||
--disable-stack-protector
|
||||
)
|
||||
|
||||
emconfigure ./autogen.sh
|
||||
CFLAGS=$CFLAGS emconfigure ./configure "${CONF_FLAGS[@]}"
|
||||
emmake make install -j
|
||||
20
build/theora.sh
Executable file
20
build/theora.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CONF_FLAGS=(
|
||||
--prefix=$INSTALL_DIR # install library in a build directory for FFmpeg to include
|
||||
--host=i686-linux # use i686 linux
|
||||
--enable-shared=no # disable shared library
|
||||
--enable-docs=no
|
||||
--enable-fast-install=no
|
||||
--disable-spec
|
||||
--disable-asm
|
||||
--disable-examples
|
||||
--disable-oggtest # disable ogg tests
|
||||
--disable-vorbistest # disable vorbis tests
|
||||
--disable-sdltest # disable sdl tests
|
||||
)
|
||||
|
||||
emconfigure ./autogen.sh "${CONF_FLAGS[@]}"
|
||||
emmake make install -j
|
||||
21
build/vorbis.sh
Executable file
21
build/vorbis.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Remove this flag as clang doesn't recognize
|
||||
sed -i 's#-mno-ieee-fp##g' configure.ac
|
||||
|
||||
CONF_FLAGS=(
|
||||
--prefix=$INSTALL_DIR # install library in a build directory for FFmpeg to include
|
||||
--host=i686-linux # use i686 linux
|
||||
--enable-shared=no # disable shared library
|
||||
--enable-docs=no
|
||||
--enable-examples=no
|
||||
--enable-fast-install=no
|
||||
--disable-oggtest # disable oggtests
|
||||
--disable-dependency-tracking # speed up one-time build
|
||||
)
|
||||
|
||||
emconfigure ./autogen.sh
|
||||
emconfigure ./configure "${CONF_FLAGS[@]}"
|
||||
emmake make install -j
|
||||
19
build/wavpack.sh
Executable file
19
build/wavpack.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CONF_FLAGS=(
|
||||
--prefix=$INSTALL_DIR # install library in a build directory for FFmpeg to include
|
||||
--host=x86-linux-gnu # use x86 linux as host
|
||||
--disable-asm # disable asm optimization
|
||||
--disable-man # disable docs
|
||||
--disable-tests # disable tests
|
||||
--disable-apps # disable wavpack apps
|
||||
--disable-dsd # disalbe legacy
|
||||
--enable-legacy # enable compability for old version of wav
|
||||
--disable-shared # enable building static library
|
||||
--disable-dependency-tracking # speed up one-time build
|
||||
--disable-maintainer-mode
|
||||
)
|
||||
CFLAGS=$CFLAGS emconfigure ./autogen.sh "${CONF_FLAGS[@]}"
|
||||
emmake make install -j
|
||||
16
build/zlib.sh
Executable file
16
build/zlib.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CM_FLAGS=(
|
||||
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR
|
||||
-DCMAKE_TOOLCHAIN_FILE=$EM_TOOLCHAIN_FILE
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DSKIP_INSTALL_FILES=ON
|
||||
)
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
emmake cmake .. -DCMAKE_C_FLAGS="$CXXFLAGS" ${CM_FLAGS[@]}
|
||||
emmake make clean
|
||||
emmake make install
|
||||
Reference in New Issue
Block a user