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