summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hüttel <dilfridge@gentoo.org>2011-04-30 19:23:01 +0000
committerAndreas Hüttel <dilfridge@gentoo.org>2011-04-30 19:23:01 +0000
commit303f2307a98a0fffeec9036cba28b3f1fc323d63 (patch)
tree19b0c2ce90199d7c55d81313052f79098fc200fb /media-libs/opencv/files
parentVersion bump, bug #363041, thank Per Pomsel for report. (diff)
downloadhistorical-303f2307a98a0fffeec9036cba28b3f1fc323d63.tar.gz
historical-303f2307a98a0fffeec9036cba28b3f1fc323d63.tar.bz2
historical-303f2307a98a0fffeec9036cba28b3f1fc323d63.zip
[media-libs/opencv] Version bump, with a lot of help from Scarabeus
Package-Manager: portage-2.1.9.46/cvs/Linux x86_64
Diffstat (limited to 'media-libs/opencv/files')
-rw-r--r--media-libs/opencv/files/opencv-2.2.0-convert_sets_to_options.patch365
-rw-r--r--media-libs/opencv/files/opencv-2.2.0-ffmpeg01.patch105
-rw-r--r--media-libs/opencv/files/opencv-2.2.0-ffmpeg02.patch58
-rw-r--r--media-libs/opencv/files/opencv-2.2.0-gcc46.patch10
-rw-r--r--media-libs/opencv/files/opencv-2.2.0-libpng1.5.patch40
-rw-r--r--media-libs/opencv/files/opencv-2.2.0-numpy.patch12
-rw-r--r--media-libs/opencv/files/opencv-2.2.0-ptrcvcapture.patch17
-rw-r--r--media-libs/opencv/files/opencv-2.2.0-use_system_libs.patch94
-rw-r--r--media-libs/opencv/files/opencv-2.2.0-v4l_2.6.38.patch33
9 files changed, 734 insertions, 0 deletions
diff --git a/media-libs/opencv/files/opencv-2.2.0-convert_sets_to_options.patch b/media-libs/opencv/files/opencv-2.2.0-convert_sets_to_options.patch
new file mode 100644
index 000000000000..7da06cbd9d95
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.2.0-convert_sets_to_options.patch
@@ -0,0 +1,365 @@
+diff -urN OpenCV-2.2.0.old/CMakeLists.txt OpenCV-2.2.0.new/CMakeLists.txt
+--- OpenCV-2.2.0.old/CMakeLists.txt 2010-12-05 04:35:23.000000000 +0100
++++ OpenCV-2.2.0.new/CMakeLists.txt 2011-04-30 11:57:37.000000000 +0200
+@@ -13,7 +13,7 @@
+ # Add these standard paths to the search paths for FIND_LIBRARY
+ # to find libraries from these locations first
+ if(UNIX)
+- set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib /usr/lib)
++ set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib${LIB_SUFFIX} /usr/lib${LIB_SUFFIX})
+ endif()
+ # it _must_ go before PROJECT(OpenCV) in order to work
+ if (NOT CMAKE_INSTALL_PREFIX)
+@@ -94,7 +94,7 @@
+ # Build static or dynamic libs?
+ # ----------------------------------------------------------------------------
+ # Default: dynamic libraries:
+-SET(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)")
++OPTION(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" ON)
+ IF(BUILD_SHARED_LIBS)
+ SET(OPENCV_BUILD_SHARED_LIB 1) # For cvconfig.h, etc.
+ ELSE(BUILD_SHARED_LIBS)
+@@ -196,13 +196,13 @@
+
+ # Build/install (or not) some apps:
+ # ===================================================
+-set(BUILD_EXAMPLES OFF CACHE BOOL "Build all examples")
+-set(INSTALL_C_EXAMPLES OFF CACHE BOOL "Install C examples")
+-set(INSTALL_PYTHON_EXAMPLES OFF CACHE BOOL "Install Python examples")
++option(BUILD_EXAMPLES "Build all examples" OFF)
++option(INSTALL_C_EXAMPLES "Install C examples" OFF)
++option(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF)
+
+ # Build tests:
+ # ===================================================
+-set(BUILD_TESTS ON CACHE BOOL "Build tests")
++option(BUILD_TESTS "Build tests" ON)
+
+ # Build 3rdparty libraries under unix
+ # ===================================================
+@@ -229,12 +229,12 @@
+ #set(ENABLE_OPENMP ${DEFAULT_ENABLE_OPENMP} CACHE BOOL "")
+
+ if(CMAKE_COMPILER_IS_GNUCXX)
+- set(ENABLE_PROFILING OFF CACHE BOOL "Enable profiling in the GCC compiler (Add flags: -g -pg)")
+- set(USE_OMIT_FRAME_POINTER ON CACHE BOOL "Enable -fomit-frame-pointer for GCC")
++ option(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF)
++ option(USE_OMIT_FRAME_POINTER "Enable -fomit-frame-pointer for GCC" ON)
+ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES arm*)
+ # We can use only -O2 because the -O3 causes gcc crash
+- set(USE_O2 ON CACHE BOOL "Enable -O2 for GCC")
+- set(USE_FAST_MATH ON CACHE BOOL "Enable -ffast-math for GCC")
++ option(USE_O2 "Enable -O2 for GCC" ON)
++ option(USE_FAST_MATH "Enable -ffast-math for GCC" ON)
+ endif()
+
+ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64*)
+@@ -255,56 +255,56 @@
+ endif()
+
+ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES powerpc*)
+- set(USE_O3 ON CACHE BOOL "Enable -O3 for GCC")
+- set(ENABLE_POWERPC ON CACHE BOOL "Enable PowerPC for GCC")
++ option(USE_O3 "Enable -O3 for GCC" ON)
++ option(ENABLE_POWERPC "Enable PowerPC for GCC" ON)
+ endif ()
+
+ if(X86 OR X86_64)
+ # enable everything, since the available set of instructions is checked at runtime
+- set(USE_O3 ON CACHE BOOL "Enable -O3")
+- set(USE_FAST_MATH ON CACHE BOOL "Enable -ffast-math")
+- set(ENABLE_SSE ON CACHE BOOL "Enable SSE instructions")
+- set(ENABLE_SSE2 ON CACHE BOOL "Enable SSE2 instructions")
+- set(ENABLE_SSE3 OFF CACHE BOOL "Enable SSE3 instructions")
+- set(ENABLE_SSSE3 OFF CACHE BOOL "Enable SSSE3 instructions")
+- set(ENABLE_SSE41 OFF CACHE BOOL "Enable SSE4.1 instructions")
+- set(ENABLE_SSE42 OFF CACHE BOOL "Enable SSE4.2 instructions")
++ set(USE_O3 "Enable -O3" ON)
++ set(USE_FAST_MATH "Enable -ffast-math" ON)
++ option(ENABLE_SSE "Enable SSE instructions" ON)
++ option(ENABLE_SSE2 "Enable SSE2 instructions" ON)
++ option(ENABLE_SSE3 "Enable SSE3 instructions" OFF)
++ option(ENABLE_SSSE3 "Enable SSSE3 instructions" OFF)
++ option(ENABLE_SSE41 "Enable SSE4.1 instructions" OFF)
++ option(ENABLE_SSE42 "Enable SSE4.2 instructions" OFF)
+ endif()
+ endif()
+
+ # allow fine grained control over which libraries not to link, even if
+ # they are available on the system
+ # ====================================================================
+-set(WITH_PNG ON CACHE BOOL "Include PNG support")
+-set(WITH_JPEG ON CACHE BOOL "Include JPEG support")
+-set(WITH_JASPER ON CACHE BOOL "Include JPEG2K support")
+-set(WITH_TIFF ON CACHE BOOL "Include TIFF support")
+-set(WITH_OPENEXR ON CACHE BOOL "Include ILM support via OpenEXR")
++option(WITH_PNG "Include PNG support" ON)
++option(WITH_JPEG "Include JPEG support" ON)
++option(WITH_JASPER "Include JPEG2K support" ON)
++option(WITH_TIFF "Include TIFF support" ON)
++option(WITH_OPENEXR "Include ILM support via OpenEXR" ON)
+
+ if(UNIX)
+- set(WITH_FFMPEG ON CACHE BOOL "Include FFMPEG support")
++ option(WITH_FFMPEG "Include FFMPEG support" ON)
+ if(NOT APPLE)
+- set(WITH_UNICAP OFF CACHE BOOL "Include Unicap support (GPL)")
+- set(WITH_GTK ON CACHE BOOL "Include GTK support")
+- set(WITH_GSTREAMER ON CACHE BOOL "Include Gstreamer support")
+- set(WITH_V4L ON CACHE BOOL "Include Video 4 Linux support")
+- set(WITH_XINE OFF CACHE BOOL "Include Xine support (GPL)")
++ option(WITH_UNICAP "Include Unicap support (GPL)" OFF)
++ option(WITH_GTK "Include GTK support" ON)
++ option(WITH_GSTREAMER "Include Gstreamer support" ON)
++ option(WITH_V4L "Include Video 4 Linux support" ON)
++ option(WITH_XINE "Include Xine support (GPL)" OFF)
+ endif()
+- set(WITH_PVAPI ON CACHE BOOL "Include Prosilica GigE support")
+- set(WITH_1394 ON CACHE BOOL "Include IEEE1394 support")
++ option(WITH_PVAPI "Include Prosilica GigE support" ON)
++ option(WITH_1394 "Include IEEE1394 support" ON)
+ endif()
+
+ if(APPLE)
+- set(WITH_CARBON OFF CACHE BOOL "Use Carbon for UI instead of Cocoa")
+- set(WITH_QUICKTIME OFF CACHE BOOL "Use QuickTime for Video I/O insted of QTKit")
++ option(WITH_CARBON "Use Carbon for UI instead of Cocoa" OFF)
++ option(WITH_QUICKTIME "Use QuickTime for Video I/O insted of QTKit" OFF)
+ endif()
+
+-set(WITH_TBB OFF CACHE BOOL "Include TBB support")
+-set(WITH_EIGEN2 ON CACHE BOOL "Include Eigen2/Eigen3 support")
+-set(WITH_CUDA OFF CACHE BOOL "Include NVidia Cuda Runtime support")
++option(WITH_TBB "Include TBB support" OFF)
++option(WITH_EIGEN2 "Include Eigen2/Eigen3 support" ON)
++option(WITH_CUDA "Include NVidia Cuda Runtime support" OFF)
+
+ if(WIN32)
+- set(WITH_VIDEOINPUT ON CACHE BOOL "Enable VideoInput support")
++ option(WITH_VIDEOINPUT "Enable VideoInput support" ON)
+ endif()
+
+ # ===================================================
+@@ -496,7 +496,7 @@
+ include(OpenCVFindOpenEXR.cmake)
+ endif()
+
+-set(BUILD_NEW_PYTHON_SUPPORT ON CACHE BOOL "Build with Python support")
++option(BUILD_NEW_PYTHON_SUPPORT "Build with Python support" ON)
+
+ if(BUILD_NEW_PYTHON_SUPPORT)
+ find_package(PythonInterp)
+@@ -513,8 +513,8 @@
+
+ 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_PLUGIN_INSTALL_PATH lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages/opencv)
++ set(PYTHON_PACKAGES_PATH lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages)
+ endif()
+ if(WIN32)
+ get_filename_component(PYTHON_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${PYTHON_VERSION_MAJOR_MINOR}\\InstallPath]" ABSOLUTE CACHE)
+@@ -543,8 +543,8 @@
+ #YV
+ ############################### QT ################################
+
+-set(WITH_QT OFF CACHE BOOL "Build with Qt Backend support")
+-set(WITH_QT_OPENGL OFF CACHE BOOL "Add OpenGL extension to Qt")
++option(WITH_QT "Build with Qt Backend support" OFF)
++option(WITH_QT_OPENGL "Add OpenGL extension to Qt" OFF)
+
+ set(HAVE_QT 0)
+ set(HAVE_QT_OPENGL 0)
+@@ -823,15 +823,12 @@
+
+
+ ################## LATEX ##################
+-set(BUILD_LATEX_DOCS OFF CACHE BOOL "Build LaTeX OpenCV Documentation")
++option(BUILD_LATEX_DOCS "Build LaTeX OpenCV Documentation" OFF)
+
+ ################### DOXYGEN ###############
+
+ find_package(Doxygen)
+-
+-if(DOXYGEN_FOUND)
+- set(BUILD_DOXYGEN_DOCS ON CACHE BOOL "Generate HTML docs using Doxygen")
+-endif()
++option(BUILD_DOXYGEN_DOCS "Generate HTML docs using Doxygen" ON)
+
+ # ----------------------------------------------------------------------------
+ # UPDATE CONFIG FILES & SCRIPTS:
+@@ -863,7 +860,7 @@
+ # Set the maximum level of warnings:
+ # ----------------------------------------------------------------------------
+ # Should be set to true for development
+-set(OPENCV_WARNINGS_ARE_ERRORS OFF CACHE BOOL "Treat warnings as errors")
++option(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF)
+
+ set(EXTRA_C_FLAGS "")
+ set(EXTRA_C_FLAGS_RELEASE "")
+@@ -1070,9 +1067,9 @@
+ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE PATH "Output directory for applications" )
+
+ if(WIN32)
+-set(OPENCV_DOC_INSTALL_PATH doc)
++set(OPENCV_DOC_INSTALL_PATH doc CACHE PATH "Directory for documentation to install (without prefix)")
+ else()
+-set(OPENCV_DOC_INSTALL_PATH share/opencv/doc)
++set(OPENCV_DOC_INSTALL_PATH share/doc/opencv-${OPENCV_VERSION}/ CACHE PATH "Directory for documentation to install (without prefix)")
+ endif()
+
+ # --------------------------------------------------------------------------------------------
+@@ -1106,7 +1103,7 @@
+ set(CMAKE_INCLUDE_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/include/opencv" "${CMAKE_INSTALL_PREFIX}/include")
+ set(CMAKE_BASE_INCLUDE_DIRS_CONFIGCMAKE "\"\"")
+
+-set(CMAKE_LIB_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/lib")
++set(CMAKE_LIB_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+
+ exec_program(mkdir ARGS "-p \"${CMAKE_BINARY_DIR}/unix-install/\"" OUTPUT_VARIABLE RET_VAL)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" IMMEDIATE @ONLY)
+@@ -1164,14 +1161,14 @@
+ # -------------------------------------------------------------------------------------------
+ set(prefix ${CMAKE_INSTALL_PREFIX})
+ set(exec_prefix "\${prefix}")
+-set(libdir "\${exec_prefix}/lib")
++set(libdir "\${exec_prefix}/lib${LIB_SUFFIX}")
+ set(includedir "\${prefix}/include")
+ set(VERSION ${OPENCV_VERSION})
+
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/opencv.pc.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/opencv.pc" @ONLY IMMEDIATE)
+
+ if(UNIX)
+- install(FILES ${CMAKE_BINARY_DIR}/unix-install/opencv.pc DESTINATION lib/pkgconfig)
++ install(FILES ${CMAKE_BINARY_DIR}/unix-install/opencv.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
+ endif()
+
+
+@@ -1191,7 +1188,7 @@
+ # CPack target
+ # ----------------------------------------------------------------------------
+
+-set(BUILD_PACKAGE OFF CACHE BOOL "Build a installer with the SDK")
++option(BUILD_PACKAGE "Build a installer with the SDK" OFF)
+
+ if(BUILD_PACKAGE)
+
+diff -urN OpenCV-2.2.0.old/modules/ffmpeg/CMakeLists.txt OpenCV-2.2.0.new/modules/ffmpeg/CMakeLists.txt
+--- OpenCV-2.2.0.old/modules/ffmpeg/CMakeLists.txt 2010-12-05 04:35:24.000000000 +0100
++++ OpenCV-2.2.0.new/modules/ffmpeg/CMakeLists.txt 2011-04-30 10:51:26.000000000 +0200
+@@ -43,12 +43,12 @@
+ VERSION ${OPENCV_VERSION}
+ OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
+ DEFINE_SYMBOL "CVAPI_EXPORTS"
+- ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
++ ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/"
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
+ )
+
+ install(TARGETS ${the_target}
+ RUNTIME DESTINATION bin COMPONENT main
+- ARCHIVE DESTINATION lib COMPONENT main
+- LIBRARY DESTINATION lib COMPONENT main
++ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT main
++ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT main
+ )
+diff -urN OpenCV-2.2.0.old/modules/gpu/CMakeLists.txt OpenCV-2.2.0.new/modules/gpu/CMakeLists.txt
+--- OpenCV-2.2.0.old/modules/gpu/CMakeLists.txt 2010-12-05 04:35:24.000000000 +0100
++++ OpenCV-2.2.0.new/modules/gpu/CMakeLists.txt 2011-04-30 10:51:08.000000000 +0200
+@@ -96,9 +96,9 @@
+ # Additional target properties
+ set_target_properties(${the_target} PROPERTIES
+ DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+- ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
++ ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/"
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
+- INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}"
+ )
+
+ # Add the required libraries for linking:
+@@ -124,8 +124,8 @@
+
+ install(TARGETS ${the_target}
+ RUNTIME DESTINATION bin COMPONENT main
+- LIBRARY DESTINATION lib COMPONENT main
+- ARCHIVE DESTINATION lib COMPONENT main)
++ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT main
++ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT main)
+
+ install(FILES ${lib_hdrs}
+ DESTINATION include/opencv2/${name}
+diff -urN OpenCV-2.2.0.old/modules/highgui/CMakeLists.txt OpenCV-2.2.0.new/modules/highgui/CMakeLists.txt
+--- OpenCV-2.2.0.old/modules/highgui/CMakeLists.txt 2010-12-05 04:35:24.000000000 +0100
++++ OpenCV-2.2.0.new/modules/highgui/CMakeLists.txt 2011-04-30 10:53:11.000000000 +0200
+@@ -250,9 +250,9 @@
+ # Additional target properties
+ set_target_properties(${the_target} PROPERTIES
+ DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+- ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
++ ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/"
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
+- INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}"
+ LINK_INTERFACE_LIBRARIES ""
+ )
+
+@@ -302,8 +302,8 @@
+
+ install(TARGETS ${the_target}
+ RUNTIME DESTINATION bin COMPONENT main
+- LIBRARY DESTINATION lib COMPONENT main
+- ARCHIVE DESTINATION lib COMPONENT main)
++ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT main
++ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT main)
+
+ install(FILES ${highgui_ext_hdrs}
+ DESTINATION include/opencv2/highgui
+diff -urN OpenCV-2.2.0.old/OpenCVModule.cmake OpenCV-2.2.0.new/OpenCVModule.cmake
+--- OpenCV-2.2.0.old/OpenCVModule.cmake 2010-12-05 04:35:25.000000000 +0100
++++ OpenCV-2.2.0.new/OpenCVModule.cmake 2011-04-30 10:53:45.000000000 +0200
+@@ -51,9 +51,9 @@
+ # Additional target properties
+ set_target_properties(${the_target} PROPERTIES
+ DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+- ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
++ ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/"
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
+- INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}"
+ )
+
+ # Add the required libraries for linking:
+@@ -75,8 +75,8 @@
+
+ install(TARGETS ${the_target}
+ RUNTIME DESTINATION bin COMPONENT main
+- LIBRARY DESTINATION lib COMPONENT main
+- ARCHIVE DESTINATION lib COMPONENT main)
++ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT main
++ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT main)
+
+ install(FILES ${lib_hdrs}
+ DESTINATION include/opencv2/${name}
+diff -urN OpenCV-2.2.0.old/tests/cxts/CMakeLists.txt OpenCV-2.2.0.new/tests/cxts/CMakeLists.txt
+--- OpenCV-2.2.0.old/tests/cxts/CMakeLists.txt 2010-12-05 04:35:25.000000000 +0100
++++ OpenCV-2.2.0.new/tests/cxts/CMakeLists.txt 2011-04-30 10:54:15.000000000 +0200
+@@ -51,7 +51,7 @@
+ # Additional target properties
+ set_target_properties(${the_target} PROPERTIES
+ DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+- ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
++ ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/"
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
+ DEFINE_SYMBOL "CVAPI_EXPORTS"
+ )
+@@ -64,6 +64,6 @@
+ if(WIN32)
+ install(TARGETS ${the_target}
+ RUNTIME DESTINATION bin COMPONENT main
+- LIBRARY DESTINATION lib COMPONENT main
+- ARCHIVE DESTINATION lib COMPONENT main)
++ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT main
++ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT main)
+ endif()
diff --git a/media-libs/opencv/files/opencv-2.2.0-ffmpeg01.patch b/media-libs/opencv/files/opencv-2.2.0-ffmpeg01.patch
new file mode 100644
index 000000000000..bfde3a92c78f
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.2.0-ffmpeg01.patch
@@ -0,0 +1,105 @@
+
+Index: D:/WaterWATCH/dev/opencv/modules/highgui/src/cap_ffmpeg.cpp
+===================================================================
+--- D:/WaterWATCH/dev/opencv/modules/highgui/src/cap_ffmpeg.cpp (revision 2112)
++++ D:/WaterWATCH/dev/opencv/modules/highgui/src/cap_ffmpeg.cpp (revision 2113)
+@@ -466,7 +466,7 @@
+ AVCodecContext *enc = &ic->streams[i]->codec;
+ #endif
+
+- if( CODEC_TYPE_VIDEO == enc->codec_type && video_stream < 0) {
++ if( AVMEDIA_TYPE_VIDEO == enc->codec_type && video_stream < 0) {
+ AVCodec *codec = avcodec_find_decoder(enc->codec_id);
+ if (!codec ||
+ avcodec_open(enc, codec) < 0)
+@@ -550,15 +550,27 @@
+ continue;
+ }
+
+-#if LIBAVFORMAT_BUILD > 4628
+- avcodec_decode_video(video_st->codec,
+- picture, &got_picture,
+- packet.data, packet.size);
+-#else
+- avcodec_decode_video(&video_st->codec,
+- picture, &got_picture,
+- packet.data, packet.size);
+-#endif
++
++ AVPacket avpkt;
++ av_init_packet(&avpkt);
++ avpkt.data = packet.data;
++ avpkt.size = packet.size;
++ //
++ // HACK for CorePNG to decode as normal PNG by default
++ // same method used by ffmpeg
++ avpkt.flags = AV_PKT_FLAG_KEY;
++ avcodec_decode_video2(video_st->codec,
++ picture, &got_picture, &avpkt);
++//Functions Removed from ffmpeg on 4/19/11
++//#if LIBAVFORMAT_BUILD > 4628
++// avcodec_decode_video(video_st->codec,
++// picture, &got_picture,
++// packet.data, packet.size);
++//#else
++// avcodec_decode_video(&video_st->codec,
++// picture, &got_picture,
++// packet.data, packet.size);
++//#endif
+
+ if (got_picture) {
+ // we have a new picture, so memorize it
+@@ -899,7 +911,7 @@
+ #endif
+
+ #if LIBAVFORMAT_BUILD > 4621
+- c->codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_VIDEO);
++ c->codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO);
+ #else
+ c->codec_id = oc->oformat->video_codec;
+ #endif
+@@ -911,7 +923,7 @@
+ //if(codec_tag) c->codec_tag=codec_tag;
+ codec = avcodec_find_encoder(c->codec_id);
+
+- c->codec_type = CODEC_TYPE_VIDEO;
++ c->codec_type = AVMEDIA_TYPE_VIDEO;
+
+ /* put sample parameters */
+ c->bit_rate = bitrate;
+@@ -998,7 +1010,7 @@
+ AVPacket pkt;
+ av_init_packet(&pkt);
+
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ pkt.stream_index= video_st->index;
+ pkt.data= (uint8_t *)picture;
+ pkt.size= sizeof(AVPicture);
+@@ -1018,7 +1030,7 @@
+ pkt.pts = c->coded_frame->pts;
+ #endif
+ if(c->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ pkt.stream_index= video_st->index;
+ pkt.data= outbuf;
+ pkt.size= out_size;
+@@ -1215,7 +1227,7 @@
+ av_register_all ();
+
+ /* auto detect the output format from the name and fourcc code. */
+- fmt = guess_format(NULL, filename, NULL);
++ fmt = av_guess_format(NULL, filename, NULL);
+ if (!fmt)
+ return false;
+
+@@ -1238,7 +1250,7 @@
+ #endif
+
+ // alloc memory for context
+- oc = av_alloc_format_context();
++ oc = avformat_alloc_context();
+ assert (oc);
+
+ /* set file name */
diff --git a/media-libs/opencv/files/opencv-2.2.0-ffmpeg02.patch b/media-libs/opencv/files/opencv-2.2.0-ffmpeg02.patch
new file mode 100644
index 000000000000..00ee541590c5
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.2.0-ffmpeg02.patch
@@ -0,0 +1,58 @@
+
+Index: D:/WaterWATCH/dev/opencv/modules/highgui/src/cap_ffmpeg.cpp
+===================================================================
+--- D:/WaterWATCH/dev/opencv/modules/highgui/src/cap_ffmpeg.cpp (revision 2121)
++++ D:/WaterWATCH/dev/opencv/modules/highgui/src/cap_ffmpeg.cpp (revision 2122)
+@@ -815,24 +815,25 @@
+ #endif
+ };
+
+-static const char * icvFFMPEGErrStr(int err)
+-{
+- switch(err) {
+- case AVERROR_NUMEXPECTED:
+- return "Incorrect filename syntax";
+- case AVERROR_INVALIDDATA:
+- return "Invalid data in header";
+- case AVERROR_NOFMT:
+- return "Unknown format";
+- case AVERROR_IO:
+- return "I/O error occurred";
+- case AVERROR_NOMEM:
+- return "Memory allocation error";
+- default:
+- break;
+- }
+- return "Unspecified error";
+-}
++//Deprecated Errors, should be using AVERROR(EINVAL) to return error strings
++//static const char * icvFFMPEGErrStr(int err)
++//{
++// switch(err) {
++// case AVERROR_NUMEXPECTED:
++// return "Incorrect filename syntax";
++// case AVERROR_INVALIDDATA:
++// return "Invalid data in header";
++// case AVERROR_NOFMT:
++// return "Unknown format";
++// case AVERROR_IO:
++// return "I/O error occurred";
++// case AVERROR_NOMEM:
++// return "Memory allocation error";
++// default:
++// break;
++// }
++// return "Unspecified error";
++//}
+
+ /* function internal to FFMPEG (libavformat/riff.c) to lookup codec id by fourcc tag*/
+ extern "C" {
+@@ -1322,7 +1323,7 @@
+ /* open the codec */
+ if ( (err=avcodec_open(c, codec)) < 0) {
+ char errtext[256];
+- sprintf(errtext, "Could not open codec '%s': %s", codec->name, icvFFMPEGErrStr(err));
++ sprintf(errtext, "Could not open codec '%s': %s", codec->name, AVERROR(EINVAL));
+ CV_Error(CV_StsBadArg, errtext);
+ }
+
diff --git a/media-libs/opencv/files/opencv-2.2.0-gcc46.patch b/media-libs/opencv/files/opencv-2.2.0-gcc46.patch
new file mode 100644
index 000000000000..a69499b4f171
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.2.0-gcc46.patch
@@ -0,0 +1,10 @@
+Index: /trunk/opencv/modules/core/include/opencv2/core/core.hpp
+===================================================================
+--- /trunk/opencv/modules/core/include/opencv2/core/core.hpp (revision 4804)
++++ /trunk/opencv/modules/core/include/opencv2/core/core.hpp (revision 4861)
+@@ -56,4 +56,5 @@
+ #include <algorithm>
+ #include <cmath>
++#include <cstddef>
+ #include <complex>
+ #include <map>
diff --git a/media-libs/opencv/files/opencv-2.2.0-libpng1.5.patch b/media-libs/opencv/files/opencv-2.2.0-libpng1.5.patch
new file mode 100644
index 000000000000..fce010da4d7e
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.2.0-libpng1.5.patch
@@ -0,0 +1,40 @@
+
+Index: /trunk/opencv/modules/highgui/src/grfmt_png.cpp
+===================================================================
+--- /trunk/opencv/modules/highgui/src/grfmt_png.cpp (revision 4337)
++++ /trunk/opencv/modules/highgui/src/grfmt_png.cpp (revision 4945)
+@@ -108,5 +108,5 @@
+ {
+ png_structp png_ptr = (png_structp)_png_ptr;
+- PngDecoder* decoder = (PngDecoder*)(png_ptr->io_ptr);
++ PngDecoder* decoder = (PngDecoder*)(png_get_io_ptr(png_ptr));
+ CV_Assert( decoder );
+ const Mat& buf = decoder->m_buf;
+@@ -139,5 +139,5 @@
+ if( info_ptr && end_info )
+ {
+- if( setjmp( png_ptr->jmpbuf ) == 0 )
++ if( setjmp( png_jmpbuf( png_ptr ) ) == 0 )
+ {
+ if( !m_buf.empty() )
+@@ -201,5 +201,5 @@
+ png_infop end_info = (png_infop)m_end_info;
+
+- if( setjmp(png_ptr->jmpbuf) == 0 )
++ if( setjmp( png_jmpbuf ( png_ptr ) ) == 0 )
+ {
+ int y;
+@@ -285,5 +285,5 @@
+ return;
+ png_structp png_ptr = (png_structp)_png_ptr;
+- PngEncoder* encoder = (PngEncoder*)(png_ptr->io_ptr);
++ PngEncoder* encoder = (PngEncoder*)(png_get_io_ptr(png_ptr));
+ CV_Assert( encoder && encoder->m_buf );
+ size_t cursz = encoder->m_buf->size();
+@@ -327,5 +327,5 @@
+ if( info_ptr )
+ {
+- if( setjmp( png_ptr->jmpbuf ) == 0 )
++ if( setjmp( png_jmpbuf ( png_ptr ) ) == 0 )
+ {
+ if( m_buf )
diff --git a/media-libs/opencv/files/opencv-2.2.0-numpy.patch b/media-libs/opencv/files/opencv-2.2.0-numpy.patch
new file mode 100644
index 000000000000..0690eab2f25f
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.2.0-numpy.patch
@@ -0,0 +1,12 @@
+diff -up OpenCV-2.2.0/CMakeLists.txt.numpy OpenCV-2.2.0/CMakeLists.txt
+--- OpenCV-2.2.0/CMakeLists.txt.numpy 2010-12-07 17:54:56.369070005 +0100
++++ OpenCV-2.2.0/CMakeLists.txt 2010-12-07 17:58:31.987070004 +0100
+@@ -532,7 +532,7 @@ if(BUILD_NEW_PYTHON_SUPPORT)
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(PYTHON_NUMPY_PROCESS EQUAL 0)
+ set(PYTHON_USE_NUMPY 1)
+- add_definitions(-D PYTHON_USE_NUMPY=1)
++ add_definitions(-DPYTHON_USE_NUMPY=1)
+ include_directories(AFTER ${PYTHON_NUMPY_INCLUDE_DIRS})
+ message(STATUS " Use INCLUDE: ${PYTHON_NUMPY_INCLUDE_DIRS}")
+ else()
diff --git a/media-libs/opencv/files/opencv-2.2.0-ptrcvcapture.patch b/media-libs/opencv/files/opencv-2.2.0-ptrcvcapture.patch
new file mode 100644
index 000000000000..c1316f0eacee
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.2.0-ptrcvcapture.patch
@@ -0,0 +1,17 @@
+Index: modules/highgui/src/cap.cpp
+===================================================================
+--- modules/highgui/src/cap.cpp (revision 4283)
++++ modules/highgui/src/cap.cpp (working copy)
+@@ -52,10 +52,10 @@
+ namespace cv
+ {
+
+-template<> inline void Ptr<CvCapture>::delete_obj()
++template<> void Ptr<CvCapture>::delete_obj()
+ { cvReleaseCapture(&obj); }
+
+-template<> inline void Ptr<CvVideoWriter>::delete_obj()
++template<> void Ptr<CvVideoWriter>::delete_obj()
+ { cvReleaseVideoWriter(&obj); }
+
+ }
diff --git a/media-libs/opencv/files/opencv-2.2.0-use_system_libs.patch b/media-libs/opencv/files/opencv-2.2.0-use_system_libs.patch
new file mode 100644
index 000000000000..5d22a9be17bf
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.2.0-use_system_libs.patch
@@ -0,0 +1,94 @@
+diff -urN OpenCV-2.2.0.old/CMakeLists.txt OpenCV-2.2.0/CMakeLists.txt
+--- OpenCV-2.2.0.old/CMakeLists.txt 2010-12-05 04:35:23.000000000 +0100
++++ OpenCV-2.2.0/CMakeLists.txt 2011-04-29 23:48:20.000000000 +0200
+@@ -193,6 +193,11 @@
+ # ----------------------------------------------------------------------------
+ # CHECK FOR SYSTEM LIBRARIES, OPTIONS, ETC..
+ # ----------------------------------------------------------------------------
++find_package(LAPACK REQUIRED)
++find_package(BLAS REQUIRED)
++find_package(ZLIB REQUIRED)
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(FLANN REQUIRED flann)
+
+ # Build/install (or not) some apps:
+ # ===================================================
+diff -urN OpenCV-2.2.0.old/modules/core/CMakeLists.txt OpenCV-2.2.0/modules/core/CMakeLists.txt
+--- OpenCV-2.2.0.old/modules/core/CMakeLists.txt 2010-12-05 04:35:24.000000000 +0100
++++ OpenCV-2.2.0/modules/core/CMakeLists.txt 2011-04-30 10:56:32.000000000 +0200
+@@ -1,3 +1,3 @@
+-include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/include")
+-set(deps opencv_lapack zlib)
++include_directories("${ZLIB_INCLUDE_DIRS}")
++set(deps ${ZLIB_LIBRARIES} ${LAPACK_LIBRARIES})
+ define_opencv_module(core ${deps})
+diff -urN OpenCV-2.2.0.old/modules/core/src/lapack.cpp OpenCV-2.2.0/modules/core/src/lapack.cpp
+--- OpenCV-2.2.0.old/modules/core/src/lapack.cpp 2010-12-05 04:35:24.000000000 +0100
++++ OpenCV-2.2.0/modules/core/src/lapack.cpp 2011-04-30 11:50:09.000000000 +0200
+@@ -48,7 +48,7 @@
+ typedef __CLPK_integer integer;
+ typedef __CLPK_real real;
+ #else
+- #include "clapack.h"
++ #include <clapack/clapack.h>
+ #endif
+
+ #undef abs
+diff -urN OpenCV-2.2.0.old/modules/haartraining/CMakeLists.txt OpenCV-2.2.0/modules/haartraining/CMakeLists.txt
+--- OpenCV-2.2.0.old/modules/haartraining/CMakeLists.txt 2010-12-05 04:35:24.000000000 +0100
++++ OpenCV-2.2.0/modules/haartraining/CMakeLists.txt 2011-04-29 23:48:41.000000000 +0200
+@@ -18,7 +18,7 @@
+ link_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/bin ${CMAKE_CURRENT_BINARY_DIR})
+ endif()
+
+-set(haartraining_libs opencv_core opencv_imgproc opencv_highgui opencv_objdetect opencv_calib3d opencv_haartraining_engine)
++set(haartraining_libs opencv_core opencv_imgproc opencv_highgui opencv_objdetect opencv_calib3d opencv_haartraining_engine ${BLAS_LIBRARIES} ${FLANN_LIBRARIES} ${LAPACK_LIBRARIES})
+
+ link_libraries(${haartraining_libs})
+
+diff -urN OpenCV-2.2.0.old/modules/highgui/CMakeLists.txt OpenCV-2.2.0/modules/highgui/CMakeLists.txt
+--- OpenCV-2.2.0.old/modules/highgui/CMakeLists.txt 2010-12-05 04:35:24.000000000 +0100
++++ OpenCV-2.2.0/modules/highgui/CMakeLists.txt 2011-04-29 23:11:47.000000000 +0200
+@@ -219,8 +219,8 @@
+ set(the_target "opencv_highgui")
+
+ add_definitions(-DHIGHGUI_EXPORTS -DCVAPI_EXPORTS)
+-
+-include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
++include_directories("${ZLIB_INCLUDE_DIRS}"
++ "${CMAKE_CURRENT_SOURCE_DIR}/include"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../core/include"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../imgproc/include"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src"
+@@ -285,7 +285,7 @@
+ #target_link_libraries(${the_target} libtiff)
+ endif()
+
+-target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} opencv_core opencv_imgproc zlib ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${JASPER_LIBRARIES} ${HIGHGUI_LIBRARIES} ${OPENEXR_LIBRARIES})
++target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} opencv_core opencv_imgproc ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${JASPER_LIBRARIES} ${HIGHGUI_LIBRARIES} ${OPENEXR_LIBRARIES})
+
+ if(APPLE)
+ target_link_libraries(${the_target} "-lbz2 -framework Cocoa -framework QuartzCore")
+diff -urN OpenCV-2.2.0.old/modules/highgui/src/grfmt_png.cpp OpenCV-2.2.0/modules/highgui/src/grfmt_png.cpp
+--- OpenCV-2.2.0.old/modules/highgui/src/grfmt_png.cpp 2010-12-05 04:35:25.000000000 +0100
++++ OpenCV-2.2.0/modules/highgui/src/grfmt_png.cpp 2011-04-29 22:25:25.000000000 +0200
+@@ -42,6 +42,7 @@
+
+ #include "precomp.hpp"
+
++#include <zlib.h>
+ #ifdef HAVE_PNG
+
+ /****************************************************************************************\
+diff -urN OpenCV-2.2.0.old/OpenCVFindOpenEXR.cmake OpenCV-2.2.0/OpenCVFindOpenEXR.cmake
+--- OpenCV-2.2.0.old/OpenCVFindOpenEXR.cmake 2010-12-05 04:35:25.000000000 +0100
++++ OpenCV-2.2.0/OpenCVFindOpenEXR.cmake 2011-04-30 10:57:21.000000000 +0200
+@@ -44,7 +44,7 @@
+ IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
+ SET(OPENEXR_FOUND TRUE)
+ SET(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
+- SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} zlib CACHE STRING "The libraries needed to use OpenEXR")
++ SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
+ ENDIF ()
+
+ IF(OPENEXR_FOUND)
diff --git a/media-libs/opencv/files/opencv-2.2.0-v4l_2.6.38.patch b/media-libs/opencv/files/opencv-2.2.0-v4l_2.6.38.patch
new file mode 100644
index 000000000000..dd23cd133ccf
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.2.0-v4l_2.6.38.patch
@@ -0,0 +1,33 @@
+diff -up OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp.nov4l1 OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp
+--- OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp.nov4l1 2010-12-05 11:35:25.000000000 +0800
++++ OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp 2011-04-18 10:40:01.984950054 +0800
+@@ -214,7 +214,7 @@
+ #include <sys/types.h>
+ #include <sys/mman.h>
+
+-#include <linux/videodev.h>
++#include <libv4l1-videodev.h>
+
+ #include <string.h>
+ #include <stdlib.h>
+diff -up OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp.nov4l1 OpenCV-2.2.0/modules/highgui/src/cap_libv4l.cpp.cpp
+--- OpenCV-2.2.0/modules/highgui/src/cap_libv4l.cpp.nov4l1 2010-12-05 11:35:25.000000000 +0800
++++ OpenCV-2.2.0/modules/highgui/src/cap_libv4l.cpp 2011-04-18 10:39:07.568578185 +0800
+@@ -224,7 +224,7 @@
+ #include "highgui.h"
+ #include "precomp.hpp"
+
+-#if !defined WIN32 && defined HAVE_CAMV4L && defined HAVE_CAMV4L2
++#if !defined WIN32 && defined HAVE_CAMV4L2
+
+ #define CLEAR(x) memset (&(x), 0, sizeof (x))
+
+@@ -241,7 +241,7 @@
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+
+-#include <linux/videodev.h>
++#include <libv4l1-videodev.h>
+ #include <linux/videodev2.h>
+
+ #include <libv4l1.h>