1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7,8} )
8 inherit gnome2 python-single-r1 toolchain-funcs
10 DESCRIPTION="Introspection system for GObject-based libraries"
11 HOMEPAGE="https://wiki.gnome.org/Projects/GObjectIntrospection"
13 LICENSE="LGPL-2+ GPL-2+"
15 IUSE="cairo doctool test"
16 RESTRICT="!test? ( test )"
18 ${PYTHON_REQUIRED_USE}
21 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
23 # virtual/pkgconfig needed at runtime, bug #505408
25 >=dev-libs/gobject-introspection-common-${PV}
26 >=dev-libs/glib-2.58.0:2
28 $(python_gen_cond_dep '
29 dev-python/mako[${PYTHON_MULTI_USEDEP}]
30 dev-python/markdown[${PYTHON_MULTI_USEDEP}]
35 !<dev-lang/vala-0.20.0
38 # Wants real bison, not virtual/yacc
40 >=dev-util/gtk-doc-am-1.19
45 $(python_gen_cond_dep '
46 dev-python/markdown[${PYTHON_MULTI_USEDEP}]
49 " # autoreconf needs autoconf-archive
50 # PDEPEND to avoid circular dependencies, bug #391213; but needed for tests, thus test DEPEND as well
51 PDEPEND="cairo? ( x11-libs/cairo[glib] )"
54 python-single-r1_pkg_setup
58 if ! has_version "x11-libs/cairo[glib]"; then
59 # Bug #391213: enable cairo-gobject support even if it's not installed
60 # We only PDEPEND on cairo to avoid circular dependencies
61 export CAIRO_LIBS="-lcairo -lcairo-gobject"
62 export CAIRO_CFLAGS="-I${EPREFIX}/usr/include/cairo"
65 # To prevent crosscompiling problems, bug #414105
66 gnome2_src_configure \
69 YACC="$(type -p yacc)" \
77 # Prevent collision with gobject-introspection-common
78 rm -v "${ED}"usr/share/aclocal/introspection.m4 \
79 "${ED}"usr/share/gobject-introspection-1.0/Makefile.introspection || die
80 rmdir "${ED}"usr/share/aclocal || die