summaryrefslogtreecommitdiff
blob: 49955d39ad0dcd1d18a0c72f00732164f3f7bbd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=4
inherit autotools eutils gnome2

DESCRIPTION="Genius Mathematics Tool and the GEL Language"
HOMEPAGE="http://www.jirka.org/genius.html"
SRC_URI="
	mirror://gnome/sources/${PN}/1.0/${P}.tar.xz
	doc? ( http://www.jirka.org/${PN}-reference.pdf )"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc gnome nls"

RDEPEND="
	dev-libs/glib:2
	dev-libs/gmp
	dev-libs/mpfr
	dev-libs/popt
	sys-libs/ncurses
	sys-libs/readline
	gnome? (
		app-text/scrollkeeper
		app-text/gnome-doc-utils
		x11-libs/gtk+:2
		gnome-base/libgnome
		gnome-base/libgnomeui
		gnome-base/libglade:2.0
		x11-libs/gtksourceview:2.0
		x11-libs/vte:0 )"
DEPEND="${RDEPEND}
	dev-util/intltool
	|| ( sys-devel/bison dev-util/yacc )
	sys-devel/flex
	nls? ( sys-devel/gettext )"

src_prepare() {
	if ! use gnome
	then	sed -i \
				-e "/GNOME_DOC_INIT/d" \
				configure.in
			sed -i \
				-e '/gnome-doc-utils\.make/d' \
				help/Makefile.am
			eautoreconf
	fi
	G2CONF="${G2CONF} $(use_enable gnome) $(use_enable nls) \
		--disable-update-mimedb --disable-scrollkeeper \
		--disable-extra-gcc-optimization"
	# gnome2.eclass adds --disable-gtk-doc or --enable-gtk-doc to G2CONF
	# if there is the USE flag doc, thus leading to QA warnings
	GCONF_DEBUG="no"
	DOCS="AUTHORS ChangeLog NEWS README TODO"
	USE_DESTDIR="1"
	gnome2_src_prepare
}

src_install() {
	use doc && DOCS+=" ${DISTDIR}/${PN}-reference.pdf"
	gnome2_src_install
}