From 5e3d93dd920eb1ab571e569ad6efae9fdeb23b6f Mon Sep 17 00:00:00 2001 From: BtbN Date: Sun, 20 Jun 2021 22:15:10 +0200 Subject: [PATCH] Add fdk-aac --- scripts.d/50-fdk-aac.sh | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 scripts.d/50-fdk-aac.sh diff --git a/scripts.d/50-fdk-aac.sh b/scripts.d/50-fdk-aac.sh new file mode 100755 index 0000000..3a7f288 --- /dev/null +++ b/scripts.d/50-fdk-aac.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +FDK_REPO="https://github.com/mstorsjo/fdk-aac.git" +FDK_COMMIT="801f67f671929311e0c9952c5f92d6e147c7b003" + +ffbuild_enabled() { + [[ $VARIANT == nonfree* ]] || return -1 + return 0 +} + +ffbuild_dockerbuild() { + git-mini-clone "$FDK_REPO" "$FDK_COMMIT" fdk + cd fdk + + ./autogen.sh + + local myconf=( + --prefix="$FFBUILD_PREFIX" + --disable-shared + --enable-static + --with-pic + --disable-example + ) + + if [[ $TARGET == win* || $TARGET == linux* ]]; then + myconf+=( + --host="$FFBUILD_TOOLCHAIN" + ) + else + echo "Unknown target" + return -1 + fi + + ./configure "${myconf[@]}" + make -j$(nproc) + make install +} + +ffbuild_configure() { + echo --enable-libfdk-aac +} + +ffbuild_unconfigure() { + echo --disable-libfdk-aac +}