FFmpeg-Builds/scripts.d/50-twolame.sh
BtbN 61debb00e5 Switch to a more direct Dockerfile.dl generation
Otherwise the entire build cache effectively invalidates the moment one
script changes..
2023-06-18 21:25:52 +02:00

50 lines
939 B
Bash
Executable file

#!/bin/bash
SCRIPT_REPO="https://github.com/njh/twolame.git"
SCRIPT_COMMIT="90b694b6125dbe23a346bd5607a7fb63ad2785dc"
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
cd "$FFBUILD_DLDIR/$SELF"
NOCONFIGURE=1 ./autogen.sh
touch doc/twolame.1
local myconf=(
--prefix="$FFBUILD_PREFIX"
--with-pic
--disable-shared
--enable-static
--disable-sndfile
)
if [[ $TARGET == win* || $TARGET == linux* ]]; then
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
echo "Unknown target"
return -1
fi
./configure "${myconf[@]}"
make -j$(nproc)
make install
sed -i 's/Cflags:/Cflags: -DLIBTWOLAME_STATIC/' "$FFBUILD_PREFIX"/lib/pkgconfig/twolame.pc
}
ffbuild_configure() {
echo --enable-libtwolame
}
ffbuild_unconfigure() {
echo --disable-libtwolame
}
ffbuild_cflags() {
echo -DLIBTWOLAME_STATIC
}