blob: f51439c8f3d3820e803b70bbf4ee69d2ecfe0382 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/cmus/cmus-2.1.0.ebuild,v 1.3 2007/01/25 14:42:09 beandog Exp $
inherit eutils multilib
DESCRIPTION="A ncurses based music player with plugin support for many formats"
HOMEPAGE="http://onion.dynserv.net/~timo/cmus.html"
SRC_URI="http://onion.dynserv.net/~timo/files/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="alsa ao arts debug flac mad mikmod modplug mp3 musepack oss vorbis"
DEPEND="sys-libs/ncurses
alsa? ( >=media-libs/alsa-lib-1.0.11 )
ao? ( media-libs/libao )
arts? ( kde-base/arts )
flac? ( media-libs/flac )
mad? ( >=media-libs/libmad-0.14 )
mikmod? ( media-libs/libmikmod )
modplug? ( >=media-libs/libmodplug-0.7 )
mp3? ( >=media-libs/libmad-0.14 )
musepack? ( >=media-libs/libmpcdec-1.2 )
vorbis? ( >=media-libs/libvorbis-1.0 )"
# aac? ( >=media-libs/faad-2.5 ) # after licensing issues have been settled
# mp4? ( media-libs/libmp4v2
# >=media-libs/faad-2.5 )
RDEPEND="${DEPEND}"
pkg_setup() {
if ! built_with_use sys-libs/ncurses unicode
then
ewarn
ewarn "\t sys-libs/ncurses compiled without the unicode USE flag."
ewarn "\t Please recompile sys-libs/ncurses with USE=unicode and emerge"
ewarn "\t cmus again if you experience any problems with UTF-8 or"
ewarn "\t wide characters."
ewarn
epause
fi
}
my_config() {
local value
use ${1} && value=y || value=n
myconf="${myconf} ${2}=${value}"
}
src_compile() {
local debuglevel myconf
use debug && debuglevel=2 || debuglevel=1
myconf="CONFIG_SUN=n CONFIG_AAC=n CONFIG_MP4=n"
my_config ao CONFIG_AO
my_config alsa CONFIG_ALSA
my_config arts CONFIG_ARTS
my_config flac CONFIG_FLAC
my_config mad CONFIG_MAD
my_config mikmod CONFIG_MIKMOD
my_config mp3 CONFIG_MAD
my_config modplug CONFIG_MODPLUG
my_config musepack CONFIG_MPC
my_config oss CONFIG_OSS
my_config vorbis CONFIG_VORBIS
# econf doesn't work, because configure wants "prefix" (and similar) without dashes
./configure prefix=/usr ${myconf} libdir=/usr/$(get_libdir) DEBUG=$debuglevel || die "configure failed"
emake || die "emake failed"
}
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
dodoc AUTHORS README
}
|