aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorjhale <jhale@FreeBSD.org>2015-06-14 23:28:03 +0800
committerjhale <jhale@FreeBSD.org>2015-06-14 23:28:03 +0800
commit25283fb1611d9c69c402e333e36cb793a6732be4 (patch)
treebfa591c72df6d8a3f82bd85e94866973ca9a5238 /graphics
parent61aeebabbd28c55842f3601502186614ae81f155 (diff)
downloadfreebsd-ports-gnome-25283fb1611d9c69c402e333e36cb793a6732be4.tar.gz
freebsd-ports-gnome-25283fb1611d9c69c402e333e36cb793a6732be4.tar.zst
freebsd-ports-gnome-25283fb1611d9c69c402e333e36cb793a6732be4.zip
- 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]
Diffstat (limited to 'graphics')
-rw-r--r--graphics/opencv-core/Makefile2
-rw-r--r--graphics/opencv-java/Makefile2
-rw-r--r--graphics/opencv/Makefile36
-rw-r--r--graphics/py-opencv/Makefile2
4 files changed, 37 insertions, 5 deletions
diff --git a/graphics/opencv-core/Makefile b/graphics/opencv-core/Makefile
index 409189475995..fa0de009e639 100644
--- a/graphics/opencv-core/Makefile
+++ b/graphics/opencv-core/Makefile
@@ -1,7 +1,7 @@
# Created by: Martin Matuska <mm@FreeBSD.org>
# $FreeBSD$
-PORTREVISION= 2
+PORTREVISION= 3
PKGNAMESUFFIX= -${OCV_SLAVE}
COMMENT= OpenCV core libraries
diff --git a/graphics/opencv-java/Makefile b/graphics/opencv-java/Makefile
index 830e805e9038..45e6ba8c78c0 100644
--- a/graphics/opencv-java/Makefile
+++ b/graphics/opencv-java/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= graphics java
PKGNAMESUFFIX= -${OCV_SLAVE}
diff --git a/graphics/opencv/Makefile b/graphics/opencv/Makefile
index 68fda6504e77..cbee06e41e24 100644
--- a/graphics/opencv/Makefile
+++ b/graphics/opencv/Makefile
@@ -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 \
diff --git a/graphics/py-opencv/Makefile b/graphics/py-opencv/Makefile
index 47da9502f25c..77b0a0d7c295 100644
--- a/graphics/py-opencv/Makefile
+++ b/graphics/py-opencv/Makefile
@@ -1,7 +1,7 @@
# Created by: Martin Matuska <mm@FreeBSD.org>
# $FreeBSD$
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= graphics python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}