diff options
author | Christoph Junghans <christoph.junghans@gmail.com> | 2015-01-13 17:01:34 -0700 |
---|---|---|
committer | Christoph Junghans <christoph.junghans@gmail.com> | 2015-01-13 17:01:34 -0700 |
commit | 5a27001c95a180702164a00d1dc80c8164fc7d86 (patch) | |
tree | 11ce695cbfbc55addf2a382a49cf575190cb5bfc /sci-misc/kaldi/kaldi-0_p20150101.ebuild | |
parent | Merge pull request #336 from marbre/mendeleydesktop (diff) | |
parent | sci-misc/kaldi: Comment about special case with upstream configure script (diff) | |
download | sci-5a27001c95a180702164a00d1dc80c8164fc7d86.tar.gz sci-5a27001c95a180702164a00d1dc80c8164fc7d86.tar.bz2 sci-5a27001c95a180702164a00d1dc80c8164fc7d86.zip |
Merge pull request #332 from akreal/kaldi
sci-misc/kaldi: New package
Diffstat (limited to 'sci-misc/kaldi/kaldi-0_p20150101.ebuild')
-rw-r--r-- | sci-misc/kaldi/kaldi-0_p20150101.ebuild | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/sci-misc/kaldi/kaldi-0_p20150101.ebuild b/sci-misc/kaldi/kaldi-0_p20150101.ebuild new file mode 100644 index 000000000..9ef57039e --- /dev/null +++ b/sci-misc/kaldi/kaldi-0_p20150101.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="5" + +inherit eutils flag-o-matic subversion + +DESCRIPTION="A toolkit for speech recognition" +HOMEPAGE="http://kaldi.sourceforge.net/" +ESVN_REPO_URI="https://svn.code.sf.net/p/kaldi/code/trunk/src@4735" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="doc test threads" +KEYWORDS="" + +RDEPEND=" + media-libs/speex + sci-libs/atlas[lapack,threads=] + ~sci-misc/openfst-1.3.4" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen )" + +src_prepare() { + epatch \ + "${FILESDIR}"/configure.patch \ + "${FILESDIR}"/Makefile.patch \ + "${FILESDIR}"/default_rules.mk.patch +} + +src_configure() { + # Upstream's configure script is "hand-generated" and not autotools compatible, + # for this reason econf can not be used + ./configure \ + --shared \ + --fst-root="${EPREFIX}/usr" \ + $(use threads && echo --threaded-atlas=yes) \ + --atlas-root="${EPREFIX}/usr/include/atlas" || die "failed to run configure" + + use test || append-cxxflags -DNDEBUG + + sed -i \ + -e 's/OPENFST_VER =/OPENFST_VER = 1.3.4#/' \ + -e "s:-g :-DHAVE_SPEEX ${CXXFLAGS} :" \ + -e "s:-lm -lpthread -ldl:-lm -lpthread -ldl -lspeex ${LDFLAGS}:" \ + kaldi.mk || die "sed unix/kaldi.mk failed" +} + +src_compile() { + emake + use doc && doxygen +} + +src_install() { + dolib.so $(make print-libfiles) + dobin $(make print-binfiles) + use doc && dohtml -r html/* +} |