2020-10-30 15:14:11 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-10-28 18:47:11 +00:00
|
|
|
RUBBERBAND_REPO="https://github.com/breakfastquay/rubberband.git"
|
2022-04-23 19:49:20 +00:00
|
|
|
RUBBERBAND_COMMIT="95371b882b01af86132d17be739de82d2fadf6d7"
|
2020-10-30 15:14:11 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
2021-06-20 19:59:48 +00:00
|
|
|
[[ $VARIANT == lgpl* ]] && return -1
|
2020-10-30 15:14:11 +00:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
2021-10-28 18:47:11 +00:00
|
|
|
git-mini-clone "$RUBBERBAND_REPO" "$RUBBERBAND_COMMIT" rubberband
|
2020-10-30 15:14:11 +00:00
|
|
|
cd rubberband
|
|
|
|
|
2021-04-03 23:09:54 +00:00
|
|
|
mkdir build && cd build
|
2020-10-30 15:14:11 +00:00
|
|
|
|
|
|
|
local myconf=(
|
|
|
|
--prefix="$FFBUILD_PREFIX"
|
2022-02-27 14:09:08 +00:00
|
|
|
-Ddefault_library=static
|
2020-10-30 15:14:11 +00:00
|
|
|
)
|
|
|
|
|
2021-05-14 02:52:29 +00:00
|
|
|
if [[ $TARGET == win* || $TARGET == linux* ]]; then
|
2020-10-30 15:14:11 +00:00
|
|
|
myconf+=(
|
2021-04-03 23:09:54 +00:00
|
|
|
--cross-file=/cross.meson
|
2020-10-30 15:14:11 +00:00
|
|
|
)
|
2021-05-14 02:52:29 +00:00
|
|
|
else
|
2020-10-30 15:14:11 +00:00
|
|
|
echo "Unknown target"
|
|
|
|
return -1
|
|
|
|
fi
|
|
|
|
|
2021-04-03 23:09:54 +00:00
|
|
|
meson "${myconf[@]}" ..
|
|
|
|
ninja -j$(nproc)
|
|
|
|
ninja install
|
2020-10-30 15:14:11 +00:00
|
|
|
|
|
|
|
# Fix static linking
|
|
|
|
echo "Requires.private: fftw3 samplerate" >> "$FFBUILD_PREFIX"/lib/pkgconfig/rubberband.pc
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_configure() {
|
|
|
|
echo --enable-librubberband
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_unconfigure() {
|
|
|
|
echo --disable-librubberband
|
|
|
|
}
|