Add libvpx
This commit is contained in:
parent
5889107b8e
commit
99f68d51bb
1 changed files with 54 additions and 0 deletions
54
scripts.d/50-libvpx.sh
Executable file
54
scripts.d/50-libvpx.sh
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/bin/bash
|
||||
|
||||
LIBVPX_REPO="https://chromium.googlesource.com/webm/libvpx"
|
||||
LIBVPX_COMMIT="d1a78971ebcfd728c9c73b0cfbee69f470d4dc72"
|
||||
|
||||
ffbuild_enabled() {
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerstage() {
|
||||
to_df "ADD $SELF /root/libvpx.sh"
|
||||
to_df "RUN bash -c 'source /root/libvpx.sh && ffbuild_dockerbuild && rm /root/libvpx.sh'"
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$LIBVPX_REPO" libvpx || return -1
|
||||
cd libvpx
|
||||
git checkout "$LIBVPX_COMMIT" || return -1
|
||||
|
||||
local myconf=(
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--enable-pic
|
||||
--disable-examples
|
||||
--disable-tools
|
||||
--disable-docs
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
)
|
||||
|
||||
if [[ $TARGET == win* ]]; then
|
||||
myconf+=(
|
||||
--target=x86_64-win64-gcc
|
||||
)
|
||||
export CROSS="$FFBUILD_CROSS_PREFIX"
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}" || return -1
|
||||
make -j$(nproc) || return -1
|
||||
make install || return -1
|
||||
|
||||
cd ..
|
||||
rm -rf libvpx
|
||||
}
|
||||
|
||||
ffbuild_configure() {
|
||||
echo --enable-libvpx
|
||||
}
|
||||
|
||||
ffbuild_unconfigure() {
|
||||
echo --disable-libvpx
|
||||
}
|
Loading…
Reference in a new issue