From ccdf3595f71228317831be4c1e545c622596d1fa Mon Sep 17 00:00:00 2001 From: naddy Date: Sun, 15 Apr 2018 14:30:15 +0000 Subject: [PATCH] For some reason, clang6 does not accept __builtin_sinf in this construct; replace with sinf(). --- audio/caps-plugins/Makefile | 4 +-- .../caps-plugins/patches/patch-dsp_v4f_IIR2_h | 30 +++++++++++++++++-- audio/caps-plugins/patches/patch-dsp_v4f_h | 19 ++++++++++++ 3 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 audio/caps-plugins/patches/patch-dsp_v4f_h diff --git a/audio/caps-plugins/Makefile b/audio/caps-plugins/Makefile index 7811ab8f1fa..3133b1ce2be 100644 --- a/audio/caps-plugins/Makefile +++ b/audio/caps-plugins/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.9 2017/07/26 22:45:15 sthen Exp $ +# $OpenBSD: Makefile,v 1.10 2018/04/15 14:30:15 naddy Exp $ COMMENT = CAPS LADSPA plugins V = 0.9.24 DISTNAME = caps_${V} -REVISION = 1 +REVISION = 2 PKGNAME = caps-plugins-${V} CATEGORIES = audio EXTRACT_SUFX = .tar.bz2 diff --git a/audio/caps-plugins/patches/patch-dsp_v4f_IIR2_h b/audio/caps-plugins/patches/patch-dsp_v4f_IIR2_h index a3c9184d381..d49a72e1e3f 100644 --- a/audio/caps-plugins/patches/patch-dsp_v4f_IIR2_h +++ b/audio/caps-plugins/patches/patch-dsp_v4f_IIR2_h @@ -1,6 +1,7 @@ -$OpenBSD: patch-dsp_v4f_IIR2_h,v 1.1 2015/05/09 08:00:55 robert Exp $ ---- dsp/v4f_IIR2.h.orig Tue Apr 28 08:36:38 2015 -+++ dsp/v4f_IIR2.h Tue Apr 28 08:37:03 2015 +$OpenBSD: patch-dsp_v4f_IIR2_h,v 1.2 2018/04/15 14:30:15 naddy Exp $ +Index: dsp/v4f_IIR2.h +--- dsp/v4f_IIR2.h.orig ++++ dsp/v4f_IIR2.h @@ -32,7 +32,7 @@ namespace DSP { @@ -10,3 +11,26 @@ $OpenBSD: patch-dsp_v4f_IIR2_h,v 1.1 2015/05/09 08:00:55 robert Exp $ inline float pow10f(float f) {return pow(10,f);} #endif +@@ -45,8 +45,8 @@ class RBJv4 + { + v4f_t w = v4f_2pi * f; + +- sin = v4f_map<__builtin_sinf> (w); +- cos = v4f_map<__builtin_cosf> (w); ++ sin = v4f_map (w); ++ cos = v4f_map (w); + + alpha = sin / (v4f_2 * Q); + } +@@ -549,9 +549,9 @@ class Resonator4fBank + { + v4f_t * a = state + i*Item; + f *= v4f_2pi; +- a[0] = v4f_map<__builtin_sinf> (f); ++ a[0] = v4f_map (f); + a[0] *= gain; +- a[5] = v4f_map<__builtin_cosf> (f); ++ a[5] = v4f_map (f); + set_r (i, r); + } + void set_r (int i, v4f_t r) diff --git a/audio/caps-plugins/patches/patch-dsp_v4f_h b/audio/caps-plugins/patches/patch-dsp_v4f_h new file mode 100644 index 00000000000..3b920964981 --- /dev/null +++ b/audio/caps-plugins/patches/patch-dsp_v4f_h @@ -0,0 +1,19 @@ +$OpenBSD: patch-dsp_v4f_h,v 1.1 2018/04/15 14:30:15 naddy Exp $ + +Index: dsp/v4f.h +--- dsp/v4f.h.orig ++++ dsp/v4f.h +@@ -150,10 +150,10 @@ class Sin4f + { + v4f_t *y = data(); + v4f_t w = -v4f_pi * f; +- y[0] = v4f_map<__builtin_sinf> (w); +- y[1] = v4f_map<__builtin_sinf> (v4f_2 * w); ++ y[0] = v4f_map (w); ++ y[1] = v4f_map (v4f_2 * w); + /* b in above scalar implementation is y[2] in the flat data */ +- y[2] = v4f_2 * v4f_map<__builtin_cosf> (w); /* b */ ++ y[2] = v4f_2 * v4f_map (w); /* b */ + z = 0; + } +