aboutsummaryrefslogtreecommitdiff
path: root/graphics/py-s2
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2020-12-18 15:03:55 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2020-12-18 15:03:55 +0000
commit19cb0dd149304005aefb22049ce38b6e23b3fbb1 (patch)
treefe9ae9191d85bccef92584a33a20474b6a8d6fc8 /graphics/py-s2
parent33f4c7b9542212f484abda428b90a7fdc9885355 (diff)
downloadports-19cb0dd149304005aefb22049ce38b6e23b3fbb1.tar.gz
ports-19cb0dd149304005aefb22049ce38b6e23b3fbb1.zip
graphics/py-s2: fix build on powerpc64 head
__builtin_bpermd with clang requires POWER7 or later: In file included from CMakeFiles/_pywraps2.dir/s2PYTHON_wrap.cxx:4427: In file included from /usr/local/include/s2/util/coding/coder.h:32: In file included from /usr/local/include/s2/util/coding/varint.h:41: /usr/local/include/s2/util/bits/bits.h:509:19: error: this builtin is only valid on POWER7 or later CPUs uint64 result = __builtin_bpermd(0x3f3e3d3c3b3a3938, temp); But GCC can use __builtin_bpermd without resorting to forcing POWER7.
Notes
Notes: svn path=/head/; revision=558380
Diffstat (limited to 'graphics/py-s2')
-rw-r--r--graphics/py-s2/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/graphics/py-s2/Makefile b/graphics/py-s2/Makefile
index d6e12988ce20..2904aca8d112 100644
--- a/graphics/py-s2/Makefile
+++ b/graphics/py-s2/Makefile
@@ -17,7 +17,7 @@ BUILD_DEPENDS= s2>=${PORTVERSION}:graphics/s2 \
swig:devel/swig
LIB_DEPENDS= libs2.so:graphics/s2
-USES= cmake compiler:c++11-lang localbase:ldflags python
+USES= cmake localbase:ldflags python
WRKSRC_SUBDIR= src/python
@@ -25,4 +25,12 @@ GH_ACCOUNT= google
GH_PROJECT= s2geometry
USE_GITHUB= yes
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == powerpc64
+USES+= compiler:gcc-c++11-lib
+.else
+USES+= compiler:c++11-lang
+.endif
+
.include <bsd.port.mk>