[packages/guitarix] fix detection of zita-resampler >= 1.10
atler
atler at pld-linux.org
Wed Jul 5 03:17:22 CEST 2023
commit dbca578984a750fc5f498ae15b7fb3a161199ef8
Author: Jan Palus <atler at pld-linux.org>
Date: Wed Jul 5 01:16:31 2023 +0200
fix detection of zita-resampler >= 1.10
guitarix.spec | 2 ++
zita-resampler-1.10.patch | 27 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
---
diff --git a/guitarix.spec b/guitarix.spec
index 87e4d59..f3ad0a6 100644
--- a/guitarix.spec
+++ b/guitarix.spec
@@ -6,6 +6,7 @@ License: GPL v2+, GPL v3+ (abgate plugin)
Group: Applications/Multimedia
Source0: http://downloads.sourceforge.net/guitarix/%{name}2-%{version}.tar.xz
# Source0-md5: d1757e08ddc54c4ec07defea6a30ac5b
+Patch0: zita-resampler-1.10.patch
URL: https://guitarix.org/
BuildRequires: avahi-gobject-devel
BuildRequires: bluez-libs-devel
@@ -52,6 +53,7 @@ use the feedback and feedforward sliders.
%prep
%setup -q
+%patch0 -p1
%build
CC="%{__cc}" \
diff --git a/zita-resampler-1.10.patch b/zita-resampler-1.10.patch
new file mode 100644
index 0000000..0c75fcf
--- /dev/null
+++ b/zita-resampler-1.10.patch
@@ -0,0 +1,27 @@
+diff -ur guitarix-0.44.1.orig/waftools/zita-resampler.py guitarix-0.44.1/waftools/zita-resampler.py
+--- guitarix-0.44.1.orig/waftools/zita-resampler.py 2022-05-02 20:38:03.000000000 +0200
++++ guitarix-0.44.1/waftools/zita-resampler.py 2023-07-05 00:19:49.453916836 +0200
+@@ -15,12 +15,21 @@
+ code="""
+ #include <zita-resampler/resampler.h>
+ #include <zita-resampler/resampler-table.h>
+- #if ZITA_RESAMPLER_MAJOR_VERSION != %d
++ #define EXPECTED_ZITA_RESAMPLER_VERSION %d
++ #if defined(ZITA_RESAMPLER_MAJOR_VERSION) && ZITA_RESAMPLER_MAJOR_VERSION != EXPECTED_ZITA_RESAMPLER_VERSION
+ #error
+ #endif
+- int main(){ return 0; }
++ int main(){
++ #if !defined(ZITA_RESAMPLER_MAJOR_VERSION)
++ if (zita_resampler_major_version() != 1)
++ throw "error";
++ else
++ #endif
++ return 0;
++ }
+ """ % expected_zita_resampler_version
+ conf.check_cxx(
++ execute=True,
+ fragment=code,
+ lib='zita-resampler',
+ uselib_store='ZITA_RESAMPLER',
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/guitarix.git/commitdiff/d370ea15ee527b35b47f66a3e1ef8b4ac1ca9457
More information about the pld-cvs-commit
mailing list