FFmpeg-Builds/scripts.d/25-gmp.sh
2022-08-16 12:44:22 +02:00

44 lines
796 B
Bash
Executable file

#!/bin/bash
SCRIPT_REPO="https://gmplib.org/repo/gmp/"
SCRIPT_HGREV="d337756619a0"
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
retry-tool sh -c "rm -rf gmp && hg clone -r '$SCRIPT_HGREV' -u '$SCRIPT_HGREV' '$SCRIPT_REPO' gmp"
cd gmp
./.bootstrap
local myconf=(
--prefix="$FFBUILD_PREFIX"
--enable-maintainer-mode
--disable-shared
--enable-static
--with-pic
)
if [[ $TARGET == win* || $TARGET == linux* ]]; then
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
echo "Unknown target"
return -1
fi
./configure "${myconf[@]}"
make -j$(nproc)
make install
}
ffbuild_configure() {
echo --enable-gmp
}
ffbuild_unconfigure() {
echo --disable-gmp
}