aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorpkubaj <pkubaj@FreeBSD.org>2019-08-20 07:33:39 +0800
committerpkubaj <pkubaj@FreeBSD.org>2019-08-20 07:33:39 +0800
commitd3615f3897cc197f66dcea8f3613984baf07dbc8 (patch)
tree751bbdfec57cc7379e6187c8cc718b5c2e7311c1 /math
parent15bbee5bcc7df2b6b0144fb8bac0eab7efa9117d (diff)
downloadfreebsd-ports-gnome-d3615f3897cc197f66dcea8f3613984baf07dbc8.tar.gz
freebsd-ports-gnome-d3615f3897cc197f66dcea8f3613984baf07dbc8.tar.zst
freebsd-ports-gnome-d3615f3897cc197f66dcea8f3613984baf07dbc8.zip
math/sleef: fix build on powerpc64
Altivec needs {} for vectors instead of (). lib/libsleefgnuabi.so is not built on powerpc64. PR: 239468 Approved by: jmd (maintainer), mat (mentor) Differential Revision: https://reviews.freebsd.org/D21216
Diffstat (limited to 'math')
-rw-r--r--math/sleef/Makefile8
-rw-r--r--math/sleef/files/patch-src_libm-tester_tester3.c14
-rw-r--r--math/sleef/pkg-plist6
3 files changed, 25 insertions, 3 deletions
diff --git a/math/sleef/Makefile b/math/sleef/Makefile
index eabe5c6dd010..62527329b5b6 100644
--- a/math/sleef/Makefile
+++ b/math/sleef/Makefile
@@ -18,4 +18,12 @@ USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= shibatch
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == powerpc64
+PLIST_SUB+= NO_PPC64="@comment "
+.else
+PLIST_SUB+= NO_PPC64=""
+.endif
+
.include <bsd.port.mk>
diff --git a/math/sleef/files/patch-src_libm-tester_tester3.c b/math/sleef/files/patch-src_libm-tester_tester3.c
new file mode 100644
index 000000000000..0f4115457373
--- /dev/null
+++ b/math/sleef/files/patch-src_libm-tester_tester3.c
@@ -0,0 +1,14 @@
+--- src/libm-tester/tester3.c.orig 2019-07-26 21:42:15 UTC
++++ src/libm-tester/tester3.c
+@@ -71,9 +71,9 @@ static INLINE float getsvfloat32_t(svfloat32_t v, int
+ #endif
+
+ #ifdef __VSX__
+-static INLINE vector_double setvector_double(double d, int r) { double a[2]; memrand(a, sizeof(a)); a[r & 1] = d; return (vector double) ( a[0], a[1] ); }
++static INLINE vector_double setvector_double(double d, int r) { double a[2]; memrand(a, sizeof(a)); a[r & 1] = d; return (vector double) { a[0], a[1] }; }
+ static INLINE double getvector_double(vector double v, int r) { double a[2]; return unifyValue(v[r & 1]); }
+-static INLINE vector_float setvector_float(float d, int r) { float a[4]; memrand(a, sizeof(a)); a[r & 3] = d; return (vector float) ( a[0], a[1], a[2], a[3] ); }
++static INLINE vector_float setvector_float(float d, int r) { float a[4]; memrand(a, sizeof(a)); a[r & 3] = d; return (vector float) { a[0], a[1], a[2], a[3] }; }
+ static INLINE float getvector_float(vector float v, int r) { float a[4]; return unifyValuef(v[r & 3]); }
+ #endif
+
diff --git a/math/sleef/pkg-plist b/math/sleef/pkg-plist
index 6043645bce70..ef90b71602e9 100644
--- a/math/sleef/pkg-plist
+++ b/math/sleef/pkg-plist
@@ -6,6 +6,6 @@ lib/libsleef.so.3.4.0
lib/libsleefdft.so
lib/libsleefdft.so.3
lib/libsleefdft.so.3.4.0
-lib/libsleefgnuabi.so
-lib/libsleefgnuabi.so.3
-lib/libsleefgnuabi.so.3.4
+%%NO_PPC64%%lib/libsleefgnuabi.so
+%%NO_PPC64%%lib/libsleefgnuabi.so.3
+%%NO_PPC64%%lib/libsleefgnuabi.so.3.4