--- a/sphinxbase-0.8.ebuild +++ b/sphinxbase-0.8.ebuild @@ -1,79 +1,79 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ +# $Header: $ EAPI=5 -PYTHON_COMPAT=( python2_7 ) -DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python2_7 python3_4 ) AUTOTOOLS_AUTORECONF=1 +AUTOTOOLS_IN_SOURCE_BUILD=1 +WANT_AUTOMAKE="1.12" -inherit autotools-utils distutils-r1 +inherit autotools-utils python-single-r1 DESCRIPTION="Support library required by the Sphinx Speech Recognition Engine" HOMEPAGE="http://cmusphinx.sourceforge.net/" -SRC_URI="mirror://sourceforge/cmusphinx/${P}.tar.gz" +case ${PV} in +9999) + EGIT_REPO_URI="git://github.com/cmusphinx/sphinxbase.git" + inherit git-r3 + ;; +*) + SRC_URI="mirror://sourceforge/cmusphinx/${P}.tar.gz" + KEYWORDS="~amd64 ~x86 ~arm" + ;; +esac LICENSE="BSD-2 HPND MIT" SLOT="0" -KEYWORDS="amd64 x86" -IUSE="doc lapack python static-libs" +IUSE="alsa doc jack lapack +pulseaudio oss python static-libs" +DOCS=( README AUTHORS NEWS ) # automagic dep on pulseaudio RDEPEND=" - media-sound/pulseaudio + pulseaudio? ( media-sound/pulseaudio ) lapack? ( virtual/lapack ) python? ( ${PYTHON_DEPS} )" DEPEND="${RDEPEND} doc? ( >=app-doc/doxygen-1.4.7 )" -# Due to generated Python setup.py. -AUTOTOOLS_IN_SOURCE_BUILD=1 +REQUIRED_USE="( ^^ ( pulseaudio jack alsa oss ) )" -PATCHES=( - "${FILESDIR}"/${P}-unbundle-lapack.patch - "${FILESDIR}"/${P}-automake113.patch -) +src_prepare() { + if ! use pulseaudio ; then + local line="167" -src_configure() { - local myeconfargs=( - $(use_with lapack) - $(use_enable doc) - # python modules are built through distutils - # so disable the ugly wrapper - --without-python - ) - autotools-utils_src_configure -} + sed -i '184d' configure.in -run_distutils() { - if use python; then - pushd python > /dev/null || die - distutils-r1_"${@}" - popd > /dev/null || die - fi -} + if ! use jack ; then + sed -i '184d' configure.in || die + line="173" + fi -src_compile() { - autotools-utils_src_compile + if ! use alsa ; then + sed -i '184d' configure.in || die + line="179" + fi - run_distutils ${FUNCNAME} -} + sed -i "160,${line}d" configure.in -python_test() { - LD_LIBRARY_PATH="${S}"/src/lib${PN}/.libs \ - "${PYTHON}" sb_test.py || die "Tests fail with ${EPYTHON}" + eautoreconf + fi } -src_test() { - autotools-utils_src_test +pkg_setup() { + use python && python-single-r1_pkg_setup +} - run_distutils ${FUNCNAME} +src_configure() { + local myeconfargs=( + $(use_with lapack) + $(use_with python) + ) + autotools-utils_src_configure } src_install() { - run_distutils ${FUNCNAME} - use doc && local HTML_DOCS=( doc/html/. ) autotools-utils_src_install }