summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2013-02-23 12:42:35 +0000
committerJustin Lecher <jlec@gentoo.org>2013-02-23 12:42:35 +0000
commitc168f541eaea3976a80e850ca2a80c1e82689454 (patch)
treebd95e79977afda35425a927e7a5d468854cf9269 /app-accessibility/sphinxbase
parentCleanup. (diff)
downloadgentoo-2-c168f541eaea3976a80e850ca2a80c1e82689454.tar.gz
gentoo-2-c168f541eaea3976a80e850ca2a80c1e82689454.tar.bz2
gentoo-2-c168f541eaea3976a80e850ca2a80c1e82689454.zip
app-accessibility/sphinxbase: Version BUmp, #451876; move to new python-r1 eclass; detect blas via pkg-config; only build docs with use doc (https://sourceforge.net/p/cmusphinx/patches/102/)
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 8009D6F070EB7916)
Diffstat (limited to 'app-accessibility/sphinxbase')
-rw-r--r--app-accessibility/sphinxbase/ChangeLog12
-rw-r--r--app-accessibility/sphinxbase/files/sphinxbase-0.8-unbundle-lapack.patch85
-rw-r--r--app-accessibility/sphinxbase/metadata.xml2
-rw-r--r--app-accessibility/sphinxbase/sphinxbase-0.8.ebuild75
4 files changed, 171 insertions, 3 deletions
diff --git a/app-accessibility/sphinxbase/ChangeLog b/app-accessibility/sphinxbase/ChangeLog
index 68824cc75b2e..07e0c1bc2416 100644
--- a/app-accessibility/sphinxbase/ChangeLog
+++ b/app-accessibility/sphinxbase/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-accessibility/sphinxbase
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-accessibility/sphinxbase/ChangeLog,v 1.4 2012/12/14 11:11:58 ulm Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-accessibility/sphinxbase/ChangeLog,v 1.5 2013/02/23 12:42:35 jlec Exp $
+
+*sphinxbase-0.8 (23 Feb 2013)
+
+ 23 Feb 2013; Justin Lecher <jlec@gentoo.org> +sphinxbase-0.8.ebuild,
+ +files/sphinxbase-0.8-unbundle-lapack.patch, metadata.xml:
+ Version BUmp, #451876; move to new python-r1 eclass; detect blas via
+ pkg-config; only build docs with use doc
+ (https://sourceforge.net/p/cmusphinx/patches/102/)
14 Dec 2012; Ulrich Müller <ulm@gentoo.org> sphinxbase-0.7.ebuild:
Fix LICENSE, see COPYING file, bug 445042.
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
index 72d214a2dedd..3a41b49fd724 100644
--- a/app-accessibility/sphinxbase/metadata.xml
+++ b/app-accessibility/sphinxbase/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>accessibility</herd>
+ <herd>accessibility</herd>
</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..adff92e60d84
--- /dev/null
+++ b/app-accessibility/sphinxbase/sphinxbase-0.8.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-accessibility/sphinxbase/sphinxbase-0.8.ebuild,v 1.1 2013/02/23 12:42:35 jlec Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_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"
+
+# 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 )
+
+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() {
+ "${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
+}