dev-libs/gom: drop inherit of unused gnome2-utils.eclass
[gentoo.git] / dev-libs / gom / gom-0.4.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,8} )
7
8 inherit gnome.org 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="gtk-doc +introspection python test"
17 RESTRICT="!test? ( test )"
18 REQUIRED_USE="python? ( introspection ${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? ( ${PYTHON_DEPS}
25                 >=dev-python/pygobject-3.16:3[${PYTHON_USEDEP}] )
26 "
27 DEPEND="${RDEPEND}
28         gtk-doc? ( dev-util/gtk-doc
29                 app-text/docbook-xml-dtd:4.3 )
30         virtual/pkgconfig
31         test? ( x11-libs/gdk-pixbuf:2 )
32 "
33
34 src_prepare() {
35         default
36         sed -i -e '/subdir.*python/d' bindings/meson.build || die
37         # drop test building and deps if not enabled
38         if ! use test; then
39                 sed -i -e '/gdkpixbuf_dep/d' meson.build || die
40                 sed -i -e '/subdir(.*tests.*)/d' meson.build || die
41         fi
42 }
43
44 src_configure() {
45         local emesonargs=(
46                 $(meson_use introspection enable-introspection)
47                 $(meson_use gtk-doc enable-gtk-doc)
48         )
49
50         meson_src_configure
51 }
52
53 src_install() {
54         docinto examples
55         dodoc examples/*.py
56
57         meson_src_install
58
59         if use python; then
60                 python_foreach_impl python_domodule bindings/python/gi
61         fi
62 }