pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/audio/easytag Actually, do support flac-1.1.3 by using...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/da8056a079dd
branches:  trunk
changeset: 523729:da8056a079dd
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Fri Jan 12 20:16:04 2007 +0000

description:
Actually, do support flac-1.1.3 by using a patch from
ftp.altlinux.org /pub/people/thresh

diffstat:

 audio/easytag/Makefile         |    3 +-
 audio/easytag/distinfo         |    3 +-
 audio/easytag/patches/patch-aa |  132 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 136 insertions(+), 2 deletions(-)

diffs (164 lines):

diff -r b7c849c37006 -r da8056a079dd audio/easytag/Makefile
--- a/audio/easytag/Makefile    Fri Jan 12 20:02:53 2007 +0000
+++ b/audio/easytag/Makefile    Fri Jan 12 20:16:04 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.53 2007/01/12 20:02:53 wiz Exp $
+# $NetBSD: Makefile,v 1.54 2007/01/12 20:16:04 wiz Exp $
 #
 
 DISTNAME=      easytag-1.1
@@ -17,6 +17,7 @@
 USE_PKGLOCALEDIR=      yes
 USE_LIBTOOL=           yes
 
+.include "../../audio/flac/buildlink3.mk"
 .include "../../audio/id3lib/buildlink3.mk"
 .include "../../audio/libvorbis/buildlink3.mk"
 .include "../../x11/gtk/buildlink3.mk"
diff -r b7c849c37006 -r da8056a079dd audio/easytag/distinfo
--- a/audio/easytag/distinfo    Fri Jan 12 20:02:53 2007 +0000
+++ b/audio/easytag/distinfo    Fri Jan 12 20:16:04 2007 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.23 2005/04/19 00:24:13 wiz Exp $
+$NetBSD: distinfo,v 1.24 2007/01/12 20:16:04 wiz Exp $
 
 SHA1 (easytag-1.1.tar.bz2) = 2441ab3ccb80f9b8d9301c1cd302670c10782d1a
 RMD160 (easytag-1.1.tar.bz2) = 997fda51f555743b8a9647fc6bba9b40f704991a
 Size (easytag-1.1.tar.bz2) = 1112302 bytes
+SHA1 (patch-aa) = c6c91e6d9369c1830e20cd9412272617c08cbc1f
diff -r b7c849c37006 -r da8056a079dd audio/easytag/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/easytag/patches/patch-aa    Fri Jan 12 20:16:04 2007 +0000
@@ -0,0 +1,132 @@
+$NetBSD: patch-aa,v 1.15 2007/01/12 20:16:04 wiz Exp $
+
+--- src/flac_header.c.orig     2004-01-22 22:17:10.000000000 +0000
++++ src/flac_header.c
+@@ -40,6 +40,13 @@
+ #include "misc.h"
+ #include "i18n.h"
+ 
++/* FLAC 1.1.3 has FLAC_API_VERSION_CURRENT == 8 */
++/* by LEGACY_FLAC we mean pre-FLAC 1.1.3; in FLAC 1.1.3 the FLAC__FileDecoder was merged into the FLAC__StreamDecoder  */
++#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8
++#define LEGACY_FLAC
++#else
++#undef LEGACY_FLAC
++#endif
+ 
+ 
+ 
+@@ -75,9 +82,15 @@ static unsigned reservoir_samples_ = 0;
+ /**************
+  * Prototypes *
+  **************/
++#ifdef LEGACY_FLAC
+ static FLAC__StreamDecoderWriteStatus write_callback_(const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
+ static void metadata_callback_(const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
+ static void error_callback_   (const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
++#else
++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);
++#endif
+ 
+ 
+ 
+@@ -95,7 +108,11 @@ gboolean Flac_Header_Read_File_Info (gch
+     gdouble duration = 0;
+     gulong filesize;
+ 
++#ifdef LEGACY_FLAC
+     FLAC__FileDecoder *tmp_decoder;
++#else
++    FLAC__StreamDecoder *tmp_decoder;
++#endif
+     file_info_struct tmp_file_info;
+ 
+ 
+@@ -110,11 +127,16 @@ gboolean Flac_Header_Read_File_Info (gch
+     fclose(file);
+ 
+     /* Decoding FLAC file */
++#ifdef LEGACY_FLAC
+     tmp_decoder = FLAC__file_decoder_new();
++#else
++    tmp_decoder = FLAC__stream_decoder_new();
++#endif
+     if(tmp_decoder == 0)
+         return FALSE;
+ 
+     tmp_file_info.abort_flag = false;
++#ifdef LEGACY_FLAC
+     FLAC__file_decoder_set_md5_checking     (tmp_decoder, false);
+     FLAC__file_decoder_set_filename         (tmp_decoder, filename);
+     FLAC__file_decoder_set_write_callback   (tmp_decoder, write_callback_);
+@@ -123,7 +145,13 @@ gboolean Flac_Header_Read_File_Info (gch
+     FLAC__file_decoder_set_client_data      (tmp_decoder, &tmp_file_info);
+     if(FLAC__file_decoder_init(tmp_decoder) != FLAC__FILE_DECODER_OK)
+         return FALSE;
++#else
++    FLAC__stream_decoder_set_md5_checking     (tmp_decoder, false);
++    if(FLAC__stream_decoder_init_file(tmp_decoder, filename, write_callback_, metadata_callback_, error_callback_, &tmp_file_info) != FLAC__STREAM_DECODER_INIT_STATUS_OK)
++        return FALSE;
++#endif
+ 
++#ifdef LEGACY_FLAC
+     // In FLAC 1.0.3, is used : FLAC__file_decoder_process_metadata
+     // In FLAC 1.0.4, is used : FLAC__file_decoder_process_until_end_of_metadata
+ #if ( (LIBFLAC_MAJOR <= 1) && (LIBFLAC_MINOR <= 0) && (LIBFLAC_PATCH <= 3) )
+@@ -131,10 +159,18 @@ gboolean Flac_Header_Read_File_Info (gch
+ #else
+     if(!FLAC__file_decoder_process_until_end_of_metadata(tmp_decoder)) // FLAC 1.0.4 (Bastian Kleineidam)
+ #endif
++#else
++    if(!FLAC__stream_decoder_process_until_end_of_metadata(tmp_decoder))
++#endif
+         return FALSE;
+ 
++#ifdef LEGACY_FLAC
+     FLAC__file_decoder_finish(tmp_decoder);
+     FLAC__file_decoder_delete(tmp_decoder);
++#else
++    FLAC__stream_decoder_finish(tmp_decoder);
++    FLAC__stream_decoder_delete(tmp_decoder);
++#endif
+     /* End of decoding FLAC file */
+ 
+ 
+@@ -154,7 +190,11 @@ gboolean Flac_Header_Read_File_Info (gch
+ 
+ 
+ 
++#ifdef LEGACY_FLAC
+ FLAC__StreamDecoderWriteStatus write_callback_(const FLAC__FileDecoder *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
+ {
+     file_info_struct *file_info = (file_info_struct *)client_data;
+     const unsigned bps = file_info->bits_per_sample, channels = file_info->channels, wide_samples = frame->header.blocksize;
+@@ -187,7 +227,11 @@ FLAC__StreamDecoderWriteStatus write_cal
+     return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+ }
+ 
++#ifdef LEGACY_FLAC
+ void metadata_callback_(const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
++#else
++void metadata_callback_(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
++#endif
+ {
+     file_info_struct *file_info = (file_info_struct *)client_data;
+     (void)decoder;
+@@ -212,7 +256,11 @@ void metadata_callback_(const FLAC__File
+     }
+ }
+ 
++#ifdef LEGACY_FLAC
+ void error_callback_(const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
++#else
++void error_callback_(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
++#endif
+ {
+     file_info_struct *file_info = (file_info_struct *)client_data;
+     (void)decoder;



Home | Main Index | Thread Index | Old Index