chocpkg/pkgdef/SDL2_mixer.sh
Simon Howard 131faedfa6 Extend type: syntax to allow target: prefix too.
This is important for pkgdef files like SDL2_mixer which recursively
invoke chocpkg to check if a soft dependent package is installed. In
this case it's important to explicitly prefix the package type to
pass it through to the recursed instance.
2016-03-05 21:59:19 -05:00

27 lines
840 B
Bash

description "SDL audio mixing and music library"
dependencies SDL2
check_pkgconfig SDL2_mixer
fetch_download http://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.tar.gz
# Disable dependencies on external libraries for sound file formats:
config_options="
--disable-music-mod --disable-music-mp3
--disable-music-flac-shared --disable-music-ogg-shared
"
# ...except ones we have installed:
if ! chocpkg installed ${PACKAGE_TYPE}:flac; then
config_options+=" --disable-music-flac"
fi
if ! chocpkg installed ${PACKAGE_TYPE}:libogg; then
config_options+=" --disable-music-ogg"
fi
# FluidSynth, if we have it.
if chocpkg installed ${PACKAGE_TYPE}:fluidsynth; then
config_options+=" --enable-music-midi-fluidsynth"
else
config_options+=" --disable-music-midi-fluidsynth"
fi
build_autotools $config_options