commit:     ed4ab9a75769fb675f622033acab97637fa6b64d
Author:     Alexander Tsoy <alexander <AT> tsoy <DOT> me>
AuthorDate: Sat Jun 17 15:51:35 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 18 04:24:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed4ab9a7

media-sound/guitarix: fix build w/ >=zita-resampler-1.10

Closes: https://bugs.gentoo.org/900609
Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me>
Closes: https://github.com/gentoo/gentoo/pull/31510
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../guitarix-0.44.1-zita-resampler-1.10.patch      | 35 ++++++++++++++++++++++
 media-sound/guitarix/guitarix-0.44.1.ebuild        |  1 +
 2 files changed, 36 insertions(+)

diff --git 
a/media-sound/guitarix/files/guitarix-0.44.1-zita-resampler-1.10.patch 
b/media-sound/guitarix/files/guitarix-0.44.1-zita-resampler-1.10.patch
new file mode 100644
index 000000000000..1eed9bafda27
--- /dev/null
+++ b/media-sound/guitarix/files/guitarix-0.44.1-zita-resampler-1.10.patch
@@ -0,0 +1,35 @@
+From 4c15aea1425ef19a5d68387e60abfab830fed20b Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <alexan...@tsoy.me>
+Date: Thu, 15 Jun 2023 22:05:29 +0300
+Subject: [PATCH] Fix major version detection of zita-resampler >=1.10
+
+https://github.com/brummer10/guitarix/pull/129
+
+Fixes #122
+---
+ waftools/zita-resampler.py | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/waftools/zita-resampler.py b/waftools/zita-resampler.py
+index 1cd49a2a..ba5bbc7c 100644
+--- a/waftools/zita-resampler.py
++++ b/waftools/zita-resampler.py
+@@ -18,10 +18,11 @@ def configure(conf):
+     code="""
+     #include <zita-resampler/resampler.h>
+     #include <zita-resampler/resampler-table.h>
+-    #if ZITA_RESAMPLER_MAJOR_VERSION != %d
+-    #error
+-    #endif
+-    int main(){ return 0; }
++    int main() {
++        int maj = zita_resampler_major_version();
++        if (maj == %d) { return 0; };
++        return 1;
++    }
+     """ % expected_zita_resampler_version
+     conf.check_cxx(
+         fragment=code,
+-- 
+2.39.3
+

diff --git a/media-sound/guitarix/guitarix-0.44.1.ebuild 
b/media-sound/guitarix/guitarix-0.44.1.ebuild
index 04e6a893b200..5529fdc46ede 100644
--- a/media-sound/guitarix/guitarix-0.44.1.ebuild
+++ b/media-sound/guitarix/guitarix-0.44.1.ebuild
@@ -64,6 +64,7 @@ DOCS=( changelog README )
 PATCHES=(
        "${FILESDIR}"/${PN}-0.41.0-nostrip.patch
        "${FILESDIR}"/${PN}-0.41.0-py3.11.patch
+       "${FILESDIR}"/${PN}-0.44.1-zita-resampler-1.10.patch
 )
 
 src_configure() {

Reply via email to