pakcage/sdl_mixer: add optional dependency on FluidSynth for MIDI
authorPaul Cercueil <paul@crapouillou.net>
Thu, 2 Jul 2020 15:25:46 +0000 (17:25 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 12 Jul 2020 13:45:29 +0000 (15:45 +0200)
Add support for MIDI playback using FluidSynth.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/sdl_mixer/sdl_mixer.mk

index 73eb821ff32d991f3375f0aabc8f06d1cee23d61..4cd13de2f6b0f2f219ffd1f11587015d9a1d3e39 100644 (file)
@@ -22,11 +22,20 @@ SDL_MIXER_AUTORECONF = YES
 SDL_MIXER_CONF_OPTS = \
        --without-x \
        --with-sdl-prefix=$(STAGING_DIR)/usr \
-       --disable-music-midi \
        --disable-music-mod \
        --disable-music-mp3 \
        --disable-music-flac # configure script fails when cross compiling
 
+ifeq ($(BR2_PACKAGE_FLUIDSYNTH),y)
+SDL_MIXER_DEPENDENCIES += fluidsynth
+SDL_MIXER_CONF_OPTS += \
+       --enable-music-midi \
+       --enable-music-fluidsynth-midi
+else
+SDL_MIXER_CONF_OPTS += \
+       --disable-music-midi
+endif
+
 ifeq ($(BR2_PACKAGE_LIBMAD),y)
 SDL_MIXER_CONF_OPTS += --enable-music-mp3-mad-gpl
 SDL_MIXER_DEPENDENCIES += libmad