1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit gnome2 pax-utils virtualx
7 DESCRIPTION="Javascript bindings for GNOME"
8 HOMEPAGE="https://wiki.gnome.org/Projects/Gjs"
10 LICENSE="MIT || ( MPL-1.1 LGPL-2+ GPL-2+ )"
12 IUSE="+cairo examples gtk readline test"
13 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
16 >=dev-libs/glib-2.54.0
17 >=dev-libs/gobject-introspection-1.57.2:=
19 readline? ( sys-libs/readline:0= )
20 dev-lang/spidermonkey:60
22 cairo? ( x11-libs/cairo[X] )
23 gtk? ( >=x11-libs/gtk+-3.20:3 )
26 gnome-base/gnome-common
29 test? ( sys-apps/dbus )
32 RESTRICT="!test? ( test )"
35 # FIXME: add systemtap/dtrace support, like in glib:2
36 # FIXME: --enable-systemtap installs files in ${D}/${D} for some reason
37 # XXX: Do NOT enable coverage, completely useless for portage installs
38 gnome2_src_configure \
42 --disable-code-coverage \
43 $(use_with cairo cairo) \
45 $(use_enable readline) \
46 $(use_with test dbus-tests) \
47 --disable-installed-tests \
48 --without-xvfb-tests # disables Makefile spawning Xvfb for us, as we do it ourselves:
49 # https://gitlab.gnome.org/GNOME/gjs/issues/280
53 # installation sometimes fails in parallel, bug #???
54 gnome2_src_install -j1
57 insinto /usr/share/doc/"${PF}"/examples
58 doins "${S}"/examples/*
61 # Required for gjs-console to run correctly on PaX systems
62 pax-mark mr "${ED}/usr/bin/gjs-console"
66 virtx dbus-run-session emake check || die