media-video/vlc: amd64 stable wrt bug #721940
[gentoo.git] / media-video / gaupol / gaupol-1.8.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
8 inherit distutils-r1 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 RESTRICT="!test? ( test )"
19
20 RDEPEND="
21         app-text/iso-codes
22         dev-python/chardet[${PYTHON_USEDEP}]
23         dev-python/pygobject:3[${PYTHON_USEDEP}]
24         x11-libs/gtk+:3[introspection]
25         spell? ( app-text/gspell[introspection] )
26 "
27 DEPEND="
28         sys-devel/gettext
29         test? (
30                 ${RDEPEND}
31                 app-dicts/myspell-en
32                 app-text/enchant[hunspell]
33                 app-text/gspell[introspection]
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_icon_cache_update
47         if [[ -z ${REPLACING_VERSIONS} ]]; then
48                 elog "Previewing support requires MPV, MPlayer or VLC."
49                 if use spell; then
50                         elog ""
51                         elog "Spell-checking requires a dictionary, any of app-dicts/myspell-*"
52                         elog "or app-text/aspell with the appropriate L10N variable."
53                         elog ""
54                         elog "Additionally, make sure that app-text/enchant has the correct flags enabled:"
55                         elog "USE=hunspell for myspell dictionaries and USE=aspell for aspell dictionaries."
56                 fi
57         fi
58 }
59
60 pkg_postrm() {
61         xdg_desktop_database_update
62         xdg_icon_cache_update
63 }