diff options
author | Tim Harder <radhermit@gentoo.org> | 2011-09-30 08:04:32 +0000 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2011-09-30 08:04:32 +0000 |
commit | 9fc3518511d61a8b836b5846bd51d3fa8063af15 (patch) | |
tree | 58165ad67238aa4e8ab5f079190b97821cf0348b /media-sound/cmus | |
parent | version bump wrt #382129. also fixes #378139. (diff) | |
download | gentoo-2-9fc3518511d61a8b836b5846bd51d3fa8063af15.tar.gz gentoo-2-9fc3518511d61a8b836b5846bd51d3fa8063af15.tar.bz2 gentoo-2-9fc3518511d61a8b836b5846bd51d3fa8063af15.zip |
Version bump (bug #378445).
(Portage version: 2.2.0_alpha60/cvs/Linux x86_64)
Diffstat (limited to 'media-sound/cmus')
-rw-r--r-- | media-sound/cmus/ChangeLog | 8 | ||||
-rw-r--r-- | media-sound/cmus/cmus-2.4.2.ebuild | 90 | ||||
-rw-r--r-- | media-sound/cmus/files/cmus-2.4.2-ffmpeg.patch | 130 |
3 files changed, 227 insertions, 1 deletions
diff --git a/media-sound/cmus/ChangeLog b/media-sound/cmus/ChangeLog index 30960e3aa95e..935419b43100 100644 --- a/media-sound/cmus/ChangeLog +++ b/media-sound/cmus/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-sound/cmus # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/cmus/ChangeLog,v 1.47 2011/07/17 10:33:46 fauli Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/cmus/ChangeLog,v 1.48 2011/09/30 08:04:32 radhermit Exp $ + +*cmus-2.4.2 (30 Sep 2011) + + 30 Sep 2011; Tim Harder <radhermit@gentoo.org> +cmus-2.4.2.ebuild, + +files/cmus-2.4.2-ffmpeg.patch: + Version bump (bug #378445). *cmus-2.4.1 (17 Jul 2011) diff --git a/media-sound/cmus/cmus-2.4.2.ebuild b/media-sound/cmus/cmus-2.4.2.ebuild new file mode 100644 index 000000000000..747b100a7f29 --- /dev/null +++ b/media-sound/cmus/cmus-2.4.2.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/cmus/cmus-2.4.2.ebuild,v 1.1 2011/09/30 08:04:32 radhermit Exp $ + +EAPI=4 +inherit eutils multilib + +MY_P=${PN}-v${PV} + +DESCRIPTION="A ncurses based music player with plugin support for many formats" +HOMEPAGE="http://cmus.sourceforge.net/" +SRC_URI="mirror://sourceforge/cmus/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" +IUSE="aac alsa ao debug examples flac mad mikmod modplug mp4 musepack oss +pidgin pulseaudio unicode vorbis wavpack wma zsh-completion" + +CDEPEND="sys-libs/ncurses[unicode?] + aac? ( media-libs/faad2 ) + alsa? ( >=media-libs/alsa-lib-1.0.11 ) + ao? ( media-libs/libao ) + flac? ( media-libs/flac ) + mad? ( >=media-libs/libmad-0.14 ) + mikmod? ( media-libs/libmikmod ) + modplug? ( >=media-libs/libmodplug-0.7 ) + mp4? ( >=media-libs/libmp4v2-1.9 ) + musepack? ( >=media-sound/musepack-tools-444 ) + pulseaudio? ( media-sound/pulseaudio ) + vorbis? ( >=media-libs/libvorbis-1.0 ) + wavpack? ( media-sound/wavpack ) + wma? ( virtual/ffmpeg )" +DEPEND="${CDEPEND} + dev-util/pkgconfig" +RDEPEND="${CDEPEND} + zsh-completion? ( app-shells/zsh ) + pidgin? ( net-im/pidgin + dev-python/dbus-python )" + +S=${WORKDIR}/${MY_P} + +my_config() { + local value + use ${1} && value=a || value=n + myconf="${myconf} ${2}=${value}" +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-ffmpeg.patch +} + +src_configure() { + local debuglevel=1 myconf="CONFIG_ARTS=n CONFIG_SUN=n" + + use debug && debuglevel=2 + + my_config flac CONFIG_FLAC + my_config mad CONFIG_MAD + my_config modplug CONFIG_MODPLUG + my_config mikmod CONFIG_MIKMOD + my_config musepack CONFIG_MPC + my_config vorbis CONFIG_VORBIS + my_config wavpack CONFIG_WAVPACK + my_config mp4 CONFIG_MP4 + my_config aac CONFIG_AAC + my_config wma CONFIG_FFMPEG + my_config pulseaudio CONFIG_PULSE + my_config alsa CONFIG_ALSA + my_config ao CONFIG_AO + my_config oss CONFIG_OSS + + ./configure prefix=/usr ${myconf} exampledir=/usr/share/doc/${PF}/examples \ + libdir=/usr/$(get_libdir) DEBUG=${debuglevel} || die +} + +src_install() { + default + + use examples || rm -rf "${D}"/usr/share/doc/${PF}/examples + + if use zsh-completion; then + insinto /usr/share/zsh/site-functions + doins contrib/_cmus + fi + + if use pidgin; then + newbin contrib/cmus-updatepidgin.py cmus-updatepidgin + fi +} diff --git a/media-sound/cmus/files/cmus-2.4.2-ffmpeg.patch b/media-sound/cmus/files/cmus-2.4.2-ffmpeg.patch new file mode 100644 index 000000000000..c1ca17e72391 --- /dev/null +++ b/media-sound/cmus/files/cmus-2.4.2-ffmpeg.patch @@ -0,0 +1,130 @@ +--- cmus-v2.4.2/ffmpeg.c.orig ++++ cmus-v2.4.2/ffmpeg.c +@@ -21,6 +21,7 @@ + #include "xmalloc.h" + #include "debug.h" + #include "utils.h" ++#include "comment.h" + #include "config/ffmpeg.h" + + #include <stdio.h> +@@ -32,6 +33,9 @@ + #include <libavcodec/avcodec.h> + #include <libavformat/avformat.h> + #include <libavformat/avio.h> ++#ifndef AVUTIL_MATHEMATICS_H ++#include <libavutil/mathematics.h> ++#endif + #endif + + #if (LIBAVFORMAT_VERSION_INT < ((52<<16)+(31<<8)+0)) +@@ -52,10 +56,19 @@ + #endif + #endif + ++#if (LIBAVUTIL_VERSION_INT < ((51<<16)+(5<<8)+0)) ++#define AV_DICT_IGNORE_SUFFIX AV_METADATA_IGNORE_SUFFIX ++#define av_dict_get av_metadata_get ++#define AVDictionaryEntry AVMetadataTag ++#endif ++ + struct ffmpeg_input { + AVPacket pkt; + int curr_pkt_size; + uint8_t *curr_pkt_buf; ++ ++ unsigned long curr_size; ++ unsigned long curr_duration; + }; + + struct ffmpeg_output { +@@ -166,18 +179,26 @@ + int stream_index = -1; + AVCodec *codec; + AVCodecContext *cc = NULL; +- AVFormatContext *ic; ++ AVFormatContext *ic = NULL; + + ffmpeg_init(); + ++#if (LIBAVFORMAT_VERSION_INT < ((53<<16)+(2<<8)+0)) + err = av_open_input_file(&ic, ip_data->filename, NULL, 0, NULL); ++#else ++ err = avformat_open_input(&ic, ip_data->filename, NULL, NULL); ++#endif + if (err < 0) { + d_print("av_open failed: %d\n", err); + return -IP_ERROR_FILE_FORMAT; + } + + do { ++#if (LIBAVFORMAT_VERSION_INT < ((53<<16)+(3<<8)+0)) + err = av_find_stream_info(ic); ++#else ++ err = avformat_find_stream_info(ic, NULL); ++#endif + if (err < 0) { + d_print("unable to find stream info: %d\n", err); + err = -IP_ERROR_FILE_FORMAT; +@@ -208,7 +229,11 @@ + if (codec->capabilities & CODEC_CAP_TRUNCATED) + cc->flags |= CODEC_FLAG_TRUNCATED; + ++#if (LIBAVCODEC_VERSION_INT < ((53<<16)+(6<<8)+0)) + if (avcodec_open(cc, codec) < 0) { ++#else ++ if (avcodec_open2(cc, codec, NULL) < 0) { ++#endif + d_print("could not open codec: %d, %s\n", cc->codec_id, cc->codec_name); + err = -IP_ERROR_UNSUPPORTED_FILE_TYPE; + break; +@@ -299,6 +324,8 @@ + } + input->curr_pkt_size = input->pkt.size; + input->curr_pkt_buf = input->pkt.data; ++ input->curr_size += input->pkt.size; ++ input->curr_duration += input->pkt.duration; + continue; + } + +@@ -409,7 +436,7 @@ + char buff[16]; + int i = 0; + +- *comments = xnew0(struct keyval, NUM_FFMPEG_KEYS + 1); ++ *comments = keyvals_new(NUM_FFMPEG_KEYS); + + i = set_comment(*comments, i, "artist", ic->author); + i = set_comment(*comments, i, "album", ic->album); +@@ -427,9 +454,9 @@ + } + #else + GROWING_KEYVALS(c); +- AVMetadataTag *tag = NULL; ++ AVDictionaryEntry *tag = NULL; + +- while ((tag = av_metadata_get(ic->metadata, "", tag, AV_METADATA_IGNORE_SUFFIX))) { ++ while ((tag = av_dict_get(ic->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) { + if (tag && tag->value[0]) + comments_add_const(&c, tag->key, tag->value); + } +@@ -472,15 +499,15 @@ + }; + + const int ip_priority = 30; +-#ifdef USE_FALLBACK_IP +-const char *const ip_extensions[] = { "any", NULL }; +-#else + const char *const ip_extensions[] = { + "ac3", "aif", "aifc", "aiff", "ape", "au", "mka", "shn", "tta", "wma", + /* also supported by other plugins */ + "aac", "fla", "flac", "m4a", "m4b", "mp+", "mp2", "mp3", "mp4", "mpc", + "mpp", "ogg", "wav", "wv", ++#ifdef USE_FALLBACK_IP ++ "*", ++#endif + NULL + }; +-#endif + const char *const ip_mime_types[] = { NULL }; ++const char * const ip_options[] = { NULL }; |