Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/sound
In directory vz-cvs-3.sog:/tmp/cvs-serv17818

Modified Files:
        ices.info 
Added Files:
        ices.patch 
Log Message:
fix (Build)Depends across the different variants
fix building against libflac

Index: ices.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/sound/ices.info,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ices.info   19 Oct 2012 22:53:03 -0000      1.6
+++ ices.info   20 Oct 2012 02:16:53 -0000      1.7
@@ -1,8 +1,9 @@
 Info2: <<
 Package: ices%type_pkg[-perl]%type_pkg[-nonfree]
 Version: 0.4
-Revision: 1004
-### Dist restricted by python24
+Revision: 1005
+### Dist restricted by perl586 and python24
+### Need to use fink-perl to avoid building fat.
 Distribution: 10.5
 Description: Source client for broadcasting in MP3
 License: GPL
@@ -13,25 +14,52 @@
 Conflicts: ices, ices-perl, ices-nonfree, ices-perl-nonfree
 Replaces: ices, ices-perl, ices-nonfree, ices-perl-nonfree
 Depends: <<
-  libshout4-shlibs, python24-shlibs (>= 1:2.4.2-1004),
-  (%type_pkg[-perl]) perl586-core | system-perl586,
   (%type_pkg[-nonfree]) lame-shlibs,
-  (%type_pkg[-nonfree]) libvorbis0-shlibs,
-  (%type_pkg[-nonfree]) libflac8
+  (%type_pkg[-nonfree]) libflac8 (>= 1.2.1-1001),
+  libiconv,
+  libogg-shlibs,
+  libshout4-shlibs,
+  libvorbis0-shlibs,
+  libxml2-shlibs,
+  python24-shlibs (>= 1:2.4.4-1),
+  (%type_pkg[-perl]) perl586-core
 <<
 BuildDepends: <<
-  pkgconfig, libshout4, python24 (>= 1:2.4.2-1004), libvorbis0, libogg, 
libtheora0,
-  (%type_pkg[-perl]) perl586-core | system-perl586,
+  fink-package-precedence,
   (%type_pkg[-nonfree]) lame-dev,
-  (%type_pkg[-nonfree]) libflac8-dev
+  (%type_pkg[-nonfree]) libflac8-dev (>= 1.2.1-1001),
+  libiconv-dev,
+  libogg,
+  libshout4,
+  libvorbis0,
+  libxml2,
+  pkgconfig,
+  (%type_pkg[-perl]) perl586-core,
+  python24 (>= 1:2.4.4-1)
 <<
-
+PatchFile: %ni.patch
+PatchFile-MD5: f2cd9c66d6c5a98f42187e37874454fa
 ConfigureParams: <<
-  --mandir=%p/share/man --sysconfdir=%p/etc/%{ni} --with-docdir=%p/share/doc/%n
-  (%type_raw[-perl] = .) --without-perl
-  (%type_raw[-nonfree] = .) --without-lame --without-faad
+       --mandir=%p/share/man \
+       --sysconfdir=%p/etc/%{ni} \
+       --with-docdir=%p/share/doc/%n \
+       (%type_raw[-perl] = .) --without-perl \
+       (%type_raw[-perl] = -perl) --with-perl=%p/bin/perl5.8.6 \
+       (%type_raw[-nonfree] = .) --without-lame \
+       --with-python=%p/bin/python2.4 \
+       --without-faad \
+       --enable-dependency-tracking
 <<
 
+CompileScript: <<
+       #!/bin/sh -ev
+       %{default_script}
+       if [ x"%type_raw[-nonfree]" == "x" ]; then
+               fink-package-precedence --prohibit-bdep=lame-dev,libflac8-dev .
+       else
+               fink-package-precedence .
+       fi
+<<
 InstallScript: make DESTDIR=%d install
 
 DocFiles: AUTHORS BUGS COPYING NEWS README README.playlist TODO
@@ -42,7 +70,13 @@
 can transcode Vorbis, FLAC, and MP4 audio sources. IceS is also scriptable
 in your choice of perl or python.
 <<
+DescPort: <<
+       Fink-perl must be used to avoid system-perl trying and failing to build 
fat.
+<<
 DescPackaging: <<
        Previously maintained by Brendan Cully
+       
+       shout.pc publishes '-lvorbis -logg'.  So not-nonfree must still 
(Build)Depend
+       on those packages, even if not actually being used.
 <<
 <<

--- NEW FILE: ices.patch ---
diff -ruNp -U 8 ices-0.4-orig/src/in_flac.c ices-0.4/src/in_flac.c
--- ices-0.4-orig/src/in_flac.c 2004-07-31 13:52:24.000000000 -0400
+++ ices-0.4/src/in_flac.c      2012-10-19 21:37:07.000000000 -0400
@@ -35,24 +35,29 @@ typedef struct {
   size_t len;
   /* write buffer */
   int16_t *left;
   int16_t *right;
   size_t olen;
 } flac_in_t;
 
 /* -- static prototypes -- */
-static int ices_flac_readpcm (input_stream_t* self, size_t len,
+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);
 static void
 flac_metadata_cb(const FLAC__StreamDecoder* decoder,
                 const FLAC__StreamMetadata* metadata, void* client_data);
 static void
 flac_error_cb(const FLAC__StreamDecoder* decoder,
@@ -71,47 +76,57 @@ ices_flac_open (input_stream_t* self, ch
   flac_in_t* flac_data;
   FLAC__StreamDecoder* decoder;
 
   if (!(decoder = FLAC__stream_decoder_new())) {
     ices_log_error("ices_flac_open: Error allocating FLAC decoder");
     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;
   flac_data->buf = buf;
   flac_data->len = len;
 
   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);
     FLAC__stream_decoder_delete(decoder);
     return 1;
   }
   if (!flac_data->parsed) {
     ices_log_error("Could not find FLAC metadata header in prebuffer");
@@ -136,17 +151,17 @@ ices_flac_open (input_stream_t* self, ch
 errData:
   free(flac_data);
 errDecoder:
   FLAC__stream_decoder_delete(decoder);
 
   return -1;
 }
 
-static int
+static ssize_t
 ices_flac_readpcm (input_stream_t* self, size_t olen, int16_t* left,
                   int16_t* right)
 {
   flac_in_t* flac_data = (flac_in_t*)self->data;
 
   flac_data->left = left;
   flac_data->right = right;
   flac_data->olen = olen;
@@ -174,17 +189,17 @@ ices_flac_close (input_stream_t* self)
   free (flac_data);
 
   return close(self->fd);
 }
 
 /* -- 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;
   ssize_t len;
   char errbuf[128];
 
   if (!flac_data->len) {
     if (!flac_data->parsed) {


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to