Changeset View
Changeset View
Standalone View
Standalone View
science/g2o/Makefile
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
# Created by: Yuri Victorovich <yuri@FreeBSD.org> | |||||
# $FreeBSD$ | |||||
PORTNAME= g2o | |||||
DISTVERSION= 20170730 | |||||
DISTVERSIONSUFFIX= _git-58-g56b0344 | |||||
CATEGORIES= science math | |||||
MAINTAINER= yuri@FreeBSD.org | |||||
COMMENT= General framework for graph optimization | |||||
LICENSE= LGPL21 | |||||
BUILD_DEPENDS= eigen>0:math/eigen3 | |||||
LIB_DEPENDS= libcxsparse.so:math/suitesparse \ | |||||
libQGLViewer-qt5.so:graphics/libQGLViewer | |||||
USES= cmake:outsource | |||||
USE_GITHUB= yes | |||||
GH_ACCOUNT= RainerKuemmerle | |||||
USE_GL= gl glu | |||||
USE_QT5= core gui opengl xml widgets qmake_build buildtools_build | |||||
USE_LDCONFIG= yes | |||||
CMAKE_ARGS= -DG2O_FAST_MATH:BOOL=ON \ | |||||
-DDO_SSE_AUTODETECT:BOOL=OFF | |||||
adamw: Why not enable SSE_AUTODETECT instead of doing all the flavours? | |||||
Not Done Inline ActionsWith SSE_AUTODETECT the current SSE support on the package building server will be recorded, and such package will generally break on systems with lower SSE support in CPU. This is why it isn't a trivial thing, and I did it this way. I tried to make this package to support SIMD properly, as opposed to just doing SSE2, or just doing autodetect. Both of these approaches are generally incorrect. yuri: With `SSE_AUTODETECT` the current SSE support on the package building server will be recorded… | |||||
Not Done Inline ActionsAh, got it. It's a build-time autodetection. I'd assumed it was a runtime autodetection. Flavours makes sense. adamw: Ah, got it. It's a build-time autodetection. I'd assumed it was a runtime autodetection. | |||||
# g2o can take advantage of SIMD on i386/amd64: the flavor corresponding to the machine should be installed | |||||
.include <bsd.port.options.mk> | |||||
.if ${ARCH} == amd64 || ${ARCH} == i386 | |||||
FLAVORS= nosimd sse2 sse3 sse41 sse42 sse4a | |||||
PKGNAMESUFFIX= -${FLAVOR:Unosimd} | |||||
. if ${FLAVOR} == nosimd || ${FLAVOR} == "" | |||||
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 | |||||
. if ${FLAVOR} == sse2 | |||||
CMAKE_ARGS+= -DDISABLE_SSE3:BOOL=ON \ | |||||
-DDISABLE_SSE4_1:BOOL=ON \ | |||||
-DDISABLE_SSE4_2:BOOL=ON \ | |||||
-DDISABLE_SSE4_A:BOOL=ON | |||||
. endif | |||||
. if ${FLAVOR} == sse3 | |||||
CMAKE_ARGS+= -DDISABLE_SSE4_1:BOOL=ON \ | |||||
-DDISABLE_SSE4_2:BOOL=ON \ | |||||
-DDISABLE_SSE4_A:BOOL=ON | |||||
. endif | |||||
. if ${FLAVOR} == sse41 | |||||
CMAKE_ARGS+= -DDISABLE_SSE4_2:BOOL=ON \ | |||||
-DDISABLE_SSE4_A:BOOL=ON | |||||
. endif | |||||
. if ${FLAVOR} == sse42 | |||||
CMAKE_ARGS+= -DDISABLE_SSE4_A:BOOL=ON | |||||
. endif | |||||
# other platforms may have SIMD support added later | |||||
.else | |||||
FLAVORS= nosimd | |||||
.endif | |||||
CONFLICTS_INSTALL= ${FLAVORS:N${FLAVOR}:S/^/${PORTNAME}-/} | |||||
post-patch: | |||||
@${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include|' \ | |||||
${WRKSRC}/cmake_modules/*.cmake | |||||
.include <bsd.port.mk> |
Why not enable SSE_AUTODETECT instead of doing all the flavours?