From 0965f9448e28714ae61f4d726845999c149e23eb Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 30 Aug 2018 18:18:45 +0200 Subject: [PATCH] sphinxbase/pocketsphinx: Sync with AUR, remove libtool --- pocketsphinx/default/LICENSE | 31 ------------------- pocketsphinx/default/PKGBUILD | 34 +++++++++----------- sphinxbase/default/LICENSE | 30 ------------------ sphinxbase/default/PKGBUILD | 48 ++++++++++++----------------- sphinxbase/default/timing-fix.patch | 23 -------------- 5 files changed, 35 insertions(+), 131 deletions(-) delete mode 100644 pocketsphinx/default/LICENSE delete mode 100644 sphinxbase/default/LICENSE delete mode 100644 sphinxbase/default/timing-fix.patch diff --git a/pocketsphinx/default/LICENSE b/pocketsphinx/default/LICENSE deleted file mode 100644 index 35615546..00000000 --- a/pocketsphinx/default/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Copyright (c) 1999-2016 Carnegie Mellon University. All rights -reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -This work was supported in part by funding from the Defense Advanced -Research Projects Agency and the National Science Foundation of the -United States of America, and the CMU Sphinx Speech Consortium. - -THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND -ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY -NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - \ No newline at end of file diff --git a/pocketsphinx/default/PKGBUILD b/pocketsphinx/default/PKGBUILD index b3b4c888..a4289868 100644 --- a/pocketsphinx/default/PKGBUILD +++ b/pocketsphinx/default/PKGBUILD @@ -4,17 +4,15 @@ pkgname=pocketsphinx pkgver=5prealpha -pkgrel=5 -pkgdesc='Lightweight speech recognition engine' +pkgrel=10 +pkgdesc='Lightweight speech recognition engine, specifically tuned for handheld and mobile devices, though it works equally well on the desktop.' arch=('i686' 'x86_64') url='http://cmusphinx.sourceforge.net' license=('BSD') makedepends=('swig' 'python2' 'python') -depends=('sphinxbase=5prealpha' 'gstreamer0.10-base' 'gst-plugins-base-libs') -source=("http://downloads.sourceforge.net/cmusphinx/$pkgname-$pkgver.tar.gz" - "https://raw.githubusercontent.com/cmusphinx/pocketsphinx/master/LICENSE") -sha256sums=('ad9f5f5c5ce79ff87b63d527f8f4d3e2f54c0c1da53793895991a8849ca47701' - '49181202f2b991d25f6cac8cd1705994494b9600d4311794ecbb9fcf8b188aef') +depends=('sphinxbase=5prealpha' 'gst-plugins-base-libs') +source=("http://downloads.sourceforge.net/cmusphinx/$pkgname-$pkgver.tar.gz") +sha256sums=('ef5bb5547e2712bdf571f256490ef42a47962033892efd9d7df8eed7fe573ed9') options=('!libtool') prepare() { @@ -24,37 +22,35 @@ prepare() { autoreconf -ivf > /dev/null cd .. + cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py2" cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py3" } build() { + 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 + cd "../$pkgname-$pkgver-py2" + export PYTHON=/usr/bin/python2 ./configure --prefix=/usr - make + make } package() { - cd "$pkgname-$pkgver-py3" + cd "$pkgname-$pkgver-py3" - make DESTDIR="$pkgdir" install + 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}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - - libtool --finish "$pkgdir/usr/lib" - libtool --finish "$pkgdir/usr/lib/gstreamer-1.0" - libtool --finish "$pkgdir/usr/lib/python2.7/site-packages/pocketsphinx" - libtool --finish "$pkgdir/usr/lib/python3.5/site-packages/pocketsphinx" + install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}" + install -D -m644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/sphinxbase/default/LICENSE b/sphinxbase/default/LICENSE deleted file mode 100644 index b5d665e7..00000000 --- a/sphinxbase/default/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (c) 1999-2016 Carnegie Mellon University. All rights -reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -This work was supported in part by funding from the Defense Advanced -Research Projects Agency and the National Science Foundation of the -United States of America, and the CMU Sphinx Speech Consortium. - -THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND -ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY -NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/sphinxbase/default/PKGBUILD b/sphinxbase/default/PKGBUILD index 76976718..946bba5a 100644 --- a/sphinxbase/default/PKGBUILD +++ b/sphinxbase/default/PKGBUILD @@ -1,47 +1,43 @@ -# Maintainer: Marco Pompili < marcs (dot) pompili (at) gmail (dot) com > +# Maintainer: Marco Pompili # Contributor: Giorgio Gilestro crocowhile@gmail.com # Contributor: Martchus # Contributor: Mladen Milinkovic pkgname=sphinxbase pkgver=5prealpha -pkgrel=5 -pkgdesc='Common library for sphinx speech recognition' +pkgrel=10 +pkgdesc='Common library for sphinx speech recognition.' url='http://cmusphinx.sourceforge.net/' arch=('i686' 'x86_64') license=('BSD') -makedepends=('bison' 'swig' 'python2' 'python') -depends=('lapack' 'libpulse') -source=("http://downloads.sourceforge.net/project/cmusphinx/${pkgname}/${pkgver}/$pkgname-$pkgver.tar.gz" - "https://raw.githubusercontent.com/cmusphinx/sphinxbase/master/LICENSE" - 'timing-fix.patch') -sha256sums=('06971dbe272d2f73bde0ef7b3538c0c8f8ea885cb171fd6b17a5975bced66e64' - '8b4bc30d2a57839cba678bb84472a9b0b4c84725ed04b37508e5ed3476f03c19' +makedepends=('bison' 'swig') +depends=('python2' 'python' 'lapack' 'libpulse') # not sure if libsamplerate is needed 'libsamplerate' +source=("http://downloads.sourceforge.net/project/cmusphinx/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz" + "timing-fix.patch") +sha256sums=('f72bdb59e50b558bed47cc2105777200d2b246a0f328e913de16a9b22f9a246f' '5e8b2bac5d9f84a1c7b7fd774ef2b3f8f6cfc9dcb415b10a66ef439f91f3d4c5') options=('!libtool') prepare() { - cd "$srcdir/$pkgname-$pkgver" + cd "${pkgname}-${pkgver}" - patch -p1 < "$srcdir/timing-fix.patch" - - msg2 "Reconfiguring project for Automake v1.15" + 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" + cp -R "${pkgname}-${pkgver}" "${pkgname}-${pkgver}-py2" + cp -R "${pkgname}-${pkgver}" "${pkgname}-${pkgver}-py3" } build() { - cd "$srcdir/$pkgname-$pkgver-py2" + cd "${pkgname}-${pkgver}-py2" msg2 "Building Sphinxbase with Python 2 bindings..." ./configure --prefix=/usr make - cd "../$pkgname-$pkgver-py3" + cd "../${pkgname}-${pkgver}-py3" msg2 "Building Sphinxbase with Python 3 bindings..." export PYTHON=/usr/bin/python2 ./configure --prefix=/usr @@ -49,20 +45,16 @@ build() { } package() { - cd "$srcdir/$pkgname-$pkgver-py2" + cd "${pkgname}-${pkgver}-py2" msg2 "Installing Sphinxbase with Python 2 bindings" - make DESTDIR="$pkgdir/" install + make DESTDIR="${pkgdir}/" install msg2 "Installing Python 3 bindings" - cd "../$pkgname-$pkgver-py3/swig" - make DESTDIR="$pkgdir/" install + cd "../${pkgname}-${pkgver}-py3/swig" + make DESTDIR="${pkgdir}/" install - install -d "$pkgdir/usr/share/licenses/$pkgname" - install -m644 "${srcdir}/LICENSE" \ + install -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" \ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - - libtool --finish "$pkgdir/usr/lib" - libtool --finish "$pkgdir/usr/lib/python2.7/site-packages/sphinxbase" - libtool --finish "$pkgdir/usr/lib/python3.5/site-packages/sphinxbase" } diff --git a/sphinxbase/default/timing-fix.patch b/sphinxbase/default/timing-fix.patch deleted file mode 100644 index 6c44e856..00000000 --- a/sphinxbase/default/timing-fix.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit a1d18a46aeec2022e64fa1b11b08b5721bc9f98f -Author: Mladen Milinkovic -Date: Fri May 20 04:45:53 2016 +0200 - - fe_process_frames_ext() wasn't updating fe sample_counter in some cases - - When there wasn't enough samples in buffer to fill one frame, - sample_counter wasn't updated with samples that were stored in overflow - buffer. - -diff --git a/src/libsphinxbase/fe/fe_interface.c b/src/libsphinxbase/fe/fe_interface.c -index 1cc3566..d090b6e 100644 ---- a/src/libsphinxbase/fe/fe_interface.c -+++ b/src/libsphinxbase/fe/fe_interface.c -@@ -471,6 +471,8 @@ fe_process_frames_ext(fe_t *fe, - memcpy(fe->overflow_samps + fe->num_overflow_samps, - *inout_spch, *inout_nsamps * (sizeof(int16))); - fe->num_overflow_samps += *inout_nsamps; -+ /* Update global sample counter with number of samples */ -+ fe->sample_counter += *inout_nsamps; - /* Update input-output pointers and counters. */ - *inout_spch += *inout_nsamps; - *inout_nsamps = 0;