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

46 lines
940 B
Bash
Raw Normal View History

#!/bin/bash
2021-10-28 18:47:11 +00:00
RUBBERBAND_REPO="https://github.com/breakfastquay/rubberband.git"
RUBBERBAND_COMMIT="b3c920a35ed1ea4da37ddd62a12d3a81278097d1"
ffbuild_enabled() {
2021-06-20 19:59:48 +00:00
[[ $VARIANT == lgpl* ]] && return -1
return 0
}
ffbuild_dockerbuild() {
2021-10-28 18:47:11 +00:00
git-mini-clone "$RUBBERBAND_REPO" "$RUBBERBAND_COMMIT" rubberband
cd rubberband
2021-04-03 23:09:54 +00:00
mkdir build && cd build
local myconf=(
--prefix="$FFBUILD_PREFIX"
2021-04-03 23:09:54 +00:00
-Dno_shared=true
)
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
# Fix static linking
echo "Requires.private: fftw3 samplerate" >> "$FFBUILD_PREFIX"/lib/pkgconfig/rubberband.pc
}
ffbuild_configure() {
echo --enable-librubberband
}
ffbuild_unconfigure() {
echo --disable-librubberband
}