Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 476424 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-44 / +44 lines)
Line  Link Here
0
-- a/sphinxbase-0.8.ebuild
0
++ b/sphinxbase-0.8.ebuild
Lines 1-79 Link Here
1
# Copyright 1999-2015 Gentoo Foundation
1
# Copyright 1999-2015 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Id$
3
# $Header: $
4
4
5
EAPI=5
5
EAPI=5
6
6
7
PYTHON_COMPAT=( python2_7 )
7
PYTHON_COMPAT=( python2_7 python3_4 )
8
DISTUTILS_OPTIONAL=1
9
AUTOTOOLS_AUTORECONF=1
8
AUTOTOOLS_AUTORECONF=1
9
AUTOTOOLS_IN_SOURCE_BUILD=1
10
WANT_AUTOMAKE="1.12"
10
11
11
inherit autotools-utils distutils-r1
12
inherit autotools-utils python-single-r1
12
13
13
DESCRIPTION="Support library required by the Sphinx Speech Recognition Engine"
14
DESCRIPTION="Support library required by the Sphinx Speech Recognition Engine"
14
HOMEPAGE="http://cmusphinx.sourceforge.net/"
15
HOMEPAGE="http://cmusphinx.sourceforge.net/"
15
SRC_URI="mirror://sourceforge/cmusphinx/${P}.tar.gz"
16
case ${PV} in
17
9999)
18
	EGIT_REPO_URI="git://github.com/cmusphinx/sphinxbase.git"
19
	inherit git-r3
20
	;;
21
*)
22
	SRC_URI="mirror://sourceforge/cmusphinx/${P}.tar.gz"
23
	KEYWORDS="~amd64 ~x86 ~arm"
24
	;;
25
esac
16
26
17
LICENSE="BSD-2 HPND MIT"
27
LICENSE="BSD-2 HPND MIT"
18
SLOT="0"
28
SLOT="0"
19
KEYWORDS="amd64 x86"
29
IUSE="alsa doc jack lapack +pulseaudio oss python static-libs"
20
IUSE="doc lapack python static-libs"
30
DOCS=( README AUTHORS NEWS )
21
31
22
# automagic dep on pulseaudio
32
# automagic dep on pulseaudio
23
RDEPEND="
33
RDEPEND="
24
	media-sound/pulseaudio
34
	pulseaudio? ( media-sound/pulseaudio )
25
	lapack? ( virtual/lapack )
35
	lapack? ( virtual/lapack )
26
	python? ( ${PYTHON_DEPS} )"
36
	python? ( ${PYTHON_DEPS} )"
27
DEPEND="${RDEPEND}
37
DEPEND="${RDEPEND}
28
	doc? ( >=app-doc/doxygen-1.4.7 )"
38
	doc? ( >=app-doc/doxygen-1.4.7 )"
29
39
30
# Due to generated Python setup.py.
40
REQUIRED_USE="( ^^ ( pulseaudio jack alsa oss ) )"
31
AUTOTOOLS_IN_SOURCE_BUILD=1
32
41
33
PATCHES=(
42
src_prepare() {
34
	"${FILESDIR}"/${P}-unbundle-lapack.patch
43
        if ! use pulseaudio ; then
35
	"${FILESDIR}"/${P}-automake113.patch
44
                local line="167"
36
)
37
45
38
src_configure() {
46
                sed -i '184d' configure.in
39
	local myeconfargs=(
40
		$(use_with lapack)
41
		$(use_enable doc)
42
		# python modules are built through distutils
43
		# so disable the ugly wrapper
44
		--without-python
45
	)
46
	autotools-utils_src_configure
47
}
48
47
49
run_distutils() {
48
                if ! use jack ; then
50
	if use python; then
49
                        sed -i '184d' configure.in || die
51
		pushd python > /dev/null || die
50
                        line="173"
52
		distutils-r1_"${@}"
51
                fi
53
		popd > /dev/null || die
54
	fi
55
}
56
52
57
src_compile() {
53
                if ! use alsa ; then
58
	autotools-utils_src_compile
54
                        sed -i '184d' configure.in || die
55
                        line="179"
56
                fi
59
57
60
	run_distutils ${FUNCNAME}
58
                sed -i "160,${line}d" configure.in
61
}
62
59
63
python_test() {
60
                eautoreconf
64
	LD_LIBRARY_PATH="${S}"/src/lib${PN}/.libs \
61
        fi
65
		"${PYTHON}" sb_test.py || die "Tests fail with ${EPYTHON}"
66
}
62
}
67
63
68
src_test() {
64
pkg_setup() {
69
	autotools-utils_src_test
65
	use python && python-single-r1_pkg_setup
66
}
70
67
71
	run_distutils ${FUNCNAME}
68
src_configure() {
69
	local myeconfargs=(
70
		$(use_with lapack)
71
		$(use_with python)
72
	)
73
	autotools-utils_src_configure
72
}
74
}
73
75
74
src_install() {
76
src_install() {
75
	run_distutils ${FUNCNAME}
76
77
	use doc && local HTML_DOCS=( doc/html/. )
77
	use doc && local HTML_DOCS=( doc/html/. )
78
	autotools-utils_src_install
78
	autotools-utils_src_install
79
}
79
}

Return to bug 476424