1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
10 inherit autotools eutils gnome2 multilib python-r1 virtualx
12 DESCRIPTION="A GObject plugins library"
13 HOMEPAGE="https://developer.gnome.org/libpeas/stable/"
17 KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86 ~amd64-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux"
18 IUSE="+gtk glade jit lua +python"
19 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ?? ( $(python_gen_useflags 'python3*') ) )"
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] )
28 jit? ( >=dev-lang/luajit-2:2 )
29 !jit? ( =dev-lang/lua-5.1*:0 ) )
32 >=dev-python/pygobject-3.2:3[${PYTHON_USEDEP}] )
35 >=dev-util/gtk-doc-am-1.11
36 >=dev-util/intltool-0.40
39 dev-libs/gobject-introspection-common
40 gnome-base/gnome-common
42 # eautoreconf needs gobject-introspection-common, gnome-common
45 # Gentoo uses unversioned lua - lua.pc instad of lua5.1.pc, /usr/bin/lua instead of /usr/bin/lua5.1
46 epatch "${FILESDIR}"/${PN}-1.14.0-lua.pc.patch
52 # Wtf, --disable-gcov, --enable-gcov=no, --enable-gcov, all enable gcov
53 # What do we do about gdb, valgrind, gcov, etc?
55 $(use_enable glade glade-catalog)
59 # possibly overriden below
67 myconf+=( --enable-lua5.1 --enable-luajit )
69 myconf+=( --enable-lua5.1 )
75 python_is_python3 && v=3 || v=2
78 # it is just 'PYTHON' for py3 in the build system
79 "PYTHON${v#3}=${PYTHON}"
80 "PYTHON${v}_CONFIG=$(python_get_PYTHON_CONFIG)"
83 use python && python_foreach_impl python_configure
85 gnome2_src_configure "${myconf[@]}"
89 # FIXME: Tests fail because of some bug involving Xvfb and Gtk.IconTheme
90 # DO NOT REPORT UPSTREAM, this is not a libpeas bug.
92 # >>> from gi.repository import Gtk
93 # >>> Gtk.IconTheme.get_default().has_icon("gtk-about")
94 # This should return True, it returns False for Xvfb