FFmpeg-Builds/scripts.d/50-rubberband.sh

48 lines
905 B
Bash
Raw Normal View History

#!/bin/bash
2022-07-12 15:54:12 +00:00
SCRIPT_REPO="https://github.com/breakfastquay/rubberband.git"
2023-05-29 12:10:36 +00:00
SCRIPT_COMMIT="7d5b101d278ac4f7eb557d481013b3cc5d8da478"
ffbuild_enabled() {
2021-06-20 19:59:48 +00:00
[[ $VARIANT == lgpl* ]] && return -1
return 0
}
ffbuild_dockerdl() {
2022-07-12 15:54:12 +00:00
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" rubberband
}
ffbuild_dockerbuild() {
cd "$FFBUILD_DLDIR"/rubberband
2021-04-03 23:09:54 +00:00
mkdir build && cd build
local myconf=(
--prefix="$FFBUILD_PREFIX"
2022-02-27 14:09:08 +00:00
-Ddefault_library=static
-Dfft=fftw
-Dresampler=libsamplerate
)
if [[ $TARGET == win* || $TARGET == linux* ]]; then
myconf+=(
2021-04-03 23:09:54 +00:00
--cross-file=/cross.meson
)
else
echo "Unknown target"
return -1
fi
2021-04-03 23:09:54 +00:00
meson "${myconf[@]}" ..
ninja -j$(nproc)
ninja install
}
ffbuild_configure() {
echo --enable-librubberband
}
ffbuild_unconfigure() {
echo --disable-librubberband
}