*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / x11-misc / libinput-gestures / libinput-gestures-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
6 PYTHON_COMPAT=( python3_{6..7} )
7
8 inherit python-single-r1 xdg-utils
9
10 DESCRIPTION="Actions gestures on your touchpad using libinput"
11 HOMEPAGE="https://github.com/bulletmark/libinput-gestures"
12 if [[ ${PV} == *9999 ]] ; then
13         inherit git-r3
14         EGIT_REPO_URI="https://github.com/bulletmark/${PN}.git"
15 else
16         SRC_URI="https://github.com/bulletmark/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
17         KEYWORDS="~amd64 ~x86"
18 fi
19
20 LICENSE="GPL-3+"
21 SLOT="0"
22 IUSE=""
23 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
24
25 RDEPEND="${PYTHON_DEPS}
26         >=dev-libs/libinput-1.8.0
27         x11-misc/wmctrl
28         x11-misc/xdotool"
29 DEPEND=">=dev-libs/libinput-1.8.0
30         dev-util/desktop-file-utils"
31
32 src_prepare() {
33         default
34
35         # Fix docdir installation path
36         sed '/^DOCDIR/s@$NAME@${PF}@' -i libinput-gestures-setup || die
37 }
38
39 src_test() { :; }
40
41 pkg_postinst() {
42         xdg_icon_cache_update
43
44         elog "You must be in the input group to read the touchpad device."
45
46         if ! has_version x11-libs/gtk+:3 ; then
47                 elog "${PN}-setup script supports Gnome 3 via x11-libs/gtk+:3."
48         fi
49         if ! has_version kde-plasma/kde-cli-tools:5 ; then
50                 elog "${PN}-setup script supports Plasma 5 via kde-plasma/kde-cli-tools:5."
51         fi
52 }
53
54 pkg_postrm() {
55         xdg_icon_cache_update
56 }