Mercurial > vanilla
changeset 1111:09bd387e47c2
audio/sdl2-mixer: add MP3 support
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 19 Sep 2019 14:01:52 +0200 |
parents | 7fcfa0112446 |
children | ef91cc02d48e |
files | audio/sdl2-mixer/sdl2-mixer.sh |
diffstat | 1 files changed, 30 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/audio/sdl2-mixer/sdl2-mixer.sh Thu Sep 19 13:25:23 2019 +0200 +++ b/audio/sdl2-mixer/sdl2-mixer.sh Thu Sep 19 14:01:52 2019 +0200 @@ -24,7 +24,7 @@ PKGSUMMARY="sound addon for SDL2" PKGDOWNLOAD="https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-$PKGVERSION.tar.gz" PKGDEPENDS="sdl2" -PKGOPTIONS="FLAC OGG OPUS WAVE" +PKGOPTIONS="FLAC FLUIDSYNTH MP3 OGG OPUS WAVE" : ${CHOST:=$(uname -m)-linux-musl} : ${CBUILD:=$(uname -m)-linux-musl} @@ -33,27 +33,50 @@ : ${LDFLAGS:=} : ${LIBS:=} : ${FLAC:=yes} +: ${FLUIDSYNTH:=yes} +: ${MP3:=mad mpg123} : ${OGG:=yes} : ${OPUS:=yes} : ${WAVE:=yes} if [ "$FLAC" = "yes" ]; then PKGDEPENDS="flac $PKGDEPENDS" - with_flac="--enable-music-flac" + with_flac="--enable-music-flac --disable-music-flac-shared" else with_flac="--disable-music-flac" fi +if [ "$FLUIDSYNTH" = "yes" ]; then + PKGDEPENDS="fluidsynth $PKGDEPENDS" + with_fluidsynth="--enable-music-midi-fluidsynth --disable-music-midi-fluidsynth-shared" +else + with_fluidsynth="--disable-music-midi-fluidsynth" +fi + +if [ -z "${MP3##*mad*}" ] || [ "$MP3" = "yes" ]; then + PKGDEPENDS="libmad $PKGDEPENDS" + with_mad="--enable-music-mp3-mad-gpl" +else + with_mad="--disable-music-mp3-mad-gpl" +fi + +if [ -z "${MP3##*mpg123*}" ] || [ "$MP3" = "yes" ]; then + PKGDEPENDS="mpg123 $PKGDEPENDS" + with_mpg123="--enable-music-mp3-mpg123 --disable-music-mp3-mpg123-shared" +else + with_mpg123="--disable-music-mp3-mpg123" +fi + if [ "$OPUS" = "yes" ]; then PKGDEPENDS="opus $PKGDEPENDS" - with_opus="--enable-music-opus" + with_opus="--enable-music-opus --disable-music-opus-shared" else with_opus="--disable-music-opus" fi if [ "$OGG" = "yes" ]; then PKGDEPENDS="libogg $PKGDEPENDS" - with_ogg="--enable-music-ogg" + with_ogg="--enable-music-ogg --disable-music-ogg-shared" else with_ogg="--disable-music-ogg" fi @@ -79,6 +102,9 @@ --host=$CHOST \ --prefix= \ $with_flac \ + $with_fluidsynth \ + $with_mad \ + $with_mpg123 \ $with_opus \ $with_ogg \ $with_wave