media-fonts/liberation-fonts: Version bump (v2.1.0)
[gentoo.git] / dev-libs / libpeas / libpeas-1.22.0-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 GNOME2_LA_PUNT="yes"
6 GNOME2_EAUTORECONF="yes"
7 PYTHON_COMPAT=( python{3_6,3_7,3_8} )
8
9 inherit autotools eutils gnome2 multilib python-single-r1 virtualx
10
11 DESCRIPTION="A GObject plugins library"
12 HOMEPAGE="https://developer.gnome.org/libpeas/stable/"
13
14 LICENSE="LGPL-2+"
15 SLOT="0"
16 KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
17
18 IUSE="+gtk glade lua luajit +python"
19 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
20
21 RDEPEND="
22         >=dev-libs/glib-2.38:2
23         >=dev-libs/gobject-introspection-1.39:=
24         glade? ( >=dev-util/glade-3.9.1:3.10 )
25         gtk? ( >=x11-libs/gtk+-3:3[introspection] )
26         lua? (
27                 >=dev-lua/lgi-0.9.0
28                 luajit? ( >=dev-lang/luajit-2:2 )
29                 !luajit? ( =dev-lang/lua-5.1*:0 ) )
30         python? (
31                 ${PYTHON_DEPS}
32                 $(python_gen_cond_dep '
33                         >=dev-python/pygobject-3.2:3[${PYTHON_MULTI_USEDEP}]
34                 ')
35         )
36 "
37 DEPEND="${RDEPEND}
38         dev-util/glib-utils
39         >=dev-util/gtk-doc-am-1.11
40         >=dev-util/intltool-0.40
41         virtual/pkgconfig
42
43         dev-libs/gobject-introspection-common
44         gnome-base/gnome-common
45 "
46 # eautoreconf needs gobject-introspection-common, gnome-common
47
48 PATCHES=(
49         # Gentoo uses unversioned lua - lua.pc instad of lua5.1.pc, /usr/bin/lua instead of /usr/bin/lua5.1
50         "${FILESDIR}"/${PN}-1.14.0-lua.pc.patch
51         "${FILESDIR}"/${PV}-py38-support.patch # Fix py3.8 support, bug 702810
52 )
53
54 pkg_setup() {
55         use python && python-single-r1_pkg_setup
56 }
57
58 src_configure() {
59         # Wtf, --disable-gcov, --enable-gcov=no, --enable-gcov, all enable gcov
60         # What do we do about gdb, valgrind, gcov, etc?
61         local myconf=(
62                 $(use_enable glade glade-catalog)
63                 $(use_enable gtk)
64                 --disable-static
65
66                 # py2 not supported anymore
67                 --disable-python2
68                 $(use_enable python python3)
69
70                 # lua
71                 $(use_enable lua lua5.1)
72                 $(use_enable $(usex luajit lua luajit) luajit)
73         )
74
75         gnome2_src_configure "${myconf[@]}"
76 }
77
78 src_test() {
79         # This looks fixed since 1.18.0:
80         #
81         # FIXME: Tests fail because of some bug involving Xvfb and Gtk.IconTheme
82         # DO NOT REPORT UPSTREAM, this is not a libpeas bug.
83         # To reproduce:
84         # >>> from gi.repository import Gtk
85         # >>> Gtk.IconTheme.get_default().has_icon("gtk-about")
86         # This should return True, it returns False for Xvfb
87         virtx emake check
88 }