dev-libs/libgweather: Version bump
[gentoo.git] / dev-libs / libpeas / libpeas-1.14.0-r1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6 GCONF_DEBUG="no"
7 GNOME2_LA_PUNT="yes"
8 PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
9
10 inherit autotools eutils gnome2 multilib python-r1 virtualx
11
12 DESCRIPTION="A GObject plugins library"
13 HOMEPAGE="https://developer.gnome.org/libpeas/stable/"
14
15 LICENSE="LGPL-2+"
16 SLOT="0"
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*') ) )"
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                 jit? ( >=dev-lang/luajit-2:2 )
29                 !jit? ( =dev-lang/lua-5.1*:0 ) )
30         python? (
31                 ${PYTHON_DEPS}
32                 >=dev-python/pygobject-3.2:3[${PYTHON_USEDEP}] )
33 "
34 DEPEND="${RDEPEND}
35         >=dev-util/gtk-doc-am-1.11
36         >=dev-util/intltool-0.40
37         virtual/pkgconfig
38
39         dev-libs/gobject-introspection-common
40         gnome-base/gnome-common
41 "
42 # eautoreconf needs gobject-introspection-common, gnome-common
43
44 src_prepare() {
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
47         eautoreconf
48         gnome2_src_prepare
49 }
50
51 src_configure() {
52         # Wtf, --disable-gcov, --enable-gcov=no, --enable-gcov, all enable gcov
53         # What do we do about gdb, valgrind, gcov, etc?
54         local myconf=(
55                 $(use_enable glade glade-catalog)
56                 $(use_enable gtk)
57                 --disable-static
58
59                 # possibly overriden below
60                 --disable-python{2,3}
61                 --disable-lua5.1
62                 --disable-luajit
63         )
64
65         if use lua ; then
66                 if use jit ; then
67                         myconf+=( --enable-lua5.1 --enable-luajit )
68                 else
69                         myconf+=( --enable-lua5.1 )
70                 fi
71         fi
72
73         python_configure() {
74                 local v
75                 python_is_python3 && v=3 || v=2
76                 myconf+=(
77                         "--enable-python${v}"
78                         # it is just 'PYTHON' for py3 in the build system
79                         "PYTHON${v#3}=${PYTHON}"
80                         "PYTHON${v}_CONFIG=$(python_get_PYTHON_CONFIG)"
81                 )
82         }
83         use python && python_foreach_impl python_configure
84
85         gnome2_src_configure "${myconf[@]}"
86 }
87
88 src_test() {
89         # FIXME: Tests fail because of some bug involving Xvfb and Gtk.IconTheme
90         # DO NOT REPORT UPSTREAM, this is not a libpeas bug.
91         # To reproduce:
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
95         Xemake check
96 }