pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/vorbis-tools Add support for flac-1.1.3 based on...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a1f2edc71838
branches:  trunk
changeset: 523787:a1f2edc71838
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sat Jan 13 15:35:52 2007 +0000

description:
Add support for flac-1.1.3 based on Josh Coalson's patches.
Bump PKGREVISION because previously it would just disable flac
support.

diffstat:

 audio/vorbis-tools/Makefile         |    4 +-
 audio/vorbis-tools/distinfo         |   15 ++-
 audio/vorbis-tools/patches/patch-ab |    6 +-
 audio/vorbis-tools/patches/patch-ac |   12 +-
 audio/vorbis-tools/patches/patch-ag |   19 +++
 audio/vorbis-tools/patches/patch-ah |   12 ++
 audio/vorbis-tools/patches/patch-ai |  208 ++++++++++++++++++++++++++++++++++++
 audio/vorbis-tools/patches/patch-aj |  171 +++++++++++++++++++++++++++++
 audio/vorbis-tools/patches/patch-ak |   26 ++++
 audio/vorbis-tools/patches/patch-an |   83 ++++++++++++++
 audio/vorbis-tools/patches/patch-ao |   15 ++
 audio/vorbis-tools/patches/patch-ap |   12 ++
 audio/vorbis-tools/patches/patch-aq |   13 ++
 13 files changed, 582 insertions(+), 14 deletions(-)

diffs (truncated from 692 to 300 lines):

diff -r e93a3b6d4133 -r a1f2edc71838 audio/vorbis-tools/Makefile
--- a/audio/vorbis-tools/Makefile       Sat Jan 13 14:48:05 2007 +0000
+++ b/audio/vorbis-tools/Makefile       Sat Jan 13 15:35:52 2007 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.44 2007/01/07 12:25:53 wiz Exp $
+# $NetBSD: Makefile,v 1.45 2007/01/13 15:35:52 wiz Exp $
 
 DISTNAME=      vorbis-tools-1.1.1
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    audio
 MASTER_SITES=  http://downloads.xiph.org/releases/vorbis/
 
diff -r e93a3b6d4133 -r a1f2edc71838 audio/vorbis-tools/distinfo
--- a/audio/vorbis-tools/distinfo       Sat Jan 13 14:48:05 2007 +0000
+++ b/audio/vorbis-tools/distinfo       Sat Jan 13 15:35:52 2007 +0000
@@ -1,11 +1,20 @@
-$NetBSD: distinfo,v 1.18 2006/11/02 07:57:56 wiz Exp $
+$NetBSD: distinfo,v 1.19 2007/01/13 15:35:52 wiz Exp $
 
 SHA1 (vorbis-tools-1.1.1.tar.gz) = a1394b39905b389d72f12c2a9f0c86a33d07a487
 RMD160 (vorbis-tools-1.1.1.tar.gz) = ed38929b8a81f833f726e489e55e9f62d5ed69ec
 Size (vorbis-tools-1.1.1.tar.gz) = 948837 bytes
 SHA1 (patch-aa) = 2adc912765d58b19c1285c12ac0935b860b7da34
-SHA1 (patch-ab) = 6c154334ea5a7a7e76982f0588de30548c802fca
-SHA1 (patch-ac) = 7eb178a2d7a5dbecd83a5df0138c9ab41943251a
+SHA1 (patch-ab) = b706ae0bc9e13c5ccff689aa1451efc782e340e9
+SHA1 (patch-ac) = 65e07de0f0e4de30b6fed374146535adebba5ed6
 SHA1 (patch-ad) = 729ca84168ee781335429840ee54a2b894b82f54
 SHA1 (patch-ae) = 67bda1581c18dec0e43846f4c39aba35a7b2223e
 SHA1 (patch-af) = eafb75d8b9aade62b9862e3df1380f15eba80f47
+SHA1 (patch-ag) = af25e010e1eb350a8614398d312dd0842a207060
+SHA1 (patch-ah) = fa01e42b339fe2cbd5d98c150e0bb618b43fd4a1
+SHA1 (patch-ai) = c44c9b0bec99b0e8a3883c0ef388f6d0856fa11a
+SHA1 (patch-aj) = 8cfa93518f71feb1e85f4db784d5e5c158dcf11e
+SHA1 (patch-ak) = fb0e11d1aff4753fbb3ee9088e6faeb5bcd58ef1
+SHA1 (patch-an) = a6a1aa59f2bf87b2217e827e6309233515d162c2
+SHA1 (patch-ao) = f509dde919b93ddfba0105189cb645c2667ba0e4
+SHA1 (patch-ap) = 4da7c1a2b92dad4a05322b05451a1ac4c34ce2fb
+SHA1 (patch-aq) = 237bbcb6c4d895dcd01f42cae5a48f11d2a695b1
diff -r e93a3b6d4133 -r a1f2edc71838 audio/vorbis-tools/patches/patch-ab
--- a/audio/vorbis-tools/patches/patch-ab       Sat Jan 13 14:48:05 2007 +0000
+++ b/audio/vorbis-tools/patches/patch-ab       Sat Jan 13 15:35:52 2007 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.6 2003/12/08 14:43:48 wiz Exp $
+$NetBSD: patch-ab,v 1.7 2007/01/13 15:35:52 wiz Exp $
 
---- ogg123/ogg123.c.orig       Tue Sep  2 21:37:05 2003
+--- ogg123/ogg123.c.orig       2005-06-03 10:15:09.000000000 +0000
 +++ ogg123/ogg123.c
-@@ -606,7 +606,13 @@ void play (char *source_string)
+@@ -610,7 +610,13 @@ void play (char *source_string)
    
    format->cleanup(decoder);
    transport->close(source);
diff -r e93a3b6d4133 -r a1f2edc71838 audio/vorbis-tools/patches/patch-ac
--- a/audio/vorbis-tools/patches/patch-ac       Sat Jan 13 14:48:05 2007 +0000
+++ b/audio/vorbis-tools/patches/patch-ac       Sat Jan 13 15:35:52 2007 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ac,v 1.6 2003/12/08 14:43:48 wiz Exp $
+$NetBSD: patch-ac,v 1.7 2007/01/13 15:35:52 wiz Exp $
 
---- oggenc/oggenc.c.orig       Tue Sep 16 00:04:00 2003
+--- oggenc/oggenc.c.orig       2005-06-03 10:15:10.000000000 +0000
 +++ oggenc/oggenc.c
-@@ -640,6 +640,8 @@ static void parse_options(int argc, char
+@@ -659,6 +659,8 @@ static void parse_options(int argc, char
  
                                break;
                        case 'a':
@@ -11,7 +11,7 @@
                                opt->artist = realloc(opt->artist, (++opt->artist_count)*sizeof(char *));
                                opt->artist[opt->artist_count - 1] = strdup(optarg);
                                break;
-@@ -652,10 +654,14 @@ static void parse_options(int argc, char
+@@ -671,10 +673,14 @@ static void parse_options(int argc, char
                                opt->comments[opt->comment_count - 1] = strdup(optarg);
                                break;
                        case 'd':
@@ -26,7 +26,7 @@
                  opt->genre = realloc(opt->genre, (++opt->genre_count)*sizeof(char *));
                  opt->genre[opt->genre_count - 1] = strdup(optarg);
                  break;
-@@ -664,6 +670,8 @@ static void parse_options(int argc, char
+@@ -683,6 +689,8 @@ static void parse_options(int argc, char
                                exit(0);
                                break;
                        case 'l':
@@ -35,7 +35,7 @@
                                opt->album = realloc(opt->album, (++opt->album_count)*sizeof(char *));
                                opt->album[opt->album_count - 1] = strdup(optarg);
                                break;
-@@ -674,6 +682,8 @@ static void parse_options(int argc, char
+@@ -693,6 +701,8 @@ static void parse_options(int argc, char
                                        opt->serial = 0; /* Failed, so just set to zero */
                                break;
                        case 't':
diff -r e93a3b6d4133 -r a1f2edc71838 audio/vorbis-tools/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/vorbis-tools/patches/patch-ag       Sat Jan 13 15:35:52 2007 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-ag,v 1.1 2007/01/13 15:35:52 wiz Exp $
+
+--- configure.ac.orig  2005-06-27 09:25:51.000000000 +0000
++++ configure.ac
+@@ -171,13 +171,8 @@ FLAC_LIBS=""
+ if test "x$build_flac" = xyes; then
+   AC_CHECK_LIB(m,log,FLAC_LIBS="-lm")
+   AC_CHECK_LIB(FLAC, [FLAC__stream_decoder_process_single],
+-    [have_libFLAC=yes; FLAC_LIBS="-lFLAC $FLAC_LIBS"],
++    [have_libFLAC=yes; FLAC_LIBS="-lFLAC $FLAC_LIBS $OGG_LIBS"],
+     AC_MSG_WARN([libFLAC missing])
+-    have_libFLAC=no, [$FLAC_LIBS]
+-  )
+-  AC_CHECK_LIB(OggFLAC, [OggFLAC__stream_decoder_new],
+-    [FLAC_LIBS="-lOggFLAC $FLAC_LIBS $OGG_LIBS"],
+-    AC_MSG_WARN([libOggFLAC missing])
+     have_libFLAC=no, [$FLAC_LIBS $OGG_LIBS]
+   )
+   AC_CHECK_HEADER(FLAC/stream_decoder.h,,
diff -r e93a3b6d4133 -r a1f2edc71838 audio/vorbis-tools/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/vorbis-tools/patches/patch-ah       Sat Jan 13 15:35:52 2007 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-ah,v 1.1 2007/01/13 15:35:52 wiz Exp $
+
+--- ogg123/Makefile.am.orig    2005-06-13 13:11:44.000000000 +0000
++++ ogg123/Makefile.am
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+ if HAVE_LIBFLAC
+-flac_sources = flac_format.c easyflac.c easyflac.h 
++flac_sources = flac_format.c
+ else
+ flac_sources =
+ endif
diff -r e93a3b6d4133 -r a1f2edc71838 audio/vorbis-tools/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/vorbis-tools/patches/patch-ai       Sat Jan 13 15:35:52 2007 +0000
@@ -0,0 +1,208 @@
+$NetBSD: patch-ai,v 1.1 2007/01/13 15:35:52 wiz Exp $
+
+--- ogg123/flac_format.c.orig  2005-06-03 10:15:09.000000000 +0000
++++ ogg123/flac_format.c
+@@ -25,13 +25,23 @@
+ #include "audio.h"
+ #include "format.h"
+ #include "i18n.h"
++#if !defined(FLAC_API_VERSION_CURRENT) || (FLAC_API_VERSION_CURRENT < 8)
++#define NEED_EASYFLAC 1
++#endif
++#if NEED_EASYFLAC
+ #include "easyflac.h"
++#else
++#include <FLAC/stream_decoder.h>
++#endif
+ #include "vorbis_comments.h"
+ 
+-#define DEFAULT_FLAC_FRAME_SIZE 4608
+-
+ typedef struct {
++#if NEED_EASYFLAC
+   EasyFLAC__StreamDecoder *decoder;
++#else
++  FLAC__StreamDecoder *decoder;
++  int is_oggflac;
++#endif
+   short channels;
+   int rate;
+   int bits_per_sample;
+@@ -67,10 +77,18 @@ format_t oggflac_format;
+ 
+ 
+ /* Private functions declarations */
+-FLAC__StreamDecoderReadStatus easyflac_read_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data);
+-FLAC__StreamDecoderWriteStatus easyflac_write_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
+-void easyflac_metadata_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
+-void easyflac_error_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
++#if NEED_EASYFLAC
++static FLAC__StreamDecoderReadStatus easyflac_read_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data);
++static FLAC__StreamDecoderWriteStatus easyflac_write_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
++static void easyflac_metadata_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
++static void easyflac_error_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
++#else
++static FLAC__StreamDecoderReadStatus read_callback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data);
++static FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
++static void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
++static void error_callback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
++static FLAC__bool eof_callback(const FLAC__StreamDecoder *decoder, void *client_data);
++#endif
+ 
+ void resize_buffer(flac_private_t *flac, int newchannels, int newsamples);
+ /*void copy_comments (vorbis_comment *v_comments, FLAC__StreamMetadata_VorbisComment *f_comments);*/
+@@ -155,6 +173,7 @@ decoder_t* flac_init (data_source_t *sou
+   private->buf_start = 0;
+   
+   /* Setup FLAC decoder */
++#if NEED_EASYFLAC
+   if (oggflac_can_decode(source)) {
+     decoder->format = &oggflac_format;
+     private->decoder = EasyFLAC__stream_decoder_new(1);
+@@ -172,13 +191,39 @@ decoder_t* flac_init (data_source_t *sou
+   EasyFLAC__set_metadata_respond(private->decoder, FLAC__METADATA_TYPE_STREAMINFO);
+   EasyFLAC__set_metadata_respond(private->decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
+   EasyFLAC__init(private->decoder);
++#else
++  if (oggflac_can_decode(source)) {
++    private->is_oggflac = 1;
++    decoder->format = &oggflac_format;
++  } else {
++    private->is_oggflac = 0;
++    decoder->format = &flac_format;
++  }
++  private->decoder = FLAC__stream_decoder_new();
++
++  FLAC__stream_decoder_set_md5_checking(private->decoder, false);
++  FLAC__stream_decoder_set_metadata_respond(private->decoder, FLAC__METADATA_TYPE_STREAMINFO);
++  FLAC__stream_decoder_set_metadata_respond(private->decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
++  if(private->is_oggflac)
++    FLAC__stream_decoder_init_ogg_stream(private->decoder, read_callback, /*seek_callback=*/0, /*tell_callback=*/0, /*length_callback=*/0, eof_callback, write_callback, metadata_callback, 
error_callback, decoder);
++  else
++    FLAC__stream_decoder_init_stream(private->decoder, read_callback, /*seek_callback=*/0, /*tell_callback=*/0, /*length_callback=*/0, eof_callback, write_callback, metadata_callback, 
error_callback, decoder);
++#endif
+   
+   /* Callback will set the total samples and sample rate */
++#if NEED_EASYFLAC
+   EasyFLAC__process_until_end_of_metadata(private->decoder);
++#else
++  FLAC__stream_decoder_process_until_end_of_metadata(private->decoder);
++#endif
+ 
+   /* Callback will set the number of channels and resize the 
+      audio buffer */
++#if NEED_EASYFLAC
+   EasyFLAC__process_single(private->decoder);
++#else
++  FLAC__stream_decoder_process_single(private->decoder);
++#endif
+ 
+   /* FLAC API returns signed samples on all streams */
+   decoder->actual_fmt.signed_sample = 1;
+@@ -241,11 +286,19 @@ int flac_read (decoder_t *decoder, void 
+       realsamples += copy;
+     }
+     else if (!priv->eos) {
++#if NEED_EASYFLAC
+       ret = EasyFLAC__process_single(priv->decoder);
+       if (!ret ||
+         EasyFLAC__get_state(priv->decoder)
+         == FLAC__STREAM_DECODER_END_OF_STREAM)
+       priv->eos = 1;  /* Bail out! */
++#else
++      ret = FLAC__stream_decoder_process_single(priv->decoder);
++      if (!ret ||
++        FLAC__stream_decoder_get_state(priv->decoder)
++        == FLAC__STREAM_DECODER_END_OF_STREAM)
++      priv->eos = 1;  /* Bail out! */
++#endif
+     } else
+       break;
+   }
+@@ -311,8 +364,13 @@ void flac_cleanup (decoder_t *decoder)
+     free(priv->buf[i]);
+   
+   free(priv->buf);
++#if NEED_EASYFLAC
+   EasyFLAC__finish(priv->decoder);
+   EasyFLAC__stream_decoder_delete(priv->decoder);
++#else
++  FLAC__stream_decoder_finish(priv->decoder);
++  FLAC__stream_decoder_delete(priv->decoder);
++#endif
+ 
+   free(decoder->private);
+   free(decoder);
+@@ -342,7 +400,11 @@ format_t oggflac_format = {
+ 
+ 
+ 
++#if NEED_EASYFLAC
+ FLAC__StreamDecoderReadStatus easyflac_read_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
++#else
++FLAC__StreamDecoderReadStatus read_callback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
++#endif
+ {
+   decoder_t *e_decoder = client_data;
+   flac_private_t *priv = e_decoder->private;
+@@ -363,7 +425,11 @@ FLAC__StreamDecoderReadStatus easyflac_r
+ }
+ 
+ 
++#if NEED_EASYFLAC
+ FLAC__StreamDecoderWriteStatus easyflac_write_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
++#else
++FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
++#endif
+ {
+   decoder_t *e_decoder = client_data;
+   flac_private_t *priv = e_decoder->private;
+@@ -389,7 +455,11 @@ FLAC__StreamDecoderWriteStatus easyflac_



Home | Main Index | Thread Index | Old Index