media-sound/qtagger: EAPI-7 bump, switch to cmake, missing DEPEND
[gentoo.git] / media-sound / solfege / solfege-3.23.4.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 PYTHON_COMPAT=( python3_{6,7,8} )
7 PYTHON_REQ_USE="sqlite"
8 inherit autotools python-single-r1
9
10 DESCRIPTION="GNU program to help practicing ear training"
11 HOMEPAGE="https://www.gnu.org/software/solfege/"
12 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
13
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="~amd64 ~ppc ~x86"
17 IUSE="alsa oss"
18
19 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
20
21 BDEPEND="${PYTHON_DEPS}
22         >=app-text/docbook-xsl-stylesheets-1.60
23         app-text/txt2man
24         dev-lang/swig
25         dev-libs/libxslt
26         dev-util/itstool
27         sys-apps/texinfo
28         sys-devel/gettext
29         virtual/pkgconfig
30 "
31 RDEPEND="${PYTHON_DEPS}
32         $(python_gen_cond_dep '
33                 dev-python/pycairo[${PYTHON_MULTI_USEDEP}]
34                 dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
35         ')
36         x11-libs/gtk+:3
37         alsa? ( dev-python/pyalsa )
38         !oss? ( media-sound/timidity++ )
39 "
40 DEPEND="${RDEPEND}"
41
42 RESTRICT="test"
43
44 PATCHES=(
45         "${FILESDIR}/${P}-no-xmllint.patch"
46         "${FILESDIR}/${P}-fix-menubar.patch"
47         "${FILESDIR}/${P}-itstool.patch"
48         "${FILESDIR}/${P}-topdocs-encodings.patch"
49         "${FILESDIR}/${P}-fix-webbrowser-module.patch"
50 )
51
52 src_prepare() {
53         default
54
55         # fix encoding of the Hungarian translation, thanks to Arch Linux
56         iconv -f ISO-8859-2 -t UTF-8 po/hu.po -o po/hu.po.new || die
57         sed -i 's/charset=iso-8859-2/charset=utf-8/' po/hu.po.new || die
58         mv po/hu.po.new po/hu.po || die
59
60         sed -E 's|(PYTHON_INCLUDES=).+|\1"$(pkg-config --cflags-only-I python3)"|g' \
61                 -i acinclude.m4 || die
62
63         eautoreconf
64 }
65
66 src_configure() {
67         econf $(use_enable oss oss-sound)
68 }
69
70 src_compile() {
71         emake skipmanual=yes
72 }
73
74 src_install() {
75         emake DESTDIR="${ED}" nopycompile=YES skipmanual=yes install
76         dodoc AUTHORS changelog FAQ README
77 }