[112173] trunk/dports/graphics/opencv
devans at macports.org
devans at macports.org
Mon Oct 14 08:40:56 PDT 2013
Revision: 112173
https://trac.macports.org/changeset/112173
Author: devans at macports.org
Date: 2013-10-14 08:40:56 -0700 (Mon, 14 Oct 2013)
Log Message:
-----------
opencv: apply upstream patch for OS X capture issue, #40764.
Modified Paths:
--------------
trunk/dports/graphics/opencv/Portfile
Added Paths:
-----------
trunk/dports/graphics/opencv/files/patch-issue-3156.diff
Modified: trunk/dports/graphics/opencv/Portfile
===================================================================
--- trunk/dports/graphics/opencv/Portfile 2013-10-14 15:12:28 UTC (rev 112172)
+++ trunk/dports/graphics/opencv/Portfile 2013-10-14 15:40:56 UTC (rev 112173)
@@ -7,7 +7,7 @@
name opencv
version 2.4.6.1
-revision 1
+revision 2
categories graphics science
platforms darwin
license BSD
@@ -50,7 +50,8 @@
patch-cmake_OpenCVFindLibsPerf.cmake.diff \
patch-modules_java_CMakeLists.txt.diff \
patch-modules_python_CMakeLists.txt.diff \
- patch-modules_core_src_parallel.cpp.diff
+ patch-modules_core_src_parallel.cpp.diff \
+ patch-issue-3156.diff
configure.args-append -DWITH_1394=OFF \
-DWITH_CARBON=OFF \
Added: trunk/dports/graphics/opencv/files/patch-issue-3156.diff
===================================================================
--- trunk/dports/graphics/opencv/files/patch-issue-3156.diff (rev 0)
+++ trunk/dports/graphics/opencv/files/patch-issue-3156.diff 2013-10-14 15:40:56 UTC (rev 112173)
@@ -0,0 +1,15 @@
+--- modules/highgui/src/cap_qtkit.mm
++++ modules/highgui/src/cap_qtkit.mm
+@@ -277,8 +277,11 @@ - (IplImage*)getOutput;
+ double sleepTime = 0.005;
+ double total = 0;
+
+- while (![capture updateImage] && (total += sleepTime)<=timeOut)
+- usleep((int)(sleepTime*1000));
++ NSDate *loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime];
++ while (![capture updateImage] && (total += sleepTime)<=timeOut &&
++ [[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode
++ beforeDate:loopUntil])
++ loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime];
+
+ [localpool drain];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131014/a6455313/attachment-0001.html>
More information about the macports-changes
mailing list