Update pocketsphinx to 5.0.0
* Remove no longer required base package * Do not include Python module anymore; it is not built by default by the upsteam build script anymore (only if CMake variable SKBUILD is set) and thus supposedly designed to be distributed in a separate package; this makes also sense at it avoids rebuilding the C library on every minor Python release * Rebuild subtitlecomposer; however, at this point this means its speech plugin will not be available anymore as even the detection of the library does not work: ``` -- Could NOT find PocketSphinx (missing: POCKETSPHINX_INCLUDE_DIR) (found suitable version "5.0.0", minimum required is "5") -- Have NOT Found PocketSphinx - Speech plugin will not be built ```
This commit is contained in:
parent
193752b02f
commit
01b3ceea72
|
@ -3,37 +3,28 @@
|
|||
# Contributor: Ben Duffield <bavardage AT archlinux.us>
|
||||
|
||||
pkgname=pocketsphinx
|
||||
pkgver=5prealpha
|
||||
pkgrel=13
|
||||
pkgdesc='Lightweight speech recognition engine'
|
||||
pkgver=5.0.0
|
||||
pkgrel=1
|
||||
pkgdesc='A small speech recognizer'
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://cmusphinx.sourceforge.net'
|
||||
license=('BSD')
|
||||
makedepends=('swig' 'python')
|
||||
depends=('sphinxbase=5prealpha' 'gst-plugins-base-libs')
|
||||
source=("https://downloads.sourceforge.net/cmusphinx/$pkgname-$pkgver.tar.gz")
|
||||
sha256sums=('ef5bb5547e2712bdf571f256490ef42a47962033892efd9d7df8eed7fe573ed9')
|
||||
options=('!libtool')
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
echo "Reconfiguring project for current version of Automake"
|
||||
autoreconf -ivf > /dev/null
|
||||
}
|
||||
url='https://cmusphinx.github.io'
|
||||
license=('custom')
|
||||
makedepends=('cmake' 'ninja' 'gst-plugins-base-libs')
|
||||
optdepends=('gst-plugins-base-libs: GStreamer plugin')
|
||||
source=("https://github.com/cmusphinx/pocketsphinx/archive/refs/tags/v$pkgver.tar.gz")
|
||||
sha256sums=('78ffe5b60b6981b08667435dd26c5a179b612b8ca372bd9c23c896a8b2239a20')
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
export PYTHON=/usr/bin/python PYTHONWARNINGS=ignore
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DBUILD_GSTREAMER=ON
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
make DESTDIR="$pkgdir" install
|
||||
DESTDIR=${pkgdir} cmake --build build --target install
|
||||
|
||||
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
install -D -m644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
# Maintainer: Martchus <martchus@gmx.net>
|
||||
# Contributor: Marco Pompili <aur AT emarcs DOT org>
|
||||
# Contributor: Giorgio Gilestro crocowhile@gmail.com
|
||||
# Contributor: Mladen Milinkovic <maxrd2@smoothware.net>
|
||||
|
||||
pkgname=sphinxbase
|
||||
pkgver=5prealpha
|
||||
pkgrel=13
|
||||
pkgdesc='Common library for sphinx speech recognition'
|
||||
url='https://cmusphinx.sourceforge.net/'
|
||||
arch=('i686' 'x86_64')
|
||||
license=('BSD')
|
||||
makedepends=('bison' 'swig')
|
||||
depends=('python' 'lapack' 'libpulse') # not sure if libsamplerate is needed 'libsamplerate'
|
||||
source=("http://downloads.sourceforge.net/project/cmusphinx/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"
|
||||
"sphinxbase-5prealpha-fix-doxy2swig.patch")
|
||||
|
||||
sha256sums=('f72bdb59e50b558bed47cc2105777200d2b246a0f328e913de16a9b22f9a246f'
|
||||
'1cb485202f83dc517872f5ab41f59d18884af1b85799166d80e08860f7729919')
|
||||
options=('!libtool')
|
||||
|
||||
prepare() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
|
||||
patch -p1 -b -i ../sphinxbase-5prealpha-fix-doxy2swig.patch
|
||||
|
||||
echo "Reconfiguring project for current version of Automake"
|
||||
autoreconf -ivf > /dev/null
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
|
||||
export PYTHON=/usr/bin/python PYTHONWARNINGS=ignore
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
|
||||
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
install -m644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" \
|
||||
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
}
|
|
@ -1,141 +0,0 @@
|
|||
From e0221880ccdd79ed9bf42937a56a4c319b013576 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
Date: Thu, 11 Nov 2021 21:06:59 +0100
|
||||
Subject: [PATCH] Update ax_python_devel.m4
|
||||
|
||||
Notably python3.10's distutils emits a warning when getting imported.
|
||||
This was making the old ax_python_devel.m4 fail.
|
||||
---
|
||||
m4/ax_python_devel.m4 | 37 ++++++++++++++++++++-----------------
|
||||
1 file changed, 20 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4
|
||||
index 59a2ff09..44dbd83e 100644
|
||||
--- a/m4/ax_python_devel.m4
|
||||
+++ b/m4/ax_python_devel.m4
|
||||
@@ -1,5 +1,5 @@
|
||||
# ===========================================================================
|
||||
-# http://www.gnu.org/software/autoconf-archive/ax_python_devel.html
|
||||
+# https://www.gnu.org/software/autoconf-archive/ax_python_devel.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
@@ -12,8 +12,8 @@
|
||||
# in your configure.ac.
|
||||
#
|
||||
# This macro checks for Python and tries to get the include path to
|
||||
-# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS)
|
||||
-# output variables. It also exports $(PYTHON_EXTRA_LIBS) and
|
||||
+# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output
|
||||
+# variables. It also exports $(PYTHON_EXTRA_LIBS) and
|
||||
# $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code.
|
||||
#
|
||||
# You can search for some particular version of Python by passing a
|
||||
@@ -52,7 +52,7 @@
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
-# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+# with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
@@ -67,7 +67,7 @@
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
-#serial 17
|
||||
+#serial 21
|
||||
|
||||
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
|
||||
AC_DEFUN([AX_PYTHON_DEVEL],[
|
||||
@@ -99,7 +99,7 @@ AC_DEFUN([AX_PYTHON_DEVEL],[
|
||||
This version of the AC@&t@_PYTHON_DEVEL macro
|
||||
doesn't work properly with versions of Python before
|
||||
2.1.0. You may need to re-run configure, setting the
|
||||
-variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
|
||||
+variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG,
|
||||
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
|
||||
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
|
||||
to something else than an empty string.
|
||||
@@ -137,7 +137,7 @@ variable to configure. See ``configure --help'' for reference.
|
||||
#
|
||||
AC_MSG_CHECKING([for the distutils Python package])
|
||||
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||
- if test -z "$ac_distutils_result"; then
|
||||
+ if test $? -eq 0; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
@@ -172,7 +172,7 @@ $ac_distutils_result])
|
||||
# Check for Python library path
|
||||
#
|
||||
AC_MSG_CHECKING([for Python library path])
|
||||
- if test -z "$PYTHON_LDFLAGS"; then
|
||||
+ if test -z "$PYTHON_LIBS"; then
|
||||
# (makes two attempts to ensure we've got a version number
|
||||
# from the interpreter)
|
||||
ac_python_version=`cat<<EOD | $PYTHON -
|
||||
@@ -227,25 +227,25 @@ EOD`
|
||||
then
|
||||
# use the official shared library
|
||||
ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
|
||||
- PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
|
||||
+ PYTHON_LIBS="-L$ac_python_libdir -l$ac_python_library"
|
||||
else
|
||||
# old way: use libpython from python_configdir
|
||||
ac_python_libdir=`$PYTHON -c \
|
||||
"from distutils.sysconfig import get_python_lib as f; \
|
||||
import os; \
|
||||
print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
|
||||
- PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
|
||||
+ PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
|
||||
fi
|
||||
|
||||
- if test -z "PYTHON_LDFLAGS"; then
|
||||
+ if test -z "PYTHON_LIBS"; then
|
||||
AC_MSG_ERROR([
|
||||
Cannot determine location of your Python DSO. Please check it was installed with
|
||||
- dynamic libraries enabled, or try setting PYTHON_LDFLAGS by hand.
|
||||
+ dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
|
||||
])
|
||||
fi
|
||||
fi
|
||||
- AC_MSG_RESULT([$PYTHON_LDFLAGS])
|
||||
- AC_SUBST([PYTHON_LDFLAGS])
|
||||
+ AC_MSG_RESULT([$PYTHON_LIBS])
|
||||
+ AC_SUBST([PYTHON_LIBS])
|
||||
|
||||
#
|
||||
# Check for site packages
|
||||
@@ -288,8 +288,10 @@ EOD`
|
||||
AC_MSG_CHECKING([consistency of all components of python development environment])
|
||||
# save current global flags
|
||||
ac_save_LIBS="$LIBS"
|
||||
+ ac_save_LDFLAGS="$LDFLAGS"
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
- LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS"
|
||||
+ LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS"
|
||||
+ LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
|
||||
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
|
||||
AC_LANG_PUSH([C])
|
||||
AC_LINK_IFELSE([
|
||||
@@ -300,6 +302,7 @@ EOD`
|
||||
# turn back to default flags
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
+ LDFLAGS="$ac_save_LDFLAGS"
|
||||
|
||||
AC_MSG_RESULT([$pythonexists])
|
||||
|
||||
@@ -307,8 +310,8 @@ EOD`
|
||||
AC_MSG_FAILURE([
|
||||
Could not link test program to Python. Maybe the main Python library has been
|
||||
installed in some non-standard library path. If so, pass it to configure,
|
||||
- via the LDFLAGS environment variable.
|
||||
- Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
|
||||
+ via the LIBS environment variable.
|
||||
+ Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
|
||||
============================================================================
|
||||
ERROR!
|
||||
You probably have to install the development version of the Python package
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/doc/doxy2swig.py b/doc/doxy2swig.py
|
||||
index 5589b0d..a01c4b1 100644
|
||||
--- a/doc/doxy2swig.py
|
||||
+++ b/doc/doxy2swig.py
|
||||
@@ -299,7 +299,10 @@ class Doxy2SWIG:
|
||||
name = first['name'].firstChild.data
|
||||
|
||||
for n in node.getElementsByTagName('param'):
|
||||
- arg_type = n.getElementsByTagName('type')[0]
|
||||
+ elts = n.getElementsByTagName('type')
|
||||
+ if len(elts) == 0:
|
||||
+ continue
|
||||
+ arg_type = elts[0]
|
||||
ref = self.get_specific_nodes(arg_type, ('ref'))
|
||||
if 'ref' in ref:
|
||||
type_name = ref['ref'].firstChild.data
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
pkgname=subtitlecomposer
|
||||
pkgver=0.7.1
|
||||
pkgrel=4
|
||||
pkgrel=5
|
||||
pkgdesc='Video subtitle editor'
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://invent.kde.org/multimedia/${_name}"
|
||||
|
@ -18,12 +18,19 @@ makedepends=('extra-cmake-modules' 'jack' 'blas' 'xorg-server-xvfb')
|
|||
|
||||
# Comment/uncomment the following dependency to disable/enable
|
||||
# building the pocketsphinx plugin
|
||||
makedepends+=('pocketsphinx')
|
||||
# Currently commented-out by default as the library is not even detected as of the 5.0.0 release:
|
||||
# ```
|
||||
# -- Could NOT find PocketSphinx (missing: POCKETSPHINX_INCLUDE_DIR) (found suitable version "5.0.0", minimum required is "5")
|
||||
# -- Have NOT Found PocketSphinx - Speech plugin will not be built
|
||||
# ```
|
||||
#makedepends+=('pocketsphinx')
|
||||
|
||||
# For consistency, also enable/disable the corresponding optdepends
|
||||
optdepends=('pocketsphinx: Pocketsphinx speech recognition backend'
|
||||
'ruby: scripting'
|
||||
'python: scripting')
|
||||
# 'pocketsphinx: Pocketsphinx speech recognition backend'
|
||||
optdepends=(
|
||||
'ruby: scripting'
|
||||
'python: scripting'
|
||||
)
|
||||
|
||||
_tar=${pkgname}-${pkgver}
|
||||
source=("https://download.kde.org/stable/${pkgname}/${_tar}.tar.xz"
|
||||
|
|
Loading…
Reference in New Issue