diff options
author | 2009-12-23 20:39:19 +0000 | |
---|---|---|
committer | 2009-12-23 20:39:19 +0000 | |
commit | bf3d350ebc156c96985de057bc4db45f1021aba7 (patch) | |
tree | 6a07ad00b0c59c2d8cb0a9beb72025f5b8605676 /gnustep-apps/cynthiune | |
parent | Prepare preventive mask for drizzle. (diff) | |
download | historical-bf3d350ebc156c96985de057bc4db45f1021aba7.tar.gz historical-bf3d350ebc156c96985de057bc4db45f1021aba7.tar.bz2 historical-bf3d350ebc156c96985de057bc4db45f1021aba7.zip |
Convert musepack support to SV8 api, thanks to ssuominen in bug #297910
Package-Manager: portage-2.2_rc60/cvs/Linux x86_64
Diffstat (limited to 'gnustep-apps/cynthiune')
-rw-r--r-- | gnustep-apps/cynthiune/ChangeLog | 8 | ||||
-rw-r--r-- | gnustep-apps/cynthiune/Manifest | 4 | ||||
-rw-r--r-- | gnustep-apps/cynthiune/cynthiune-0.9.5-r5.ebuild | 67 | ||||
-rw-r--r-- | gnustep-apps/cynthiune/files/cynthiune-0.9.5-libmpcdec.patch | 310 |
4 files changed, 387 insertions, 2 deletions
diff --git a/gnustep-apps/cynthiune/ChangeLog b/gnustep-apps/cynthiune/ChangeLog index 9c4f29e19fa8..58baecb23fef 100644 --- a/gnustep-apps/cynthiune/ChangeLog +++ b/gnustep-apps/cynthiune/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for gnustep-apps/cynthiune # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnustep-apps/cynthiune/ChangeLog,v 1.25 2009/11/10 21:51:47 volkmar Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnustep-apps/cynthiune/ChangeLog,v 1.26 2009/12/23 20:39:18 voyageur Exp $ + +*cynthiune-0.9.5-r5 (23 Dec 2009) + + 23 Dec 2009; Bernard Cafarelli <voyageur@gentoo.org> + +cynthiune-0.9.5-r5.ebuild, +files/cynthiune-0.9.5-libmpcdec.patch: + Convert musepack support to SV8 api, thanks to ssuominen in bug #297910 10 Nov 2009; Mounir Lamouri <volkmar@gentoo.org> cynthiune-0.9.5-r4.ebuild: diff --git a/gnustep-apps/cynthiune/Manifest b/gnustep-apps/cynthiune/Manifest index 757998de3e45..e3d3b16e645b 100644 --- a/gnustep-apps/cynthiune/Manifest +++ b/gnustep-apps/cynthiune/Manifest @@ -3,9 +3,11 @@ AUX cynthiune-0.9.5-NSMutableDictionary.patch 312 RMD160 aebeb9f2b5cd54621103c61 AUX cynthiune-0.9.5-as-needed.patch 1681 RMD160 07179474202c7f64689731d079b9b94cc3a201c4 SHA1 6d041502b3e348529f6298812595dbd04e58ed34 SHA256 4241e0709d8889661090b8b94574bcf6e9eb219aab7ff044ec17a2941445e83d AUX cynthiune-0.9.5-flac-1.1.3.patch 8504 RMD160 4320c4a28fcd5bc9d37fab4113168ba9e4c0b42b SHA1 d2552a9e68dd5bee85a2545a0d49074f99f69029 SHA256 bbf5da3ba5acce325ce0d21c164f435912fa68149c7955179399bfee6ce4805f AUX cynthiune-0.9.5-gnustep-make-2.patch 12567 RMD160 2ea2afc4facff487187c7a600c1a711911d1b9db SHA1 f77ed1765d746a118c9a72fdf59bb8fc409bfde1 SHA256 61adc8a6ee7257c778dca98189a87942b29c1f08364419ff601f6865ae125246 +AUX cynthiune-0.9.5-libmpcdec.patch 8735 RMD160 29c22b17128624e54e2ad629daf31bbbbaabdeef SHA1 fa8e24aeb3b662cfef0d279ab77a52ca1df5e9c9 SHA256 8c5337294146216d30fecf5bfb87688c42d8ec4dad6cf0e3e07213236cc45c8d AUX cynthiune-0.9.5-libmpcdecsv7.patch 2071 RMD160 780e80e06e6cf2d06ba491c2ad586a28349a71b1 SHA1 5c787a3e13f1a76b0321a222278f013cc08acdd5 SHA256 540b577ae4f1f86377f0e156a577d782dec7964c4f9ec96c20faf417167e7cce AUX cynthiune-0.9.5-set-macro.patch 1108 RMD160 db86c99b51c925e7f0716f660904a1e4182ef902 SHA1 a15c667e9e5d60ee333d16eaf5db779ec95060b6 SHA256 47241760782bf54ff172ef0a010e5b27073c717e62c85e2c428425752b018f4d DIST Cynthiune-0.9.5.tar.gz 490426 RMD160 b9dff46275b6b79ebc62655e7de92b9c9aa41274 SHA1 6622288efde5e576defa64f0d4034adeb56291d4 SHA256 e3e036385388556759e3712ea5e595976ec7a4867698dea7c46b46d226122e70 EBUILD cynthiune-0.9.5-r4.ebuild 2045 RMD160 49a284d2fbcf91399d9951ae3e036b4186777f22 SHA1 04c7ba8e30ed9a88cf83b111b435be8a2299caaa SHA256 805f48d028734796e4c46a55e859cb3641a1876386055bcf4a3bd4a643d73434 -MISC ChangeLog 4017 RMD160 ee52b53068c0ae01836c4ef69c123543ba2b6912 SHA1 55a007eb56b0289e11d61073bf15996c119adcc8 SHA256 59b3f34f9096347212733cdefb125e08909f49dc872abc7a35d5e43f16635f95 +EBUILD cynthiune-0.9.5-r5.ebuild 2055 RMD160 f71073c033a8defc61f753b533949a413a4b5ff1 SHA1 ebaf1a087a4bbe249c53709655dd47628d346724 SHA256 4c273b6e57588f5e7c5648dca7ff6580f46e581b9e3e20ab06d3dd40bd1b99b2 +MISC ChangeLog 4253 RMD160 2b27029484131065043fffc76f8ebf438e4a6f35 SHA1 9f79ae11f472821e846d4a6dc3782aeefc3f7caf SHA256 33cd162a75560fc067d07f10e057f31337d90ec6d997340d5df244c6c354428a MISC metadata.xml 2216 RMD160 06c2aea6ad54e88d28371ef8a6302120e88e8505 SHA1 65b4217c9947df1b0052b2a121bfce3c849de949 SHA256 6559882bfeb74a0c812e092fc392728e16a7df57d1ec45d43f44babd79ee3424 diff --git a/gnustep-apps/cynthiune/cynthiune-0.9.5-r5.ebuild b/gnustep-apps/cynthiune/cynthiune-0.9.5-r5.ebuild new file mode 100644 index 000000000000..2a685dcd706e --- /dev/null +++ b/gnustep-apps/cynthiune/cynthiune-0.9.5-r5.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnustep-apps/cynthiune/cynthiune-0.9.5-r5.ebuild,v 1.1 2009/12/23 20:39:18 voyageur Exp $ + +inherit gnustep-2 + +S=${WORKDIR}/${P/c/C} + +DESCRIPTION="Free software and romantic music player for GNUstep." +HOMEPAGE="http://organact.mine.nu/~wolfgang/cynthiune" +SRC_URI="http://organact.mine.nu/~wolfgang/cynthiune/${P/c/C}.tar.gz" + +IUSE="flac mad modplug musepack timidity vorbis" + +KEYWORDS="~amd64 ~ppc ~x86" +LICENSE="GPL-2" +SLOT="0" + +RDEPEND="media-libs/audiofile + media-libs/taglib + flac? ( media-libs/flac ) + mad? ( media-libs/libid3tag + media-libs/libmad ) + musepack? ( >=media-sound/musepack-tools-444 ) + modplug? ( media-libs/libmodplug ) + timidity? ( media-sound/timidity++ ) + vorbis? ( >=media-libs/libogg-1.1.2 + >=media-libs/libvorbis-1.0.1-r2 ) + =media-libs/musicbrainz-2*" +DEPEND="${RDEPEND} + mad? ( dev-util/pkgconfig )" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-flac-1.1.3.patch + epatch "${FILESDIR}"/${P}-set-macro.patch + epatch "${FILESDIR}"/${P}-NSCellExtensions.patch + epatch "${FILESDIR}"/${P}-NSMutableDictionary.patch + epatch "${FILESDIR}"/${P}-gnustep-make-2.patch + epatch "${FILESDIR}"/${P}-as-needed.patch + epatch "${FILESDIR}"/${P}-libmpcdec.patch +} + +cynthiune_get_config() { + # Gentoo doesn't have libavi (any more) + local myconf="disable-windowsmedia=yes disable-arts=yes disable-esound=yes" + use flac || myconf="${myconf} disable-flac=yes disable-flactags=yes" + use mad || myconf="${myconf} disable-mp3=yes disable-id3tag=yes" + use modplug || myconf="${myconf} disable-mod=yes" + use musepack || myconf="${myconf} disable-musepack=yes" + use timidity || myconf="${myconf} disable-timidity=yes" + use vorbis || myconf="${myconf} disable-ogg=yes disable-vorbistags=yes" + + echo ${myconf} +} + +src_compile() { + egnustep_env + egnustep_make "$(cynthiune_get_config)" || die "make failed" +} + +src_install() { + egnustep_env + egnustep_install "$(cynthiune_get_config)" || die +} diff --git a/gnustep-apps/cynthiune/files/cynthiune-0.9.5-libmpcdec.patch b/gnustep-apps/cynthiune/files/cynthiune-0.9.5-libmpcdec.patch new file mode 100644 index 000000000000..1c89f4b4f86b --- /dev/null +++ b/gnustep-apps/cynthiune/files/cynthiune-0.9.5-libmpcdec.patch @@ -0,0 +1,310 @@ +2009-05-19 Yavor Doganov <yavor@gnu.org> + + * Bundsles/Musepack/CNSFileHandle.h: Import <mpc/reader.h>. + (CNSFileHandleRetain, CNSFileHandleRelease): Remove prototypes. + (CNSFileHandleRead, CNSFileHandleTell, CNSFileHandleCanSeek) + (CNSFileHandleSeek, CNSFileHandleGetSize): Accept mpc_reader + type as first argument. + * Bundles/Musepack/CNSFileHandle.m (CNSFileHandleRetain) + (CNSFileHandleRelease): Delete; unused. + (CNSFileHandleRead, CNSFileHandleTell, CNSFileHandleCanSeek) + (CNSFileHandleSeek, CNSFileHandleGetSize): Adjust for the new + mpc_reader type. + * Bundles/Musepack/Musepack.h <mpcDecoder>: Declare of + mpc_demux type. + * Bundles/Musepack/Musepack.m: Import <mpc/mpcdec.h>. + (MPCReaderDelete): Use `mpc_reader_exit_stdio' instead of + `free'. + (MPCStreamInfoNew): Don't call `mpc_streaminfo_init'. + (MPCDecoderNew): Remove function. + ([Musepack -streamOpen]): Initialize the decoder with the new + API function `mpc_demux_init'. + ([Musepack +streamTestOpen]): Likewise. + ([Musepack -readNextChunk:withSize:]): Adjust to use + `mpc_demux_decode'. + <frame, err>: New local variables. + <vbrAcc, vbrBits>: Remove. + ([Musepack -readDuration]): Use `mpc_streaminfo_get_length' to + obtain the duration and return its result casted to unsigned int. + ([Musepack -streamClose]): Use `mpc_demux_exit' as appropriate. + ([Musepack +acceptedFileExtensions]): Recognize `.mpp'. + ([Musepack -seek]): Use `mpc_demux_seek_second'. + +--- cynthiune.app-0.9.5.orig/Bundles/Musepack/CNSFileHandle.h ++++ cynthiune.app-0.9.5/Bundles/Musepack/CNSFileHandle.h +@@ -23,20 +23,17 @@ + #ifndef CNSFILEHANDLE_H + #define CNSFILEHANDLE_H + +-#include <mpcdec/config_types.h> ++#import <mpc/reader.h> + + #ifdef __cplusplus + extern "C" { + #endif /* __cplusplus */ + +-void CNSFileHandleRetain (void *fileHandle); +-void CNSFileHandleRelease (void *fileHandle); +- +-int CNSFileHandleRead (void *fileHandle, void *ptr, int size); +-int CNSFileHandleTell (void *fileHandle); +-mpc_bool_t CNSFileHandleCanSeek (void *fileHandle); +-mpc_bool_t CNSFileHandleSeek (void *fileHandle, int offset); +-int CNSFileHandleGetSize (void *fileHandle); ++int CNSFileHandleRead (mpc_reader *fileHandle, void *ptr, int size); ++int CNSFileHandleTell (mpc_reader *fileHandle); ++mpc_bool_t CNSFileHandleCanSeek (mpc_reader *fileHandle); ++mpc_bool_t CNSFileHandleSeek (mpc_reader *fileHandle, int offset); ++int CNSFileHandleGetSize (mpc_reader *fileHandle); + + #ifdef __cplusplus + } +--- cynthiune.app-0.9.5.orig/Bundles/Musepack/CNSFileHandle.m ++++ cynthiune.app-0.9.5/Bundles/Musepack/CNSFileHandle.m +@@ -26,57 +26,45 @@ + + #import "CNSFileHandle.h" + +-void +-CNSFileHandleRetain (void *fileHandle) +-{ +- [(NSFileHandle *) fileHandle retain]; +-} +- +-void +-CNSFileHandleRelease (void *fileHandle) +-{ +- [(NSFileHandle *) fileHandle release]; +-} +- + int +-CNSFileHandleRead (void *fileHandle, void *ptr, int size) ++CNSFileHandleRead (mpc_reader *fileHandle, void *ptr, int size) + { + NSData *data; + +- data = [(NSFileHandle *) fileHandle readDataOfLength: size]; ++ data = [(NSFileHandle *) fileHandle->data readDataOfLength: size]; + [data getBytes: ptr]; + + return [data length]; + } + + int +-CNSFileHandleTell (void *fileHandle) ++CNSFileHandleTell (mpc_reader *fileHandle) + { +- return [(NSFileHandle *) fileHandle offsetInFile]; ++ return [(NSFileHandle *) fileHandle->data offsetInFile]; + } + + mpc_bool_t +-CNSFileHandleCanSeek (void *fileHandle) ++CNSFileHandleCanSeek (mpc_reader *fileHandle) + { + return YES; + } + + mpc_bool_t +-CNSFileHandleSeek (void *fileHandle, int offset) ++CNSFileHandleSeek (mpc_reader *fileHandle, int offset) + { +- [(NSFileHandle *) fileHandle seekToFileOffset: (long long) offset]; ++ [(NSFileHandle *) fileHandle->data seekToFileOffset: (long long) offset]; + + return YES; + } + + int +-CNSFileHandleGetSize (void *fileHandle) ++CNSFileHandleGetSize (mpc_reader *fileHandle) + { + int size, where; + +- where = [(NSFileHandle *) fileHandle offsetInFile]; +- size = [(NSFileHandle *) fileHandle seekToEndOfFile]; +- [(NSFileHandle *) fileHandle seekToFileOffset: (long long) where]; ++ where = [(NSFileHandle *) fileHandle->data offsetInFile]; ++ size = [(NSFileHandle *) fileHandle->data seekToEndOfFile]; ++ [(NSFileHandle *) fileHandle->data seekToFileOffset: (long long) where]; + + return size; + } +--- cynthiune.app-0.9.5.orig/Bundles/Musepack/Musepack.h ++++ cynthiune.app-0.9.5/Bundles/Musepack/Musepack.h +@@ -31,7 +31,7 @@ + + mpc_reader *mpcReader; + mpc_streaminfo *mpcStreamInfo; +- mpc_decoder *mpcDecoder; ++ mpc_demux *mpcDecoder; + + MPC_SAMPLE_FORMAT sampleBuffer[maxSamples]; + unsigned char frameBuffer[maxSamples * 4]; +--- cynthiune.app-0.9.5.orig/Bundles/Musepack/Musepack.m ++++ cynthiune.app-0.9.5/Bundles/Musepack/Musepack.m +@@ -30,7 +30,7 @@ + #import <Cynthiune/Format.h> + #import <Cynthiune/utils.h> + +-#import <mpcdec/mpcdec.h> ++#import <mpc/mpcdec.h> + + #import "Musepack.h" + #import "CNSFileHandle.h" +@@ -75,7 +75,7 @@ + MPCReaderDelete (mpc_reader *reader) + { + [(NSFileHandle *) reader->data release]; +- free (reader); ++ mpc_reader_exit_stdio (reader); + } + + static mpc_streaminfo * +@@ -84,23 +84,10 @@ + mpc_streaminfo *streamInfo; + + streamInfo = malloc (sizeof (mpc_streaminfo)); +- mpc_streaminfo_init (streamInfo); + + return streamInfo; + } + +-static mpc_decoder * +-MPCDecoderNew (mpc_reader *reader, mpc_streaminfo *streamInfo) +-{ +- mpc_decoder *decoder; +- +- decoder = malloc (sizeof (mpc_decoder)); +- mpc_decoder_setup (decoder, reader); +- mpc_decoder_initialize (decoder, streamInfo); +- +- return decoder; +-} +- + static inline void + CopyBuffer (const MPC_SAMPLE_FORMAT *buffer, unsigned char *destBuffer, + unsigned int length) +@@ -173,10 +160,13 @@ + { + [fileHandle retain]; + mpcReader = MPCReaderNew (fileHandle); ++ if (!mpcReader) ++ return MPC_FALSE; + mpcStreamInfo = MPCStreamInfoNew (); +- mpc_streaminfo_read (mpcStreamInfo, mpcReader); +- +- mpcDecoder = MPCDecoderNew (mpcReader, mpcStreamInfo); ++ mpcDecoder = mpc_demux_init (mpcReader); ++ if (!mpcDecoder) ++ return MPC_FALSE; ++ mpc_demux_get_info (mpcDecoder, mpcStreamInfo); + + result = YES; + } +@@ -196,6 +186,7 @@ + NSFileHandle *testFileHandle; + mpc_reader *testReader; + mpc_streaminfo *testStreamInfo; ++ mpc_demux *testDecoder; + BOOL result; + + testFileHandle = [NSFileHandle fileHandleForReadingAtPath: fileName]; +@@ -203,9 +194,14 @@ + { + testReader = MPCReaderNew (testFileHandle); + testStreamInfo = MPCStreamInfoNew (); +- result = !mpc_streaminfo_read (testStreamInfo, testReader); +- free (testStreamInfo); +- MPCReaderDelete (testReader); ++ testDecoder = mpc_demux_init (testReader); ++ if (testDecoder) ++ { ++ result = YES; ++ mpc_demux_exit (testDecoder); ++ } ++ if (testReader) ++ MPCReaderDelete (testReader); + } + else + result = NO; +@@ -222,21 +218,29 @@ + withSize: (unsigned int) bufferSize + { + int bytes, status; +- unsigned int vbrAcc, vbrBits; ++ mpc_frame_info frame; ++ mpc_status err; + unsigned long frames, samples; + + status = 1; ++ frame.buffer = sampleBuffer; + +- if (!remaining) ++ while (!remaining) + { +- samples = mpc_decoder_decode (mpcDecoder, sampleBuffer, +- &vbrAcc, &vbrBits); +- if (!samples) +- status = 0; +- else if (samples == (unsigned long) -1) +- status = -1; ++ err = mpc_demux_decode (mpcDecoder, &frame); ++ if (err != MPC_STATUS_OK) ++ { ++ status = -1; ++ break; ++ } ++ else if (frame.bits == -1) ++ { ++ status = 0; ++ break; ++ } + else + { ++ samples = frame.samples; + frames = samples * mpcStreamInfo->channels; + CopyBuffer (sampleBuffer, frameBuffer, frames); + remaining = frames * 2; +@@ -277,7 +281,7 @@ + + - (unsigned int) readDuration + { +- return mpcStreamInfo->pcm_samples / mpcStreamInfo->sample_freq; ++ return (unsigned int) mpc_streaminfo_get_length (mpcStreamInfo); + } + + - (void) streamClose +@@ -287,12 +291,10 @@ + [fileHandle closeFile]; + [fileHandle release]; + } ++ if (mpcDecoder) ++ mpc_demux_exit (mpcDecoder); + if (mpcReader) + MPCReaderDelete (mpcReader); +- if (mpcStreamInfo) +- free (mpcStreamInfo); +- if (mpcDecoder) +- free (mpcDecoder); + + [self _resetIVars]; + } +@@ -300,7 +302,7 @@ + // Player Protocol + + (NSArray *) acceptedFileExtensions + { +- return [NSArray arrayWithObjects: @"mpc", @"mp+", nil]; ++ return [NSArray arrayWithObjects: @"mpc", @"mp+", @"mpp", nil]; + } + + - (BOOL) isSeekable +@@ -310,7 +312,7 @@ + + - (void) seek: (unsigned int) aPos + { +- mpc_decoder_seek_seconds (mpcDecoder, (double) aPos); ++ mpc_demux_seek_second (mpcDecoder, (double) aPos); + } + + @end |