af367ca1b9acf956086d0d7d0f538db7dea1d89b
[gentoo.git] / dev-libs / gom / gom-0.3.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 GCONF_DEBUG="yes"
6 PYTHON_COMPAT=( python3_{6,7} )
7
8 inherit gnome.org gnome2-utils meson python-r1
9
10 DESCRIPTION="GObject to SQLite object mapper library"
11 HOMEPAGE="https://wiki.gnome.org/Projects/Gom"
12
13 LICENSE="LGPL-2+"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
16 IUSE="doc +introspection test"
17 RESTRICT="!test? ( test )"
18 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
19
20 RDEPEND="
21         >=dev-db/sqlite-3.7:3
22         >=dev-libs/glib-2.36:2
23         introspection? ( >=dev-libs/gobject-introspection-1.30.0:= )
24         ${PYTHON_DEPS}
25         >=dev-python/pygobject-3.16:3[${PYTHON_USEDEP}]
26 "
27 DEPEND="${RDEPEND}
28         doc? ( dev-util/gtk-doc )
29         virtual/pkgconfig
30         x11-libs/gdk-pixbuf:2
31 " # only tests need gdk-pixbuf, but they are unconditionally built
32
33 pkg_setup() {
34         python_setup
35 }
36
37 src_configure() {
38         local emesonargs=(
39                 $(meson_use introspection enable-introspection)
40                 $(meson_use doc enable-gtk-doc)
41         )
42
43         python_foreach_impl meson_src_configure
44 }
45
46 src_compile() {
47         python_foreach_impl meson_src_compile
48 }
49
50 src_install() {
51         docinto examples
52         dodoc examples/*.py
53
54         installing() {
55                 meson_src_install
56                 python_optimize
57         }
58         python_foreach_impl installing
59 }
60
61 src_test() {
62         # tests may take a long time
63         python_foreach_impl meson_src_test
64 }