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