summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/squeezelite/files/squeezelite-1.2-gentoo-optional-codecs.patch')
-rw-r--r--media-sound/squeezelite/files/squeezelite-1.2-gentoo-optional-codecs.patch124
1 files changed, 124 insertions, 0 deletions
diff --git a/media-sound/squeezelite/files/squeezelite-1.2-gentoo-optional-codecs.patch b/media-sound/squeezelite/files/squeezelite-1.2-gentoo-optional-codecs.patch
new file mode 100644
index 0000000..37bf880
--- /dev/null
+++ b/media-sound/squeezelite/files/squeezelite-1.2-gentoo-optional-codecs.patch
@@ -0,0 +1,124 @@
+diff --git a/decode.c b/decode.c
+index 05fcdce..d9d9fa2 100644
+--- a/decode.c
++++ b/decode.c
+@@ -131,14 +131,24 @@ void decode_init(log_level level, const char *opt) {
+ // register codecs
+ // alc,wma,wmap,wmal,aac,spt,ogg,ogf,flc,aif,pcm,mp3
+ i = 0;
++#ifndef SL_NO_AAC
+ if (!opt || strstr(opt, "aac")) codecs[i++] = register_faad();
++#endif
++#ifndef SL_NO_OGG
+ if (!opt || strstr(opt, "ogg")) codecs[i++] = register_vorbis();
++#endif
++#ifndef SL_NO_FLAC
+ if (!opt || strstr(opt, "flac")) codecs[i++] = register_flac();
++#endif
+ if (!opt || strstr(opt, "pcm")) codecs[i++] = register_pcm();
+
+ // try mad then mpg for mp3 unless command line option passed
++#ifndef SL_NO_MAD
+ if ( !opt || strstr(opt, "mp3") || strstr(opt, "mad")) codecs[i] = register_mad();
++#endif
++#ifndef SL_NO_MPG123
+ if ((!opt || strstr(opt, "mp3") || strstr(opt, "mpg")) && !codecs[i]) codecs[i] = register_mpg();
++#endif
+
+ mutex_create(decode.mutex);
+
+diff --git a/faad.c b/faad.c
+index 6adb88a..33a7f10 100644
+--- a/faad.c
++++ b/faad.c
+@@ -20,6 +20,8 @@
+
+ #include "squeezelite.h"
+
++#ifndef SL_NO_AAC
++
+ #include <neaacdec.h>
+
+ #define WRAPBUF_LEN 2048
+@@ -601,3 +603,5 @@ struct codec *register_faad(void) {
+
+ return &ret;
+ }
++
++#endif
+diff --git a/flac.c b/flac.c
+index 5d22bfe..cab6601 100644
+--- a/flac.c
++++ b/flac.c
+@@ -20,6 +20,8 @@
+
+ #include "squeezelite.h"
+
++#ifndef SL_NO_FLAC
++
+ #include <FLAC/stream_decoder.h>
+
+ struct flac {
+@@ -253,3 +255,5 @@ struct codec *register_flac(void) {
+
+ return &ret;
+ }
++
++#endif
+diff --git a/mad.c b/mad.c
+index 0e73b35..5058656 100644
+--- a/mad.c
++++ b/mad.c
+@@ -20,6 +20,8 @@
+
+ #include "squeezelite.h"
+
++#ifndef SL_NO_MAD
++
+ #include <mad.h>
+
+ #define MAD_DELAY 529
+@@ -350,3 +352,5 @@ struct codec *register_mad(void) {
+
+ return &ret;
+ }
++
++#endif
+diff --git a/mpg.c b/mpg.c
+index 4142282..7326af8 100644
+--- a/mpg.c
++++ b/mpg.c
+@@ -20,6 +20,8 @@
+
+ #include "squeezelite.h"
+
++#ifndef SL_NO_MAD
++
+ #include <mpg123.h>
+
+ #define READ_SIZE 512
+@@ -261,3 +263,5 @@ struct codec *register_mpg(void) {
+
+ return &ret;
+ }
++
++#endif
+diff --git a/vorbis.c b/vorbis.c
+index 37c544c..56eb046 100644
+--- a/vorbis.c
++++ b/vorbis.c
+@@ -20,6 +20,8 @@
+
+ #include "squeezelite.h"
+
++#ifndef SL_NO_OGG
++
+ // automatically select between floating point (preferred) and fixed point libraries:
+ // NOTE: works with Tremor version here: http://svn.xiph.org/trunk/Tremor, not vorbisidec.1.0.2 currently in ubuntu
+
+@@ -293,3 +295,5 @@ struct codec *register_vorbis(void) {
+
+ return &ret;
+ }
++
++#endif