diff options
-rw-r--r-- | app-cdr/cuecue/ChangeLog | 10 | ||||
-rw-r--r-- | app-cdr/cuecue/cuecue-0.2.2-r1.ebuild | 45 | ||||
-rw-r--r-- | app-cdr/cuecue/files/cuecue-0.2.2-flac113.diff | 130 | ||||
-rw-r--r-- | app-cdr/cuecue/files/digest-cuecue-0.2.2-r1 | 3 |
4 files changed, 186 insertions, 2 deletions
diff --git a/app-cdr/cuecue/ChangeLog b/app-cdr/cuecue/ChangeLog index b413dc18ffdf..32680696a4df 100644 --- a/app-cdr/cuecue/ChangeLog +++ b/app-cdr/cuecue/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-cdr/cuecue -# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-cdr/cuecue/ChangeLog,v 1.3 2006/10/19 19:15:22 flameeyes Exp $ +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-cdr/cuecue/ChangeLog,v 1.4 2007/02/27 22:47:46 sbriesen Exp $ + +*cuecue-0.2.2-r1 (27 Feb 2007) + + 27 Feb 2007; Stefan Briesenick <sbriesen@gentoo.org> + +files/cuecue-0.2.2-flac113.diff, +cuecue-0.2.2-r1.ebuild: + adding flac 1.1.3 compatibility patch (see bug #157706). 19 Oct 2006; Diego Pettenò <flameeyes@gentoo.org> cuecue-0.2.2.ebuild: Depend on 1.1.2 version of flac, as the 1.1.3 version changes API. diff --git a/app-cdr/cuecue/cuecue-0.2.2-r1.ebuild b/app-cdr/cuecue/cuecue-0.2.2-r1.ebuild new file mode 100644 index 000000000000..da7f0ab6d792 --- /dev/null +++ b/app-cdr/cuecue/cuecue-0.2.2-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-cdr/cuecue/cuecue-0.2.2-r1.ebuild,v 1.1 2007/02/27 22:47:46 sbriesen Exp $ + +inherit eutils + +DESCRIPTION="Cuecue is a suite to convert .cue + [.ogg|.flac|.wav|.mp3] to .cue + .bin." +HOMEPAGE="http://cuecue.berlios.de/" +SRC_URI="http://download.berlios.de/cuecue/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="mp3 flac vorbis" + +DEPEND="mp3? ( media-libs/libmad ) + flac? ( media-libs/flac ) + vorbis? ( media-libs/libogg media-libs/libvorbis )" + +src_unpack() { + unpack ${A} + cd "${S}" + + # flac 1.1.3 compatibility patch (see bug #157706) + epatch "${FILESDIR}/${P}-flac113.diff" + + # remove obsolete CFLAGS + sed -i -e "s:-g -Os::g" configure* +} + +src_compile() { + local myconf="" + myconf="${myconf} $(use_enable mp3)" + myconf="${myconf} $(use_enable flac)" + myconf="${myconf} $(use_enable vorbis ogg)" + econf ${myconf} || die "econf failed" + emake || die "emake failed" +} + +src_install () { + emake DESTDIR="${D}" install || die "make install failed" + insinto /usr/include + doins src/libcuecue/cuecue.h + dodoc CHANGES README TODO +} diff --git a/app-cdr/cuecue/files/cuecue-0.2.2-flac113.diff b/app-cdr/cuecue/files/cuecue-0.2.2-flac113.diff new file mode 100644 index 000000000000..8a0252180d24 --- /dev/null +++ b/app-cdr/cuecue/files/cuecue-0.2.2-flac113.diff @@ -0,0 +1,130 @@ +diff -Naur src.orig/libcuecue/flac.c src/libcuecue/flac.c +--- src.orig/libcuecue/flac.c 2004-09-22 04:28:21.000000000 +0200 ++++ src/libcuecue/flac.c 2007-02-27 23:25:36.000000000 +0100 +@@ -27,6 +27,12 @@ + #include "cuecue.h" + #include "cuecue_internal.h" + ++#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT <= 7 ++#define LEGACY_FLAC ++#else ++#undef LEGACY_FLAC ++#endif ++ + typedef struct Internal + { + FILE *dst; +@@ -38,7 +44,11 @@ + } Internal; + + ++#ifdef LEGACY_FLAC + void error(const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data) ++#else ++void error(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data) ++#endif + { + Internal *internal = client_data; + switch (status) { +@@ -52,11 +62,21 @@ + strcpy(cuecue_error,"CRC Mismatch: FLAC file corrupted"); + internal->error=1; + break; ++#ifndef LEGACY_FLAC ++ case FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM: ++ strcpy(cuecue_error,"Unparseable stream"); ++ internal->error=1; ++ break; ++#endif + } + } + + ++#ifdef LEGACY_FLAC + void metadata(const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data) ++#else ++void metadata(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data) ++#endif + { + if(metadata->type == FLAC__METADATA_TYPE_STREAMINFO) { + /* get size of the file, for progress callback */ +@@ -66,7 +86,11 @@ + } + + ++#ifdef LEGACY_FLAC + FLAC__StreamDecoderWriteStatus write(const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data) ++#else ++FLAC__StreamDecoderWriteStatus write(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data) ++#endif + { + Internal *internal = client_data; + unsigned int samples = frame->header.blocksize; +@@ -126,7 +150,11 @@ + { + FILE *dst; + Internal internal; ++#ifdef LEGACY_FLAC + FLAC__FileDecoder *decoder; ++#else ++ FLAC__StreamDecoder *decoder; ++#endif + + dst = fopen(file_destination, "wb"); + +@@ -141,7 +169,11 @@ + internal.error=0; + internal.dst=dst; + ++#ifdef LEGACY_FLAC + decoder = FLAC__file_decoder_new(); ++#else ++ decoder = FLAC__stream_decoder_new(); ++#endif + + if (decoder==NULL) { + snprintf(cuecue_error,CUECUE_ERROR_LENGTH,"Cannot create FLAC decoder! memory error ?"); +@@ -150,6 +182,7 @@ + + internal.buffer = malloc(BUFFER_SIZE); + ++#ifdef LEGACY_FLAC + FLAC__file_decoder_set_md5_checking(decoder, true); + FLAC__file_decoder_set_filename(decoder, file_source); + +@@ -162,8 +195,20 @@ + snprintf(cuecue_error,1024,"Cannot open '%s'",file_source); + internal.error=1; + } ++#else ++ FLAC__stream_decoder_set_md5_checking(decoder, true); ++ if(FLAC__stream_decoder_init_file(decoder, file_source, write, metadata, error, &internal) != FLAC__STREAM_DECODER_INIT_STATUS_OK) { ++ snprintf(cuecue_error,1024,"Cannot open '%s'",file_source); ++ internal.error=1; ++ } ++#endif + +- if(!FLAC__file_decoder_process_until_end_of_file(decoder)) { ++#ifdef LEGACY_FLAC ++ if(!FLAC__file_decoder_process_until_end_of_file(decoder)) ++#else ++ if(!FLAC__stream_decoder_process_until_end_of_stream(decoder)) ++#endif ++ { + if (!internal.error) { + /* early error, not even the time to decode metadata :) */ + snprintf(cuecue_error,CUECUE_ERROR_LENGTH,"Cannot open '%s'",file_source); +@@ -171,8 +216,13 @@ + internal.error=1; + } + ++#ifdef LEGACY_FLAC + FLAC__file_decoder_finish(decoder); + FLAC__file_decoder_delete(decoder); ++#else ++ FLAC__stream_decoder_finish(decoder); ++ FLAC__stream_decoder_delete(decoder); ++#endif + + fclose(dst); + free(internal.buffer); diff --git a/app-cdr/cuecue/files/digest-cuecue-0.2.2-r1 b/app-cdr/cuecue/files/digest-cuecue-0.2.2-r1 new file mode 100644 index 000000000000..5c06cec2f3ad --- /dev/null +++ b/app-cdr/cuecue/files/digest-cuecue-0.2.2-r1 @@ -0,0 +1,3 @@ +MD5 8c026bcf4ef93f7fa84ce232b621aa90 cuecue-0.2.2.tar.gz 97927 +RMD160 a456c197f83cbd303f06922c6c3c7f7c40ce752b cuecue-0.2.2.tar.gz 97927 +SHA256 dbab57f1df3e50d041ba8cad0ee0851c1aea97c4685f89fd1d3259b4b79f081f cuecue-0.2.2.tar.gz 97927 |