FFmpeg-Builds/scripts.d/20-zlib.sh

43 lines
682 B
Bash
Raw Normal View History

2020-09-04 14:16:28 +00:00
#!/bin/bash
ZLIB_SRC="https://zlib.net/zlib-1.2.11.tar.gz"
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
mkdir zlib
cd zlib
2021-04-04 21:20:31 +00:00
wget "$ZLIB_SRC" -O zlib.tar.gz
tar xaf zlib.tar.gz
2020-09-04 14:16:28 +00:00
rm zlib.tar.gz
2021-04-04 21:20:31 +00:00
cd zlib*
2020-09-04 14:16:28 +00:00
local myconf=(
--prefix="$FFBUILD_PREFIX"
--static
)
if [[ $TARGET == win* ]]; then
export CC="${FFBUILD_CROSS_PREFIX}gcc"
export AR="${FFBUILD_CROSS_PREFIX}ar"
else
echo "Unknown target"
return -1
fi
2021-04-04 21:20:31 +00:00
./configure "${myconf[@]}"
make -j$(nproc)
make install
2020-09-04 14:16:28 +00:00
}
ffbuild_configure() {
echo --enable-zlib
}
ffbuild_unconfigure() {
echo --disable-zlib
}