dev-libs/libnfc: bump
[gentoo.git] / dev-libs / gobject-introspection / gobject-introspection-1.64.1.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,8} )
7 PYTHON_REQ_USE="xml"
8 inherit gnome.org meson python-single-r1 toolchain-funcs xdg
9
10 DESCRIPTION="Introspection system for GObject-based libraries"
11 HOMEPAGE="https://wiki.gnome.org/Projects/GObjectIntrospection"
12
13 LICENSE="LGPL-2+ GPL-2+"
14 SLOT="0"
15 IUSE="doctool gtk-doc test"
16 RESTRICT="!test? ( test )"
17 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
18 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"
19
20 # virtual/pkgconfig needed at runtime, bug #505408
21 RDEPEND="
22         >=dev-libs/gobject-introspection-common-${PV}
23         >=dev-libs/glib-2.58.0:2
24         dev-libs/libffi:=
25         doctool? (
26                 $(python_gen_cond_dep '
27                         dev-python/mako[${PYTHON_MULTI_USEDEP}]
28                         dev-python/markdown[${PYTHON_MULTI_USEDEP}]
29                 ')
30         )
31         virtual/pkgconfig
32         ${PYTHON_DEPS}
33 "
34 # Wants real bison, not virtual/yacc
35 DEPEND="${RDEPEND}
36         gtk-doc? ( >=dev-util/gtk-doc-1.19
37                 app-text/docbook-xml-dtd:4.3
38                 app-text/docbook-xml-dtd:4.5
39         )
40         sys-devel/bison
41         sys-devel/flex
42         test? ( x11-libs/cairo[glib] )
43 "
44
45 pkg_setup() {
46         python-single-r1_pkg_setup
47 }
48
49 src_configure() {
50         local emesonargs=(
51                 $(meson_feature test cairo)
52                 $(meson_feature doctool)
53                 #-Dglib_src_dir
54                 $(meson_use gtk-doc gtk_doc)
55                 #-Dcairo_libname
56                 -Dpython="${EPYTHON}"
57                 #-Dgir_dir_prefix
58         )
59         meson_src_configure
60 }
61
62 src_install() {
63         meson_src_install
64         python_fix_shebang "${ED}"/usr/bin/
65         python_optimize "${ED}"/usr/$(get_libdir)/gobject-introspection/giscanner
66
67         # Prevent collision with gobject-introspection-common
68         rm -v "${ED}"/usr/share/aclocal/introspection.m4 \
69                 "${ED}"/usr/share/gobject-introspection-1.0/Makefile.introspection || die
70         rmdir "${ED}"/usr/share/aclocal || die
71 }