diff options
author | Alexis Ballier <aballier@gentoo.org> | 2006-12-10 15:58:24 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2006-12-10 15:58:24 +0000 |
commit | a1655d2150f43a2bc25b86d052d3dc483a5aea0a (patch) | |
tree | dd66df5cf48838e08e1ff1fbc3ef841b78a102db /media-sound/qmbtagger | |
parent | Stable on ppc now; bug #154522. (diff) | |
download | gentoo-2-a1655d2150f43a2bc25b86d052d3dc483a5aea0a.tar.gz gentoo-2-a1655d2150f43a2bc25b86d052d3dc483a5aea0a.tar.bz2 gentoo-2-a1655d2150f43a2bc25b86d052d3dc483a5aea0a.zip |
Patch from Josh Coalson to be compatible with flac 1.1.3
(Portage version: 2.1.2_rc3-r1)
Diffstat (limited to 'media-sound/qmbtagger')
-rw-r--r-- | media-sound/qmbtagger/ChangeLog | 6 | ||||
-rw-r--r-- | media-sound/qmbtagger/files/qmbtagger-0.07+flac-1.1.3.patch | 98 | ||||
-rw-r--r-- | media-sound/qmbtagger/qmbtagger-0.07.ebuild | 5 |
3 files changed, 106 insertions, 3 deletions
diff --git a/media-sound/qmbtagger/ChangeLog b/media-sound/qmbtagger/ChangeLog index 3ba939235cfd..ec572b5456c8 100644 --- a/media-sound/qmbtagger/ChangeLog +++ b/media-sound/qmbtagger/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-sound/qmbtagger # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/qmbtagger/ChangeLog,v 1.17 2006/10/28 00:57:36 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/qmbtagger/ChangeLog,v 1.18 2006/12/10 15:58:24 aballier Exp $ + + 10 Dec 2006; Alexis Ballier <aballier@gentoo.org> + +files/qmbtagger-0.07+flac-1.1.3.patch, qmbtagger-0.07.ebuild: + Patch from Josh Coalson to be compatible with flac 1.1.3 28 Oct 2006; Diego Pettenò <flameeyes@gentoo.org> qmbtagger-0.07.ebuild: Update admindir with a 3.5.5 version to fix autotools dependencies. Thanks diff --git a/media-sound/qmbtagger/files/qmbtagger-0.07+flac-1.1.3.patch b/media-sound/qmbtagger/files/qmbtagger-0.07+flac-1.1.3.patch new file mode 100644 index 000000000000..da92864f8cb9 --- /dev/null +++ b/media-sound/qmbtagger/files/qmbtagger-0.07+flac-1.1.3.patch @@ -0,0 +1,98 @@ +diff -ru qmbtagger-0.07/configure.in qmbtagger-0.07-b2/configure.in +--- qmbtagger-0.07/configure.in 2004-06-15 16:50:14.000000000 -0700 ++++ qmbtagger-0.07-b2/configure.in 2004-06-15 16:50:14.000000000 -0700 +@@ -140,7 +140,7 @@ + AC_MSG_RESULT($have_lib) + if test $have_lib = yes; then + AC_DEFINE(USE_FLAC, 1, [FLAC support on]) +- BLIBS="$BLIBS -lFLAC++ -lFLAC" ++ BLIBS="$BLIBS -lFLAC++ -lFLAC -logg" + use_FLAC=1 + fi + ]) +diff -ru qmbtagger-0.07/configure.in.in qmbtagger-0.07-b2/configure.in.in +--- qmbtagger-0.07/configure.in.in 2004-06-15 16:50:14.000000000 -0700 ++++ qmbtagger-0.07-b2/configure.in.in 2004-06-15 16:50:14.000000000 -0700 +@@ -136,7 +136,7 @@ + AC_MSG_RESULT($have_lib) + if test $have_lib = yes; then + AC_DEFINE(USE_FLAC, 1, [FLAC support on]) +- BLIBS="$BLIBS -lFLAC++ -lFLAC" ++ BLIBS="$BLIBS -lFLAC++ -lFLAC -logg" + use_FLAC=1 + fi + ]) +diff -ru qmbtagger-0.07/src/qmbflacfile.cpp qmbtagger-0.07-b2/src/qmbflacfile.cpp +--- qmbtagger-0.07/src/qmbflacfile.cpp 2004-05-01 13:18:00.000000000 -0700 ++++ qmbtagger-0.07-b2/src/qmbflacfile.cpp 2006-10-31 23:12:28.000000000 -0800 +@@ -23,6 +23,7 @@ + + #include "qmbflacfile.h" + #include "qmbfile.h" ++#include <errno.h> + #include <stdio.h> + #include <fstream> + #include <qapplication.h> +@@ -30,6 +31,13 @@ + #include <musicbrainz/mb_c.h> + #include <FLAC++/metadata.h> + ++/* by LEGACY_FLAC we mean before FLAC 1.1.3 when the APIs were simplified. */ ++#if !defined(FLACPP_API_VERSION_CURRENT) || FLACPP_API_VERSION_CURRENT < 6 ++#define LEGACY_FLAC ++#else ++#undef LEGACY_FLAC ++#endif ++ + QMBFLACFile::QMBFLACFile() + : QMBFile(), FLAC::Decoder::File(), offset(0), decode_error(false) + { +@@ -66,13 +74,16 @@ + int lastslash = filename.findRev('/'); + metadata.SetFileName(filename.right(filename.length() - lastslash - 1)); + ++#ifdef LEGACY_FLAC + //set the filename with the FLAC::Decoder::File class + set_filename(fullfilename.latin1()); ++#endif + + //tell the decoder to call the metadata callback on vorbis comments so we can get the metadata already stored in the file + set_metadata_respond(FLAC__METADATA_TYPE_VORBIS_COMMENT); + + //Start reading the FLAC file ++#ifdef LEGACY_FLAC + FLAC__FileDecoderState state = init(); + + if (state != FLAC__FILE_DECODER_OK) { +@@ -80,11 +91,19 @@ + finish(); + return -1; + } ++#else ++ FLAC__StreamDecoderInitStatus status = init(fullfilename.latin1()); ++ ++ if (status != FLAC__STREAM_DECODER_INIT_STATUS_OK) { ++ qWarning("QMBFLACFile::Extract(): error opening file: %i (%s).", status, FLAC__StreamDecoderInitStatusString[status]); ++ finish(); ++ return -1; ++ } ++#endif + + //read through all the metadata so our callback can catch it all + if(!process_until_end_of_metadata ()) { +- state = get_state(); +- qWarning("QMBFLACFile::Extract(): error getting metadata: %i (%s).", state, FLAC__FileDecoderStateString[state]); ++ qWarning("QMBFLACFile::Extract(): error getting metadata: (%s).", get_state().as_cstring()); + decode_error = true; + finish(); + return -2; +@@ -116,8 +135,7 @@ + //now lets get the data from the FLAC file + while (!decode_error && offset < (unsigned long) bufferlen) { + if (!process_single()) { +- state = get_state(); +- qWarning("QMBFLACFile::Extract(): error getting raw data: %i (%s).", state, FLAC__FileDecoderStateString[state]); ++ qWarning("QMBFLACFile::Extract(): error getting raw data: (%s).", get_state().as_cstring()); + decode_error = true; + finish(); + return -2; diff --git a/media-sound/qmbtagger/qmbtagger-0.07.ebuild b/media-sound/qmbtagger/qmbtagger-0.07.ebuild index ecec249d8b93..ada22bff3513 100644 --- a/media-sound/qmbtagger/qmbtagger-0.07.ebuild +++ b/media-sound/qmbtagger/qmbtagger-0.07.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/qmbtagger/qmbtagger-0.07.ebuild,v 1.10 2006/10/28 00:57:35 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/qmbtagger/qmbtagger-0.07.ebuild,v 1.11 2006/12/10 15:58:24 aballier Exp $ inherit eutils kde-functions @@ -15,7 +15,7 @@ KEYWORDS="amd64 ~ppc x86" IUSE="ogg debug" RDEPEND="=x11-libs/qt-3* - ~media-libs/flac-1.1.2 + media-libs/flac media-libs/id3lib media-libs/musicbrainz media-libs/libmad @@ -29,6 +29,7 @@ src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/${P}-errno.patch" + epatch "${FILESDIR}/${P}+flac-1.1.3.patch" rm -rf "${S}/admin" ln -s "${WORKDIR}/admin" "${S}/admin" |