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
This commit is contained in:
parent
291821e7d2
commit
807c89db58
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=508161
@ -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
|
||||
|
@ -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
|
||||
|
30
audio/artyfx-lv2/files/patch-src_avtk_libs_pffft.cxx
Normal file
30
audio/artyfx-lv2/files/patch-src_avtk_libs_pffft.cxx
Normal file
@ -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)
|
||||
|
||||
/*
|
Loading…
Reference in New Issue
Block a user