|
| 1 | +# Copyright 1999-2020 Gentoo Authors |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | + |
| 4 | +EAPI=6 |
| 5 | +inherit gnome2 pax-utils virtualx |
| 6 | + |
| 7 | +DESCRIPTION="Javascript bindings for GNOME" |
| 8 | +HOMEPAGE="https://wiki.gnome.org/Projects/Gjs" |
| 9 | + |
| 10 | +LICENSE="MIT || ( MPL-1.1 LGPL-2+ GPL-2+ )" |
| 11 | +SLOT="0" |
| 12 | +IUSE="+cairo examples gtk readline +sysprof test" |
| 13 | +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
| 14 | + |
| 15 | +RDEPEND=" |
| 16 | + >=dev-libs/glib-2.58.0 |
| 17 | + >=dev-libs/gobject-introspection-1.61.2:= |
| 18 | +
|
| 19 | + readline? ( sys-libs/readline:0= ) |
| 20 | + dev-lang/spidermonkey:60 |
| 21 | + dev-libs/libffi:= |
| 22 | + cairo? ( x11-libs/cairo[X] ) |
| 23 | +" |
| 24 | +DEPEND="${RDEPEND} |
| 25 | + sysprof? ( >=dev-util/sysprof-capture-3.33.2:3 ) |
| 26 | + virtual/pkgconfig |
| 27 | + test? ( sys-apps/dbus |
| 28 | + >=x11-libs/gtk+-3.20:3 ) |
| 29 | +" |
| 30 | + |
| 31 | +RESTRICT="!test? ( test )" |
| 32 | + |
| 33 | +src_configure() { |
| 34 | + # FIXME: add systemtap/dtrace support, like in glib:2 |
| 35 | + # FIXME: --enable-systemtap installs files in ${D}/${D} for some reason |
| 36 | + # XXX: Do NOT enable coverage, completely useless for portage installs |
| 37 | + gnome2_src_configure \ |
| 38 | + --disable-systemtap \ |
| 39 | + --disable-dtrace \ |
| 40 | + --disable-code-coverage \ |
| 41 | + $(use_with cairo cairo) \ |
| 42 | + $(use_enable sysprof profiler) \ |
| 43 | + $(use_enable readline) \ |
| 44 | + $(use_with test dbus-tests) \ |
| 45 | + $(use_with test gtk-tests) \ |
| 46 | + --disable-installed-tests |
| 47 | +} |
| 48 | + |
| 49 | +src_install() { |
| 50 | + # installation sometimes fails in parallel, bug #??? |
| 51 | + gnome2_src_install -j1 |
| 52 | + |
| 53 | + if use examples; then |
| 54 | + insinto /usr/share/doc/"${PF}"/examples |
| 55 | + doins "${S}"/examples/* |
| 56 | + fi |
| 57 | + |
| 58 | + # Required for gjs-console to run correctly on PaX systems |
| 59 | + pax-mark mr "${ED}/usr/bin/gjs-console" |
| 60 | +} |
| 61 | + |
| 62 | +src_test() { |
| 63 | + virtx emake check |
| 64 | +} |
0 commit comments