Add patch for doxy2swig compilation issue. (#119)

This commit is contained in:
dvs999 2020-05-12 16:41:32 +01:00 committed by GitHub
parent 57bcfc8677
commit f989cb4aba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 4 deletions

View File

@ -12,8 +12,11 @@ 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
}

View File

@ -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