[71618] trunk/dports/audio/ices0
ryandesign at macports.org
ryandesign at macports.org
Fri Sep 17 23:06:46 PDT 2010
Revision: 71618
http://trac.macports.org/changeset/71618
Author: ryandesign at macports.org
Date: 2010-09-17 23:06:42 -0700 (Fri, 17 Sep 2010)
Log Message:
-----------
ices0:
* add dependencies on mp4v2, flac and faad2
* fix compilation with latest mp4v2 and flac
* fix docdir
See #26506
Modified Paths:
--------------
trunk/dports/audio/ices0/Portfile
Added Paths:
-----------
trunk/dports/audio/ices0/files/
trunk/dports/audio/ices0/files/patch-r13773.diff
trunk/dports/audio/ices0/files/patch-src-in_mp4.c.diff
Modified: trunk/dports/audio/ices0/Portfile
===================================================================
--- trunk/dports/audio/ices0/Portfile 2010-09-18 04:49:18 UTC (rev 71617)
+++ trunk/dports/audio/ices0/Portfile 2010-09-18 06:06:42 UTC (rev 71618)
@@ -3,6 +3,7 @@
PortSystem 1.0
name ices0
version 0.4
+revision 1
categories audio net
maintainers nomaintainer
description Stream audio to an icecast server
@@ -17,12 +18,18 @@
depends_build port:pkgconfig
-depends_lib port:libxml2 \
+depends_lib port:faad2 \
+ port:flac \
port:lame \
- port:libshout2
+ port:libshout2 \
+ port:libxml2 \
+ port:mp4v2
+patchfiles patch-src-in_mp4.c.diff \
+ patch-r13773.diff
+
configure.args --program-suffix=0 \
- --with-docdir=${prefix}/share/doc \
+ --with-docdir=${prefix}/share/doc/${name} \
--mandir=${prefix}/share/man \
--without-python \
--without-perl
Added: trunk/dports/audio/ices0/files/patch-r13773.diff
===================================================================
--- trunk/dports/audio/ices0/files/patch-r13773.diff (rev 0)
+++ trunk/dports/audio/ices0/files/patch-r13773.diff 2010-09-18 06:06:42 UTC (rev 71618)
@@ -0,0 +1,104 @@
+Index: src/in_flac.c
+===================================================================
+--- src/in_flac.c (revision 13772)
++++ src/in_flac.c (revision 13773)
+@@ -40,14 +40,19 @@
+ } flac_in_t;
+
+ /* -- static prototypes -- */
+-static int ices_flac_readpcm (input_stream_t* self, size_t len,
+- int16_t* left, int16_t* right);
++static ssize_t ices_flac_readpcm (input_stream_t* self, size_t len,
++ int16_t* left, int16_t* right);
+ static int ices_flac_close (input_stream_t* self);
+
+ /* -- FLAC callbacks -- */
++#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT <= 7
++# define FLAC_BUFSIZE_TYPE unsigned
++#else
++# define FLAC_BUFSIZE_TYPE size_t
++#endif /* !FLAC_API_VERSION_CURRENT || FLAC_API_VERSION_CURRENT <= 7 */
+ static FLAC__StreamDecoderReadStatus
+ flac_read_cb(const FLAC__StreamDecoder* decoder, FLAC__byte buffer[],
+- unsigned* bytes, void* client_data);
++ FLAC_BUFSIZE_TYPE* bytes, void* client_data);
+ static FLAC__StreamDecoderWriteStatus
+ flac_write_cb(const FLAC__StreamDecoder* decoder, const FLAC__Frame* frame,
+ const FLAC__int32* const buffer[], void* client_data);
+@@ -76,18 +81,39 @@
+ return -1;
+ }
+
++#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT <= 7
+ FLAC__stream_decoder_set_read_callback(decoder, flac_read_cb);
+ FLAC__stream_decoder_set_write_callback(decoder, flac_write_cb);
+ FLAC__stream_decoder_set_metadata_callback(decoder, flac_metadata_cb);
+ FLAC__stream_decoder_set_error_callback(decoder, flac_error_cb);
++ FLAC__stream_decoder_set_client_data(decoder, self);
+
++ switch (FLAC__stream_decoder_init(decoder)) {
++ case FLAC__STREAM_DECODER_SEARCH_FOR_METADATA:
++ break;
++ case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
++ ices_log_error("Could not allocate memory during FLAC decoder init");
++ goto errDecoder;
++ default:
++ ices_log_error("Unexpected error during FLAC decoder init");
++ goto errDecoder;
++ }
++#else
++ if (FLAC__stream_decoder_init_stream(decoder, flac_read_cb, NULL, NULL, NULL,
++ NULL, flac_write_cb, flac_metadata_cb,
++ flac_error_cb, self)
++ != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
++ ices_log_error("ices_flac_open: Error initializing FLAC decoder");
++ goto errDecoder;
++ }
++#endif /* !FLAC_API_VERSION_CURRENT || FLAC_API_VERSION_CURRENT <= 7 */
++
+ FLAC__stream_decoder_set_metadata_respond(decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
+
+ if (!(flac_data = (flac_in_t*)malloc (sizeof (flac_in_t)))) {
+ ices_log_error ("Malloc failed in ices_flac_open");
+ goto errDecoder;
+ }
+- FLAC__stream_decoder_set_client_data(decoder, self);
+
+ flac_data->decoder = decoder;
+ flac_data->parsed = 0;
+@@ -96,17 +122,6 @@
+
+ self->data = flac_data;
+
+- switch (FLAC__stream_decoder_init(decoder)) {
+- case FLAC__STREAM_DECODER_SEARCH_FOR_METADATA:
+- break;
+- case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
+- ices_log_error("Could not allocate memory during FLAC decoder init");
+- goto errData;
+- default:
+- ices_log_error("Unexpected error during FLAC decoder init");
+- goto errData;
+- }
+-
+ if (!FLAC__stream_decoder_process_single(decoder)) {
+ ices_log_error("Could not find FLAC metadata header");
+ free(flac_data);
+@@ -141,7 +156,7 @@
+ return -1;
+ }
+
+-static int
++static ssize_t
+ ices_flac_readpcm (input_stream_t* self, size_t olen, int16_t* left,
+ int16_t* right)
+ {
+@@ -179,7 +194,7 @@
+ /* -- callbacks -- */
+ static FLAC__StreamDecoderReadStatus
+ flac_read_cb(const FLAC__StreamDecoder* decoder, FLAC__byte buffer[],
+- unsigned* bytes, void* client_data)
++ FLAC_BUFSIZE_TYPE* bytes, void* client_data)
+ {
+ input_stream_t* self = (input_stream_t*)client_data;
+ flac_in_t* flac_data = (flac_in_t*)self->data;
Added: trunk/dports/audio/ices0/files/patch-src-in_mp4.c.diff
===================================================================
--- trunk/dports/audio/ices0/files/patch-src-in_mp4.c.diff (rev 0)
+++ trunk/dports/audio/ices0/files/patch-src-in_mp4.c.diff 2010-09-18 06:06:42 UTC (rev 71618)
@@ -0,0 +1,11 @@
+--- src/in_mp4.c.orig 2004-07-30 21:35:29.000000000 -0500
++++ src/in_mp4.c 2010-09-18 00:08:05.000000000 -0500
+@@ -29,7 +29,7 @@
+ /* fink error? */
+ #define HAVE_IN_PORT_T 1
+ #define HAVE_SOCKLEN_T 1
+-#include <mp4.h>
++#include <mp4v2/mp4v2.h>
+ #include <faad.h>
+
+ /* -- data structures -- */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100917/5ea4ab31/attachment-0001.html>
More information about the macports-changes
mailing list