aboutsummaryrefslogtreecommitdiffstats
path: root/audio/artyfx-lv2
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2019-08-05 18:59:39 +0800
committerPiotr Kubaj <pkubaj@FreeBSD.org>2019-08-05 18:59:39 +0800
commit807c89db58719382498c4be9d729573776015833 (patch)
tree92e0a180a6b695f5cdb798d53482d33d8920e45a /audio/artyfx-lv2
parent291821e7d21874898d4b30d7e716779b2ee8e6cb (diff)
downloadfreebsd-ports-gnome-807c89db58719382498c4be9d729573776015833.tar.gz
freebsd-ports-gnome-807c89db58719382498c4be9d729573776015833.tar.zst
freebsd-ports-gnome-807c89db58719382498c4be9d729573776015833.zip
audio/artyfx-lv2: fix build with GCC-based architectures
The fix for clang in files/patch-src_avtk_avtk_picojson.hxx breaks GCC. Have two versions for two compilers. Fix altivec in src/avtk/libs/pffft.cxx and add -maltivec to CXXFLAGS on powerpc64. Also use new compilers. PR: 239518 Approved by: yuri (maintainer), tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D21141
Diffstat (limited to 'audio/artyfx-lv2')
-rw-r--r--audio/artyfx-lv2/Makefile4
-rw-r--r--audio/artyfx-lv2/files/patch-src_avtk_avtk_picojson.hxx8
-rw-r--r--audio/artyfx-lv2/files/patch-src_avtk_libs_pffft.cxx30
3 files changed, 39 insertions, 3 deletions
diff --git a/audio/artyfx-lv2/Makefile b/audio/artyfx-lv2/Makefile
index eb0c96025fe5..eb7b6a69f034 100644
--- a/audio/artyfx-lv2/Makefile
+++ b/audio/artyfx-lv2/Makefile
@@ -17,7 +17,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= lv2>0:audio/lv2
LIB_DEPENDS= libsndfile.so:audio/libsndfile
-USES= cmake localbase:ldflags pkgconfig
+USES= cmake compiler:c++11-lang gnome localbase:ldflags pkgconfig
USE_GITHUB= yes
GH_ACCOUNT= openAVproductions
GH_PROJECT= openAV-ArtyFX
@@ -31,6 +31,8 @@ OPTIONS_DEFAULT_i386= SSE
SSE_CMAKE_ON= -DPORT_SIMD_FLAGS:STRING="-msse -msse2 -mfpmath=sse"
+CXXFLAGS_powerpc64= -maltivec
+
post-patch:
@${REINPLACE_CMD} -e 's| -g | |; s| -O1 | |; s/-msse2 -mfpmath=sse/$${PORT_SIMD_FLAGS}/g' \
${WRKSRC}/CMakeLists.txt
diff --git a/audio/artyfx-lv2/files/patch-src_avtk_avtk_picojson.hxx b/audio/artyfx-lv2/files/patch-src_avtk_avtk_picojson.hxx
index f4b5a3179cbb..5da36f615816 100644
--- a/audio/artyfx-lv2/files/patch-src_avtk_avtk_picojson.hxx
+++ b/audio/artyfx-lv2/files/patch-src_avtk_avtk_picojson.hxx
@@ -1,11 +1,15 @@
---- src/avtk/avtk/picojson.hxx.orig 2018-05-29 06:05:03 UTC
+--- src/avtk/avtk/picojson.hxx.orig 2018-02-25 11:56:24 UTC
+++ src/avtk/avtk/picojson.hxx
-@@ -204,7 +204,7 @@ inline value::value(double n) : type_(nu
+@@ -204,7 +204,11 @@ inline value::value(double n) : type_(number_type)
#ifdef _MSC_VER
! _finite(n)
#elif __cplusplus>=201103L || !(defined(isnan) && defined(isinf))
- std::isnan(n) || std::isinf(n)
++#ifdef __GNUC__
++ std::isnan(n) || std::isinf(n)
++#else
+ isnanf(n) || isinf(n)
++#endif
#else
isnan(n) || isinf(n)
#endif
diff --git a/audio/artyfx-lv2/files/patch-src_avtk_libs_pffft.cxx b/audio/artyfx-lv2/files/patch-src_avtk_libs_pffft.cxx
new file mode 100644
index 000000000000..61ec324e64ee
--- /dev/null
+++ b/audio/artyfx-lv2/files/patch-src_avtk_libs_pffft.cxx
@@ -0,0 +1,30 @@
+--- src/avtk/libs/pffft.cxx.orig 2019-07-29 20:43:14 UTC
++++ src/avtk/libs/pffft.cxx
+@@ -98,6 +98,7 @@
+ Altivec support macros
+ */
+ #if !defined(PFFFT_SIMD_DISABLE) && (defined(__ppc__) || defined(__ppc64__))
++#include <altivec.h>
+ typedef vector float v4sf;
+ # define SIMD_SZ 4
+ # define VZERO() ((vector float) vec_splat_u8(0))
+@@ -113,8 +114,8 @@ inline v4sf ld_ps1(const float *p)
+ # define LD_PS1(p) ld_ps1(&p)
+ # define INTERLEAVE2(in1, in2, out1, out2) { v4sf tmp__ = vec_mergeh(in1, in2); out2 = vec_mergel(in1, in2); out1 = tmp__; }
+ # define UNINTERLEAVE2(in1, in2, out1, out2) { \
+- vector unsigned char vperm1 = (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
+- vector unsigned char vperm2 = (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
++ vector unsigned char vperm1 = (vector unsigned char){0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27}; \
++ vector unsigned char vperm2 = (vector unsigned char){4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31}; \
+ v4sf tmp__ = vec_perm(in1, in2, vperm1); out2 = vec_perm(in1, in2, vperm2); out1 = tmp__; \
+ }
+ # define VTRANSPOSE4(x0,x1,x2,x3) { \
+@@ -127,7 +128,7 @@ inline v4sf ld_ps1(const float *p)
+ x2 = vec_mergeh(y1, y3); \
+ x3 = vec_mergel(y1, y3); \
+ }
+-# define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
++# define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char){16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15})
+ # define VALIGNED(ptr) ((((long)(ptr)) & 0xF) == 0)
+
+ /*