aboutsummaryrefslogtreecommitdiff
path: root/audio/cynthiune
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2008-04-07 20:37:23 +0000
committerChristian Weisgerber <naddy@FreeBSD.org>2008-04-07 20:37:23 +0000
commitfc6f8996911202c6df18b1ee15a9cb205ba4ea49 (patch)
tree539cb57de0e25c0fcfd062eb36d849e1f96fdb90 /audio/cynthiune
parente736f59941a3e760ba36b76c2472497f04a3d7da (diff)
downloadports-fc6f8996911202c6df18b1ee15a9cb205ba4ea49.tar.gz
ports-fc6f8996911202c6df18b1ee15a9cb205ba4ea49.zip
Update to FLAC 1.2.1. This version includes two and a half years
worth of changes and an altered API. Bump the revision of all ports that depend on libFLAC and adapt to the new API where necessary. Some patches from Debian, Gentoo, OpenBSD, and upstream repositories. PR: 119476
Notes
Notes: svn path=/head/; revision=210771
Diffstat (limited to 'audio/cynthiune')
-rw-r--r--audio/cynthiune/Makefile2
-rw-r--r--audio/cynthiune/files/patch-Bundles_FLACTags_FLACTags.m71
-rw-r--r--audio/cynthiune/files/patch-Bundles_FLAC_FLAC.h11
-rw-r--r--audio/cynthiune/files/patch-Bundles_FLAC_FLAC.m129
4 files changed, 212 insertions, 1 deletions
diff --git a/audio/cynthiune/Makefile b/audio/cynthiune/Makefile
index df8b67220b6d..3db788c23375 100644
--- a/audio/cynthiune/Makefile
+++ b/audio/cynthiune/Makefile
@@ -7,7 +7,7 @@
PORTNAME= cynthiune
PORTVERSION= 0.9.5
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= audio gnustep
MASTER_SITES= ${MASTER_SITE_DEBIAN}
MASTER_SITE_SUBDIR= pool/main/c/cynthiune.app
diff --git a/audio/cynthiune/files/patch-Bundles_FLACTags_FLACTags.m b/audio/cynthiune/files/patch-Bundles_FLACTags_FLACTags.m
new file mode 100644
index 000000000000..4b2e6b23f40d
--- /dev/null
+++ b/audio/cynthiune/files/patch-Bundles_FLACTags_FLACTags.m
@@ -0,0 +1,71 @@
+--- Bundles/FLACTags/FLACTags.m.orig 2006-03-21 22:41:04.000000000 +0100
++++ Bundles/FLACTags/FLACTags.m 2008-03-27 17:23:35.000000000 +0100
+@@ -78,14 +78,14 @@ processComment (FLAC__StreamMetadata_Vor
+ }
+
+ static FLAC__StreamDecoderWriteStatus
+-writeCallback (const FLAC__FileDecoder *fileDecoder, const FLAC__Frame *frame,
++writeCallback (const FLAC__StreamDecoder *fileDecoder, const FLAC__Frame *frame,
+ const FLAC__int32 * const buffer[], void *clientData)
+ {
+ return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+ }
+
+ static void
+-metadataCallback (const FLAC__FileDecoder *fileDecoder,
++metadataCallback (const FLAC__StreamDecoder *fileDecoder,
+ const FLAC__StreamMetadata *metadata,
+ void *clientData)
+ {
+@@ -104,7 +104,7 @@ metadataCallback (const FLAC__FileDecode
+ }
+
+ static void
+-errorCallback (const FLAC__FileDecoder *fileDecoder,
++errorCallback (const FLAC__StreamDecoder *fileDecoder,
+ FLAC__StreamDecoderErrorStatus status,
+ void *clientData)
+ {
+@@ -132,30 +132,25 @@ errorCallback (const FLAC__FileDecoder *
+ year: (NSString **) year
+ ofFilename: (NSString *) filename
+ {
+- FLAC__FileDecoder *fileDecoder;
++ FLAC__StreamDecoder *fileDecoder;
+ BOOL result;
+ NSString **arrayOfValues[] = { title, artist, album, trackNumber,
+ genre, year };
+
+- fileDecoder = FLAC__file_decoder_new();
++ fileDecoder = FLAC__stream_decoder_new();
+ if (fileDecoder)
+ {
+- FLAC__file_decoder_set_metadata_ignore_all (fileDecoder);
+- FLAC__file_decoder_set_metadata_respond (fileDecoder,
++ FLAC__stream_decoder_set_metadata_ignore_all (fileDecoder);
++ FLAC__stream_decoder_set_metadata_respond (fileDecoder,
+ FLAC__METADATA_TYPE_VORBIS_COMMENT);
+- FLAC__file_decoder_set_metadata_callback (fileDecoder,
+- metadataCallback);
+- FLAC__file_decoder_set_write_callback (fileDecoder, writeCallback);
+- FLAC__file_decoder_set_error_callback (fileDecoder, errorCallback);
+- FLAC__file_decoder_set_client_data (fileDecoder, arrayOfValues);
+-
+- result = (FLAC__file_decoder_set_filename (fileDecoder,
+- [filename cString])
+- && (FLAC__file_decoder_init (fileDecoder)
+- == FLAC__FILE_DECODER_OK)
+- && FLAC__file_decoder_process_until_end_of_metadata
+- (fileDecoder));
+- FLAC__file_decoder_delete (fileDecoder);
++ result = (FLAC__stream_decoder_init_file (fileDecoder,
++ [filename cString],
++ writeCallback, metadataCallback,
++ errorCallback,
++ *arrayOfValues)
++ == FLAC__STREAM_DECODER_INIT_STATUS_OK)
++ && FLAC__stream_decoder_process_until_end_of_metadata (fileDecoder);
++ FLAC__stream_decoder_delete (fileDecoder);
+ }
+ else
+ result = NO;
diff --git a/audio/cynthiune/files/patch-Bundles_FLAC_FLAC.h b/audio/cynthiune/files/patch-Bundles_FLAC_FLAC.h
new file mode 100644
index 000000000000..85680ee18b61
--- /dev/null
+++ b/audio/cynthiune/files/patch-Bundles_FLAC_FLAC.h
@@ -0,0 +1,11 @@
+--- Bundles/FLAC/FLAC.h.orig 2006-03-21 11:11:19.000000000 +0100
++++ Bundles/FLAC/FLAC.h 2008-03-27 17:23:35.000000000 +0100
+@@ -31,7 +31,7 @@
+
+ @interface FLAC : NSObject <CynthiuneBundle, Format>
+ {
+- FLAC__FileDecoder *fileDecoder;
++ FLAC__StreamDecoder *fileDecoder;
+
+ unsigned int bitsPerSample;
+ unsigned int duration;
diff --git a/audio/cynthiune/files/patch-Bundles_FLAC_FLAC.m b/audio/cynthiune/files/patch-Bundles_FLAC_FLAC.m
new file mode 100644
index 000000000000..119d4b090bd3
--- /dev/null
+++ b/audio/cynthiune/files/patch-Bundles_FLAC_FLAC.m
@@ -0,0 +1,129 @@
+--- Bundles/FLAC/FLAC.m.orig 2006-03-21 22:39:13.000000000 +0100
++++ Bundles/FLAC/FLAC.m 2008-03-27 17:23:35.000000000 +0100
+@@ -39,7 +39,7 @@
+ #define LOCALIZED(X) _b ([FLAC class], X)
+
+ static FLAC__StreamDecoderWriteStatus
+-writeCallback (const FLAC__FileDecoder *fileDecoder, const FLAC__Frame *frame,
++writeCallback (const FLAC__StreamDecoder *fileDecoder, const FLAC__Frame *frame,
+ const FLAC__int32 * const buffer[], void *clientData)
+ {
+ CFLAC *cStream;
+@@ -70,7 +70,7 @@ writeCallback (const FLAC__FileDecoder *
+ }
+
+ static void
+-metadataCallback (const FLAC__FileDecoder *fileDecoder,
++metadataCallback (const FLAC__StreamDecoder *fileDecoder,
+ const FLAC__StreamMetadata *metadata,
+ void *clientData)
+ {
+@@ -88,7 +88,7 @@ metadataCallback (const FLAC__FileDecode
+ }
+
+ static void
+-errorCallback (const FLAC__FileDecoder *fileDecoder,
++errorCallback (const FLAC__StreamDecoder *fileDecoder,
+ FLAC__StreamDecoderErrorStatus status,
+ void *clientData)
+ {
+@@ -161,25 +161,24 @@ errorCallback (const FLAC__FileDecoder *
+
+ - (BOOL) _initializeFileDecoderWithFilename: (NSString *) fileName
+ {
+- FLAC__file_decoder_set_metadata_ignore_all (fileDecoder);
+- FLAC__file_decoder_set_metadata_respond (fileDecoder,
++ FLAC__stream_decoder_set_metadata_ignore_all (fileDecoder);
++ FLAC__stream_decoder_set_metadata_respond (fileDecoder,
+ FLAC__METADATA_TYPE_STREAMINFO);
+- FLAC__file_decoder_set_metadata_callback (fileDecoder,
+- metadataCallback);
+- FLAC__file_decoder_set_write_callback (fileDecoder, writeCallback);
+- FLAC__file_decoder_set_error_callback (fileDecoder, errorCallback);
+- FLAC__file_decoder_set_client_data (fileDecoder, self);
+-
+- return (FLAC__file_decoder_set_filename (fileDecoder, [fileName cString])
+- && (FLAC__file_decoder_init (fileDecoder) == FLAC__FILE_DECODER_OK)
+- && FLAC__file_decoder_process_until_end_of_metadata (fileDecoder));
++ return (FLAC__stream_decoder_init_file (fileDecoder,
++ [fileName cString],
++ writeCallback,
++ metadataCallback,
++ errorCallback,
++ self)
++ == FLAC__STREAM_DECODER_INIT_STATUS_OK)
++ && FLAC__stream_decoder_process_until_end_of_metadata (fileDecoder);
+ }
+
+ - (BOOL) streamOpen: (NSString *) fileName
+ {
+ BOOL result;
+
+- fileDecoder = FLAC__file_decoder_new();
++ fileDecoder = FLAC__stream_decoder_new();
+
+ if (fileDecoder)
+ {
+@@ -187,7 +186,7 @@ errorCallback (const FLAC__FileDecoder *
+ result = YES;
+ else
+ {
+- FLAC__file_decoder_delete (fileDecoder);
++ FLAC__stream_decoder_delete (fileDecoder);
+ fileDecoder = NULL;
+ result = NO;
+ }
+@@ -200,7 +199,7 @@ errorCallback (const FLAC__FileDecoder *
+
+ - (void) streamClose
+ {
+- FLAC__file_decoder_delete (fileDecoder);
++ FLAC__stream_decoder_delete (fileDecoder);
+ fileDecoder = NULL;
+ }
+
+@@ -215,7 +214,7 @@ errorCallback (const FLAC__FileDecoder *
+ if (position >= readBufferSize)
+ {
+ position = 0;
+- success = FLAC__file_decoder_process_single (fileDecoder);
++ success = FLAC__stream_decoder_process_single (fileDecoder);
+ }
+
+ if (success)
+@@ -251,13 +250,13 @@ errorCallback (const FLAC__FileDecoder *
+ withSize: (unsigned int) bufferSize
+ {
+ int readBytes;
+- FLAC__FileDecoderState state;
++ FLAC__StreamDecoderState state;
+
+- state = FLAC__file_decoder_get_state (fileDecoder);
++ state = FLAC__stream_decoder_get_state (fileDecoder);
+
+- if (state == FLAC__FILE_DECODER_OK)
++ if (state == FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC)
+ readBytes = [self _processNextChunk: buffer withSize: bufferSize];
+- else if (state == FLAC__FILE_DECODER_END_OF_FILE)
++ else if (state == FLAC__STREAM_DECODER_END_OF_STREAM)
+ readBytes = 0;
+ else
+ readBytes = -1;
+@@ -272,7 +271,7 @@ errorCallback (const FLAC__FileDecoder *
+
+ - (void) seek: (unsigned int) aPos
+ {
+- FLAC__file_decoder_seek_absolute (fileDecoder, aPos * rate);
++ FLAC__stream_decoder_seek_absolute (fileDecoder, aPos * rate);
+ }
+
+ - (unsigned int) readChannels
+@@ -295,7 +294,7 @@ errorCallback (const FLAC__FileDecoder *
+ if (readBuffer)
+ free (readBuffer);
+ if (fileDecoder)
+- FLAC__file_decoder_delete (fileDecoder);
++ FLAC__stream_decoder_delete (fileDecoder);
+ [super dealloc];
+ }
+