summaryrefslogtreecommitdiff
blob: 9340f77503ae60d646325b3c70aa508a8ea64c6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="7"
PYTHON_COMPAT=( python3_{6,7,8} )
VALA_USE_DEPEND="vapigen"

inherit autotools gnome2-utils python-any-r1 vala vcs-snapshot virtualx xdg

DESCRIPTION="An easy to use virtual keyboard toolkit"
HOMEPAGE="https://github.com/ueno/eekboard"
SRC_URI="https://github.com/ueno/${PN}/archive/e212262f29e022bdf7047861263ceea0c373e916.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc +introspection libcanberra static-libs +vala +xtest"
RESTRICT="!test? ( test )"
REQUIRED_USE="vala? ( introspection )"

RDEPEND="app-accessibility/at-spi2-core
	dev-libs/glib:2
	dev-libs/libcroco
	virtual/libintl
	x11-libs/gtk+:3
	x11-libs/libX11
	x11-libs/libxklavier
	x11-libs/pango
	introspection? ( dev-libs/gobject-introspection )
	libcanberra? ( media-libs/libcanberra[gtk3(+)] )
	vala? ( $(vala_depend) )
	xtest? ( x11-libs/libXtst )"
DEPEND="${RDEPEND}"
BDEPEND="${PYTHON_DEPS}
	dev-util/glib-utils
	dev-util/gtk-doc
	dev-util/gtk-doc-am
	dev-util/intltool
	sys-devel/gettext
	virtual/pkgconfig"

PATCHES=(
	"${FILESDIR}"/${PN}-python-3.patch
	"${FILESDIR}"/${PN}-vala.patch
)

src_prepare() {
	use vala && vala_src_prepare
	default
	eautoreconf
}

src_configure() {
	econf \
		$(use_enable doc gtk-doc) \
		$(use_enable introspection) \
		$(use_enable libcanberra) \
		$(use_enable static-libs static) \
		$(use_enable vala) \
		$(use_enable xtest)
}

src_install() {
	default
	find "${ED}" -name '*.la' -delete || die
}

src_test() {
	virtx default
}

pkg_preinst() {
	xdg_pkg_preinst
	gnome2_schemas_savelist
}

pkg_postinst() {
	xdg_pkg_postinst
	gnome2_schemas_update
}

pkg_postrm() {
	xdg_pkg_postrm
	gnome2_schemas_update
}