*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-libs / libxmlb / libxmlb-0.1.12.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 meson python-any-r1
9
10 DESCRIPTION="Library to help create and query binary XML blobs"
11 HOMEPAGE="https://github.com/hughsie/libxmlb"
12 SRC_URI="https://github.com/hughsie/libxmlb/archive/${PV}.tar.gz -> ${P}.tar.gz"
13 LICENSE="LGPL-2.1+"
14 SLOT="0"
15
16 KEYWORDS="amd64 ~arm ~arm64 x86"
17 IUSE="doc introspection stemmer test"
18
19 RESTRICT="!test? ( test )"
20
21 RDEPEND="
22         dev-libs/glib:2
23         sys-apps/util-linux
24         stemmer? ( dev-libs/snowball-stemmer )
25 "
26
27 DEPEND="
28         ${RDEPEND}
29         doc? ( dev-util/gtk-doc )
30         introspection? ( dev-libs/gobject-introspection )
31 "
32
33 BDEPEND="
34         >=dev-util/meson-0.47.0
35         virtual/pkgconfig
36         introspection? (
37                 $(python_gen_any_dep 'dev-python/setuptools[${PYTHON_USEDEP}]')
38                 ${PYTHON_DEPS}
39         )
40 "
41
42 python_check_deps() {
43         has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]"
44 }
45
46 pkg_setup() {
47         use introspection && python-any-r1_pkg_setup
48 }
49
50 src_configure() {
51         local emesonargs=(
52                 -Dgtkdoc="$(usex doc true false)"
53                 -Dintrospection="$(usex introspection true false)"
54                 -Dstemmer="$(usex stemmer true false)"
55                 -Dtests="$(usex test true false)"
56         )
57         meson_src_configure
58 }