chocpkg/pkgdef/SDL2.sh

32 lines
1,002 B
Bash
Raw Normal View History

description "Simple DirectMedia Layer"
check_pkgconfig sdl2
variant stable fetch_download \
2017-01-26 18:47:01 +00:00
https://www.libsdl.org/release/SDL2-2.0.5.tar.gz \
442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785
variant latest fetch_hg https://hg.libsdl.org/SDL/
config_options=
2016-02-17 04:00:20 +00:00
# Many OS X systems have the Quartz X11 server installed, but
# we probably don't want to use it.
if [ $(uname) = "Darwin" ]; then
config_options+=" --disable-video-x11"
2016-02-17 04:00:20 +00:00
fi
# When targeting Windows, we need to install the directx headers first.
if [ $(uname) = "Cygwin" ] || [[ "$BUILD_HOST" = *mingw* ]]; then
dependencies directx-devel
config_options+=" --disable-directx"
fi
# Disable assembly to avoid depending on SIMD stuff.
if [[ "$BUILD_HOST" = *-*-emscripten ]]; then
config_options+=" --disable-assembly"
fi
# For SDL, we do an out-of-tree build in a subdirectory, since the configure
# script can complain otherwise.
AUTOTOOLS_BUILD_PATH=build-artifacts
build_autotools $config_options