summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordvs9992020-05-12 17:44:40 +0200
committerMartchus2020-05-12 17:47:15 +0200
commit0214f55dd6a776e3046ff0ef4db1c631320601d3 (patch)
tree07546737adb6f778d21af702639a5ee34f697ccc
parent326c307a1cfdb772253f629fcac542db5c1e8a17 (diff)
downloadaur-0214f55dd6a776e3046ff0ef4db1c631320601d3.tar.gz
Add patch for doxy2swig compilation issue
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD15
-rw-r--r--sphinxbase-5prealpha-fix-doxy2swig.patch16
3 files changed, 29 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index be2238f29a34..7638fd525668 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = sphinxbase
pkgdesc = Common library for sphinx speech recognition.
pkgver = 5prealpha
- pkgrel = 10
+ pkgrel = 11
url = http://cmusphinx.sourceforge.net/
arch = i686
arch = x86_64
@@ -14,7 +14,9 @@ pkgbase = sphinxbase
depends = libpulse
options = !libtool
source = http://downloads.sourceforge.net/project/cmusphinx/sphinxbase/5prealpha/sphinxbase-5prealpha.tar.gz
+ source = sphinxbase-5prealpha-fix-doxy2swig.patch
sha256sums = f72bdb59e50b558bed47cc2105777200d2b246a0f328e913de16a9b22f9a246f
+ sha256sums = 1cb485202f83dc517872f5ab41f59d18884af1b85799166d80e08860f7729919
pkgname = sphinxbase
diff --git a/PKGBUILD b/PKGBUILD
index 13afdac39cb7..4da2075165e6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,15 +5,18 @@
pkgname=sphinxbase
pkgver=5prealpha
-pkgrel=10
+pkgrel=11
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'
-source=("http://downloads.sourceforge.net/project/cmusphinx/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
-sha256sums=('f72bdb59e50b558bed47cc2105777200d2b246a0f328e913de16a9b22f9a246f')
+source=("http://downloads.sourceforge.net/project/cmusphinx/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ "sphinxbase-5prealpha-fix-doxy2swig.patch")
+
+sha256sums=('f72bdb59e50b558bed47cc2105777200d2b246a0f328e913de16a9b22f9a246f'
+ '1cb485202f83dc517872f5ab41f59d18884af1b85799166d80e08860f7729919')
options=('!libtool')
prepare() {
@@ -21,7 +24,8 @@ 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"
@@ -32,12 +36,13 @@ build() {
cd "${pkgname}-${pkgver}-py2"
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/python2
+ export PYTHON=/usr/bin/python
./configure --prefix=/usr
make
}
diff --git a/sphinxbase-5prealpha-fix-doxy2swig.patch b/sphinxbase-5prealpha-fix-doxy2swig.patch
new file mode 100644
index 000000000000..08c12d82439d
--- /dev/null
+++ b/sphinxbase-5prealpha-fix-doxy2swig.patch
@@ -0,0 +1,16 @@
+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