summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfanch <fanchyannmaria at orange dot fr>2010-06-12 19:25:59 +0200
committerfanch <fanchyannmaria at orange dot fr>2010-06-12 19:25:59 +0200
commit4c92457cea51a419323a8559cdc8ff4f11ae38b7 (patch)
tree76333923e94a44a1217e663850c93e8cbe4fc64c
parent4222208eac7e2dbfed7ecf7063998fd3fe7e3d04 (diff)
downloadnutyx-extra-4c92457cea51a419323a8559cdc8ff4f11ae38b7.tar.gz
nutyx-extra-4c92457cea51a419323a8559cdc8ff4f11ae38b7.tar.bz2
nutyx-extra-4c92457cea51a419323a8559cdc8ff4f11ae38b7.tar.xz
nutyx-extra-4c92457cea51a419323a8559cdc8ff4f11ae38b7.zip
ajout de sdl_sound#1.0.3-1
-rw-r--r--extra/sdl_sound/.footprint13
-rw-r--r--extra/sdl_sound/.md5sum2
-rw-r--r--extra/sdl_sound/Pkgfile24
-rw-r--r--extra/sdl_sound/flac.patch127
4 files changed, 166 insertions, 0 deletions
diff --git a/extra/sdl_sound/.footprint b/extra/sdl_sound/.footprint
new file mode 100644
index 000000000..0c3c67e7a
--- /dev/null
+++ b/extra/sdl_sound/.footprint
@@ -0,0 +1,13 @@
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/playsound
+-rwxr-xr-x root/root usr/bin/playsound_simple
+drwxr-xr-x root/root usr/include/
+drwxr-xr-x root/root usr/include/SDL/
+-rw-r--r-- root/root usr/include/SDL/SDL_sound.h
+drwxr-xr-x root/root usr/lib/
+lrwxrwxrwx root/root usr/lib/libSDL_sound-1.0.so.1 -> libSDL_sound-1.0.so.1.0.2
+-rwxr-xr-x root/root usr/lib/libSDL_sound-1.0.so.1.0.2
+-rw-r--r-- root/root usr/lib/libSDL_sound.a
+-rwxr-xr-x root/root usr/lib/libSDL_sound.la
+lrwxrwxrwx root/root usr/lib/libSDL_sound.so -> libSDL_sound-1.0.so.1.0.2
diff --git a/extra/sdl_sound/.md5sum b/extra/sdl_sound/.md5sum
new file mode 100644
index 000000000..d957fd986
--- /dev/null
+++ b/extra/sdl_sound/.md5sum
@@ -0,0 +1,2 @@
+aa09cd52df85d29bee87a664424c94b5 SDL_sound-1.0.3.tar.gz
+b8aa5b78ba39be43dae5b870adf98eba flac.patch
diff --git a/extra/sdl_sound/Pkgfile b/extra/sdl_sound/Pkgfile
new file mode 100644
index 000000000..dfb5f7fae
--- /dev/null
+++ b/extra/sdl_sound/Pkgfile
@@ -0,0 +1,24 @@
+
+# Description: librairie pour décoder les plus populaires fichiers au format .WAV et .MP3
+# URL:http://icculus.org/SDL_sound/
+# Maintainer: NuTyX core team
+# Packager: fanch
+# Depends on: sdl, libmikmod, libvorbis, flac, speex, smpeg
+
+name=sdl_sound
+version=1.0.3
+release=1
+source=(http://icculus.org/SDL_sound/downloads/SDL_sound-$version.tar.gz
+ flac.patch)
+
+build() {
+ cd $SRC/SDL_sound-$version
+
+ CFLAGS="$CFLAGS -I/usr/include/smpeg" \
+ CXXFLAGS="$CXXFLAGS -I/usr/include/smpeg" \
+ ./configure --prefix=/usr
+
+ make
+ make DESTDIR=$PKG install
+
+}
diff --git a/extra/sdl_sound/flac.patch b/extra/sdl_sound/flac.patch
new file mode 100644
index 000000000..32f9ec8b8
--- /dev/null
+++ b/extra/sdl_sound/flac.patch
@@ -0,0 +1,127 @@
+diff -u -r SDL_sound-1.0.1/configure.in SDL_sound-1.0.1-flac/configure.in
+--- SDL_sound-1.0.1/configure.in 2003-10-12 20:49:54.000000000 +0200
++++ SDL_sound-1.0.1-flac/configure.in 2006-12-11 20:43:46.546583251 +0100
+@@ -155,9 +155,12 @@
+ dnl FLAC developers tend to break their API with every release, so we're
+ dnl checking for the latest-and-greatest here so we don't have to support
+ dnl obsolete versions.
++dnl Starting with FLAC 1.1.3:
++dnl libFLAC supports Ogg FLAC (no more libOggFLAC) so we also need -logg
++dnl the libFLAC .so version is also #defined in FLAC/export.h
+
+ dnl Hooray for shitty autoconf bugs!
+-x="C__seekable_stream_decoder_process_single"
++x="C__stream_decoder_process_single"
+ flcsym="FLA$x"
+ dnl Check for libFLAC
+ AC_ARG_ENABLE(flac,
+@@ -167,7 +170,7 @@
+ AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes)
+ AC_CHECK_LIB(FLAC, $flcsym, have_flac_lib=yes)
+ if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then
+- LIBS="$LIBS -lFLAC"
++ LIBS="$LIBS -lFLAC -logg"
+ AC_DEFINE(SOUND_SUPPORTS_FLAC)
+ fi
+ fi
+diff -u -r SDL_sound-1.0.1/decoders/flac.c SDL_sound-1.0.1-flac/decoders/flac.c
+--- SDL_sound-1.0.1/decoders/flac.c 2003-03-10 23:44:14.000000000 +0100
++++ SDL_sound-1.0.1-flac/decoders/flac.c 2006-12-11 20:43:57.880097062 +0100
+@@ -44,6 +44,16 @@
+ #define __SDL_SOUND_INTERNAL__
+ #include "SDL_sound_internal.h"
+
++#include <FLAC/export.h>
++
++/* FLAC 1.1.3 has FLAC_API_VERSION_CURRENT == 8 */
++#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8
++#define LEGACY_FLAC
++#else
++#undef LEGACY_FLAC
++#endif
++
++#ifdef LEGACY_FLAC
+ #include <FLAC/seekable_stream_decoder.h>
+
+ #define D_END_OF_STREAM FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM
+@@ -80,6 +90,34 @@
+ typedef FLAC__SeekableStreamDecoderSeekStatus d_seek_status_t;
+ typedef FLAC__SeekableStreamDecoderTellStatus d_tell_status_t;
+ typedef FLAC__SeekableStreamDecoderLengthStatus d_length_status_t;
++#else
++#include <FLAC/stream_decoder.h>
++
++#define D_END_OF_STREAM FLAC__STREAM_DECODER_END_OF_STREAM
++
++#define d_new() FLAC__stream_decoder_new()
++#define d_process_metadata(x) FLAC__stream_decoder_process_until_end_of_metadata(x)
++#define d_process_one_frame(x) FLAC__stream_decoder_process_single(x)
++#define d_get_state(x) FLAC__stream_decoder_get_state(x)
++#define d_finish(x) FLAC__stream_decoder_finish(x)
++#define d_delete(x) FLAC__stream_decoder_delete(x)
++
++typedef FLAC__StreamDecoder decoder_t;
++typedef FLAC__StreamDecoderReadStatus d_read_status_t;
++
++#define D_SEEK_STATUS_OK FLAC__STREAM_DECODER_SEEK_STATUS_OK
++#define D_SEEK_STATUS_ERROR FLAC__STREAM_DECODER_SEEK_STATUS_ERROR
++#define D_TELL_STATUS_OK FLAC__STREAM_DECODER_TELL_STATUS_OK
++#define D_TELL_STATUS_ERROR FLAC__STREAM_DECODER_TELL_STATUS_ERROR
++#define D_LENGTH_STATUS_OK FLAC__STREAM_DECODER_LENGTH_STATUS_OK
++#define D_LENGTH_STATUS_ERROR FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR
++
++#define d_seek_absolute(x, y) FLAC__stream_decoder_seek_absolute(x, y)
++
++typedef FLAC__StreamDecoderSeekStatus d_seek_status_t;
++typedef FLAC__StreamDecoderTellStatus d_tell_status_t;
++typedef FLAC__StreamDecoderLengthStatus d_length_status_t;
++#endif
+
+ #define D_WRITE_CONTINUE FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE
+ #define D_READ_END_OF_STREAM FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM
+@@ -141,9 +179,15 @@
+ } /* free_flac */
+
+
++#ifdef LEGACY_FLAC
+ static d_read_status_t read_callback(
+ const decoder_t *decoder, FLAC__byte buffer[],
+ unsigned int *bytes, void *client_data)
++#else
++static d_read_status_t read_callback(
++ const decoder_t *decoder, FLAC__byte buffer[],
++ size_t *bytes, void *client_data)
++#endif
+ {
+ flac_t *f = (flac_t *) client_data;
+ Uint32 retval;
+@@ -400,6 +444,7 @@
+ BAIL_MACRO(ERR_OUT_OF_MEMORY, 0);
+ } /* if */
+
++#ifdef LEGACY_FLAC
+ d_set_read_callback(decoder, read_callback);
+ d_set_write_callback(decoder, write_callback);
+ d_set_metadata_callback(decoder, metadata_callback);
+@@ -410,6 +455,7 @@
+ d_set_eof_callback(decoder, eof_callback);
+
+ d_set_client_data(decoder, f);
++#endif
+
+ f->rw = internal->rw;
+ f->sample = sample;
+@@ -418,7 +464,12 @@
+ f->is_flac = 0 /* !!! FIXME: should be "has_extension", not "0". */;
+
+ internal->decoder_private = f;
++ /* really should check the init return value here: */
++#ifdef LEGACY_FLAC
+ d_init(decoder);
++#else
++ FLAC__stream_decoder_init_stream(decoder, read_callback, seek_callback, tell_callback, length_callback, eof_callback, write_callback, metadata_callback, error_callback, f);
++#endif
+
+ sample->flags = SOUND_SAMPLEFLAG_NONE;
+
+