aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorpkubaj <pkubaj@FreeBSD.org>2019-08-02 02:56:20 +0800
committerpkubaj <pkubaj@FreeBSD.org>2019-08-02 02:56:20 +0800
commit1a0a5f7b6ba67ec36f3d7056d3929cafd2f9fa2f (patch)
tree995b7c73ea0e7a6465aaea0931faf3ede7eb023c /math
parent6361772266806246c50c9d35489b0965efca62bd (diff)
downloadfreebsd-ports-gnome-1a0a5f7b6ba67ec36f3d7056d3929cafd2f9fa2f.tar.gz
freebsd-ports-gnome-1a0a5f7b6ba67ec36f3d7056d3929cafd2f9fa2f.tar.zst
freebsd-ports-gnome-1a0a5f7b6ba67ec36f3d7056d3929cafd2f9fa2f.zip
math/g2o: fix build on non-x86 architectures
This port seems to enable all SSE* CPU features even outside of x86 platforms. Disable that to fix build. Also add USES=compiler:c++11-lang, the port needs C++11 and add USES=gl. PR: 238895 Approved by: yuri (maintainer timeout), linimon (mentor) Differential Revision: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238895
Diffstat (limited to 'math')
-rw-r--r--math/g2o/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/math/g2o/Makefile b/math/g2o/Makefile
index 36f33f407b3a..65e6f5293420 100644
--- a/math/g2o/Makefile
+++ b/math/g2o/Makefile
@@ -15,7 +15,7 @@ LICENSE_COMB= dual
LIB_DEPENDS= libcxsparse.so:math/suitesparse \
libQGLViewer-qt5.so:graphics/libQGLViewer
-USES= cmake eigen:3 qt:5
+USES= cmake compiler:c++11-lang gl eigen:3 qt:5
USE_GITHUB= yes
GH_ACCOUNT= RainerKuemmerle
USE_GL= gl glu
@@ -48,6 +48,12 @@ SSE3_CMAKE_ON= -DDISABLE_SSE4_1:BOOL=ON -DDISABLE_SSE4_2:BOOL=ON -DDISABLE_SSE4
SSE41_CMAKE_ON= -DDISABLE_SSE4_2:BOOL=ON -DDISABLE_SSE4_A:BOOL=ON
SSE42_CMAKE_ON= -DDISABLE_SSE4_A:BOOL=ON
+.include <bsd.port.options.mk>
+
+.if ${ARCH} != amd64 && ${ARCH} != i386
+CMAKE_ARGS+= -DDISABLE_SSE2:BOOL=ON -DDISABLE_SSE3:BOOL=ON -DDISABLE_SSE4_1:BOOL=ON -DDISABLE_SSE4_2:BOOL=ON -DDISABLE_SSE4_A:BOOL=ON
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include|' \
${WRKSRC}/cmake_modules/*.cmake