FFmpeg-Builds/scripts.d/50-openmpt.sh
2022-02-27 00:37:15 +01:00

69 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
OPENMPT_REPO="https://source.openmpt.org/svn/openmpt/trunk/OpenMPT"
OPENMPT_REV="17047"
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
svn checkout "${OPENMPT_REPO}@${OPENMPT_REV}" openmpt
cd openmpt
local myconf=(
PREFIX="$FFBUILD_PREFIX"
CXXSTDLIB_PCLIBSPRIVATE="-lstdc++"
VERBOSE=2
STATIC_LIB=1
SHARED_LIB=0
DYNLINK=0
EXAMPLES=0
OPENMPT123=0
IN_OPENMPT=0
XMP_OPENMPT=0
DEBUG=0
OPTIMIZE=1
TEST=0
MODERN=1
FORCE_DEPS=1
NO_MINIMP3=0
NO_ZLIB=0
NO_OGG=0
NO_VORBIS=0
NO_VORBISFILE=0
NO_MPG123=1
NO_SDL2=1
NO_PULSEAUDIO=1
NO_SNDFILE=1
NO_PORTAUDIO=1
NO_PORTAUDIOCPP=1
NO_FLAC=1
)
if [[ $TARGET == win* ]]; then
myconf+=(
CONFIG=mingw64-"$TARGET"
)
export CPPFLAGS="$CPPFLAGS -DMPT_WITH_MINGWSTDTHREADS"
elif [[ $TARGET == linux* ]]; then
myconf+=(
CONFIG=gcc
TOOLCHAIN_PREFIX="$FFBUILD_CROSS_PREFIX"
)
else
echo "Unknown target"
return -1
fi
make -j$(nproc) "${myconf[@]}" all install
rm -r "$FFBUILD_PREFIX"/share/doc/libopenmpt
}
ffbuild_configure() {
echo --enable-libopenmpt
}
ffbuild_unconfigure() {
echo --disable-libopenmpt
}