Mercurial > vanilla
comparison audio/sdl2-mixer/sdl2-mixer.sh @ 1111:09bd387e47c2
audio/sdl2-mixer: add MP3 support
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 19 Sep 2019 14:01:52 +0200 |
parents | 7791d3dbfecf |
children | 6710613b88b9 |
comparison
equal
deleted
inserted
replaced
1110:7fcfa0112446 | 1111:09bd387e47c2 |
---|---|
22 PKGREVISION=1 | 22 PKGREVISION=1 |
23 PKGLICENSE="ZLIB" | 23 PKGLICENSE="ZLIB" |
24 PKGSUMMARY="sound addon for SDL2" | 24 PKGSUMMARY="sound addon for SDL2" |
25 PKGDOWNLOAD="https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-$PKGVERSION.tar.gz" | 25 PKGDOWNLOAD="https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-$PKGVERSION.tar.gz" |
26 PKGDEPENDS="sdl2" | 26 PKGDEPENDS="sdl2" |
27 PKGOPTIONS="FLAC OGG OPUS WAVE" | 27 PKGOPTIONS="FLAC FLUIDSYNTH MP3 OGG OPUS WAVE" |
28 | 28 |
29 : ${CHOST:=$(uname -m)-linux-musl} | 29 : ${CHOST:=$(uname -m)-linux-musl} |
30 : ${CBUILD:=$(uname -m)-linux-musl} | 30 : ${CBUILD:=$(uname -m)-linux-musl} |
31 : ${CC:=clang} | 31 : ${CC:=clang} |
32 : ${CFLAGS:=-O2} | 32 : ${CFLAGS:=-O2} |
33 : ${LDFLAGS:=} | 33 : ${LDFLAGS:=} |
34 : ${LIBS:=} | 34 : ${LIBS:=} |
35 : ${FLAC:=yes} | 35 : ${FLAC:=yes} |
36 : ${FLUIDSYNTH:=yes} | |
37 : ${MP3:=mad mpg123} | |
36 : ${OGG:=yes} | 38 : ${OGG:=yes} |
37 : ${OPUS:=yes} | 39 : ${OPUS:=yes} |
38 : ${WAVE:=yes} | 40 : ${WAVE:=yes} |
39 | 41 |
40 if [ "$FLAC" = "yes" ]; then | 42 if [ "$FLAC" = "yes" ]; then |
41 PKGDEPENDS="flac $PKGDEPENDS" | 43 PKGDEPENDS="flac $PKGDEPENDS" |
42 with_flac="--enable-music-flac" | 44 with_flac="--enable-music-flac --disable-music-flac-shared" |
43 else | 45 else |
44 with_flac="--disable-music-flac" | 46 with_flac="--disable-music-flac" |
45 fi | 47 fi |
46 | 48 |
49 if [ "$FLUIDSYNTH" = "yes" ]; then | |
50 PKGDEPENDS="fluidsynth $PKGDEPENDS" | |
51 with_fluidsynth="--enable-music-midi-fluidsynth --disable-music-midi-fluidsynth-shared" | |
52 else | |
53 with_fluidsynth="--disable-music-midi-fluidsynth" | |
54 fi | |
55 | |
56 if [ -z "${MP3##*mad*}" ] || [ "$MP3" = "yes" ]; then | |
57 PKGDEPENDS="libmad $PKGDEPENDS" | |
58 with_mad="--enable-music-mp3-mad-gpl" | |
59 else | |
60 with_mad="--disable-music-mp3-mad-gpl" | |
61 fi | |
62 | |
63 if [ -z "${MP3##*mpg123*}" ] || [ "$MP3" = "yes" ]; then | |
64 PKGDEPENDS="mpg123 $PKGDEPENDS" | |
65 with_mpg123="--enable-music-mp3-mpg123 --disable-music-mp3-mpg123-shared" | |
66 else | |
67 with_mpg123="--disable-music-mp3-mpg123" | |
68 fi | |
69 | |
47 if [ "$OPUS" = "yes" ]; then | 70 if [ "$OPUS" = "yes" ]; then |
48 PKGDEPENDS="opus $PKGDEPENDS" | 71 PKGDEPENDS="opus $PKGDEPENDS" |
49 with_opus="--enable-music-opus" | 72 with_opus="--enable-music-opus --disable-music-opus-shared" |
50 else | 73 else |
51 with_opus="--disable-music-opus" | 74 with_opus="--disable-music-opus" |
52 fi | 75 fi |
53 | 76 |
54 if [ "$OGG" = "yes" ]; then | 77 if [ "$OGG" = "yes" ]; then |
55 PKGDEPENDS="libogg $PKGDEPENDS" | 78 PKGDEPENDS="libogg $PKGDEPENDS" |
56 with_ogg="--enable-music-ogg" | 79 with_ogg="--enable-music-ogg --disable-music-ogg-shared" |
57 else | 80 else |
58 with_ogg="--disable-music-ogg" | 81 with_ogg="--disable-music-ogg" |
59 fi | 82 fi |
60 | 83 |
61 if [ "$WAVE" = "yes" ]; then | 84 if [ "$WAVE" = "yes" ]; then |
77 ./configure \ | 100 ./configure \ |
78 --build=$CBUILD \ | 101 --build=$CBUILD \ |
79 --host=$CHOST \ | 102 --host=$CHOST \ |
80 --prefix= \ | 103 --prefix= \ |
81 $with_flac \ | 104 $with_flac \ |
105 $with_fluidsynth \ | |
106 $with_mad \ | |
107 $with_mpg123 \ | |
82 $with_opus \ | 108 $with_opus \ |
83 $with_ogg \ | 109 $with_ogg \ |
84 $with_wave | 110 $with_wave |
85 make | 111 make |
86 make install DESTDIR=$DESTDIR | 112 make install DESTDIR=$DESTDIR |