[86726] trunk/dports/graphics/opencv

ryandesign at macports.org ryandesign at macports.org
Wed Nov 2 01:35:53 PDT 2011


Revision: 86726
          http://trac.macports.org/changeset/86726
Author:   ryandesign at macports.org
Date:     2011-11-02 01:35:52 -0700 (Wed, 02 Nov 2011)
Log Message:
-----------
opencv: update to 2.3.1; see #31818

Modified Paths:
--------------
    trunk/dports/graphics/opencv/Portfile
    trunk/dports/graphics/opencv/files/patch-CMakeLists.txt.diff
    trunk/dports/graphics/opencv/files/patch-pch-CMakeLists.txt.diff

Added Paths:
-----------
    trunk/dports/graphics/opencv/files/patch-install_name.diff

Modified: trunk/dports/graphics/opencv/Portfile
===================================================================
--- trunk/dports/graphics/opencv/Portfile	2011-11-02 06:12:55 UTC (rev 86725)
+++ trunk/dports/graphics/opencv/Portfile	2011-11-02 08:35:52 UTC (rev 86726)
@@ -5,9 +5,7 @@
 PortGroup                       cmake 1.0
 
 name                            opencv
-version                         2.2.0
-revision                        1
-set branch                      [join [lrange [split ${version} .] 0 1] .]
+version                         2.3.1
 categories                      graphics science
 license                         BSD
 platforms                       darwin
@@ -24,18 +22,21 @@
                                 Robotics.
 
 homepage                        http://opencv.willowgarage.com/wiki/
-master_sites                    sourceforge:project/opencvlibrary/opencv-unix/${branch}
+master_sites                    sourceforge:project/opencvlibrary/opencv-unix/${version}
 use_bzip2                       yes
 distname                        OpenCV-${version}
 
-checksums                       md5     122c9ac793a46854ef2819fedbbd6b1b \
-                                sha1    984ed71672d50391d0617fce2ef58e7590ec0fd7 \
-                                rmd160  57aedb7678964f43af3f1c838a8266c7b4869b01
+checksums                       rmd160  f53e4a144bffb643e957f844bc62aa83370dd39d \
+                                sha256  30e7f3e7b07fb5bd1605c934101e9f2487c3e2fcc97478e529756575024ee2b8
 
 depends_build-append            port:pkgconfig
 
 depends_lib-append              port:zlib \
                                 path:lib/libavcodec.dylib:ffmpeg \
+                                port:libpng \
+                                port:tiff \
+                                port:jasper \
+                                port:jpeg \
                                 port:bzip2 \
                                 port:dirac \
                                 port:faac \
@@ -52,7 +53,9 @@
 # liboil is not universal
 universal_variant               no
 
-patchfiles                      patch-CMakeLists.txt.diff
+patchfiles                      patch-CMakeLists.txt.diff \
+                                patch-install_name.diff
+
 if {[variant_isset universal] && [variant_exists universal]} {
     patchfiles-append           patch-pch-CMakeLists.txt.diff
 }
@@ -61,20 +64,38 @@
                                 -DBUILD_EXAMPLES=ON \
                                 -DINSTALL_C_EXAMPLES=ON \
                                 -DBZIP2_LIBRARIES=${prefix}/lib/libbz2.dylib \
+                                -DZLIB_LIBRARY=${prefix}/lib/libz.dylib \
+                                -DWITH_OPENEXR=OFF \
                                 -DWITH_1394=OFF
 
 if {${configure.compiler} == "clang"} {
     configure.compiler llvm-gcc-4.2
 }
 
-# use macros in /usr/include/stdint.h with C++ compiler; see <https://roundup.ffmpeg.org/issue2093>
 platform darwin {
+    # Use macros in /usr/include/stdint.h with C++ compiler
+    # http://roundup.libav.org/issue2093
     if {${os.major} <= 9} {
         configure.args-append   -DCMAKE_CXX_FLAGS=-D__STDC_CONSTANT_MACROS
     }
 }
 
-variant dc1394 description {Use libdc1394 for firewire camera. Breaks compatibility with Apple iSight FireWire camera.} {
+pre-build {
+    # When building 2.3.1 with 2.2.0 active:
+    # error: 'InputArray' was not declared in this scope
+    # http://tech.groups.yahoo.com/group/OpenCV/message/82355
+    # http://stackoverflow.com/questions/7410012/unable-to-make-opencv#answer-7461541
+    if {[file exists ${prefix}/lib/pkgconfig/opencv.pc]} {
+        set installed_version [exec ${prefix}/bin/pkg-config ${name} --modversion]
+        if {${version} != ${installed_version}} {
+            ui_error "${name} ${version} cannot be built while ${name} ${installed_version} is installed and active."
+            ui_error "Please deactivate ${name} ${installed_version} first."
+            return -code error "incompatible ${name} version active"
+        }
+    }
+}
+
+variant dc1394 description {Use libdc1394 for FireWire camera. Breaks compatibility with Apple iSight FireWire camera.} {
     depends_lib-append          port:libdc1394
     configure.args-delete       -DWITH_1394=OFF
     configure.args-append       -DWITH_1394=ON

Modified: trunk/dports/graphics/opencv/files/patch-CMakeLists.txt.diff
===================================================================
--- trunk/dports/graphics/opencv/files/patch-CMakeLists.txt.diff	2011-11-02 06:12:55 UTC (rev 86725)
+++ trunk/dports/graphics/opencv/files/patch-CMakeLists.txt.diff	2011-11-02 08:35:52 UTC (rev 86726)
@@ -1,11 +1,15 @@
---- CMakeLists.txt.orig	2010-04-13 17:51:01.000000000 +0400
-+++ CMakeLists.txt	2010-04-13 17:52:20.000000000 +0400
-@@ -468,7 +468,7 @@
-     string(REGEX MATCH "[0-9].[0-9]" PYTHON_VERSION_MAJOR_MINOR "${PYTHON_VERSION_FULL}")
-     if(UNIX)
-         set(PYTHON_PLUGIN_INSTALL_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages/opencv)
--        set(PYTHON_PACKAGES_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages)
-+        set(PYTHON_PACKAGES_PATH @@PYTHON_PKGD@@)
-     endif()
-     if(WIN32)
-         get_filename_component(PYTHON_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${PYTHON_VERSION_MAJOR_MINOR}\\InstallPath]" ABSOLUTE CACHE)
+--- CMakeLists.txt.orig	2011-08-17 14:42:55.000000000 -0500
++++ CMakeLists.txt	2011-10-29 01:10:32.000000000 -0500
+@@ -664,11 +664,7 @@
+                     RESULT_VARIABLE PYTHON_CVPY_PROCESS
+                     OUTPUT_VARIABLE PYTHON_STD_PACKAGES_PATH
+                     OUTPUT_STRIP_TRAILING_WHITESPACE)
+-    if("${PYTHON_STD_PACKAGES_PATH}" MATCHES "site-packages")
+-        set(PYTHON_PACKAGES_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages CACHE PATH "Where to install the python packages.")
+-    else() #debian based assumed, install to the dist-packages.
+-        set(PYTHON_PACKAGES_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/dist-packages CACHE PATH "Where to install the python packages.")
+-    endif()
++    set(PYTHON_PACKAGES_PATH @@PYTHON_PKGD@@ CACHE PATH "Where to install the python packages.")
+ endif()
+ if(CMAKE_HOST_WIN32)
+     get_filename_component(PYTHON_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${PYTHON_VERSION_MAJOR_MINOR}\\InstallPath]" ABSOLUTE CACHE)

Added: trunk/dports/graphics/opencv/files/patch-install_name.diff
===================================================================
--- trunk/dports/graphics/opencv/files/patch-install_name.diff	                        (rev 0)
+++ trunk/dports/graphics/opencv/files/patch-install_name.diff	2011-11-02 08:35:52 UTC (rev 86726)
@@ -0,0 +1,60 @@
+--- OpenCVModule.cmake.orig	2011-08-02 07:48:41.000000000 -0500
++++ OpenCVModule.cmake	2011-11-02 02:35:15.000000000 -0500
+@@ -83,7 +83,6 @@
+         DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+         ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+         RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+-        INSTALL_NAME_DIR lib
+         )
+ 
+     add_opencv_precompiled_headers(${the_target})
+--- modules/gpu/CMakeLists.txt.orig	2011-08-11 16:17:14.000000000 -0500
++++ modules/gpu/CMakeLists.txt	2011-11-02 02:35:42.000000000 -0500
+@@ -113,7 +113,6 @@
+     DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+     ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+     RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+-    INSTALL_NAME_DIR lib
+     )
+ 
+ # Add the required libraries for linking:
+--- modules/haartraining/CMakeLists.txt.orig	2011-06-14 05:37:20.000000000 -0500
++++ modules/haartraining/CMakeLists.txt	2011-11-02 02:35:38.000000000 -0500
+@@ -42,7 +42,6 @@
+     DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+     ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+     RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+-    INSTALL_NAME_DIR lib
+     )
+ 
+ if(NOT ANDROID)
+--- modules/highgui/CMakeLists.txt.orig	2011-08-11 16:17:08.000000000 -0500
++++ modules/highgui/CMakeLists.txt	2011-11-02 02:35:34.000000000 -0500
+@@ -294,7 +294,6 @@
+     DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+     ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+     RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+-    INSTALL_NAME_DIR lib
+     LINK_INTERFACE_LIBRARIES ""
+     )
+ 
+--- modules/stitching/CMakeLists.txt.orig	2011-06-14 05:37:15.000000000 -0500
++++ modules/stitching/CMakeLists.txt	2011-11-02 02:35:25.000000000 -0500
+@@ -28,7 +28,6 @@
+                       DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+                       ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+                       RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+-                      INSTALL_NAME_DIR lib
+                       OUTPUT_NAME "opencv_stitching")
+ 					  
+ if(ENABLE_SOLUTION_FOLDERS)
+--- modules/traincascade/CMakeLists.txt.orig	2011-08-02 07:48:38.000000000 -0500
++++ modules/traincascade/CMakeLists.txt	2011-11-02 02:35:19.000000000 -0500
+@@ -32,7 +32,6 @@
+                       DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+                       ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+                       RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+-                      INSTALL_NAME_DIR lib
+                       OUTPUT_NAME "opencv_traincascade")
+ 					  
+ if(ENABLE_SOLUTION_FOLDERS)

Modified: trunk/dports/graphics/opencv/files/patch-pch-CMakeLists.txt.diff
===================================================================
--- trunk/dports/graphics/opencv/files/patch-pch-CMakeLists.txt.diff	2011-11-02 06:12:55 UTC (rev 86725)
+++ trunk/dports/graphics/opencv/files/patch-pch-CMakeLists.txt.diff	2011-11-02 08:35:52 UTC (rev 86726)
@@ -1,10 +1,10 @@
---- CMakeLists.txt.orig	2010-06-08 16:23:51.000000000 +0400
-+++ CMakeLists.txt	2010-06-11 17:52:57.000000000 +0400
-@@ -195,7 +195,6 @@
-     set(OPENCV_BUILD_3RDPARTY_LIBS FALSE CACHE BOOL "Build 3rd party libraries")
- endif()
- 
--include(OpenCVPCHSupport.cmake REQUIRED)
- 
- if(UNIX)
-     include(OpenCVFindPkgConfig.cmake OPTIONAL)
+--- CMakeLists.txt.orig	2011-10-29 01:14:17.000000000 -0500
++++ CMakeLists.txt	2011-10-29 01:14:17.000000000 -0500
+@@ -337,7 +337,6 @@
+     set(OPENCV_BUILD_3RDPARTY_LIBS FALSE CACHE BOOL "Build 3rd party libraries")
+ endif()
+ 
+-include(OpenCVPCHSupport.cmake REQUIRED)
+ include(OpenCVModule.cmake REQUIRED)
+ if(ANDROID)
+     include(OpenCVAndroidProject.cmake REQUIRED)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111102/c915adfc/attachment-0001.html>


More information about the macports-changes mailing list