[104569] trunk/dports/graphics/opencv
stromnov at macports.org
stromnov at macports.org
Thu Mar 28 10:09:22 PDT 2013
Revision: 104569
https://trac.macports.org/changeset/104569
Author: stromnov at macports.org
Date: 2013-03-28 10:09:22 -0700 (Thu, 28 Mar 2013)
Log Message:
-----------
opencv: fix GCD issue (#38430)
Modified Paths:
--------------
trunk/dports/graphics/opencv/Portfile
Added Paths:
-----------
trunk/dports/graphics/opencv/files/patch-CMakeLists.txt.diff
trunk/dports/graphics/opencv/files/patch-cmake_OpenCVFindLibsPerf.cmake.diff
trunk/dports/graphics/opencv/files/patch-cmake_OpenCVFindOpenNI.cmake.diff
trunk/dports/graphics/opencv/files/patch-modules_core_src_parallel.cpp.diff
Removed Paths:
-------------
trunk/dports/graphics/opencv/files/patch-cmake-OpenCVFindOpenNI.cmake.diff
Modified: trunk/dports/graphics/opencv/Portfile
===================================================================
--- trunk/dports/graphics/opencv/Portfile 2013-03-28 17:05:04 UTC (rev 104568)
+++ trunk/dports/graphics/opencv/Portfile 2013-03-28 17:09:22 UTC (rev 104569)
@@ -7,7 +7,7 @@
name opencv
version 2.4.4
-revision 1
+revision 2
categories graphics science
license BSD
platforms darwin
@@ -45,7 +45,10 @@
path:lib/libavcodec.dylib:ffmpeg
patchfiles patch-fix_dirname_case.diff \
- patch-install_name.diff
+ patch-install_name.diff \
+ patch-CMakeLists.txt.diff \
+ patch-cmake_OpenCVFindLibsPerf.cmake.diff \
+ patch-modules_core_src_parallel.cpp.diff
configure.args-append -DWITH_1394=OFF \
-DWITH_CARBON=OFF \
@@ -69,6 +72,7 @@
-DWITH_QT=OFF \
-DWITH_QUICKTIME=OFF \
-DWITH_TBB=OFF \
+ -DWITH_GCD=ON \
-DWITH_CSTRIPES=OFF \
-DWITH_TIFF=ON \
-DWITH_UNICAP=OFF \
@@ -134,6 +138,12 @@
patchfiles-append patch-highgui_CMakeLists.txt.diff
}
+# GCD is not available
+if {${os.major} <= 11} {
+ configure.args-delete -DWITH_GCD=ON
+ configure.args-append -DWITH_GCD=OFF
+}
+
post-destroot {
xinstall -d ${destroot}${prefix}/lib/cmake
move ${destroot}${prefix}/share/OpenCV/OpenCVConfig-version.cmake \
@@ -161,7 +171,7 @@
variant openni description {Enable OpenNI support.} {
depends_lib-append port:openni
- patchfiles-append patch-cmake-OpenCVFindOpenNI.cmake.diff
+ patchfiles-append patch-cmake_OpenCVFindOpenNI.cmake.diff
configure.args-delete -DWITH_OPENNI=OFF
configure.args-append -DWITH_OPENNI=ON
Added: trunk/dports/graphics/opencv/files/patch-CMakeLists.txt.diff
===================================================================
--- trunk/dports/graphics/opencv/files/patch-CMakeLists.txt.diff (rev 0)
+++ trunk/dports/graphics/opencv/files/patch-CMakeLists.txt.diff 2013-03-28 17:09:22 UTC (rev 104569)
@@ -0,0 +1,10 @@
+--- CMakeLists.txt.orig 2013-03-20 13:10:39.000000000 +0400
++++ CMakeLists.txt 2013-03-20 13:11:41.000000000 +0400
+@@ -134,6 +134,7 @@
+ OCV_OPTION(WITH_QT "Build with Qt Backend support" OFF IF (NOT ANDROID AND NOT IOS) )
+ OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O insted of QTKit" OFF IF APPLE )
+ OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF IF (NOT IOS) )
++OCV_OPTION(WITH_GCD "Include Apple GCD support" ON IF APPLE )
+ OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF IF WIN32 )
+ OCV_OPTION(WITH_TIFF "Include TIFF support" ON IF (NOT IOS) )
+ OCV_OPTION(WITH_UNICAP "Include Unicap support (GPL)" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) )
Deleted: trunk/dports/graphics/opencv/files/patch-cmake-OpenCVFindOpenNI.cmake.diff
===================================================================
--- trunk/dports/graphics/opencv/files/patch-cmake-OpenCVFindOpenNI.cmake.diff 2013-03-28 17:05:04 UTC (rev 104568)
+++ trunk/dports/graphics/opencv/files/patch-cmake-OpenCVFindOpenNI.cmake.diff 2013-03-28 17:09:22 UTC (rev 104569)
@@ -1,13 +0,0 @@
---- cmake/OpenCVFindOpenNI.cmake.orig 2012-11-14 03:26:38.000000000 +0400
-+++ cmake/OpenCVFindOpenNI.cmake 2012-11-14 11:19:10.000000000 +0400
-@@ -26,8 +26,8 @@
- find_library(OPENNI_LIBRARY "OpenNI64" PATHS $ENV{OPEN_NI_LIB64} DOC "OpenNI library")
- endif()
- elseif(UNIX OR APPLE)
-- find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "/usr/include/ni" "/usr/include/openni" DOC "OpenNI c++ interface header")
-- find_library(OPENNI_LIBRARY "OpenNI" PATHS "/usr/lib" DOC "OpenNI library")
-+ find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "@@PREFIX@@/include/ni" "@@PREFIX@@/include/openni" DOC "OpenNI c++ interface header")
-+ find_library(OPENNI_LIBRARY "OpenNI" PATHS "@@PREFIX@@/lib" DOC "OpenNI library")
- endif()
-
- if(OPENNI_LIBRARY AND OPENNI_INCLUDES)
Added: trunk/dports/graphics/opencv/files/patch-cmake_OpenCVFindLibsPerf.cmake.diff
===================================================================
--- trunk/dports/graphics/opencv/files/patch-cmake_OpenCVFindLibsPerf.cmake.diff (rev 0)
+++ trunk/dports/graphics/opencv/files/patch-cmake_OpenCVFindLibsPerf.cmake.diff 2013-03-28 17:09:22 UTC (rev 104569)
@@ -0,0 +1,18 @@
+--- cmake/OpenCVFindLibsPerf.cmake.orig 2013-03-20 12:39:40.000000000 +0400
++++ cmake/OpenCVFindLibsPerf.cmake 2013-03-20 13:08:15.000000000 +0400
+@@ -56,8 +56,13 @@
+ endif()
+
+ # --- GCD ---
+-if(APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
+- set(HAVE_GCD 1)
++if(WITH_GCD AND APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
++ find_path(GCD_INCLUDE_PATH dispatch/dispatch.h)
++ if(GCD_INCLUDE_PATH)
++ set(HAVE_GCD 1)
++ else()
++ set(HAVE_GCD 0)
++ endif()
+ else()
+ set(HAVE_GCD 0)
+ endif()
Copied: trunk/dports/graphics/opencv/files/patch-cmake_OpenCVFindOpenNI.cmake.diff (from rev 104549, trunk/dports/graphics/opencv/files/patch-cmake-OpenCVFindOpenNI.cmake.diff)
===================================================================
--- trunk/dports/graphics/opencv/files/patch-cmake_OpenCVFindOpenNI.cmake.diff (rev 0)
+++ trunk/dports/graphics/opencv/files/patch-cmake_OpenCVFindOpenNI.cmake.diff 2013-03-28 17:09:22 UTC (rev 104569)
@@ -0,0 +1,13 @@
+--- cmake/OpenCVFindOpenNI.cmake.orig 2012-11-14 03:26:38.000000000 +0400
++++ cmake/OpenCVFindOpenNI.cmake 2012-11-14 11:19:10.000000000 +0400
+@@ -26,8 +26,8 @@
+ find_library(OPENNI_LIBRARY "OpenNI64" PATHS $ENV{OPEN_NI_LIB64} DOC "OpenNI library")
+ endif()
+ elseif(UNIX OR APPLE)
+- find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "/usr/include/ni" "/usr/include/openni" DOC "OpenNI c++ interface header")
+- find_library(OPENNI_LIBRARY "OpenNI" PATHS "/usr/lib" DOC "OpenNI library")
++ find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "@@PREFIX@@/include/ni" "@@PREFIX@@/include/openni" DOC "OpenNI c++ interface header")
++ find_library(OPENNI_LIBRARY "OpenNI" PATHS "@@PREFIX@@/lib" DOC "OpenNI library")
+ endif()
+
+ if(OPENNI_LIBRARY AND OPENNI_INCLUDES)
Added: trunk/dports/graphics/opencv/files/patch-modules_core_src_parallel.cpp.diff
===================================================================
--- trunk/dports/graphics/opencv/files/patch-modules_core_src_parallel.cpp.diff (rev 0)
+++ trunk/dports/graphics/opencv/files/patch-modules_core_src_parallel.cpp.diff 2013-03-28 17:09:22 UTC (rev 104569)
@@ -0,0 +1,13 @@
+--- modules/core/src/parallel.cpp.orig 2013-03-20 13:41:07.000000000 +0400
++++ modules/core/src/parallel.cpp 2013-03-20 13:41:21.000000000 +0400
+@@ -65,10 +65,6 @@
+ #define HAVE_OPENMP
+ #endif
+
+-#ifdef __APPLE__
+- #define HAVE_GCD
+-#endif
+-
+ #if defined _MSC_VER && _MSC_VER >= 1600
+ #define HAVE_CONCURRENCY
+ #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130328/ea8d445b/attachment.html>
More information about the macports-changes
mailing list