#TODO something wrong with keyboard input
[source]
git = "https://github.com/Interrupt/systemshock"
[build]
template = "custom"
dependencies = [
    "libogg",
    "liborbital",
    "libvorbis",
    "mesa",
    "sdl2",
    "sdl2-mixer",
    "zlib",
]
script = """
DYNAMIC_INIT
COOKBOOK_CMAKE_FLAGS+=(
    -DCMAKE_C_FLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL2"
    -DCMAKE_CXX_FLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL2"
    -DENABLE_FLUIDSYNTH=OFF
    -DENABLE_SDL2=ON
    -DENABLE_SOUND=ON
    -DOPENGL_INCLUDE_DIR="${COOKBOOK_SYSROOT}"
    -DOPENGL_opengl_LIBRARY="-lgl"
    -DOPENGL_glx_LIBRARY="-lglx"
    -DSDL2_MIXER_LIBRARIES="-lSDL2_mixer -lvorbisfile -lvorbis -logg -lSDL2 -lorbital $("${TARGET}-pkg-config" --libs osmesa)"
)
cookbook_cmake
mkdir -pv "${COOKBOOK_STAGE}/home/user/systemshock"
cp -v systemshock "${COOKBOOK_STAGE}/home/user/systemshock/systemshock"
cp -rv "${COOKBOOK_SOURCE}/shaders" "${COOKBOOK_STAGE}/home/user/systemshock/shaders"
"""
[package]
dependencies = [
]
