Currently the "alsa" USE flag on dosbox enables ALSA MIDI support but also forces libsdl to be built with ALSA support, even though the latter is not necessary. PulseAudio users have to use ALSA or OSS for MIDI because PulseAudio has no MIDI support but this has nothing to do with SDL. I have built libsdl without ALSA support but forced dosbox's ALSA MIDI support with EXTRA_ECONF="--enable-alsa-midi" and it works fine.
I can't see how the use dep for libsdl is required at all for midi support. I reverted that part of the deps.