media-sound/ncmpcpp: fix build with GCC 10
[gentoo.git] / media-sound / ncmpcpp / ncmpcpp-9999.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit autotools git-r3
6
7 DESCRIPTION="featureful ncurses based MPD client inspired by ncmpc"
8 HOMEPAGE="https://ncmpcpp.rybczak.net/"
9 EGIT_REPO_URI="https://repo.or.cz/ncmpcpp.git"
10 LICENSE="GPL-2"
11
12 SLOT="0"
13 KEYWORDS=""
14 IUSE="clock outputs taglib visualizer"
15
16 RDEPEND="
17         !dev-libs/boost:0/1.57.0
18         >=media-libs/libmpdclient-2.1
19         dev-libs/boost:=[icu,nls,threads]
20         dev-libs/icu:=
21         net-misc/curl
22         sys-libs/ncurses:=[unicode]
23         sys-libs/readline:*
24         taglib? ( media-libs/taglib )
25         visualizer? ( sci-libs/fftw:3.0= )
26 "
27 DEPEND="
28         ${RDEPEND}
29         virtual/pkgconfig
30 "
31
32 src_prepare() {
33         default
34
35         sed -i -e '/^docdir/d' {,doc/}Makefile.am || die
36         sed -i -e 's|COPYING||g' Makefile.am || die
37
38         eautoreconf
39 }
40
41 src_configure() {
42         econf \
43                 $(use_enable clock) \
44                 $(use_enable outputs) \
45                 $(use_enable visualizer) \
46                 $(use_with taglib) \
47                 $(use_with visualizer fftw)
48 }
49
50 src_install() {
51         default
52
53         dodoc doc/{bindings,config}
54 }
55
56 pkg_postinst() {
57         echo
58         elog "Example configuration files have been installed at"
59         elog "${ROOT}/usr/share/doc/${PF}"
60         elog "${P} uses ~/.ncmpcpp/config and ~/.ncmpcpp/bindings"
61         elog "as user configuration files."
62         echo
63         if use visualizer; then
64         elog "If you want to use the visualizer, you need mpd with fifo enabled."
65         echo
66         fi
67 }