libmpd: Sync with gentoo-x86
[mpd.git] / media-sound / ncmpcpp / ncmpcpp-9999.ebuild
blob4f2ae8450a4880cfe04ba275170aeae94009eb3e
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI="4"
7 inherit autotools bash-completion-r1 eutils git-2
9 DESCRIPTION="An ncurses mpd client, ncmpc clone with some new features, written in C++"
10 HOMEPAGE="http://unkart.ovh.org/ncmpcpp"
11 EGIT_REPO_URI="git://repo.or.cz/ncmpcpp.git"
12 EGIT_BOOTSTRAP="eautoreconf"
14 LICENSE="GPL-2"
15 IUSE="bash-completion clock curl fftw outputs taglib unicode visualizer"
16 SLOT="0"
17 KEYWORDS=""
19 RDEPEND="
20 sys-libs/ncurses[unicode?]
21 ~media-libs/libmpdclient-9999
22 curl? ( net-misc/curl )
23 visualizer? ( fftw? ( sci-libs/fftw:3.0 ) )
24 taglib? ( media-libs/taglib )
26 DEPEND="
27 ${RDEPEND}
28 virtual/pkgconfig
31 src_prepare() {
32 # work around a compilation issue when USE=-curl
33 sed -i src/lyrics.cpp -e 's|itsFolder|Config.ncmpcpp_directory + "artists"|g' || die
36 src_configure() {
37 local myconf=""
38 if use fftw; then
39 myconf="$(use_with visualizer fftw)"
40 if ! use visualizer; then
41 ewarn "For the fftw USE flag to have any effect, you must also"
42 ewarn "enable the visualizer USE flag."
44 else
45 myconf="--without-fftw"
47 econf \
48 ${myconf} \
49 $(use_enable clock) \
50 $(use_enable outputs) \
51 $(use_enable unicode) \
52 $(use_enable visualizer) \
53 $(use_with curl) \
54 $(use_with taglib)
57 src_install() {
58 default
60 # use dodoc instead of upstream's doc install which does not compress
61 rm -rf "${D}"/usr/share/doc/${PN}
62 dodoc AUTHORS NEWS doc/config doc/bindings
64 if use bash-completion; then
65 newbashcomp doc/${PN}-completion.bash ${PN}
69 pkg_postinst() {
70 echo
71 elog "Example configuration files have been installed at"
72 elog "${ROOT}usr/share/doc/${PF}"
73 elog "${P} uses ~/.ncmpcpp/config and ~/.ncmpcpp/keys"
74 elog "as user configuration files."
75 echo
76 if use visualizer; then
77 elog "If you want to use the visualizer, you need mpd with fifo enabled."
78 echo