summaryrefslogtreecommitdiff
blob: 3592beb2aab104255f0f236bb5cdf51cf5a24b06 (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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-accessibility/gnome-speech/gnome-speech-0.4.25-r1.ebuild,v 1.5 2011/07/24 11:20:20 armin76 Exp $

EAPI="4"
GNOME_TARBALL_SUFFIX="bz2"

inherit gnome2 eutils

DESCRIPTION="Simple general API for producing text-to-speech output"
HOMEPAGE="http://www.gnome.org/"

LICENSE="LGPL-2"
SLOT="1"
KEYWORDS="~alpha amd64 ia64 ~ppc ~ppc64 sparc x86 ~x86-fbsd"
IUSE="+espeak festival"

COMMON_DEPEND=">=gnome-base/orbit-2.3.94
	>=gnome-base/libbonobo-1.97
	>=dev-libs/glib-2:2
	espeak? ( app-accessibility/espeak )"

RDEPEND="$COMMON_DEPEND
	festival? ( app-accessibility/festival )"

DEPEND="$COMMON_DEPEND
	>=dev-util/pkgconfig-0.9"

pkg_setup() {
	DOCS="AUTHORS ChangeLog NEWS README"
	G2CONF="${G2CONF} $(use_with festival) --with-speech-dispatcher"

	if ! use espeak; then
		 G2CONF="${G2CONF} --without-espeak-dir"
	fi

	# We don't want java support at all as configure is broken and nothing needs it
	export JAVAC=no
}

src_prepare() {
	gnome2_src_prepare

	epatch "${FILESDIR}/${P}-disable-java.patch"

	sed -i \
		-e 's:\(GNOME_SPEECH_JAR_DIR=\).*:\1"/usr/share/java-access-bridge/lib/":' \
		-e 's:\(FREETTS_DRIVER_JAR_DIR=\).*:\1"/usr/share/java-access-bridge/lib/":' \
		"${S}"/configure
}