gnome-extra/eiciel: update homepage
[gentoo.git] / gnome-extra / cjs / cjs-4.0.0-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit autotools gnome2 pax-utils virtualx
6
7 DESCRIPTION="Linux Mint's fork of gjs for Cinnamon"
8 HOMEPAGE="http://developer.linuxmint.com/projects/cinnamon-projects.html"
9 SRC_URI="https://github.com/linuxmint/cjs/archive/${PV}.tar.gz -> ${P}.tar.gz"
10
11 LICENSE="MIT || ( MPL-1.1 LGPL-2+ GPL-2+ )"
12 SLOT="0"
13 IUSE="+cairo examples gtk test"
14 KEYWORDS="amd64 x86"
15
16 RDEPEND="
17         dev-lang/spidermonkey:52
18         >=dev-libs/glib-2.37.3:2
19         >=dev-libs/gobject-introspection-1.38:=
20         sys-libs/readline:0=
21         virtual/libffi:0=
22         cairo? ( x11-libs/cairo[X,glib] )
23         gtk? ( x11-libs/gtk+:3 )
24 "
25 DEPEND="${RDEPEND}
26         gnome-base/gnome-common
27         sys-devel/gettext
28         virtual/pkgconfig
29         test? ( sys-apps/dbus )
30         sys-devel/autoconf-archive
31 "
32 # Cinnamon 2.2 does not work with this release.
33 RDEPEND="${RDEPEND}
34         !<gnome-extra/cinnamon-2.4
35 "
36
37 RESTRICT="test"
38
39 src_prepare() {
40         eautoreconf
41         gnome2_src_prepare
42         sed -ie "s/gjs-console/cjs-console/g" \
43                 "${S}"/installed-tests/scripts/testCommandLine.sh \
44                 "${S}"/installed-tests/scripts/testWarnings.sh || die
45
46         sed -ie "s/Gjs-WARNING/Cjs-WARNING/g" \
47                 "${S}"/installed-tests/scripts/testCommandLine.sh || die
48
49         sed -ie "s/'Gjs'/'Cjs'/g" \
50                 "${S}"/installed-tests/js/testExceptions.js \
51                 "${S}"/installed-tests/js/testSignals.js \
52                 "${S}"/installed-tests/js/testGDBus.js \
53                 "${S}"/installed-tests/js/testEverythingBasic.js || die
54 }
55
56 src_configure() {
57         # FIXME: add systemtap/dtrace support, like in glib:2
58         # FIXME: --enable-systemtap installs files in ${D}/${D} for some reason
59         gnome2_src_configure \
60                 --disable-systemtap \
61                 --disable-dtrace \
62                 $(use_with cairo) \
63                 $(use_with gtk)
64 }
65
66 src_test() {
67         virtx emake check
68 }
69
70 src_install() {
71         # installation sometimes fails in parallel
72         gnome2_src_install -j1
73
74         if use examples; then
75                 insinto /usr/share/doc/"${PF}"/examples
76                 doins "${S}"/examples/*
77         fi
78
79         # Required for cjs-console to run correctly on PaX systems
80         pax-mark mr "${ED}/usr/bin/cjs-console"
81 }