*/*: Remove python3_4 PYTHON_COMPAT correctly
[gentoo.git] / media-video / gaupol / gaupol-1.5.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python3_{5,6,7} )
7
8 inherit distutils-r1 gnome2-utils virtualx xdg-utils
9
10 DESCRIPTION="A subtitle editor for text-based subtitles"
11 HOMEPAGE="https://otsaloma.io/gaupol/"
12 SRC_URI="https://github.com/otsaloma/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
13
14 LICENSE="GPL-2+"
15 SLOT="0"
16 KEYWORDS="amd64 ~arm64 x86"
17 IUSE="spell test"
18
19 RDEPEND="
20         app-text/iso-codes
21         dev-python/chardet[${PYTHON_USEDEP}]
22         dev-python/pygobject:3[${PYTHON_USEDEP}]
23         x11-libs/gtk+:3[introspection]
24         spell? (
25                 app-text/gtkspell:3
26                 >=dev-python/pyenchant-1.4[${PYTHON_USEDEP}]
27         )
28 "
29 DEPEND="
30         sys-devel/gettext
31         test? (
32                 ${RDEPEND}
33                 dev-python/pyenchant[${PYTHON_USEDEP}]
34                 dev-python/pytest[${PYTHON_USEDEP}]
35         )
36 "
37
38 DOCS=( AUTHORS.md NEWS.md TODO.md README.md README.aeidon.md )
39
40 python_test() {
41         virtx pytest -vv
42 }
43
44 pkg_postinst() {
45         xdg_desktop_database_update
46         xdg_mimeinfo_database_update
47         gnome2_icon_cache_update
48         if [[ -z ${REPLACING_VERSIONS} ]]; then
49                 elog "Previewing support needs MPV, MPlayer or VLC."
50
51                 if use spell; then
52                         elog "Additionally, spell-checking requires a dictionary, any of"
53                         elog "Aspell/Pspell, Ispell, MySpell, Uspell, Hspell or AppleSpell."
54                 fi
55         fi
56 }
57
58 pkg_postrm() {
59         xdg_desktop_database_update
60         xdg_mimeinfo_database_update
61         gnome2_icon_cache_update
62 }