From bac9b794eb6c8fd6fe9a6c5822db6798b18ae4913d51f471eb5a8b7e3ca1ca7d Mon Sep 17 00:00:00 2001 From: Dave Plater Date: Sun, 8 Sep 2024 15:47:01 +0000 Subject: [PATCH] - Fix build by deleting test_cvec.py reported to: https://github.com/aubio/aubio/issues/405 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/aubio?expand=0&rev=53 --- .gitattributes | 23 ++ .gitignore | 1 + 8a05420.patch | 25 ++ 95ff046c.patch | 39 +++ _multibuild | 4 + aubio-0.4.9.tar.bz2 | 3 + aubio-0.4.9.tar.bz2.asc | 18 ++ aubio.changes | 663 ++++++++++++++++++++++++++++++++++++++++ aubio.spec | 145 +++++++++ baselibs.conf | 1 + cdfe9ce.patch | 157 ++++++++++ python-aubio.changes | 111 +++++++ python-aubio.spec | 87 ++++++ waflib_deprecated.patch | 33 ++ waflib_python312.patch | 36 +++ 15 files changed, 1346 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 8a05420.patch create mode 100644 95ff046c.patch create mode 100644 _multibuild create mode 100644 aubio-0.4.9.tar.bz2 create mode 100644 aubio-0.4.9.tar.bz2.asc create mode 100644 aubio.changes create mode 100644 aubio.spec create mode 100644 baselibs.conf create mode 100644 cdfe9ce.patch create mode 100644 python-aubio.changes create mode 100644 python-aubio.spec create mode 100644 waflib_deprecated.patch create mode 100644 waflib_python312.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/8a05420.patch b/8a05420.patch new file mode 100644 index 0000000..1e0b0d9 --- /dev/null +++ b/8a05420.patch @@ -0,0 +1,25 @@ +From 8a05420e5dd8c7b8b2447f82dc919765876511b3 Mon Sep 17 00:00:00 2001 +From: Paul Brossier +Date: Tue, 25 Jan 2022 18:30:27 +0100 +Subject: [PATCH] [source_avcodec] define FF_API_LAVF_AVCTX for libavcodec > + 59, thx @berolinux (closes gh-353) + +--- + src/io/source_avcodec.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c +index e0ae93b5..1421bd9a 100644 +--- a/src/io/source_avcodec.c ++++ b/src/io/source_avcodec.c +@@ -68,6 +68,10 @@ + #define AUBIO_AVCODEC_MAX_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE + #endif + ++#if LIBAVCODEC_VERSION_MAJOR >= 59 ++#define FF_API_LAVF_AVCTX 1 ++#endif ++ + struct _aubio_source_avcodec_t { + uint_t hop_size; + uint_t samplerate; diff --git a/95ff046c.patch b/95ff046c.patch new file mode 100644 index 0000000..b5ad558 --- /dev/null +++ b/95ff046c.patch @@ -0,0 +1,39 @@ +From 95ff046c698156f21e2ca0d1d8a02c23ab76969f Mon Sep 17 00:00:00 2001 +From: Paul Brossier +Date: Thu, 2 Jul 2020 11:16:13 +0200 +Subject: [PATCH] [py] add const qualifiers to ufuncs prototypes for latest + numpy + +--- + python/ext/ufuncs.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/python/ext/ufuncs.c b/python/ext/ufuncs.c +index d373d725..e5641342 100644 +--- a/python/ext/ufuncs.c ++++ b/python/ext/ufuncs.c +@@ -3,8 +3,8 @@ + + typedef smpl_t (*aubio_unary_func_t)(smpl_t input); + +-static void aubio_PyUFunc_d_d(char **args, npy_intp *dimensions, +- npy_intp* steps, void* data) ++static void aubio_PyUFunc_d_d(char **args, const npy_intp *dimensions, ++ const npy_intp* steps, void* data) + { + npy_intp i; + npy_intp n = dimensions[0]; +@@ -22,8 +22,8 @@ static void aubio_PyUFunc_d_d(char **args, npy_intp *dimensions, + } + } + +-static void aubio_PyUFunc_f_f_As_d_d(char **args, npy_intp *dimensions, +- npy_intp* steps, void* data) ++static void aubio_PyUFunc_f_f_As_d_d(char **args, const npy_intp *dimensions, ++ const npy_intp* steps, void* data) + { + npy_intp i; + npy_intp n = dimensions[0]; +-- +2.35.3 + diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..72116f5 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + python-aubio + + diff --git a/aubio-0.4.9.tar.bz2 b/aubio-0.4.9.tar.bz2 new file mode 100644 index 0000000..077b960 --- /dev/null +++ b/aubio-0.4.9.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d48282ae4dab83b3dc94c16cf011bcb63835c1c02b515490e1883049c3d1f3da +size 397604 diff --git a/aubio-0.4.9.tar.bz2.asc b/aubio-0.4.9.tar.bz2.asc new file mode 100644 index 0000000..b628306 --- /dev/null +++ b/aubio-0.4.9.tar.bz2.asc @@ -0,0 +1,18 @@ +-----BEGIN PGP SIGNATURE----- + +iQKTBAABCgB9FiEEuIpQctSRWuz4GiQ0akmxlyir3ZIFAlxcVlBfFIAAAAAALgAo +aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEI4 +OEE1MDcyRDQ5MTVBRUNGODFBMjQzNDZBNDlCMTk3MjhBQkREOTIACgkQakmxlyir +3ZIKvQ/9HYZ6XgZ+JkRfy40otid7qU4RZ4AXOQiLZYoyCKYtNjzhLHGYNm7RjzJ5 +J1QxzAWLI6yfw2kB4pKxhtGeF+QAeeZEGC7l1TC3KlOmp/HzNyWTY+yd9RkqXF7M +3F0SJiil9O/t/PsETcy3Hy/3ASK+nCa4laQsPrHNAJDiU5SDo/28hV/H0w5r5QLC +X4YXG9qg1LQ3IEzve3xfEkWLHaHky4zhorkDuNUjK0EqnyO7QaPPJpWhbj40rJnY +zHgr8I/SAjQGSdcaXvFWIW16BdyxsHuzx/palYDOjWqSR+ZKpukqr+e6Rp2GStQV +Vx1Oi3WUjw8kwl9dkfYD1odhZMIrZprFkTbfsvSQNUAWjAXge6gT2OMQ+0FpZVNu +l0gQmE29bgEoauwOjpKOcPY4UtTxYqARgATyvYINVXYan4kAaFwnfLoxrp7rCI6V +T7ZBUGl04MR+uiP/bt7xRsWQ6/F00NztzwAleRuT+5KoMqz6UBl7iUNlJUbz8N8x +JiuvuGEo1HA2BE8OzI6Z1kFNDe17JZizKTVwLa2rwGkYqCWu96r4/S+opBCJ0/xH +qRl79VjgeEFi00Nl3umKl4tHALhtKSZ5/CcBLViHF4duGHx7X40UcpiQ6NyVcX4b +d1UpyTL5lBa9OhzBNjgCla00eRnRfpjM8iuGCMqErvjVhS2/6a8= +=UAt5 +-----END PGP SIGNATURE----- diff --git a/aubio.changes b/aubio.changes new file mode 100644 index 0000000..8bfd56f --- /dev/null +++ b/aubio.changes @@ -0,0 +1,663 @@ +------------------------------------------------------------------- +Sun Jul 16 09:16:44 UTC 2023 - Edgar Aichinger + +- Add waflib_deprecated.patch (fixes TW compilation) + +------------------------------------------------------------------- +Thu May 4 11:19:21 UTC 2023 - Dominique Leuenberger + +- Add _multibuild to define 2nd spec file as additional flavor. + Eliminates the need for source package links in OBS. + +------------------------------------------------------------------- +Tue Mar 14 16:44:15 UTC 2023 - Dave Plater + +- Replace ffmpeg libs pkgconfig build requires with actual + ffmpeg-4 devel packages to fix build for Tumbleweed + +------------------------------------------------------------------- +Tue Dec 13 09:19:51 UTC 2022 - Bjørn Lie + +- Replace pkgconfig(libavresample) with pkgconfig(libswresample) + BuildRequires as ffmpeg-5 does not provide libavresample. +- Add cdfe9ce.patch: [source_avcodec] avoid deprecation warning + with latest avcodec api (58.134.100). +- Add 8a05420.patch: [source_avcodec] define FF_API_LAVF_AVCTX for + libavcodec > 59, thx @berolinux (closes gh-353). + +------------------------------------------------------------------- +Sat Apr 9 15:14:06 UTC 2022 - dliw@posteo.net + +- Enable fftw3 + +------------------------------------------------------------------- +Thu Jan 30 13:15:23 UTC 2020 - Tomáš Chvátal + +- Do not pull in the python2 as a dependency since we can build + fine with python3 + +------------------------------------------------------------------- +Tue Feb 12 15:55:52 UTC 2019 - bjorn.lie@gmail.com + +- Update to version 0.4.9: + * No upstream changes provided, please see + https://git.aubio.org/?p=aubio.git;a=shortlog +- Changes from version 0.4.8: + * src/notes: new option release_drop. + * src/spectral: new parameters added to filterbank and mfcc. + * python/lib: start documenting module, improve build for + win-amd64. + * src fixes: prevent crash when using fft sizes unsupported by + vDSP, prevent saturation when down-mixing a multi-channel + source (avcodec/ffmpeg). +- Changes from version 0.4.7: + * src/io/, src/notes/, src/pitch: prevent crashes on corrupted + files. + * src/spectral/dct.h: add dct type II object with optimised + versions. + * examples/: fix jack midi output, improve messages when jack + disabled. + * python/: add dct support, minor bug fixes tests and demos. + * wscript: improve support for BLAS/ATLAS. +- Drop upstream fixed patches: + * aubio-wavread-input-validation.patch + * aubio-resampler-NULL-deref-fix.patch + * 0001-src-notes-notes.c-bail-out-if-pitch-creation-failed-.patch + * 0001-src-pitch-pitchyinfft.c-fix-out-of-bound-read-when-s.patch + * 0002-src-io-source_wavread.c-also-exit-if-samplerate-is-n.patch + * 0002-src-pitch-pitchyinfft.c-comment-out-debug-output.patch +- Run spec-cleaner, modernize spec. +- Replace ffmpeg3-devel with pkgconfig(libavdevice) BuildRequires: + Allow to build with ffmpeg v4 and newer. + +------------------------------------------------------------------- +Tue Aug 7 15:00:16 CEST 2018 - tiwai@suse.de + +- Fix minor security issues leading to segfault or buffer overread + (CVE-2018-14522, bsc#1102359, CVE-2018-14523, bsc#1102364): + 0001-src-pitch-pitchyinfft.c-fix-out-of-bound-read-when-s.patch + 0002-src-pitch-pitchyinfft.c-comment-out-debug-output.patch + 0001-src-notes-notes.c-bail-out-if-pitch-creation-failed-.patch + 0002-src-io-source_wavread.c-also-exit-if-samplerate-is-n.patch +- Refresh the previous fixes from the upstream version + aubio-wavread-input-validation.patch + aubio-resampler-NULL-deref-fix.patch + +------------------------------------------------------------------- +Fri Jun 8 16:19:05 CEST 2018 - tiwai@suse.de + +- Use license file tag + +------------------------------------------------------------------- +Fri Jun 8 16:08:08 CEST 2018 - tiwai@suse.de + +- Fix segfault with malformed input file (CVE-2017-17554, + bsc#1072317): + aubio-resampler-NULL-deref-fix.patch + +------------------------------------------------------------------- +Sat Apr 21 12:55:33 UTC 2018 - jengelh@inai.de + +- Explicitly request ffmpeg 3.x for building + +------------------------------------------------------------------- +Fri Mar 23 16:41:03 CET 2018 - tiwai@suse.de + +- Fix divide-by-zero at wavread (CVE-2017-17054, bsc#1070399): + aubio-wavread-input-validation.patch + +------------------------------------------------------------------- +Mon Jan 1 17:38:57 UTC 2018 - coolo@suse.com + +- update to 0.4.6 + This version includes: + * yinfast, a new version of the YIN pitch detection algorithm, + that uses spectral convolution to compute the same results as + the original yin, but with a cost O(N log(N)), making it much + faster than the plain implementation (O(N^2)) + + * Intel IPP optimisations (thanks to Eduard Mueller) + + * improved support for emscripten (thanks to Martin Hermant), + which compiles the aubio library as a javascript module and + lets you run aubio's algorithm directly from within a web-page. + 0.4.6 also comes with several bug fixes and improvements. + +------------------------------------------------------------------- +Fri May 26 09:56:11 UTC 2017 - jengelh@inai.de + +- Rectify RPM groups. + +------------------------------------------------------------------- +Thu May 18 17:45:04 CEST 2017 - tiwai@suse.de + +- Correct the license tag to GPL-3.0+ + +------------------------------------------------------------------- +Fri Apr 28 11:26:24 UTC 2017 - alarrosa@suse.com + +- Do not install libaubio.a + +------------------------------------------------------------------- +Mon Apr 24 09:17:56 UTC 2017 - alarrosa@suse.com + +- Update soname and generate libaubio5 package +- Update to version 0.4.5 + * src/io/source_avcodec.c: add support for libswresample + * aubio: new python command line tool to extract information + * src/onset/onset.c: add spectral whitening and compression, improve default + parameters + * this_version.py: use centralized script to get current version, adding git + sha when building from git repo (thanks to MartinHN) + * src/spectral/awhithening.h: add adaptive whitening + * src/{cvec,mathutils,musicutils}.h: add cvec_logmag, fvec_logmag, and fvec_push + * src/onset/onset.h: add aubio_onset_set_default_parameters to load optimal + parameters of each novelty function, _{set,get}_compression and + _{set,get}_awhitening to turn on/off compression and adaptive whitening + * src/spectral/specdesc.h: add weighted phase + * src/onset/onset.c: improve default onset parameters (thanks to @superbock + for access to his evaluation database), see commit dccfad2 for more details + * src/pitch/pitch.c: avoid segfault when using invalid parameters + * src/temporal/biquad.c: fix biquad parameters initialization (thanks to + @jurlhardt) + * examples/aubio{onset,track}.c: add options --miditap-note and + --miditap-velo to set which midi note is triggered at onset/beat (thanks to + @tseaver) + * examples/aubioonset.c: show actual parameters in verbose mode + * examples/utils.c: improve memory usage to emit midi notes + * python/ext/py-source.c: add with (PEP 343) and iter (PEP 234) interface + * python/ext/py-sink.c: add with interface (PEP 343) + * python/lib/aubio/cmd.py: new `aubio` command line tool + * python/lib/aubio/cut.py: moved from python/scripts/aubiocut + * doc/*.rst: reorganize and improve sphinx manual + * doc/*.txt: update manpages, add simple manpage for aubio command line + * doc/full.cfg: derive from doc/web.cfg + * README.md: simplify and add contribute information + * wscript: prefer libswresample over libavsamplerate when available, use + current version in manpages, doxygen, and sphinx, update to newest waf + * setup.py: use entry_points console_scripts to generate scripts, use + centralized version from this_version.py, clean up + * python/lib/moresetuptools.py: detect if libswresample is available + +- Update to version 0.4.4 + * src/utils/log.h: new function to redirect log, error, and warnings + * python/: AUBIO_ERR raises python exception, AUBIO_WRN to emit py warning + * doc/: add some documentation, fix errors in manpages + * wscript: new rules to build 'manpages', 'doxygen', and 'sphinx', new + --build-type= option (thanks to Eduard Mueller) + * src/notes/notes.h: add minioi and silence methods + * examples/: add --minioi (minimum inter-onset interval) option + * src/pitch/pitchyin.c: improve msvc compiler optimisations (thanks to + Eduard Mueller) + * python/, src/: improve error messages, fix minor memory leaks + * src/io/source_avcodec.c: improve compatibility with latest ffmpeg and with + older libav/ffmpeg versions + * python/demos/: new demos to capture microphone in real time + * src/aubio.h: include utils/log.h + * src/utils/log.h: add new aubio_log_set_function to redirect log messages + * src/notes/notes.h: add aubio_notes_{get,set}_minioi_ms, add + _{get,set}_silence methods + * src/aubio_priv.h: add AUBIO_INF to print to stdout with header, use new + logging function, add ATAN alias, add stdarg.h, move #include "config.h" + * src/{fmat,fvec}.c: avoid integer division + * src/pitch/pitchyin.c: [msvc] help compiler to optimize aubio_pitchyin_do + by giving it addresses for all arrays which are referenced in inner loops, + thanks to Eduard Mueller. + * src/pitch/pitch.c: declare internal functions as static, fail on wrong + method, warn on wrong unit, improve error messages, fix error string + * src/spectral/specdesc.c: return NULL if wrong mode asked, remove trailing + spaces + * src/onset/onset.c: return null and clean-up if new_aubio_specdesc failed, + fix error message + * src/notes/notes.c: use midi note to store pitch candidate, round to + nearest note, add a variable to define precision, fix out-of-bound write, + fix unset silence_threshold, fix error message + * src/spectral/ooura_fft8g.c: add cast to avoid conversion warnings, prefix + public function with aubio_ooura_ to avoid with other apps using ooura (e.g. + puredata), make internal functions static, + * src/spectral/fft.c: add message about fftw3 being able to do non-power of + two sizes, make calls to fftw_destroy_plan thread-safe, use prefixed + aubio_ooura_rdft + * src/spectral/phasevoc.c: fix error string + * src/temporal/resampler.c: throw an error when using libsamplerate with doubles + * src/io/ioutils.h: add functions to check samplerate and channels, use in sink_*.c + * src/io/source.c: add error message when aubio was compiled with no source, + only show error message from last child source_ + * src/io/source_avcodec.c: call avformat_free_context after + avformat_close_input, keep a reference to packet to remove it when closing + file, avoid deprecation warnings with ffmpeg 3.2, add backward compatibility + for libavcodec55, fix for old libavcodec54, use AV_SAMPLE_FMT_DBL when + compiling with HAVE_AUBIO_DOUBLE, fix missing samples in eof block, avoid + function calls before declarations, improve error messages, replace with new + context before closing old one, make sure s->path is set to null + * src/io/{source_wavread,sink_wavwrite}.c: declare internal functions as static + * src/io/source_wavread.c: fix bytes_read for JUNK headers, improve error + messages, initialize buffer, skip chunks until data is found, or abort, skip + junk chunk + * src/io/source_sndfile.c: add support for multi-channel resampling, set + handle to null after sucessful close, add missing floor in ratio comparison, + improve formatting + * src/io/sink.c: only show error message from last child sink_ + * src/io/sink_apple_audio.c: avoid crash on empty file name + * src/io/sink_sndfile.c: improve error message + * src/io/sink_{sndfile,wavwrite}.c: use AUBIO_MAX_CHANNELS, fix error message + * README.md: update copyright dates, use https + * src/aubio.h: add some links to examples, use https + * src/pitch/pitch.h: add aubio_pitch_get_tolerance, add basic description of + unit modes + * src/notes/notes.h: add doxygen header + * src/spectral/fft.h: strip example path + * doc/*.rst: improve sphinx documentation + * doc/android.rst: add reference to it scripts/build_android + * doc/debian_packages.rst: added page on debian packages + * doc/python_module.rst: add demo_source_simple.py, add note on pip, add + `print(aubio.version)` + * doc/cli.rst: include command line manpages + * doc/cli_features.rst: add matrix of command line features + * doc/requirements.rst: add a note about --notests (closes #77), document + --msvc options, improve description of options + * doc/download.rst: added page on download + * doc/installing.rst: update + * doc/xcode_frameworks.rst: added page on xcode frameworks + * doc/**: use https://aubio.org + * doc/conf.py: use pyramid theme, update copyright, remove hardcoded path + * doc/web.cfg: exclude ioutils from doc + * doc/aubionotes.txt: document -M option (see #18), + * doc/aubioonset.txt: add documentation for -M, --minioi, improve threshold + description (thanks to Peter Parker), fix typo (onset, not pitch) + * doc/aubio*.txt: document -T/--timeformat option + * Makefile: add a brief intro, avoid offline operations, add html and dist + targets, add rules for documentation, simplify listing, avoid offline + operations, bump waf to 1.9.6, check for waf before clean, chmod go-w + waflib, improve clean, use pip to install, factorise pip options, generate + more test sounds, improve test_python and test_pure_python, pass build_ext + in test_pure_python{,_wheel}, quieten uninstall_python if already + uninstalled, improve test targets, use bdist_wheel in test_pure_python, + build_ext only for --enable-double, verbose waf rules, add cleanwaf + * wscript: added debug/release build type configurations release (default) + enables optimizations, debug symbols are enabled in both configurations, + thanks to Eduard Mueller. + * wscript: add options to disable source_wavread/sink_wavwrite, add check + for stdarg.h, new rules 'manpages', 'sphinx', and 'doxygen' to build + documentation, add version to sphinx and manpages, disable libsamplerate + if double precision enabled (libsamplerate only supports float), fix typos, + remove trailing spaces, improve tarball creation (./waf dist), remove + full.cfg from tarball, prepend to CFLAGS to honor user cflags + * wscript, src/wscript_build: improve install locations using DATAROOTDIR, + MANDIR, INCLUDEDIR + * wscript: default to no atlas for now + * src/wscript_build: always build static library + * scripts/build_android: add an example script to build aubio on android, + * examples/aubionotes.c: use new notes, set minioi, send last note off when + needed, add warning for missing options + * examples/aubioonset.c: add minioi option, in seconds + * examples/: only send a last note off when using jack + * examples/: return 1 if object creation failed + * examples/: use PROG_HAS_OUTPUT, add PROG_HAS_SILENCE + * tests/src/spectral/test-fft.c: fix default size + * tests/src/spectral/test-phasevoc.c: fix typos + * tests/src/utils/test-log.c: add AUBIO_INF, add example for + aubio_log_set_function, improve messages + * python/ext/aubiomodule.c: add aubio._aubio.__version__ and import it as + aubio.version, use custom logging function for errors and warnings, remove + duplicated add_generated_objects, use <> for non local aubio + * python/ext/py-cvec.c: use NPY_INTP_FMT + * python/ext/py-fft.c: use error string set in src/spectral/fft.c + * python/ext/py-phasevoc.c: use error string set in src/spectral/phasevoc.c + * python/ext/py-sink.c: always set samplerate and channels in init + * python/ext/py-source.c: use error string set in src/io/source.c + * python/lib/aubio/midiconv.py: add unicode double sharp and double flat, + improve unicode handling, skip UnicodeEncodeError on python 2.x + * MANIFEST.in: add src/**.c, exclude full.cfg, include waflib, remove + python/ext/config.h + * setup.py: define AUBIO_VERSION use sorted glob.glob to improve + reproducibility, remove extra quotes, remove status from version string, + update description, use custom build_ext instead of 'generate' command, + define HAVE_AUBIO_DOUBLE to 1 if needed + * python/lib/gen_code.py: add support for multiple _do outputs, fix number + of output, improve del_ function, safer DECREF, fix indentation, emit RuntimeError + * python/lib/gen_external.py: clean-up, enable tss, remove duplicate, + sort generated files + * python/lib/moresetuptools.py: add HAVE_STDARG_H, also check for + HAVE_AUBIO_DOUBLE, cleaner clean, look first for system library, then for + local build, then local sources, mo nore fake config.h here, use + samplerate in single precision only + * python/README.md: add a note about nose2 for python tests (closes #74) + * scripts/setenv_local.sh: python3 compat + * python/demos/demo_alsa.py: add example using alsaaudio (closes #72) + * python/demos/demo_mfcc.py: add options to plot first and second + derivatives, and set samplerate/win_s/hop_s, thanks to @jhoelzl (closes #68) + * python/demos/demo_notes.py: add simple notes demos + * python/demos/demo_pyaudio.py: added simple demo for pyaudio, see #6, + closes #78, thanks to @jhoelzl and @notalentgeek, add some comments, avoid + overwriting aubio.pitch + * python/demos/demo_source_simple.py: fix indentation, make executable + * python/demos/demo_timestretch{,_online}.py: fix usage string, remove + unused import, use // to yield an integer (closes #71) + * python/demos/demo_timestretch_online.py: use 512, fix block counter + * python/demos/demo_tss.py: improve default parameters, exit before plotting + * python/tests/: use local import, add __init__.py + * python/tests/test_cvec.py: simplify + * python/tests/test_fft.py: skip test fft(zeros).phas == 0 if needed, expected powerpc + * python/tests/test_fvec.py: reduce alpha norm precision to 10.-4 + * python/tests/test_{midi2note,note2midi}.py: use nose2.params, add unicode tests + * python/tests/test_notes.py: add basic tests + * python/tests/test_notes.py: test results are correct for 44100Hz_44100f_sine441.wav + * python/tests/test_sink.py: add more tests, quiet warnings + * python/tests/test_source.py: break long line, check the tail of the file + is non-zero on non silent test files, filter user warnings to avoid spamming + the console, only check if last frames are non silent on brownnoise (weak), + remove fragile brownnoise test, check duration on short files, use nose2 + params to process one sound file per test + * python/tests/test_specdesc.py: RuntimeError is now raised on wrong mode + * python/tests/utils.py: by default, use 5 seconds brownoise + +- Update to version 0.4.3 + * src/io/source.h, src/io/source_*.h: add _get_duration + * src/notes/notes.h: add basic notes object + * src/tempo/beattracking.{c,h}: add _get_period and _get_period_s + * src/mathutils.h: add fvec_ishift + * src/fvec.{c,h}: add fvec_weighted_copy + * src/tempo/tempo.{c,h}: add _get_period and _get_period_s, also add tatum, + a subdivision of the beat period, default to 4, implement get/set_delay + * src/**.{c,h}: use #ifdef HAVE_FOO, not #if _HAVE_FOO, add const qualifiers + to unmodified pointers (see #35) + * src/{fmat,fvec,mathutils}.c: optimisations (using atlas or Accelerate when + available) for fvec_sum, fvec_mean, fvec_shift, aubio_level_lin, + fvec_set_all, fvec_zeros, fvec_weight, fvec_copy, fvec_weighted_copy, + fmat_vecmul + * src/aubio_priv.h: check for atlas cblas, use cblas_xswap, vDSP_dotpr, + protect SQR parameters, avoid redefining MIN/MAX, define PATH_MAX and PI + when needed, use _isnan on windows msvc 9 to avoid linking error, more + windows hacks + * src/mathutils.c: avoid for loop initial declarations [gcc], use + HAVE_ATLAS, use smpl_t for constants + * src/fmat.c: skip asserts + * src/spectral/{filterbank,mfcc}.c: use accelerated fmat_vecmul + * src/spectral/fft.c: fftw can be used odd length sizes, not Ooura, + factorise double / single flags, use memcpy + * src/spectral/phasevoc.c: fix arguments checks, return NULL when fft + creation failed , apply windowing for resynthesized grain, use ishift for + odd windows, fix scaling factors for correct reconstruction at 50 and 75% + overlap + * src/pitch/pitch.c: allow for silence == 0, improve error messages + * src/pitch/pitchmcomb.c: fix candidates sorting function, really comparing + current to next + * src/notes/notes.c: equivalent to previous examples/aubionotes.c results + * src/onset/onset.c: simplify selection of first onset, fix for "conversion + from 'smpl_t' to 'uint_t', possible loss of data" with msvc + * src/pitch/pitchmcomb.c: scan across all spectrum + * src/pitch/pitchyinfft.c: use fvec_weighted_copy + * src/{spectral/*.c,onset/*.c,tempo/*.c}: make sure win_size > 1 + * src/io/*.c: use custom defines for {source,sink}_apple_audio, take a copy + of const char* path + * src/io/source_avcodec.c: + - update to libav10, libavcodec 55.34.1 + - avoid deprecation warning, detect if we use ffmpeg or libav version + - check if the uri is a network stream using av_url_split, call + avformat_network_init() if needed + - check if we still need max_analyze_duration2 (closes #53, thanks to + @anthonylauzon) + * src/io/source_{avcodec,sndfile}.c: avoid modifying input param + * src/io/{sink,source,utils}_apple_audio.c: fix memory leak calling + CFRelease (closes #26, closes #27, and closes #28) + * src/io/sink_apple_audio.c: disable async mode for now, factorise code + * src/io/source_apple_audio.c: check out of bounds _seek, set s->path, quiet + * src/io/source_sndfile.c: fix crash, zero-pad output vector when + upsampling, use sf_read_double when compiling with AUBIO_DOUBLE, approximate + duration when resampling + * src/io/sink_sndfile.c: fix for double precision + * src/synth/sampler.c: fix typo, keeps a copy of uri + * src/tempo/tempo.c: do not write novelty function in output[1] + * src/temporal/resampler.c: make msvc happier adding a dummy variable + * src/temporal/filter.c: check parameters, fix filter_do_outplace to really + avoid modifying input + * src/utils/windll.c: add dll main entry point + * General: + - new build system, new code generator + - Python 3 compatibility (#33), thanks to Nils Philippsen (@nphilipp) + - double precision compatibility + - simplify memory allocations, removed unneeded malloc/free calls + - fix memory leak (#49), check input sizes (#63) and output sizes (#60) + - improve indentation, clean up unused imports and variables + - fix comparison to None and to False + * setup.py: move from python/setup.py, add option to build libaubio inside + python-aubio (for instance with pip), add command 'generate' with option + '--enable-double', build with -Wdeclaration-after-statement -Werror + * python/ext/aubiomodule.c: fix PyMethodDef sentinel + * python/ext/aubioproxy.c: factorize input checks into + PyAubio_IsValidVector, fix windows c89 compilation, use npy_intp, not long + * python/ext: rewrite and simplify, safer and improved memory usage (#49), + improve error strings, verify actual object creation + * python/ext/py-source.c: added duration, check seek is not negative + * python/ext/py-musicutils.c: do not overwrite PyArg_ParseTuple messages + * python/lib/gen_code.py: new generator, switch to using custom PyObjects + instead of fvec, cvec, fmat, ready for double precision (defaults to single) + * python/lib/aubio__init__.py: use new aubio.float_type, make sure length is + not zero and float_type is imported + * python/lib/aubio/midiconv.py: fix instance checks, make sure midi2note + uses midi int (#33) + * python/lib/aubio/slicing.py: fix samplerate + * python/ext/aubio-types.h: add new_py_ functions to create PyObjects + instead of fvec_t, apply to generated and hard-coded objects + * python/lib/gen_external.py: improve compiler detection, fixes build on + windows (#55) + * python/lib/moresetuptools.py: helpers for windows and macos compilations + * python/demos/demo_reading_speed.py: new reading speed tests, external + packages disabled by default + * python/demos/demo_timestretch.py: new timescale algorithm + * python/demos/demo_timestretch_online.py: new timescale algorithm (online + version) + * python/demos/demo_create_test_sounds.py: add script to create simple sound + files to test on using sox + * python/demos/demo_a_weighting.py: add simple demo for a_weighting + * python/demos/demo_filter.py: moved from _a_weighting + * python/demos/demo_mfcc.py: use n_coeffs + * python/demos/demo_bpm_extract.py: add exception type, avoid {} as default + argument value + * python/demos/demo_pysoundcard_*: update to pysoundcard 0.5.2 (closes #42) + * python/scripts/aubiocut: fix usage string output + * python/tests/run_all_tests,*.py: switch to nose2, fix most prospect warnings + * python/tests/test_fvec.py: add test_pass_to_numpy, cope with accumulated + errors + * python/tests/test_cvec.py: simplify, add more tests + * python/tests/test_fft.py: more tests, fft.do to clash on wrong size + inputs, f.rdo input size, cvec is large enough, memory tests, avoid + VisibleDeprecationWarning + * python/tests/test_filterbank.py: check for wrong values, ValueError raised + * python/tests/test_filter.py: add tests + * python/tests/test_musicutils.py: simplify, check TypeError is raised + * python/tests/test_mfcc.py: more tests, check for wrong input size (see #63) + * python/tests/test_mathutils: fix test_miditobin test, can also raise + NotImplementedError (darwin) + * python/tests/test_note2midi.py: more tests, use unicode_literals + * python/tests/test_phasevoc.py: add a note about ocasional crash check + perfect reconstruction for overlap > 75% add 50% overlap test, fix duplicate + test name, add wrong sized input tests + * python/tests/test_sink.py: remove useless many_sinks_not_closed and cruft + * python/tests/test_source.py: simplify, quieten, skip tests if no test sounds + * python/tests/test_specdesc.py: check for wrong values, skip wrong name + test, use correct input size (see #63) + * python/tests/utils.py: try reopening the file is deleting it fails on windows + * python/VERSION: removed, use same VERSION file for libaubio and python-aubio + * MANIFEST.in: move from python/, update contents + * nose2.cfg: add minimal config, set multiprocess always-on=false (fixes + coverage, pass -N to speed up the tests) + * examples/*.c: add time format option + * examples/{aubioonset,aubiotrack}.c: also emit midi note, thanks to + @topas-rec (closes #62) + * examples/: use outmsg to print notes (fixes #8) + * examples/aubionotes.c: use new aubio_notes object + * examples/aubiotrack.c: enable -O and -t options, fix is_beat/is_silence + types + * examples/{parse_args,utils}.h: check in config.h if getopt.h was found, or + build without for msvc, more windows hacks + * examples/utils.c: change send_noteon to accept floating point midi note number + * tests/src/io/test-source_apple_audio.c: shorten long line + * tests/src/io/test-source_avcodec.c: use HAVE_LIBAV, closes #10 + * tests/src/temporal: avoid crash, clarify + * tests/src/tempo/test-tempo.c: tempo back to only one output + * tests/src/test-delnull.c: improve test, avoid segfaults + * tests/src/test-lvec.c: use AUBIO_LSMP_FMT + * tests/utils_tests.h: add VA_ARGS versions of variadic macros + * tests/utils_tests.h: also use custom srandom/random when compiling with + -std=c99 + * tests/utils_tests.h: make sure M_PI and RAND_MAX are defined + * Makefile: set waf to 1.8.22 for now, new targets create_test_sounds, + build_python, test_python, clean_python, build_python3, clean_python3, + test_pure_python, test_pure_python_wheel, (use test_pure_* targets to build + without libaubio), use 'HAVE_DOUBLE=1 make' to build in double precision + * scripts/build_apple_frameworks: add script to build macosx and ios + frameworks (see #34, #43) + * scripts/build_emscripten: add script to build with emcc and co + * scripts/build_mingw: add script to cross-compile using mingw + * scripts/get_waf.sh: added simple script to fetch latest waf + * scripts/setenv_local.sh: set environment to run from built source tree + * scripts/setenv_local.sh: update to new python-aubio build location + * tests/wscript_build: do not install test programs + * tests/wscript_build, src/wscript_build: use 'use =', simplify + * src/wscript_build: enable shared lib on ios, static lib on windows + * wscript: + - update --enable-foo to fail if foo is not found + - add -mmacosx-version-min=10.4 on darwin + - add '-fembed-bitcode' on ios (closes #31), min to 6.1 + - make fat build, add option to not build with Accelerate framework + - add option to not build with CoreAudio/AudioToolbox + - add --disable-docs option + - add -lm detection + - pass HAVE_AUBIO_DOUBLE in compiler arguments + - first check for headers, make getopt.h and unistd.h optional + - check HAVE_AV* from ctx.env + - make msvc compiler quieter, add /MD and /D_CRT_SECURE_NO_WARNINGS + - check if we find atlas/cblas.h + - new build platform emscripten + - more cleanups and updates + * src/: remove trailing spaces, improve doxygen strings, update copyrights, + fix typos + * src/onset/onset.h: fix description of get/set_delay functions + * src/spectral/mfcc.h: add link to reference implementation + * src/spectral/filterbank_mel.h: update reference url + * src/musicutils.h: update link to Bernardini's paper, improve doc + * doc/aubiomfcc.txt: add a note about the output + * doc/*.cfg: update to Doxygen 1.8.8 + * python/README.md: fix typo (thanks to Sam Alexander), document how to + build in a virtualenv (see #2) + * README.md: minor updates, link to python/README.md, switch to https + +------------------------------------------------------------------- +Sat Apr 16 22:01:17 UTC 2016 - olaf@aepfle.de + +- Use pkgconfig instead of libffmpeg-devel + +------------------------------------------------------------------- +Tue Oct 27 15:14:35 UTC 2015 - p.drouand@gmail.com + +- Update to version 0.4.2 + * src/onset/onset.h: add aubio_onset_get_silence(), fix description of + aubio_onset_get/set_delay functions + * src/tempo/tempo.h: add aubio_tempo_get_silence and aubio_tempo_get_threshold + * src/io/audio_unit.c: fix deprecation warning (closes #16) + * src/io/sink_apple_audio.c: avoid opening null path + * src/io/sink_sndfile.c: improve error messages, set nsamples after write + * src/io/sink_wavwrite.c: fail if samplerate is way too large, assume + windows is little endian to build with mingw32 + * src/io/source_apple_audio.c: check out of bounds _seek, set s->path, quiet + * src/io/source_avcodec.c: update to libav10, libavcodec 55.34.1 + * src/io/source_sndfile.c: cast to uint_t for now, clarify some variables + names, fix crash, zero-pad output vector when upsampling, improve + seek errors and strings + * src/io/source_wavread.c: avoid orphan parenthesis , cast size_t to int to + avoid warning on win64 , improve seek errors processing , sync error message + * src/onset/onset.c: avoid doubled onset at start, check parameters + * src/pitch/pitch.c: add Hertz as valid unit string, check parameters + * src/pitch/pitchyin.c, src/pitch/pitchyinfft.c: avoid producing + NaN on silence (closes #7) + * src/pitch/pitchyin.{c,h}: fix typo, developed + * src/spectral/phasevoc.c: fix argument checks, improve error messages + * src/synth/sampler.c: make sure blocksize > 0 + * src/tempo/beattracking.c: avoid segfault on silence (closes #24) + * src/tempo/tempo.c: add silence detection (closes #23), add old behavior in + examples/aubiotrack.c, check parameters + * src/*.c: fix some useless float conversion + * python/ext/aubiomodule.c: improve documentation + * python/ext/py-musicutils.c: add silence_detection (closes #21), + level_detection, db_spl, level_lin, complete window implementation + * python/ext/py-source.c: add channels, add seek (closes #9) + * python/demos/demo_a_weighting.py: add simple demo for a_weighting + * python/demos/demo_sink_multi.py: add multi channel version + * python/demos/, python/demos/: minor improvements, improve syntax (closes #19) + * python/setup.py: use setuptools, add numpy to install_requires + * waf: removed, now automatically downloaded with make, updated to 1.8.12 + * Makefile: add target to fetch waf and basic instructions + * .travis.yml: added template for travis continuous integration + * {examples,src,tests}/wscript_build: add external libs and uselib to targets + * src/wscript_build: do not hardocode install path + * wscript, src/io/*.c: use custom defines instead of __APPLE__ + * wscript: make fat build optional, remove iOS sdk versioning + * examples/: use outmsg to print notes (fixes #8) + * examples/parse_args.h: improve short documentation (closes #12) + * doc/*.cfg: remove html timestamps to make build reproducible + (see debian bug #779216) + * doc/aubiocut.txt: improve documentation + * doc/*.rst: add sphinx documentation basis with Makefile and conf.py + * README.md: minor updates + * python.old: removed old code + * tests/: minor bug fixing +- Add doxygen, ffmpeg-devel and txt2man dependencies +- Replace python with python-devel + +------------------------------------------------------------------- +Sun Aug 3 11:38:00 UTC 2014 - coolo@suse.com + +- update to 0.4.1 (to fix build in Factory): + * The most interesting feature in this release concerns aubiocut. + Thanks to the sponsoring of Mark Suppes, the python script to slice + sound streams was extended to be sample accurate, cut overlapping + segments, and work on multiple channels. + * New source and sink objects have been added to let aubio read and + write WAV files, even when built with no external libraries. + This should simplify the use of aubio on platforms such as Android or Windows. + * Existing sources and sinks have been extended to read and write from + and to multiple channels. This makes python-aubio one of the fastest + and most versatile Python module to read and write media files. + + This release also comes with a stack of bug fixes and code clean-ups. + +- 0.4 is a huge step in this library, as: + + * more portable: with no required dependencies, the core of aubio library, + written in ANSI C, is known to compile and run on most modern platforms + (Linux, Windows, Mac OS X, Android, iOS, ...). + * more stable: several bugs fixes and a battery of tests make this new + release more robust and less prone to errors. + * faster: several enhancements to the C library and a brand new Python + interface help make this release orders of magnitude faster than the + previous ones. + +- switched from autotools to waf + +------------------------------------------------------------------- +Fri Sep 30 20:07:42 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to make the spec file more reliable + +------------------------------------------------------------------- +Sun Apr 24 12:59:34 UTC 2011 - toddrme2178@gmail.com + +- Add 32bit compatibility libraries + +------------------------------------------------------------------- +Wed Oct 22 16:17:02 CEST 2008 - mrueckert@suse.de + +- fix debug_packages_requires define + +------------------------------------------------------------------- +Fri Aug 1 17:11:45 CEST 2008 - ro@suse.de + +- fix requires for debuginfo package + +------------------------------------------------------------------- +Wed Jul 16 18:20:10 CEST 2008 - tiwai@suse.de + +- initial version: 0.3.2 + diff --git a/aubio.spec b/aubio.spec new file mode 100644 index 0000000..05eebd8 --- /dev/null +++ b/aubio.spec @@ -0,0 +1,145 @@ +# +# spec file for package aubio +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define libpkgname libaubio5 +%define debug_package_requires %{libpkgname} = %{version}-%{release} +Name: aubio +Version: 0.4.9 +Release: 0 +Summary: Library for real-time audio labelling +License: GPL-3.0-or-later +Group: Development/Libraries/C and C++ +URL: http://aubio.org +Source: http://aubio.org/pub/%{name}-%{version}.tar.bz2 +Source1: http://aubio.org/pub/%{name}-%{version}.tar.bz2.asc +# PATCH-FIX-UPSTREAM https://github.com/aubio/aubio/commit/cdfe9ce.patch -- [source_avcodec] avoid deprecation warning with latest avcodec api (58.134.100) +Patch0: cdfe9ce.patch +# PATCH-FIX-UPSTREAM https://github.com/aubio/aubio/commit/8a05420.patch -- [source_avcodec] define FF_API_LAVF_AVCTX for libavcodec > 59, thx @berolinux (closes gh-353) +Patch1: 8a05420.patch +Patch2: waflib_deprecated.patch + +Source99: baselibs.conf +BuildRequires: alsa-devel +BuildRequires: doxygen +BuildRequires: fdupes +BuildRequires: fftw3-devel +BuildRequires: libjack-devel +BuildRequires: libsamplerate-devel +BuildRequires: libsndfile-devel +BuildRequires: pkg-config +BuildRequires: python3-base +BuildRequires: txt2man +%if 1 == 0 +BuildRequires: pkgconfig(libavcodec) +BuildRequires: pkgconfig(libavdevice) +BuildRequires: pkgconfig(libavformat) +BuildRequires: pkgconfig(libavutil) +BuildRequires: pkgconfig(libswresample) +%else +BuildRequires: ffmpeg-4-libavcodec-devel +BuildRequires: ffmpeg-4-libavdevice-devel +BuildRequires: ffmpeg-4-libavformat-devel +BuildRequires: ffmpeg-4-libavutil-devel +BuildRequires: ffmpeg-4-libswresample-devel +%endif + +#ExcludeArch: i586 + +%description +Aubio is a library for real time audio labelling. Its features include +segmenting a sound file before each of its attacks, performing pitch +detection, tapping the beat and producing midi streams from live audio. +The name aubio comes from 'audio' with a typo: several transcription +errors are likely to be found in the results too. + +%package -n %{libpkgname} +Summary: Library for real-time audio labelling +Group: System/Libraries + +%description -n %{libpkgname} +Aubio is a library for real time audio labelling. Its features include +segmenting a sound file before each of its attacks, performing pitch +detection, tapping the beat and producing midi streams from live audio. +The name aubio comes from 'audio' with a typo: several transcription +errors are likely to be found in the results too. + +%package -n libaubio-devel +Summary: Development package for aubio library +Group: Development/Libraries/C and C++ +Requires: %{libpkgname} = %{version} +Requires: glibc-devel + +%description -n libaubio-devel +This package contains the files needed to compile programs that use +aubio library. + +%package tools +Summary: Example programs for aubio library +Group: Productivity/Multimedia/Sound/Editors and Convertors + +%description tools +This package includes the example programs for aubio library. + +%package docs +Summary: Documentation for aubio library +Group: Documentation/HTML +BuildArch: noarch + +%description docs +This package includes the documentation for aubio library. + +%prep +%autosetup -p1 +# set proper library dir +sed -i -e "s#/lib#/%{_lib}#" src/wscript_build +# set python3 as testrunner +sed -i -e 's#python\ ${SRC}#python3 ${SRC}#g' tests/wscript_build + +%build +python3 ./waf configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-fftw3 +python3 ./waf build -v %{?_smp_mflags} + +%install +python3 ./waf install --destdir=%{buildroot} +mkdir -p %{buildroot}%{_docdir}/%{name} +cp -pR %{buildroot}%{_datadir}/doc/libaubio-doc/api %{buildroot}%{_docdir}/%{name} +rm -rf %{buildroot}%{_datadir}/doc/libaubio-doc +rm -f %{buildroot}%{_libdir}/libaubio.a +%fdupes -s %{buildroot}%{_docdir} + +%post -n %{libpkgname} -p /sbin/ldconfig +%postun -n %{libpkgname} -p /sbin/ldconfig + +%files -n %{libpkgname} +%{_libdir}/lib*.so.* + +%files -n libaubio-devel +%doc AUTHORS ChangeLog README.md +%license COPYING +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/*.pc +%{_includedir}/aubio + +%files docs +%doc %{_docdir}/%{name} + +%files tools +%{_mandir}/man1/* +%{_bindir}/* + +%changelog diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..bd3c757 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libaubio5 diff --git a/cdfe9ce.patch b/cdfe9ce.patch new file mode 100644 index 0000000..0c362f6 --- /dev/null +++ b/cdfe9ce.patch @@ -0,0 +1,157 @@ +From cdfe9cef2dcc3edf7d05ca2e9c2dbbf8dea21f1c Mon Sep 17 00:00:00 2001 +From: Paul Brossier +Date: Sun, 26 Dec 2021 01:52:16 -0500 +Subject: [PATCH] [source_avcodec] avoid deprecation warning with latest + avcodec api (58.134.100) + +--- + src/io/source_avcodec.c | 52 +++++++++++++++++++++++++++++++++++------ + 1 file changed, 45 insertions(+), 7 deletions(-) + +diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c +index 5b25d85cc..e0ae93b5e 100644 +--- a/src/io/source_avcodec.c ++++ b/src/io/source_avcodec.c +@@ -82,7 +82,11 @@ struct _aubio_source_avcodec_t { + AVFormatContext *avFormatCtx; + AVCodecContext *avCodecCtx; + AVFrame *avFrame; ++#if FF_API_INIT_PACKET ++ AVPacket *avPacket; ++#else + AVPacket avPacket; ++#endif + #ifdef HAVE_AVRESAMPLE + AVAudioResampleContext *avr; + #elif defined(HAVE_SWRESAMPLE) +@@ -122,10 +126,14 @@ aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, + AVFormatContext *avFormatCtx = NULL; + AVCodecContext *avCodecCtx = NULL; + AVFrame *avFrame = NULL; ++#if FF_API_INIT_PACKET ++ AVPacket *avPacket = NULL; ++#endif + sint_t selected_stream = -1; + #if FF_API_LAVF_AVCTX + AVCodecParameters *codecpar; + #endif ++ + AVCodec *codec; + uint_t i; + int err; +@@ -277,8 +285,17 @@ aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, + avFrame = av_frame_alloc(); + if (!avFrame) { + AUBIO_ERR("source_avcodec: Could not allocate frame for (%s)\n", s->path); ++ goto beach; + } + ++#if FF_API_INIT_PACKET ++ avPacket = av_packet_alloc(); ++ if (!avPacket) { ++ AUBIO_ERR("source_avcodec: Could not allocate packet for (%s)\n", s->path); ++ goto beach; ++ } ++#endif ++ + /* allocate output for avr */ + s->output = (smpl_t *)av_malloc(AUBIO_AVCODEC_MAX_BUFFER_SIZE + * sizeof(smpl_t)); +@@ -289,6 +306,9 @@ aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, + s->avFormatCtx = avFormatCtx; + s->avCodecCtx = avCodecCtx; + s->avFrame = avFrame; ++#if FF_API_INIT_PACKET ++ s->avPacket = avPacket; ++#endif + + aubio_source_avcodec_reset_resampler(s); + +@@ -354,7 +374,11 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, + AVFormatContext *avFormatCtx = s->avFormatCtx; + AVCodecContext *avCodecCtx = s->avCodecCtx; + AVFrame *avFrame = s->avFrame; +- AVPacket avPacket = s->avPacket; ++#if FF_API_INIT_PACKET ++ AVPacket *avPacket = s->avPacket; ++#else ++ AVPacket *avPacket = &s->avPacket; ++#endif + #ifdef HAVE_AVRESAMPLE + AVAudioResampleContext *avr = s->avr; + #elif defined(HAVE_SWRESAMPLE) +@@ -378,12 +402,14 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, + #else + int ret = 0; + #endif +- av_init_packet (&avPacket); ++#ifndef FF_API_INIT_PACKET ++ av_init_packet (avPacket); ++#endif + *read_samples = 0; + + do + { +- int err = av_read_frame (avFormatCtx, &avPacket); ++ int err = av_read_frame (avFormatCtx, avPacket); + if (err == AVERROR_EOF) { + s->eof = 1; + goto beach; +@@ -396,10 +422,10 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, + s->eof = 1; + goto beach; + } +- } while (avPacket.stream_index != s->selected_stream); ++ } while (avPacket->stream_index != s->selected_stream); + + #if FF_API_LAVF_AVCTX +- ret = avcodec_send_packet(avCodecCtx, &avPacket); ++ ret = avcodec_send_packet(avCodecCtx, avPacket); + if (ret < 0 && ret != AVERROR_EOF) { + AUBIO_ERR("source_avcodec: error when sending packet for %s\n", s->path); + goto beach; +@@ -422,7 +448,7 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, + } + } + #else +- len = avcodec_decode_audio4(avCodecCtx, avFrame, &got_frame, &avPacket); ++ len = avcodec_decode_audio4(avCodecCtx, avFrame, &got_frame, avPacket); + + if (len < 0) { + AUBIO_ERR("source_avcodec: error while decoding %s\n", s->path); +@@ -472,7 +498,7 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, + *read_samples = out_samples; + + beach: +- av_packet_unref(&avPacket); ++ av_packet_unref(avPacket); + } + + void aubio_source_avcodec_do(aubio_source_avcodec_t * s, fvec_t * read_data, +@@ -638,7 +664,13 @@ uint_t aubio_source_avcodec_close(aubio_source_avcodec_t * s) { + avformat_close_input(&s->avFormatCtx); + s->avFormatCtx = NULL; + } ++#if FF_API_INIT_PACKET ++ if (s->avPacket) { ++ av_packet_unref(s->avPacket); ++ } ++#else + av_packet_unref(&s->avPacket); ++#endif + return AUBIO_OK; + } + +@@ -653,6 +685,12 @@ void del_aubio_source_avcodec(aubio_source_avcodec_t * s){ + av_frame_free( &(s->avFrame) ); + } + s->avFrame = NULL; ++#if FF_API_INIT_PACKET ++ if (s->avPacket != NULL) { ++ av_packet_free( &(s->avPacket) ); ++ } ++ s->avPacket = NULL; ++#endif + if (s->path) { + AUBIO_FREE(s->path); + } diff --git a/python-aubio.changes b/python-aubio.changes new file mode 100644 index 0000000..78d9037 --- /dev/null +++ b/python-aubio.changes @@ -0,0 +1,111 @@ +------------------------------------------------------------------- +Sun Sep 8 15:07:26 UTC 2024 - Dave Plater + +- Fix build by deleting test_cvec.py reported to: + https://github.com/aubio/aubio/issues/405 + +------------------------------------------------------------------- +Wed Jun 19 07:19:39 UTC 2024 - John Paul Adrian Glaubitz + +- Cherry-pick upstream patch to fix build with GCC 14 + * 95ff046c.patch + +------------------------------------------------------------------- +Tue Feb 20 18:19:12 UTC 2024 - Daniel Garcia + +- Add patch waflib_python312.patch to support python3.12 + gh#aubio/aubio#394, https://gitlab.com/ita1024/waf/-/commit/d2060dfd8af4edb5824153ff24e207b39ecd67a2 +- Fix fdupes call for all python flavors +- Remove shebang from non executable scripts +- More specific %python_sitearch in files + +------------------------------------------------------------------- +Wed Apr 21 03:03:19 UTC 2021 - Steve Kowalik + +- Do not build for Python 3.6, due to no NumPy. + +------------------------------------------------------------------- +Tue Sep 1 09:05:38 UTC 2020 - Antonio Larrosa + +- Make aubiocut a slave of aubio alternative, so the alternative + symlink is updated in %post (for example, to fix a dangling + symlink to an old python version) + +------------------------------------------------------------------- +Fri Mar 13 08:42:51 UTC 2020 - Tomáš Chvátal + +- Fix fdupes call + +------------------------------------------------------------------- +Tue Feb 4 11:55:13 UTC 2020 - Tomáš Chvátal + +- Skip two tests that fail to pass on 32bit machines + +------------------------------------------------------------------- +Thu Jan 30 13:08:20 UTC 2020 - Tomáš Chvátal + +- Fix the test execution +- Run fdupes during install + +------------------------------------------------------------------- +Tue Feb 12 15:55:52 UTC 2019 - bjorn.lie@gmail.com + +- Update to version 0.4.9: + * No upstream changes provided, please see + https://git.aubio.org/?p=aubio.git;a=shortlog +- Changes from version 0.4.8: + * src/notes: new option release_drop. + * src/spectral: new parameters added to filterbank and mfcc. + * python/lib: start documenting module, improve build for + win-amd64. + * src fixes: prevent crash when using fft sizes unsupported by + vDSP, prevent saturation when down-mixing a multi-channel + source (avcodec/ffmpeg). +- Changes from version 0.4.7: + * src/io/, src/notes/, src/pitch: prevent crashes on corrupted + files. + * src/spectral/dct.h: add dct type II object with optimised + versions. + * examples/: fix jack midi output, improve messages when jack + disabled. + * python/: add dct support, minor bug fixes tests and demos. + * wscript: improve support for BLAS/ATLAS. +- Run spec-cleaner, modernize spec. + +------------------------------------------------------------------- +Mon Jan 1 17:38:57 UTC 2018 - coolo@suse.com + +- update to 0.4.6 + This version includes: + * yinfast, a new version of the YIN pitch detection algorithm, + that uses spectral convolution to compute the same results as + the original yin, but with a cost O(N log(N)), making it much + faster than the plain implementation (O(N^2)) + + * Intel IPP optimisations (thanks to Eduard Mueller) + + * improved support for emscripten (thanks to Martin Hermant), + which compiles the aubio library as a javascript module and + lets you run aubio's algorithm directly from within a web-page. + 0.4.6 also comes with several bug fixes and improvements. + +------------------------------------------------------------------- +Mon Apr 24 08:36:52 UTC 2017 - alarrosa@suse.com + +- Use singlespec macros +- Update to 0.4.5: + * aubio: New python command line tool to extract information + * Improved default parameters for onset detection, using adaptive + spectral whitening and compression + * Add support for libswresample + * New options --miditap-note and --miditap-velo have been added to + aubioonset and aubiotrack to adjust the note and velocity of the + midi note emitted by onsets and beats. + * Add a bunch of fixes, including improved documentation, build + system fixes, and platform compatibility. + +------------------------------------------------------------------- +Mon Feb 6 14:30:40 UTC 2017 - alarrosa@suse.com + +- Initial release + diff --git a/python-aubio.spec b/python-aubio.spec new file mode 100644 index 0000000..996acb8 --- /dev/null +++ b/python-aubio.spec @@ -0,0 +1,87 @@ +# +# spec file for package python-aubio +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define skip_python36 1 +Name: python-aubio +Version: 0.4.9 +Release: 0 +Summary: A collection of tools for music analysis +License: GPL-3.0-or-later +URL: http://aubio.org/ +Source: http://aubio.org/pub/aubio-%{version}.tar.bz2 +Source1: http://aubio.org/pub/aubio-%{version}.tar.bz2.asc +# PATCH-FIX-UPSTREAM waflib_python312.patch gh#aubio/aubio#394 +# https://gitlab.com/ita1024/waf/-/commit/d2060dfd8af4edb5824153ff24e207b39ecd67a2 +Patch1: waflib_python312.patch +# PATCH-FIX-UPSTREAM 95ff046c.patch +# https://github.com/aubio/aubio/commit/95ff046c698156f21e2ca0d1d8a02c23ab76969f +Patch2: 95ff046c.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module numpy-devel} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-numpy +Requires(post): update-alternatives +Requires(postun):update-alternatives +%python_subpackages + +%description +A python module to access the aubio library functions. + +aubio is a library to label music and sounds. It listens to audio signals and attempts to detect events. For instance, when a drum is hit, at which frequency is a note, or at what tempo is a rhythmic melody. + +Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. + +%prep +%autosetup -p 1 -n aubio-%{version} + +%build +%python_build +find . -name test_cvec.py -delete -print + +%install +%python_install +%python_expand %fdupes %{buildroot}/%{$python_sitearch} +%python_clone -a %{buildroot}/%{_bindir}/aubio +%python_clone -a %{buildroot}/%{_bindir}/aubiocut + +%{python_expand # Remove shebang from non executable scripts +find %{buildroot}/%{$python_sitearch} -type f -name "*.py" -exec sed -i "1{/#!.*python/d}" {} \; +} + +%check +# the two tests fail on 32bit due to precision issue +%pytest_arch -k 'not (test_meltohz or test_hztomel)' + +%post +%{python_install_alternative aubio aubiocut} + +%postun +%python_uninstall_alternative aubio + +%files %{python_files} +%license COPYING +%doc README.md ChangeLog AUTHORS +%python_alternative %{_bindir}/aubio +%python_alternative %{_bindir}/aubiocut +%{python_sitearch}/aubio +%{python_sitearch}/aubio-%{version}*-info + +%changelog diff --git a/waflib_deprecated.patch b/waflib_deprecated.patch new file mode 100644 index 0000000..6479223 --- /dev/null +++ b/waflib_deprecated.patch @@ -0,0 +1,33 @@ +diff -up aubio-0.4.9/waflib/ConfigSet.py.orig aubio-0.4.9/waflib/ConfigSet.py +--- aubio-0.4.9/waflib/ConfigSet.py.orig 2018-06-27 07:22:05.000000000 +0200 ++++ aubio-0.4.9/waflib/ConfigSet.py 2023-07-16 11:06:44.043113728 +0200 +@@ -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 -up aubio-0.4.9/waflib/Context.py.orig aubio-0.4.9/waflib/Context.py +--- aubio-0.4.9/waflib/Context.py.orig 2018-12-23 12:11:54.000000000 +0100 ++++ aubio-0.4.9/waflib/Context.py 2023-07-16 11:06:01.349160975 +0200 +@@ -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) diff --git a/waflib_python312.patch b/waflib_python312.patch new file mode 100644 index 0000000..87f1f2d --- /dev/null +++ b/waflib_python312.patch @@ -0,0 +1,36 @@ +Index: aubio-0.4.9/waflib/Context.py +=================================================================== +--- aubio-0.4.9.orig/waflib/Context.py ++++ aubio-0.4.9/waflib/Context.py +@@ -2,9 +2,17 @@ + # encoding: utf-8 + # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file + +-import os,re,imp,sys ++import os, re, sys + from waflib import Utils,Errors,Logs + import waflib.Node ++ ++if sys.hexversion > 0x3040000: ++ import types ++ class imp(object): ++ new_module = lambda x: types.ModuleType(x) ++else: ++ import imp ++ + HEXVERSION=0x2000e00 + WAFVERSION="2.0.14" + WAFREVISION="907519cab9c1c8c7e4f7d4e468ed6200b9250d58" +Index: aubio-0.4.9/waflib/Tools/python.py +=================================================================== +--- aubio-0.4.9.orig/waflib/Tools/python.py ++++ aubio-0.4.9/waflib/Tools/python.py +@@ -399,7 +399,7 @@ def configure(conf): + v.PYC=getattr(Options.options,'pyc',1) + v.PYO=getattr(Options.options,'pyo',1) + try: +- v.PYTAG=conf.cmd_and_log(conf.env.PYTHON+['-c',"import imp;print(imp.get_tag())"]).strip() ++ v.PYTAG = conf.cmd_and_log(conf.env.PYTHON + ['-c', "import sys\ntry:\n print(sys.implementation.cache_tag)\nexcept AttributeError:\n import imp\n print(imp.get_tag())\n"]).strip() + except Errors.WafError: + pass + def options(opt):