Skip to content

Commit

Permalink
aubio: backport some ffmpeg5 and python 3.9 build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Feb 24, 2023
1 parent 3b1429f commit c20448c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
16 changes: 13 additions & 3 deletions mingw-w64-aubio/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=aubio
pkgbase="mingw-w64-${_realname}"
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.4.9
pkgrel=3
pkgrel=4
pkgdesc='A tool for extracting annotations from audio signals (mingw-w64)'
url='https://aubio.org/'
arch=('any')
Expand All @@ -23,12 +23,16 @@ source=(https://aubio.org/pub/aubio-${pkgver}.tar.bz2
0001-fix-AUBIO_STRERROR-definition.patch
0002-wscript-disable-tests.patch
0003-waf-disable-def-install.patch
0004-wscript-fix-implib-name.patch)
0004-wscript-fix-implib-name.patch
aubio-python39.patch
https://github.com/aubio/aubio/commit/8a05420e5dd8c7b8b2447f82dc919765876511b3.patch)
sha256sums=('d48282ae4dab83b3dc94c16cf011bcb63835c1c02b515490e1883049c3d1f3da'
'c504cc0f6a80588cec94941fa9a1bb6338aea616f70a1ee1074ef19cb16c82da'
'3c9da6fcaab3a96afeff50db8979920d8fcb7749cdb5d34400e2a6275fff614a'
'09df1bdba2e3b34251a746380e65967bdf38a70182315b077b27aacdeab7672e'
'f53a1b4ae636d4ec03a038535479bd83f8a37ceb3d3b0f8f37697efb7b0b1329')
'f53a1b4ae636d4ec03a038535479bd83f8a37ceb3d3b0f8f37697efb7b0b1329'
'2f9cb8913b1c4840588df2f437f702c329b4de4e46eff4dcf68aff4b5024a358'
'33b730d1aa0562d5cb96341fce268acb8a42a0381e9dcd52caef0fc2737b8ad0')

prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
Expand All @@ -39,6 +43,12 @@ prepare() {
patch -p1 -i "${srcdir}/0002-wscript-disable-tests.patch"
patch -p1 -i "${srcdir}/0003-waf-disable-def-install.patch"
patch -p1 -i "${srcdir}/0004-wscript-fix-implib-name.patch"

# https://src.fedoraproject.org/rpms/aubio/raw/rawhide/f/aubio-python39.patch
patch -p1 -i "${srcdir}/aubio-python39.patch"

# https://github.com/aubio/aubio/commit/8a05420e5dd8c7b8b2447f82dc919765876511b3
patch -p1 -i "${srcdir}/8a05420e5dd8c7b8b2447f82dc919765876511b3.patch"
}

build() {
Expand Down
35 changes: 35 additions & 0 deletions mingw-w64-aubio/aubio-python39.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/waflib/ConfigSet.py b/waflib/ConfigSet.py
index 8212586..8142817 100644
--- a/waflib/ConfigSet.py
+++ b/waflib/ConfigSet.py
@@ -146,7 +146,7 @@ class ConfigSet(object):
Utils.writef(filename,''.join(buf))
def load(self,filename):
tbl=self.table
- code=Utils.readf(filename,m='rU')
+ code=Utils.readf(filename,m='r')
for m in re_imp.finditer(code):
g=m.group
tbl[g(2)]=eval(g(3))
diff --git a/waflib/Context.py b/waflib/Context.py
index ab6b154..cbe16c1 100644
--- a/waflib/Context.py
+++ b/waflib/Context.py
@@ -106,7 +106,7 @@ class Context(ctx):
cache[node]=True
self.pre_recurse(node)
try:
- function_code=node.read('rU',encoding)
+ function_code=node.read('r',encoding)
exec(compile(function_code,node.abspath(),'exec'),self.exec_dict)
finally:
self.post_recurse(node)
@@ -346,7 +346,7 @@ def load_module(path,encoding=None):
pass
module=imp.new_module(WSCRIPT_FILE)
try:
- code=Utils.readf(path,m='rU',encoding=encoding)
+ code=Utils.readf(path,m='r',encoding=encoding)
except EnvironmentError:
raise Errors.WafError('Could not read the file %r'%path)
module_dir=os.path.dirname(path)

0 comments on commit c20448c

Please sign in to comment.