2020-10-30 15:14:11 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# https://breakfastquay.com/rubberband/
|
2021-04-03 23:09:54 +00:00
|
|
|
RUBBERBAND_SRC="https://breakfastquay.com/files/releases/rubberband-1.9.1.tar.bz2"
|
2020-10-30 15:14:11 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
|
|
|
[[ $VARIANT == gpl* ]] || return -1
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
|
|
|
mkdir rubberband
|
|
|
|
cd rubberband
|
|
|
|
|
2021-04-03 23:09:54 +00:00
|
|
|
wget "$RUBBERBAND_SRC" -O rubberband.tar.gz
|
|
|
|
tar xaf rubberband.tar.gz
|
2020-10-30 15:14:11 +00:00
|
|
|
rm rubberband.tar.gz
|
2021-04-03 23:09:54 +00:00
|
|
|
cd rubberband*
|
|
|
|
|
|
|
|
# Fix broken cross compilation
|
|
|
|
sed -i 's/build_machine.system/host_machine.system/' meson.build
|
|
|
|
|
|
|
|
mkdir build && cd build
|
2020-10-30 15:14:11 +00:00
|
|
|
|
|
|
|
local myconf=(
|
|
|
|
--prefix="$FFBUILD_PREFIX"
|
2021-04-03 23:09:54 +00:00
|
|
|
-Dno_shared=true
|
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
|
|
|
|
}
|