dev-qt/qtx11extras: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / app-accessibility / julius / julius-4.2.2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Large Vocabulary Continuous Speech Recognition Engine"
9 HOMEPAGE="https://github.com/julius-speech/julius"
10 SRC_URI="mirror://sourceforge.jp/julius/56549/${P}.tar.gz"
11
12 LICENSE="julius"
13 SLOT="0"
14 KEYWORDS="amd64 x86"
15 IUSE="+alsa l10n_ja oss portaudio pulseaudio sndfile"
16 REQUIRED_USE="^^ ( alsa oss portaudio pulseaudio )"
17
18 RDEPEND="
19         dev-lang/perl
20         dev-perl/Jcode
21         sys-libs/readline:0
22         sys-libs/zlib
23         alsa? ( media-libs/alsa-lib )
24         portaudio? ( media-libs/portaudio )
25         pulseaudio? ( media-sound/pulseaudio )
26         sndfile? ( media-libs/libsndfile )"
27 DEPEND="${RDEPEND}
28         sys-devel/flex"
29
30 PATCHES=(
31         "${FILESDIR}"/${PN}-4.2.2-install.patch
32         "${FILESDIR}"/${PN}-4.2.2-ldflags.patch
33 )
34
35 pkg_setup() {
36         tc-export CC CXX
37 }
38
39 src_configure() {
40         local mymic i
41         for i in alsa oss portaudio pulseaudio ; do
42                 use ${i} && mymic=${i}
43         done
44
45         econf \
46                 --with-mictype=${mymic} \
47                 $(use_with sndfile)
48 }
49
50 src_install() {
51         default
52         if ! use l10n_ja ; then
53                 rm -r "${ED}"/usr/share/man/ja || die
54         fi
55 }
56
57 pkg_postinst() {
58         eerror "IMPORTANT NOTICE"
59         elog "/usr/bin/jcontrol has been renamed to /usr/bin/jucontrol"
60         elog "to avoid file collision with dev-java/java-config."
61         elog "If this creates a problem with applications, file a gentoo bug."
62 }