[104829] trunk/dports/graphics/opencv

stromnov at macports.org stromnov at macports.org
Wed Apr 3 03:20:29 PDT 2013


Revision: 104829
          https://trac.macports.org/changeset/104829
Author:   stromnov at macports.org
Date:     2013-04-03 03:20:29 -0700 (Wed, 03 Apr 2013)
Log Message:
-----------
opencv: add java variant

Modified Paths:
--------------
    trunk/dports/graphics/opencv/Portfile

Added Paths:
-----------
    trunk/dports/graphics/opencv/files/patch-modules_java_CMakeLists.txt.diff
    trunk/dports/graphics/opencv/files/patch-modules_python_CMakeLists.txt.diff

Modified: trunk/dports/graphics/opencv/Portfile
===================================================================
--- trunk/dports/graphics/opencv/Portfile	2013-04-03 09:41:44 UTC (rev 104828)
+++ trunk/dports/graphics/opencv/Portfile	2013-04-03 10:20:29 UTC (rev 104829)
@@ -7,7 +7,7 @@
 
 name                            opencv
 version                         2.4.4
-revision                        2
+revision                        3
 categories                      graphics science
 license                         BSD
 platforms                       darwin
@@ -48,6 +48,8 @@
                                 patch-install_name.diff \
                                 patch-CMakeLists.txt.diff \
                                 patch-cmake_OpenCVFindLibsPerf.cmake.diff \
+                                patch-modules_java_CMakeLists.txt.diff \
+                                patch-modules_python_CMakeLists.txt.diff \
                                 patch-modules_core_src_parallel.cpp.diff
 
 configure.args-append           -DWITH_1394=OFF \
@@ -193,9 +195,20 @@
     configure.args-append       -DWITH_QT=ON
 }
 
+variant java description {Add Java bindings.} {
+    depends_build-append        port:apache-ant
+    patchfiles-delete           patch-modules_java_CMakeLists.txt.diff
+}
+
+if {[variant_isset java] && ![variant_isset python26] && ![variant_isset python27]} {
+    configure.args-delete       -DPYTHON_EXECUTABLE=OFF
+    configure.args-append       -DPYTHON_EXECUTABLE=/usr/bin/python
+}
+
 variant python26 conflicts python27 description {Add Python 2.6 bindings.} {
     depends_lib-append          port:python26 \
                                 port:py26-numpy
+    patchfiles-delete           patch-modules_python_CMakeLists.txt.diff
     configure.args-delete       -DINSTALL_PYTHON_EXAMPLES=OFF \
                                 -DPYTHON_EXECUTABLE=OFF
     configure.args-append       -DINSTALL_PYTHON_EXAMPLES=ON \
@@ -208,6 +221,7 @@
 variant python27 conflicts python26 description {Add Python 2.7 bindings.} {
     depends_lib-append          port:python27 \
                                 port:py27-numpy
+    patchfiles-delete           patch-modules_python_CMakeLists.txt.diff
     configure.args-delete       -DINSTALL_PYTHON_EXAMPLES=OFF \
                                 -DPYTHON_EXECUTABLE=OFF
     configure.args-append       -DINSTALL_PYTHON_EXAMPLES=ON \

Added: trunk/dports/graphics/opencv/files/patch-modules_java_CMakeLists.txt.diff
===================================================================
--- trunk/dports/graphics/opencv/files/patch-modules_java_CMakeLists.txt.diff	                        (rev 0)
+++ trunk/dports/graphics/opencv/files/patch-modules_java_CMakeLists.txt.diff	2013-04-03 10:20:29 UTC (rev 104829)
@@ -0,0 +1,12 @@
+--- modules/java/CMakeLists.txt.orig	2013-03-01 19:44:17.000000000 +0400
++++ modules/java/CMakeLists.txt	2013-04-03 13:50:15.000000000 +0400
+@@ -1,6 +1,9 @@
+ # ----------------------------------------------------------------------------
+ #  CMake file for java support
+ # ----------------------------------------------------------------------------
++
++ocv_module_disable(java)
++
+ if(IOS OR NOT PYTHON_EXECUTABLE OR NOT ANT_EXECUTABLE OR NOT (JNI_FOUND OR (ANDROID AND ANDROID_NATIVE_API_LEVEL GREATER 7)))
+   ocv_module_disable(java)
+ endif()

Added: trunk/dports/graphics/opencv/files/patch-modules_python_CMakeLists.txt.diff
===================================================================
--- trunk/dports/graphics/opencv/files/patch-modules_python_CMakeLists.txt.diff	                        (rev 0)
+++ trunk/dports/graphics/opencv/files/patch-modules_python_CMakeLists.txt.diff	2013-04-03 10:20:29 UTC (rev 104829)
@@ -0,0 +1,11 @@
+--- modules/python/CMakeLists.txt.orig	2013-04-03 13:48:47.000000000 +0400
++++ modules/python/CMakeLists.txt	2013-04-03 13:49:02.000000000 +0400
+@@ -2,6 +2,8 @@
+ #  CMake file for python support
+ # ----------------------------------------------------------------------------
+ 
++ocv_module_disable(python)
++
+ if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
+   ocv_module_disable(python)
+ endif()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130403/f2280eab/attachment-0001.html>


More information about the macports-changes mailing list