diff options
author | Dror Levin <spatz@gentoo.org> | 2009-11-23 13:30:49 +0000 |
---|---|---|
committer | Dror Levin <spatz@gentoo.org> | 2009-11-23 13:30:49 +0000 |
commit | d7302a071dabc9c342de73797b1d7d7cf72d9d0f (patch) | |
tree | 5be5c50495927cd05e0484f19ee6203cf2573ff6 /media-sound | |
parent | amd64/x86 stable, bug #293976 (diff) | |
download | gentoo-2-d7302a071dabc9c342de73797b1d7d7cf72d9d0f.tar.gz gentoo-2-d7302a071dabc9c342de73797b1d7d7cf72d9d0f.tar.bz2 gentoo-2-d7302a071dabc9c342de73797b1d7d7cf72d9d0f.zip |
Fix compilation with USE=-vorbis, bug 294160.
(Portage version: 2.2_rc51/cvs/Linux x86_64)
Diffstat (limited to 'media-sound')
-rw-r--r-- | media-sound/kid3/ChangeLog | 6 | ||||
-rw-r--r-- | media-sound/kid3/files/kid3-1.3-compile-without-vorbis.patch | 105 | ||||
-rw-r--r-- | media-sound/kid3/kid3-1.3.ebuild | 8 |
3 files changed, 117 insertions, 2 deletions
diff --git a/media-sound/kid3/ChangeLog b/media-sound/kid3/ChangeLog index cdd29b97a048..2e124946cd13 100644 --- a/media-sound/kid3/ChangeLog +++ b/media-sound/kid3/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-sound/kid3 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/kid3/ChangeLog,v 1.46 2009/11/19 17:47:37 spatz Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/kid3/ChangeLog,v 1.47 2009/11/23 13:30:49 spatz Exp $ + + 23 Nov 2009; Dror Levin <spatz@gentoo.org> kid3-1.3.ebuild, + +files/kid3-1.3-compile-without-vorbis.patch: + Fix compilation with USE=-vorbis, bug 294160. *kid3-1.3 (19 Nov 2009) diff --git a/media-sound/kid3/files/kid3-1.3-compile-without-vorbis.patch b/media-sound/kid3/files/kid3-1.3-compile-without-vorbis.patch new file mode 100644 index 000000000000..fcc3416caaaa --- /dev/null +++ b/media-sound/kid3/files/kid3-1.3-compile-without-vorbis.patch @@ -0,0 +1,105 @@ +diff -ur kid3-1.3-orig/kid3/oggfile.cpp kid3-1.3/kid3/oggfile.cpp +--- kid3-1.3-orig/kid3/oggfile.cpp 2009-09-20 12:22:55.000000000 +0300 ++++ kid3-1.3/kid3/oggfile.cpp 2009-11-23 15:23:24.992619259 +0200 +@@ -636,6 +636,49 @@ + } + + /** ++ * Read information about an Ogg/Vorbis file. ++ * @param fn file name ++ * @return true if ok. ++ */ ++bool OggFile::FileInfo::read(const char* fn) ++{ ++ valid = false; ++ FILE* fp = ::fopen(fn, "rb"); ++ if (fp) { ++ OggVorbis_File vf; ++ if (::ov_open(fp, &vf, NULL, 0) == 0) { ++ vorbis_info* vi = ::ov_info(&vf, -1); ++ if (vi) { ++ valid = true; ++ version = vi->version; ++ channels = vi->channels; ++ sampleRate = vi->rate; ++ bitrate = vi->bitrate_nominal; ++ if (bitrate <= 0) { ++ bitrate = vi->bitrate_upper; ++ } ++ if (bitrate <= 0) { ++ bitrate = vi->bitrate_lower; ++ } ++ } ++#ifdef WIN32 ++ duration = (long)::ov_time_total(&vf, -1); ++#else ++ duration = ::lrint(::ov_time_total(&vf, -1)); ++#endif ++ ::ov_clear(&vf); // closes file, do not use ::fclose() ++ } else { ++ ::fclose(fp); ++ } ++ } ++ return valid; ++} ++#else // HAVE_VORBIS ++void OggFile::getDetailInfo(DetailInfo& info) const { info.valid = false; } ++unsigned OggFile::getDuration() const { return 0; } ++#endif // HAVE_VORBIS ++ ++/** + * Get the format of tag 2. + * + * @return "Vorbis". +@@ -809,51 +852,6 @@ + return lst; + } + +- +- +-/** +- * Read information about an Ogg/Vorbis file. +- * @param fn file name +- * @return true if ok. +- */ +-bool OggFile::FileInfo::read(const char* fn) +-{ +- valid = false; +- FILE* fp = ::fopen(fn, "rb"); +- if (fp) { +- OggVorbis_File vf; +- if (::ov_open(fp, &vf, NULL, 0) == 0) { +- vorbis_info* vi = ::ov_info(&vf, -1); +- if (vi) { +- valid = true; +- version = vi->version; +- channels = vi->channels; +- sampleRate = vi->rate; +- bitrate = vi->bitrate_nominal; +- if (bitrate <= 0) { +- bitrate = vi->bitrate_upper; +- } +- if (bitrate <= 0) { +- bitrate = vi->bitrate_lower; +- } +- } +-#ifdef WIN32 +- duration = (long)::ov_time_total(&vf, -1); +-#else +- duration = ::lrint(::ov_time_total(&vf, -1)); +-#endif +- ::ov_clear(&vf); // closes file, do not use ::fclose() +- } else { +- ::fclose(fp); +- } +- } +- return valid; +-} +-#else // HAVE_VORBIS +-void OggFile::getDetailInfo(DetailInfo& info) const { info.valid = false; } +-unsigned OggFile::getDuration() const { return 0; } +-#endif // HAVE_VORBIS +- + /** + * Get value. + * @param name name diff --git a/media-sound/kid3/kid3-1.3.ebuild b/media-sound/kid3/kid3-1.3.ebuild index 72ec2d68dd25..3b3f8542a9dc 100644 --- a/media-sound/kid3/kid3-1.3.ebuild +++ b/media-sound/kid3/kid3-1.3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/kid3/kid3-1.3.ebuild,v 1.1 2009/11/19 17:47:37 spatz Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/kid3/kid3-1.3.ebuild,v 1.2 2009/11/23 13:30:49 spatz Exp $ EAPI=2 inherit kde4-base @@ -23,6 +23,12 @@ RDEPEND="mp3? ( media-libs/id3lib ) media-libs/tunepimp )" DEPEND="${RDEPEND}" +src_prepare() { + epatch "${FILESDIR}/${P}-compile-without-vorbis.patch" + + kde4-base_src_prepare +} + src_configure() { mycmakeargs="${mycmakeargs} $(cmake-utils_use_with taglib) |