summaryrefslogtreecommitdiff
blob: 90da48e0a88dea1ce6db24a8f0bb3400d6f22bc3 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-accessibility/sphinxbase/sphinxbase-0.7.ebuild,v 1.2 2012/01/12 16:33:37 mgorny Exp $

EAPI=3
PYTHON_DEPEND="python? 2:2.6"
SUPPORT_PYTHON_ABIS="1"

inherit autotools-utils python

DESCRIPTION="Support library required by the Sphinx Speech Recognition Engine"
HOMEPAGE="http://cmusphinx.sourceforge.net/"
SRC_URI="mirror://sourceforge/cmusphinx/${P}.tar.gz"

LICENSE="BSD as-is"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc lapack python static-libs"

RDEPEND="lapack? ( virtual/lapack )"
DEPEND="${RDEPEND}
		doc? ( >=app-doc/doxygen-1.4.7 )"

RESTRICT_PYTHON_ABIS="3*"

# Due to generated Python setup.py.
AUTOTOOLS_IN_SOURCE_BUILD=1

src_configure() {
	local myeconfargs=(
		$( use_with lapack )
		# python modules are built through distutils
		# so disable the ugly wrapper
		--without-python
	)

	autotools-utils_src_configure
}

src_compile() {
	autotools-utils_src_compile

	if use python; then
		python_copy_sources python

		building() {
			emake PYTHON="$(PYTHON)" PYTHON_INCLUDEDIR="$(python_get_includedir)" PYTHON_LIBDIR="$(python_get_libdir)"
		}

		python_execute_function -s --source-dir python building
	fi
}

src_install() {
	autotools-utils_src_install

	if use python; then
		python_execute_function -s --source-dir python -d
	fi

	if use doc; then
		dohtml doc/html/*
	fi
}