[MacPorts] #21014: OpenCV 1.0.0 does not build on snow leopard

MacPorts noreply at macports.org
Thu Sep 17 06:37:59 PDT 2009


#21014: OpenCV 1.0.0 does not build on snow leopard
------------------------------------------+---------------------------------
 Reporter:  grundmann.matthias@…          |       Owner:  stante@…        
     Type:  defect                        |      Status:  new             
 Priority:  Normal                        |   Milestone:                  
Component:  ports                         |     Version:  1.8.0           
 Keywords:  LP64                          |        Port:  opencv          
------------------------------------------+---------------------------------

Comment(by mail@…):

 Here we are. I have built manually, not with MacPorts to create the
 patches...

  * Unpack OpenCV-1.2.0.tar.gz and step into the dir.
  * Patch CMakeList.txt


 {{{
 --- CMakeLists.txt      2009-09-14 23:29:55.000000000 +0200
 +++ CMakeLists.txt.patched      2009-09-17 15:23:52.000000000 +0200
 @@ -273,7 +273,7 @@
  endmacro()

  if(UNIX)
 -    if(NOT APPLE)
 +    #if(NOT APPLE)
        if(WITH_GTK)
          CHECK_MODULE(gtk+-2.0 HAVE_GTK)
          CHECK_MODULE(gthread-2.0 HAVE_GTHREAD)
 @@ -286,7 +286,7 @@
        else()
          set(HAVE_GSTREAMER FALSE)
        endif()
 -    endif()
 +    #endif()

      if(WITH_UNICAP)
        CHECK_MODULE(libunicap HAVE_UNICAP_)
 @@ -836,7 +836,7 @@
  endif()

  if(UNIX)
 -if(NOT APPLE)
 +#if(NOT APPLE)
  message(STATUS "")
  message(STATUS "  GUI: ")
  message(STATUS "    GTK+ 2.x:                  ${HAVE_GTK}")
 @@ -855,7 +855,7 @@
  message(STATUS "    TIFF:                      build")
  message(STATUS "    JASPER:                    build")
  endif()
 -endif()
 +#endif()
  message(STATUS "")
  message(STATUS "  Video I/O: ")
  message(STATUS "    DC1394 1.x:                ${HAVE_DC1394}")
 }}}

 and src/highgui/CMakeLists.txt


 {{{
 --- src/highgui/CMakeLists.txt  2009-09-14 23:29:54.000000000 +0200
 +++ src/highgui/CMakeLists.txt.patched  2009-09-17 15:25:36.000000000
 +0200
 @@ -112,8 +112,8 @@
  endif()

  if(APPLE)
 -    add_definitions(-DHAVE_QUICKTIME=1 -DHAVE_CARBON=1 -DHAVE_IMAGEIO=1)
 -    set(highgui_srcs ${highgui_srcs} window_carbon.cpp cvcap_qt.cpp)
 +    #add_definitions(-DHAVE_QUICKTIME=1 -DHAVE_CARBON=1 -DHAVE_IMAGEIO=1)
 +    #set(highgui_srcs ${highgui_srcs} window_carbon.cpp cvcap_qt.cpp)
  endif(APPLE)

  source_group("Src" FILES ${highgui_srcs} ${highgui_hdrs})
 @@ -198,7 +198,7 @@
  endif()

  if(APPLE)
 -       target_link_libraries(${the_target} "-framework Carbon -framework
 CoreFoundation -framework QuickTime -framework QuartzCore")
 +       target_link_libraries(${the_target} "-framework CoreFoundation
 -framework QuartzCore")
  endif()

  install(TARGETS ${the_target}
 }}}

  * create a build dir and step into it

 {{{
 mkdir build
 cd build
 }}}

  * Run cmake and make

 {{{
 cmake ..
 make
 make test
 }}}

 This builds OpenCV without Quicktime and highgui as gtk-version.

 What is missing:

  * I have never used cmake together with MacPorts. Is there an example for
 doing that? For example setting the prefix...

  * I don't have tested the gtk-highgui, because i don't have a real
 testprogram for highgui.

-- 
Ticket URL: <http://trac.macports.org/ticket/21014#comment:33>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list