- Add SIMD option to specifically disable CPU optimizations and prevent crashes

with ffmpeg on processors that do not support SSE instructions.  OFF by
  default for package building, ON with autodetect for ports to keep with
  POLA. [1][2]
- Bump PORTREVISION on all opencv ports

PR:		199715 [1], 200234 [2]
Submitted by:	Randy Westlund <rwestlun@gmail.com> [1], sasamotikomi@gmail.com [2]
This commit is contained in:
Jason E. Hale 2015-06-14 15:28:03 +00:00
parent f420899280
commit 6ca338fac7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=389642
4 changed files with 37 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# Created by: Martin Matuska <mm@FreeBSD.org>
# $FreeBSD$
PORTREVISION= 2
PORTREVISION= 3
PKGNAMESUFFIX= -${OCV_SLAVE}
COMMENT= OpenCV core libraries

View File

@ -1,6 +1,6 @@
# $FreeBSD$
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= graphics java
PKGNAMESUFFIX= -${OCV_SLAVE}

View File

@ -3,7 +3,7 @@
PORTNAME?= opencv
PORTVERSION= 2.4.9
PORTREVISION?= 4
PORTREVISION?= 5
CATEGORIES= graphics
MASTER_SITES= SF/${PORTNAME}library/${PORTNAME}-unix/${PORTVERSION}
@ -42,7 +42,7 @@ OCV_NONFREE_MODS= nonfree
OCV_JAVA_MODS= java
OCV_PYTHON_MODS= python
OPTIONS_DEFINE= DC1394 EXAMPLES NONFREE OPENGL
OPTIONS_DEFINE= DC1394 EXAMPLES NONFREE OPENGL SIMD
OPTIONS_GROUP= IMAGE PERFORMANCE VIDEO
OPTIONS_GROUP_IMAGE= JASPER JPEG OPENEXR PNG TIFF
OPTIONS_GROUP_PERFORMANCE= EIGEN3 TBB
@ -50,6 +50,9 @@ OPTIONS_GROUP_VIDEO= FFMPEG GSTREAMER V4L XINE
OPTIONS_RADIO= GUI
OPTIONS_RADIO_GUI= GTK2 QT4
OPTIONS_DEFAULT= EIGEN3 JASPER JPEG PNG TIFF V4L
.if !defined(PACKAGE_BUILDING)
OPTIONS_DEFAULT= SIMD
.endif
OPTIONS_SUB= yes
.if defined(OCV_CORE)
OPTIONS_EXCLUDE= DC1394 EXAMPLES GTK2 QT4 JASPER JPEG NONFREE OPENEXR \
@ -161,6 +164,35 @@ USE_QT4+= opengl
CMAKE_ARGS+= -DWITH_QT:BOOL=Off
.endif
.if ${PORT_OPTIONS:MSIMD}
. if ${MACHINE_CPU:Msse}
CMAKE_ARGS+= -DENABLE_SSE:BOOL=On
. else
CMAKE_ARGS+= -DENABLE_SSE:BOOL=Off
. endif
. if ${MACHINE_CPU:Msse2}
CMAKE_ARGS+= -DENABLE_SSE2:BOOL=On
. else
CMAKE_ARGS+= -DENABLE_SSE2:BOOL=Off
. endif
. if ${MACHINE_CPU:Msse3}
CMAKE_ARGS+= -DENABLE_SSE3:BOOL=On
. else
CMAKE_ARGS+= -DENABLE_SSE3:BOOL=Off
. endif
# TODO: Add support for instructions above SSE3 (upstream has them off by default)
CMAKE_ARGS+= -DENABLE_SSSE3:BOOL=Off \
-DENABLE_SSE41:BOOL=Off \
-DENABLE_SSE42:BOOL=Off
.else
CMAKE_ARGS+= -DENABLE_SSE:BOOL=Off \
-DENABLE_SSE2:BOOL=Off \
-DENABLE_SSE3:BOOL=Off \
-DENABLE_SSSE3:BOOL=Off \
-DENABLE_SSE41:BOOL=Off \
-DENABLE_SSE42:BOOL=Off
.endif
.if ${PORT_OPTIONS:MTBB}
LIB_DEPENDS+= libtbb.so:${PORTSDIR}/devel/tbb
CMAKE_ARGS+= -DWITH_TBB:BOOL=On \

View File

@ -1,7 +1,7 @@
# Created by: Martin Matuska <mm@FreeBSD.org>
# $FreeBSD$
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= graphics python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}