source $GRIMOIRE/MESON_DEPENDS &&

depends glib2 &&
depends libxml2   &&
depends audacious &&

optional_depends gtk+3 gtk=true '' \
                 "for GTK+ interface" &&

if is_depends_enabled ${SPELL} gtk+3; then
  depends pango &&
  depends cairo

if false;then
  config_query_option AUDACIOUS_OPTS \
                      "Enable OSD plugin" y \
                      "--enable-aosd" \
                      "--disable-aosd" &&

  config_query_option AUDACIOUS_OPTS \
                      "Enable global hotkey plugin?" y \
                      "--enable-hotkey" \
                      "--disable-hotkey"
fi
fi &&

optional_depends qt6base qt=true ''\
                 "for QT interface" &&

if is_depends_enabled ${SPELL} qt6base; then
  optional_depends qt6multimedia qtaudio=true '' \
                   "for QtMultimedia output" &&

  config_query_option AUDACIOUS_OPTS \
                      "Enable Ampache browser?" y \
                      ampache=true '' &&

  config_query_option AUDACIOUS_OPTS \
                      "Enable Stream tuner?" y \
                      streamtuner=true ''

fi &&

optional_depends OPENGL gl-spectrum=true '' \
                   "for OpenGL Spectrum Analyzer" &&

# control plugins
optional_depends lirc lirc=true '' \
                 "for LIRC support" &&

# output plugins
optional_depends alsa-lib alsa=true '' \
                 "for ALSA support" &&

optional_depends pulseaudio pulse=true ''\
                 "for PulseAudio support" &&

optional_depends JACK-DRIVER jack=true '' \
                 "for JACK support" &&

optional_depends sndio sndio=true '' \
                 "for Sndio support" &&

# filetype plugins
optional_depends zlib console=true ''\
                 "for game music decoder (console) plugin" &&

optional_depends LIBAVCODEC ffaudio=true '' \
                 "for ffmpeg WMA (ffaudio plugin) support" &&

optional_depends libvorbis vorbis=true '' \
                 "for Ogg Vorbis support" &&

if is_depends_enabled ${SPELL} libvorbis; then
  depends libogg
fi &&

optional_depends flac flac=true '' \
                 "for FLAC support" &&

optional_depends mpg123 mpg123=true '' \
                 "for MP3 support" &&

optional_depends lame filewriter-mp3=true '' \
                 "for MP3 filewriter" &&

optional_depends fluidsynth amidiplug=true '' \
                 "for MIDI synthesizer" &&

optional_depends wavpack wavpack=true '' \
                 "for WavPack support" &&

optional_depends faad2 aac=true '' \
                 "for AAC support" &&

optional_depends libsndfile sndfile=true '' \
                 "for libsndfile decoder" &&

optional_depends libmodplug modplug=true '' \
                 "for ModPlug support" &&

optional_depends libsidplayfp sid=true ''\
                 "for Commodore 64 audio support" &&

# other plugins
optional_depends neon neon=true '' \
                 "Enable Neon HTTP support?" &&

optional_depends curl scrobbler2=true '' \
                 "Enable Scrobbler 2 plugin?"  &&

optional_depends libnotify notify=true '' \
                 "Enable notify plugin?" &&

optional_depends sdl2 sdlout=true '' \
                 "Enable SDL output plugin?" &&

optional_depends libcdio cdaudio=true '' \
                 "Enable CD Audio Plugin?" &&

if is_depends_enabled $SPELL libcdio; then
  depends libcdio-paranoia &&
  depends libcddb
fi &&

optional_depends libmms mms=true '' \
                 "Enable MMS support?" &&

optional_depends libcue cue=true '' \
                 "Enable CUE support?" &&

optional_depends libsamplerate ' resample=true speedpitch=true' '' \
                 "Enable Resample Effect and Speed and Pitch plugins?"
