diff options
author | wiz <wiz@pkgsrc.org> | 2007-01-12 20:16:04 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2007-01-12 20:16:04 +0000 |
commit | 3cf6d418ed953ecf655a42b9a72e3ca15fe65e11 (patch) | |
tree | cbef423ff58fc52fe61c5acf2cbb829ed2eabba3 /audio | |
parent | bb766ca5c7f084d4b4b0bca823d12f0214c2d067 (diff) | |
download | pkgsrc-3cf6d418ed953ecf655a42b9a72e3ca15fe65e11.tar.gz |
Actually, do support flac-1.1.3 by using a patch from
ftp.altlinux.org /pub/people/thresh
Diffstat (limited to 'audio')
-rw-r--r-- | audio/easytag/Makefile | 3 | ||||
-rw-r--r-- | audio/easytag/distinfo | 3 | ||||
-rw-r--r-- | audio/easytag/patches/patch-aa | 132 |
3 files changed, 136 insertions, 2 deletions
diff --git a/audio/easytag/Makefile b/audio/easytag/Makefile index b1e8ebb6149..d33d8eaad0e 100644 --- a/audio/easytag/Makefile +++ b/audio/easytag/Makefile @@ -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_TOOLS+= gmake xgettext 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 --git a/audio/easytag/distinfo b/audio/easytag/distinfo index 8f6aaa705ec..81ea2417fa2 100644 --- a/audio/easytag/distinfo +++ b/audio/easytag/distinfo @@ -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 --git a/audio/easytag/patches/patch-aa b/audio/easytag/patches/patch-aa new file mode 100644 index 00000000000..cd0ed505b6e --- /dev/null +++ b/audio/easytag/patches/patch-aa @@ -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; |