Drop Python 2 support from pocketsphinx

This commit is contained in:
Martchus 2021-09-10 17:01:58 +02:00
parent a0bf1ed226
commit dc65cf32ad
2 changed files with 14 additions and 47 deletions

View File

@ -1,15 +1,15 @@
# Maintainer: Marco Pompili <aur AT emarcs DOT org>
# Maintainer: Martchus <martchus@gmx.net>
# Contributor: Marco Pompili <aur AT emarcs DOT org>
# Contributor: Ben Duffield <bavardage AT archlinux.us>
# Contributor: Martchus <martchus@gmx.net>
pkgname=pocketsphinx
pkgver=5prealpha
pkgrel=11
pkgdesc='Lightweight speech recognition engine, specifically tuned for handheld and mobile devices, though it works equally well on the desktop.'
pkgrel=12
pkgdesc='Lightweight speech recognition engine'
arch=('i686' 'x86_64')
url='http://cmusphinx.sourceforge.net'
license=('BSD')
makedepends=('swig' 'python2' 'python')
makedepends=('swig' 'python')
depends=('sphinxbase=5prealpha' 'gst-plugins-base-libs')
source=("http://downloads.sourceforge.net/cmusphinx/$pkgname-$pkgver.tar.gz")
sha256sums=('ef5bb5547e2712bdf571f256490ef42a47962033892efd9d7df8eed7fe573ed9')
@ -20,36 +20,21 @@ prepare() {
msg2 "Reconfiguring project for current version of Automake"
autoreconf -ivf > /dev/null
cd ..
cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py2"
cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py3"
}
build() {
cd "$pkgname-$pkgver"
msg2 "Building python3 environment"
export PYTHON=/usr/bin/python
cd "$pkgname-$pkgver-py3"
./configure --prefix=/usr
make
msg2 "Building python2 environment"
cd "../$pkgname-$pkgver-py2"
export PYTHON=/usr/bin/python2
./configure --prefix=/usr
make
}
package() {
cd "$pkgname-$pkgver-py3"
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
cd "../$pkgname-$pkgver-py2/swig"
make DESTDIR="$pkgdir" install
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
install -D -m644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

View File

@ -1,17 +1,17 @@
# Maintainer: Marco Pompili <aur AT emarcs DOT org>
# Maintainer: Martchus <martchus@gmx.net>
# Contributor: Marco Pompili <aur AT emarcs DOT org>
# Contributor: Giorgio Gilestro crocowhile@gmail.com
# Contributor: Martchus <martchus@gmx.net>
# Contributor: Mladen Milinkovic <maxrd2@smoothware.net>
pkgname=sphinxbase
pkgver=5prealpha
pkgrel=11
pkgdesc='Common library for sphinx speech recognition.'
pkgrel=12
pkgdesc='Common library for sphinx speech recognition'
url='http://cmusphinx.sourceforge.net/'
arch=('i686' 'x86_64')
license=('BSD')
makedepends=('bison' 'swig')
depends=('python2' 'python' 'lapack' 'libpulse') # not sure if libsamplerate is needed 'libsamplerate'
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")
@ -25,36 +25,18 @@ prepare() {
msg2 "Reconfiguring project for current version of Automake"
autoreconf -ivf > /dev/null
patch -p1 -b -i ../sphinxbase-5prealpha-fix-doxy2swig.patch
cd ..
cp -R "${pkgname}-${pkgver}" "${pkgname}-${pkgver}-py2"
cp -R "${pkgname}-${pkgver}" "${pkgname}-${pkgver}-py3"
}
build() {
cd "${pkgname}-${pkgver}-py2"
cd "${pkgname}-${pkgver}"
msg2 "Building Sphinxbase with Python 2 bindings..."
export PYTHON=/usr/bin/python2
./configure --prefix=/usr
make
cd "../${pkgname}-${pkgver}-py3"
msg2 "Building Sphinxbase with Python 3 bindings..."
export PYTHON=/usr/bin/python
./configure --prefix=/usr
make
}
package() {
cd "${pkgname}-${pkgver}-py2"
msg2 "Installing Sphinxbase with Python 2 bindings"
make DESTDIR="${pkgdir}/" install
msg2 "Installing Python 3 bindings"
cd "../${pkgname}-${pkgver}-py3/swig"
cd "${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}/" install
install -d "${pkgdir}/usr/share/licenses/${pkgname}"