ncmpcpp: Sync with gentoo
[mpd.git] / media-sound / ncmpcpp / ncmpcpp-9999.ebuild
blob91df9acee3da8257e7c4825e61b12c9593c09d0f
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 iconv 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 iconv? ( virtual/libiconv )
25 taglib? ( media-libs/taglib )
27 DEPEND="
28 ${RDEPEND}
29 virtual/pkgconfig
32 src_prepare() {
33 # work around a compilation issue when USE=-curl
34 sed -i src/lyrics.cpp -e 's|itsFolder|Config.ncmpcpp_directory + "artists"|g' || die
37 src_configure() {
38 local myconf=""
39 if use fftw; then
40 myconf="$(use_with visualizer fftw)"
41 if ! use visualizer; then
42 ewarn "For the fftw USE flag to have any effect, you must also"
43 ewarn "enable the visualizer USE flag."
45 else
46 myconf="--without-fftw"
48 econf \
49 ${myconf} \
50 $(use_enable clock) \
51 $(use_enable outputs) \
52 $(use_enable unicode) \
53 $(use_enable visualizer) \
54 $(use_with curl) \
55 $(use_with iconv) \
56 $(use_with taglib)
59 src_install() {
60 default
62 # use dodoc instead of upstream's doc install which does not compress
63 rm -rf "${D}"/usr/share/doc/${PN}
64 dodoc AUTHORS NEWS doc/config doc/keys
66 if use bash-completion; then
67 newbashcomp doc/${PN}-completion.bash ${PN}
71 pkg_postinst() {
72 echo
73 elog "Example configuration files have been installed at"
74 elog "${ROOT}usr/share/doc/${PF}"
75 elog "${P} uses ~/.ncmpcpp/config and ~/.ncmpcpp/keys"
76 elog "as user configuration files."
77 echo
78 if use visualizer; then
79 elog "If you want to use the visualizer, you need mpd with fifo enabled."
80 echo