From 1b48c5f79648a4cf01d515d1ebbce89d44954916 Mon Sep 17 00:00:00 2001 From: BtbN Date: Sun, 6 Sep 2020 20:41:17 +0200 Subject: [PATCH] Add libwavpack --- scripts.d/50-wavpack.sh | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 scripts.d/50-wavpack.sh diff --git a/scripts.d/50-wavpack.sh b/scripts.d/50-wavpack.sh new file mode 100755 index 0000000..5074f15 --- /dev/null +++ b/scripts.d/50-wavpack.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +WAVPACK_REPO="https://github.com/dbry/WavPack" +WAVPACK_COMMIT="e4e8d191e8dd74cbdbeaef3232c16a7ef517e68d" + +ffbuild_enabled() { + return 0 +} + +ffbuild_dockerstage() { + to_df "ADD $SELF /stage.sh" + to_df "RUN run_stage" +} + +ffbuild_dockerbuild() { + git-mini-clone "$WAVPACK_REPO" "$WAVPACK_COMMIT" wavpack + cd wavpack + + autoreconf -i + + local myconf=( + --prefix="$FFBUILD_PREFIX" + --disable-shared + --enable-static + --enable-legacy + --with-pic + --with-iconv + --disable-man + --enable-libcrypto + --disable-apps + ) + + if [[ $TARGET == win* ]]; then + myconf+=( + --host="$FFBUILD_TOOLCHAIN" + ) + else + echo "Unknown target" + return -1 + fi + + ./configure "${myconf[@]}" || return -1 + make -j$(nproc) || return -1 + make install || return -1 + + cd .. + rm -rf wavpack +} + +ffbuild_configure() { + echo --enable-libwavpack +} + +ffbuild_unconfigure() { + echo --disable-libwavpack +}