summaryrefslogtreecommitdiff
path: root/app-accessibility/sphinxbase
diff options
context:
space:
mode:
Diffstat (limited to 'app-accessibility/sphinxbase')
-rw-r--r--app-accessibility/sphinxbase/Manifest5
-rw-r--r--app-accessibility/sphinxbase/files/sphinxbase-0.8-automake113.patch25
-rw-r--r--app-accessibility/sphinxbase/files/sphinxbase-0.8-unbundle-lapack.patch85
-rw-r--r--app-accessibility/sphinxbase/metadata.xml11
-rw-r--r--app-accessibility/sphinxbase/sphinxbase-0.8.ebuild79
5 files changed, 205 insertions, 0 deletions
diff --git a/app-accessibility/sphinxbase/Manifest b/app-accessibility/sphinxbase/Manifest
new file mode 100644
index 000000000000..0d01bd8029ed
--- /dev/null
+++ b/app-accessibility/sphinxbase/Manifest
@@ -0,0 +1,5 @@
+AUX sphinxbase-0.8-automake113.patch 844 BLAKE2B eec1859c0284ac982cb27b296d79c4d42600f43c0cfe1105ceabf2c3468f5ead4330cf055d17959dabf5c0ca3a143bbbda4076ef311c57992b4156da5f3f5c17 SHA512 3275705839ce5d720e2f0914998ad8709e2199ae00852555c89691897499b4ea2dfcd9943213bd3d62472e7d73c6cc8a9ba2cf9315f4e0c2b3023b9adca01787
+AUX sphinxbase-0.8-unbundle-lapack.patch 2838 BLAKE2B 3191a63a888c4147105d206dc78921fd462697d8405fddffc5f2ddbc6f1c8328e65189dadd6ff7a8d282fd6047f9118205904bd010d2745bfcb1c1d0b6a2635c SHA512 65fe50fb11851848d0ae9ad17b4839953c1bebb027b91c42dc347c7e714ddea5f2a3131e2e243ba0ff771501c074a5d9850cef44b848d0feae90c764daa59447
+DIST sphinxbase-0.8.tar.gz 3313197 BLAKE2B ec2dcd232194d32d851924099ffb64fa9da6bdccb973fe1311d2b4b0506073cfd35b548ba8d8f64c2ee757f3b5ba87ae23c95d0f67c95be1110b7e2a995c9be2 SHA512 fdb13c07e591e868c395d5f8209ec389fb9d5a93d99104a00cb82382e84d320091ae7e74d53225706331d4959ab5e248fa622582a148bfdb6ab5c38470d1963c
+EBUILD sphinxbase-0.8.ebuild 1614 BLAKE2B 9ce3250b173fada5e927918af7aea7e1d036fc848ca487d1932875941322ad6960375039b14b7866cbe8609fc8aa8c181fd53b2e5580ebf72bc8892c4a3376d6 SHA512 73652225a2391c08e925714b6bbdc320268e96ab71a137844855e0158f83b1c6458fa3c4fb14a715d4f34213485e220d3f6778dcd38d1c4201e3d582ac799b9e
+MISC metadata.xml 358 BLAKE2B 3be69151b1f892ba756462711924daa29e845b15c1033680e1d9a1ad43db0bb4457397a544c0f87728e94c3b1a2e7516451e84d185fbcf2ce8754cdeed9c1eb0 SHA512 f9dee1e233aa868e4b33adb73c09b58f97a17e6844723222f1bcd1363eef669e769f12f188da17789abccc88cabb306eea6f40e31ba36e4569e4f24bfbde2421
diff --git a/app-accessibility/sphinxbase/files/sphinxbase-0.8-automake113.patch b/app-accessibility/sphinxbase/files/sphinxbase-0.8-automake113.patch
new file mode 100644
index 000000000000..11031918ee68
--- /dev/null
+++ b/app-accessibility/sphinxbase/files/sphinxbase-0.8-automake113.patch
@@ -0,0 +1,25 @@
+diff -Naur sphinxbase-0.8/test/regression/Makefile.am sphinxbase-0.8.new/test/regression/Makefile.am
+--- sphinxbase-0.8/test/regression/Makefile.am 2012-12-05 06:05:39.000000000 -0800
++++ sphinxbase-0.8.new/test/regression/Makefile.am 2013-10-08 13:05:15.498853962 -0700
+@@ -33,9 +33,19 @@
+
+ # Disable sphinx_fe tests for now if fixed-point due to imprecision
+ if FIXED_POINT
+-TESTS = $(srcdir)/test-cepview.sh $(srcdir)/test-sphinx_pitch.sh
++TESTS = test-cepview.sh test-sphinx_pitch.sh
+ else
+-TESTS = $(srcdir)/test-*.sh
++TESTS = \
++ test-cepview.sh \
++ test-sphinx_fe-ctl.sh \
++ test-sphinx_fe-dct.sh \
++ test-sphinx_fe-dither-seed.sh \
++ test-sphinx_fe-logspec2cep.sh \
++ test-sphinx_fe-logspec.sh \
++ test-sphinx_fe.sh \
++ test-sphinx_fe-smoothspec.sh \
++ test-sphinx_jsgf2fsg.sh \
++ test-sphinx_pitch.sh
+ endif
+
+ EXTRA_DIST += $(TESTS)
diff --git a/app-accessibility/sphinxbase/files/sphinxbase-0.8-unbundle-lapack.patch b/app-accessibility/sphinxbase/files/sphinxbase-0.8-unbundle-lapack.patch
new file mode 100644
index 000000000000..70beae05de7e
--- /dev/null
+++ b/app-accessibility/sphinxbase/files/sphinxbase-0.8-unbundle-lapack.patch
@@ -0,0 +1,85 @@
+ configure.in | 40 +++++++++++++++++++++-------------------
+ src/libsphinxbase/Makefile.am | 1 +
+ 2 files changed, 22 insertions(+), 19 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index e10629c..b5d6ea9 100644
+--- a/configure.in
++++ b/configure.in
+@@ -62,13 +62,15 @@ if test x$withval = xno; then
+ use_lapack=false
+ fi
+ ])
+-if test x$use_lapack = xtrue; then
+- AC_CHECK_LIB(lapack, sgesv_,,use_internal_lapack=true)
+- if test x$use_internal_lapack != xtrue; then
+- AC_CHECK_LIB(blas, sgemm_,,use_internal_lapack=true)
+- fi
++AS_IF([test "x$with_lapack" = "xyes"], [
++ PKG_CHECK_MODULES([LAPACK], [lapack],,
++ AC_CHECK_LIB(lapack, sgesv_,,use_internal_lapack=true))
++ AS_IF([test "x$use_internal_lapack" != "xtrue"], [
++ PKG_CHECK_MODULES([BLAS], [blas],,
++ AC_CHECK_LIB(blas, sgemm_,,use_internal_lapack=true))
++ ])
+ AC_DEFINE(WITH_LAPACK, [], [Enable matrix algebra with LAPACK])
+-fi
++])
+ AM_CONDITIONAL(LAPACK_LITE, test x$use_internal_lapack = xtrue)
+ AM_CONDITIONAL(USE_LAPACK, test x$use_lapack = xtrue)
+
+@@ -208,9 +210,15 @@ AM_PROG_LIBTOOL
+ dnl
+ dnl Check for Doxygen, and build dox if present
+ dnl
+-AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, yes, no)
++AC_ARG_ENABLE([doc],
++ AS_HELP_STRING([--enable-doc], [Build docs using doxygen]))
++AS_IF([test "x$enable_doc" = "xyes"], [
++ AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, yes, no)
++ AS_IF([test "x$HAVE_DOXYGEN" != "xyes"], [
++ AC_MSG_ERROR([--enable-doc given, but doxygen not found.]); exit 1
++ ])
++])
+ AM_CONDITIONAL(BUILD_DOXYGEN, test "x$HAVE_DOXYGEN" = "xyes")
+-
+ dnl
+ dnl Check for Python, and build python module if present
+ dnl
+@@ -260,19 +268,13 @@ fi
+ AM_CONDITIONAL(BUILD_CYTHON, test "x$HAVE_CYTHON" = "xyes")
+
+ dnl
+-dnl Check for pkgconfig
+-dnl
+-AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
+-
+-dnl
+ dnl Check for libsndfile
+ dnl
+-if test "x$HAVE_PKGCONFIG" = "xyes"; then
+- PKG_CHECK_MODULES(SNDFILE,sndfile,,true)
+- AC_CHECK_HEADERS([sndfile.h])
+- PKG_CHECK_MODULES(SAMPLERATE,samplerate,,true)
+- AC_CHECK_HEADERS([samplerate.h])
+-fi
++PKG_CHECK_MODULES(SNDFILE,sndfile,,true)
++AC_CHECK_HEADERS([sndfile.h])
++PKG_CHECK_MODULES(SAMPLERATE,samplerate,,true)
++AC_CHECK_HEADERS([samplerate.h])
++
+ AC_SUBST(SNDFILE_LIBS)
+ AC_SUBST(SNDFILE_CFLAGS)
+ AC_SUBST(SAMPLERATE_LIBS)
+diff --git a/src/libsphinxbase/Makefile.am b/src/libsphinxbase/Makefile.am
+index 52ee3e1..f4efd8a 100644
+--- a/src/libsphinxbase/Makefile.am
++++ b/src/libsphinxbase/Makefile.am
+@@ -8,6 +8,7 @@ libsphinxbase_la_SOURCES =
+ # This is API version 2, software release 1, which also supports API version 1
+ libsphinxbase_la_LDFLAGS = -version-info 2:1:1
+ libsphinxbase_la_LIBADD = $(LTLIBICONV) \
++ @LAPACK_LIBS@ \
+ util/libsphinxutil.la \
+ fe/libsphinxfe.la \
+ feat/libsphinxfeat.la \
diff --git a/app-accessibility/sphinxbase/metadata.xml b/app-accessibility/sphinxbase/metadata.xml
new file mode 100644
index 000000000000..c381beacd5fe
--- /dev/null
+++ b/app-accessibility/sphinxbase/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>accessibility@gentoo.org</email>
+ <name>Gentoo Accessibility Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">cmusphinx</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-accessibility/sphinxbase/sphinxbase-0.8.ebuild b/app-accessibility/sphinxbase/sphinxbase-0.8.ebuild
new file mode 100644
index 000000000000..b52de17feda6
--- /dev/null
+++ b/app-accessibility/sphinxbase/sphinxbase-0.8.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils distutils-r1
+
+DESCRIPTION="Support library required by the Sphinx Speech Recognition Engine"
+HOMEPAGE="http://cmusphinx.sourceforge.net/"
+SRC_URI="mirror://sourceforge/cmusphinx/${P}.tar.gz"
+
+LICENSE="BSD-2 HPND MIT"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc lapack python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# automagic dep on pulseaudio
+RDEPEND="
+ 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
+
+PATCHES=(
+ "${FILESDIR}"/${P}-unbundle-lapack.patch
+ "${FILESDIR}"/${P}-automake113.patch
+)
+
+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
+}
+
+run_distutils() {
+ if use python; then
+ pushd python > /dev/null || die
+ distutils-r1_"${@}"
+ popd > /dev/null || die
+ fi
+}
+
+src_compile() {
+ autotools-utils_src_compile
+
+ run_distutils ${FUNCNAME}
+}
+
+python_test() {
+ LD_LIBRARY_PATH="${S}"/src/lib${PN}/.libs \
+ "${PYTHON}" sb_test.py || die "Tests fail with ${EPYTHON}"
+}
+
+src_test() {
+ autotools-utils_src_test
+
+ run_distutils ${FUNCNAME}
+}
+
+src_install() {
+ run_distutils ${FUNCNAME}
+
+ use doc && local HTML_DOCS=( doc/html/. )
+ autotools-utils_src_install
+}