FFmpeg-Builds/scripts.d/50-sdl.sh

55 lines
801 B
Bash
Raw Normal View History

2020-09-03 17:52:38 +00:00
#!/bin/bash
2020-12-22 21:34:59 +00:00
SDL_SRC="https://libsdl.org/release/SDL2-2.0.14.tar.gz"
2020-09-03 17:52:38 +00:00
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
mkdir sdl
cd sdl
2021-04-04 21:20:31 +00:00
wget "$SDL_SRC" -O SDL.tar.gz
tar xaf SDL.tar.gz
2020-09-03 17:52:38 +00:00
rm SDL.tar.gz
2021-04-04 21:20:31 +00:00
cd SDL*
2020-09-03 17:52:38 +00:00
2021-04-04 21:20:31 +00:00
./autogen.sh
2020-09-03 17:52:38 +00:00
local myconf=(
--prefix="$FFBUILD_PREFIX"
--disable-shared
--enable-static
)
if [[ $TARGET == win* || $TARGET == linux* ]]; then
2020-09-03 17:52:38 +00:00
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
2020-09-03 17:52:38 +00:00
echo "Unknown target"
return -1
fi
2021-04-04 21:20:31 +00:00
./configure "${myconf[@]}"
make -j$(nproc)
make install
2020-09-03 17:52:38 +00:00
}
ffbuild_configure() {
echo --enable-sdl2
}
ffbuild_unconfigure() {
echo --disable-sdl2
}
ffbuild_cflags() {
return 0
}
ffbuild_ldflags() {
return 0
}