summaryrefslogtreecommitdiff
blob: b26cdb8dfc2c6cc00b8a38d9e4bae503ea6d482a (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
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit toolchain-funcs

DESCRIPTION="Large Vocabulary Continuous Speech Recognition Engine"
HOMEPAGE="https://github.com/julius-speech/julius"
SRC_URI="mirror://sourceforge.jp/julius/56549/${P}.tar.gz"

LICENSE="julius"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="+alsa l10n_ja oss portaudio pulseaudio sndfile"
REQUIRED_USE="^^ ( alsa oss portaudio pulseaudio )"

RDEPEND="
	dev-lang/perl
	dev-perl/Jcode
	sys-libs/readline:0
	sys-libs/zlib
	alsa? ( media-libs/alsa-lib )
	portaudio? ( media-libs/portaudio )
	pulseaudio? ( media-sound/pulseaudio )
	sndfile? ( media-libs/libsndfile )"
DEPEND="${RDEPEND}
	sys-devel/flex"

PATCHES=(
	"${FILESDIR}"/${PN}-4.2.2-install.patch
	"${FILESDIR}"/${PN}-4.2.2-ldflags.patch
)

pkg_setup() {
	tc-export CC CXX
}

src_configure() {
	local mymic i
	for i in alsa oss portaudio pulseaudio ; do
		use ${i} && mymic=${i}
	done

	econf \
		--with-mictype=${mymic} \
		$(use_with sndfile)
}

src_install() {
	default
	if ! use l10n_ja ; then
		rm -r "${ED}"/usr/share/man/ja || die
	fi
}

pkg_postinst() {
	eerror "IMPORTANT NOTICE"
	elog "/usr/bin/jcontrol has been renamed to /usr/bin/jucontrol"
	elog "to avoid file collision with dev-java/java-config."
	elog "If this creates a problem with applications, file a gentoo bug."
}