diff --git a/.gitignore b/.gitignore index d1eceb7..25f2bf8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ OpenCV-2.1.0.tar.bz2 +/OpenCV-2.2.0.tar.bz2 diff --git a/OpenCV-2.1-lapack.patch b/OpenCV-2.1-lapack.patch deleted file mode 100644 index b6d7a2a..0000000 --- a/OpenCV-2.1-lapack.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up OpenCV-2.1.0/CMakeLists.txt.lapack OpenCV-2.1.0/CMakeLists.txt ---- OpenCV-2.1.0/CMakeLists.txt.lapack 2010-06-25 15:59:47.000000000 +0200 -+++ OpenCV-2.1.0/CMakeLists.txt 2010-06-25 16:01:04.000000000 +0200 -@@ -839,7 +839,7 @@ IF(NOT BUILD_SHARED_LIBS) - set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} stdc++) - endif() - -- set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} flann zlib opencv_lapack) -+ set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} flann z lapack) - endif() - - -diff -up OpenCV-2.1.0/src/cxcore/CMakeLists.txt.lapack OpenCV-2.1.0/src/cxcore/CMakeLists.txt ---- OpenCV-2.1.0/src/cxcore/CMakeLists.txt.lapack 2010-06-25 15:59:47.000000000 +0200 -+++ OpenCV-2.1.0/src/cxcore/CMakeLists.txt 2010-06-25 16:00:35.000000000 +0200 -@@ -53,7 +53,7 @@ set_target_properties(${the_target} PROP - ) - - # Add the required libraries for linking: --target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} opencv_lapack zlib flann) -+target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} lapack z flann) - - # Linker flag needed for Windows Mobile 5 and 6 SDKs - if(MSVC) -@@ -67,7 +67,7 @@ if(MSVC) - ) - endif() - --add_dependencies(${the_target} opencv_lapack zlib) -+add_dependencies(${the_target} lapack z) - - install(TARGETS ${the_target} - RUNTIME DESTINATION bin COMPONENT main diff --git a/OpenCV-2.1-nointrernal.patch b/OpenCV-2.1-nointrernal.patch deleted file mode 100644 index 88b0429..0000000 --- a/OpenCV-2.1-nointrernal.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up OpenCV-2.1.0/3rdparty/CMakeLists.txt.nointernal OpenCV-2.1.0/3rdparty/CMakeLists.txt ---- OpenCV-2.1.0/3rdparty/CMakeLists.txt.nointernal 2010-04-06 03:24:34.000000000 +0200 -+++ OpenCV-2.1.0/3rdparty/CMakeLists.txt 2010-06-25 15:48:06.000000000 +0200 -@@ -1,6 +1,6 @@ - add_subdirectory(flann) --add_subdirectory(lapack) --add_subdirectory(zlib) -+#add_subdirectory(lapack) -+#add_subdirectory(zlib) - if(WITH_JASPER AND NOT JASPER_FOUND) - add_subdirectory(libjasper) - endif() diff --git a/OpenCV-2.1-rpath.patch b/OpenCV-2.1-rpath.patch deleted file mode 100644 index b06e9ec..0000000 --- a/OpenCV-2.1-rpath.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up OpenCV-2.1.0/CMakeLists.txt.rpath OpenCV-2.1.0/CMakeLists.txt ---- OpenCV-2.1.0/CMakeLists.txt.rpath 2010-06-25 17:13:42.000000000 +0200 -+++ OpenCV-2.1.0/CMakeLists.txt 2010-06-25 17:13:55.000000000 +0200 -@@ -13,7 +13,7 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS tr - # 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 /lib64 /usr/lib /usr/lib64) - endif() - # it _must_ go before PROJECT(OpenCV) in order to work - if (NOT CMAKE_INSTALL_PREFIX) diff --git a/OpenCV-2.2-fixpc.patch b/OpenCV-2.2-fixpc.patch new file mode 100644 index 0000000..3dfbdfa --- /dev/null +++ b/OpenCV-2.2-fixpc.patch @@ -0,0 +1,31 @@ +diff -up OpenCV-2.2.0/CMakeLists.txt.fixpc OpenCV-2.2.0/CMakeLists.txt +--- OpenCV-2.2.0/CMakeLists.txt.fixpc 2011-01-06 10:20:33.650218001 +0100 ++++ OpenCV-2.2.0/CMakeLists.txt 2011-01-06 10:22:10.170217997 +0100 +@@ -24,8 +24,8 @@ if (NOT CMAKE_INSTALL_PREFIX) + endif() + endif() + +-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") +-SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) ++#SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") ++#SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + + set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE) + set(CMAKE_C_FLAGS_MINSIZEREL "" CACHE INTERNAL "" FORCE) +@@ -1166,14 +1166,14 @@ endif() + # ------------------------------------------------------------------------------------------- + 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() + + diff --git a/OpenCV-2.2-libdir.patch b/OpenCV-2.2-libdir.patch new file mode 100644 index 0000000..eb92025 --- /dev/null +++ b/OpenCV-2.2-libdir.patch @@ -0,0 +1,132 @@ +diff -up OpenCV-2.2.0/CMakeLists.txt.libdir OpenCV-2.2.0/CMakeLists.txt +--- OpenCV-2.2.0/CMakeLists.txt.libdir 2010-12-05 04:35:23.000000000 +0100 ++++ OpenCV-2.2.0/CMakeLists.txt 2011-01-05 18:11:12.565218001 +0100 +@@ -13,7 +13,7 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS tr + # 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) +@@ -513,8 +515,8 @@ if(BUILD_NEW_PYTHON_SUPPORT) + + 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) +diff -up OpenCV-2.2.0/modules/ffmpeg/CMakeLists.txt.libdir OpenCV-2.2.0/modules/ffmpeg/CMakeLists.txt +--- OpenCV-2.2.0/modules/ffmpeg/CMakeLists.txt.libdir 2010-12-05 04:35:24.000000000 +0100 ++++ OpenCV-2.2.0/modules/ffmpeg/CMakeLists.txt 2011-01-05 18:11:12.531218000 +0100 +@@ -43,12 +43,12 @@ set_target_properties(${the_target} PROP + 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 -up OpenCV-2.2.0/modules/gpu/CMakeLists.txt.libdir OpenCV-2.2.0/modules/gpu/CMakeLists.txt +--- OpenCV-2.2.0/modules/gpu/CMakeLists.txt.libdir 2010-12-05 04:35:24.000000000 +0100 ++++ OpenCV-2.2.0/modules/gpu/CMakeLists.txt 2011-01-05 18:11:12.532218000 +0100 +@@ -96,9 +96,9 @@ set_target_properties(${the_target} PROP + # 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 @@ add_dependencies(${the_target} ${DEPS}) + + 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 -up OpenCV-2.2.0/modules/highgui/CMakeLists.txt.libdir OpenCV-2.2.0/modules/highgui/CMakeLists.txt +--- OpenCV-2.2.0/modules/highgui/CMakeLists.txt.libdir 2010-12-05 04:35:24.000000000 +0100 ++++ OpenCV-2.2.0/modules/highgui/CMakeLists.txt 2011-01-05 18:11:12.541218001 +0100 +@@ -250,9 +250,9 @@ set_target_properties(${the_target} PROP + # 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 -up OpenCV-2.2.0/OpenCVModule.cmake.libdir OpenCV-2.2.0/OpenCVModule.cmake +--- OpenCV-2.2.0/OpenCVModule.cmake.libdir 2010-12-05 04:35:25.000000000 +0100 ++++ OpenCV-2.2.0/OpenCVModule.cmake 2011-01-06 09:43:52.484218003 +0100 +@@ -51,9 +51,9 @@ macro(define_opencv_module name) + # 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 @@ macro(define_opencv_module name) + + 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 -up OpenCV-2.2.0/tests/cxts/CMakeLists.txt.libdir OpenCV-2.2.0/tests/cxts/CMakeLists.txt +--- OpenCV-2.2.0/tests/cxts/CMakeLists.txt.libdir 2010-12-05 04:35:25.000000000 +0100 ++++ OpenCV-2.2.0/tests/cxts/CMakeLists.txt 2011-01-05 18:11:12.535218001 +0100 +@@ -51,7 +51,7 @@ set_target_properties(${the_target} PROP + # 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" + ) diff --git a/OpenCV-2.2-nointrernal.patch b/OpenCV-2.2-nointrernal.patch new file mode 100644 index 0000000..cde92a7 --- /dev/null +++ b/OpenCV-2.2-nointrernal.patch @@ -0,0 +1,69 @@ +diff -up OpenCV-2.2.0/3rdparty/CMakeLists.txt.nointernal OpenCV-2.2.0/3rdparty/CMakeLists.txt +--- OpenCV-2.2.0/3rdparty/CMakeLists.txt.nointernal 2010-12-05 04:35:23.000000000 +0100 ++++ OpenCV-2.2.0/3rdparty/CMakeLists.txt 2010-12-07 16:00:53.510070005 +0100 +@@ -2,8 +2,12 @@ if(ANDROID) + configure_file("${CMAKE_SOURCE_DIR}/Android.mk.modules.in" "${CMAKE_CURRENT_BINARY_DIR}/Android.mk") + endif() + +-add_subdirectory(lapack) +-add_subdirectory(zlib) ++#if(WITH_LAPACK AND NOT LAPACK_FOUND) ++# add_subdirectory(lapack) ++#endif() ++#if(WITH_ZLIB AND NOT ZLIB_FOUND) ++# add_subdirectory(zlib) ++#endif() + if(WITH_JASPER AND NOT JASPER_FOUND) + add_subdirectory(libjasper) + endif() +diff -up OpenCV-2.2.0/CMakeLists.txt.nointernal OpenCV-2.2.0/CMakeLists.txt +--- OpenCV-2.2.0/CMakeLists.txt.nointernal 2010-12-05 04:35:23.000000000 +0100 ++++ OpenCV-2.2.0/CMakeLists.txt 2010-12-07 16:00:53.532070005 +0100 +@@ -280,6 +280,8 @@ set(WITH_JPEG ON CACHE BOOL "Include JPE + 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") ++set(WITH_LAPACK ON CACHE BOOL "Include LAPACK support") ++set(WITH_ZLIB ON CACHE BOOL "Include ZLIB support") + + if(UNIX) + set(WITH_FFMPEG ON CACHE BOOL "Include FFMPEG support") +diff -up OpenCV-2.2.0/modules/core/CMakeLists.txt.nointernal OpenCV-2.2.0/modules/core/CMakeLists.txt +--- OpenCV-2.2.0/modules/core/CMakeLists.txt.nointernal 2010-12-05 04:35:24.000000000 +0100 ++++ OpenCV-2.2.0/modules/core/CMakeLists.txt 2010-12-07 16:47:14.767070005 +0100 +@@ -1,3 +1,11 @@ + include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/include") +-set(deps opencv_lapack zlib) ++if(WITH_LAPACK AND NOT LAPACK_FOUND) ++ if(WITH_ZLIB AND NOT ZLIB_FOUND) ++ set(deps opencv_lapack zlib) ++ else() ++ set(deps lapack z) ++ endif() + define_opencv_module(core ${deps}) ++else() ++define_opencv_module(core lapack z) ++endif() +diff -up OpenCV-2.2.0/modules/highgui/CMakeLists.txt.nointernal OpenCV-2.2.0/modules/highgui/CMakeLists.txt +--- OpenCV-2.2.0/modules/highgui/CMakeLists.txt.nointernal 2010-12-05 04:35:24.000000000 +0100 ++++ OpenCV-2.2.0/modules/highgui/CMakeLists.txt 2010-12-07 17:01:11.963070004 +0100 +@@ -285,7 +285,7 @@ if(WITH_TIFF AND NOT TIFF_FOUND) + #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 z ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${JASPER_LIBRARIES} ${HIGHGUI_LIBRARIES} ${OPENEXR_LIBRARIES}) + + if(APPLE) + target_link_libraries(${the_target} "-lbz2 -framework Cocoa -framework QuartzCore") +--- OpenCV-2.2.0/OpenCVFindOpenEXR.cmake.nointernal 2010-12-07 17:12:16.592070004 +0100 ++++ OpenCV-2.2.0/OpenCVFindOpenEXR.cmake 2010-12-07 17:12:26.539070004 +0100 +@@ -44,7 +44,7 @@ FIND_LIBRARY(OPENEXR_ILMIMF_LIBRARY + 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/OpenCV-2.2-numpy.patch b/OpenCV-2.2-numpy.patch new file mode 100644 index 0000000..0690eab --- /dev/null +++ b/OpenCV-2.2-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/opencv-cmake-libdir-2.1.0.patch b/opencv-cmake-libdir-2.1.0.patch deleted file mode 100644 index a0ca698..0000000 --- a/opencv-cmake-libdir-2.1.0.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff -up OpenCV-2.1.0/3rdparty/flann/CMakeLists.txt.orig OpenCV-2.1.0/3rdparty/flann/CMakeLists.txt -diff -up OpenCV-2.1.0/CMakeLists.txt.orig OpenCV-2.1.0/CMakeLists.txt ---- OpenCV-2.1.0/CMakeLists.txt.orig 2010-04-06 03:24:37.000000000 +0200 -+++ OpenCV-2.1.0/CMakeLists.txt 2010-04-19 11:46:37.372528366 +0200 -@@ -467,8 +467,8 @@ if(BUILD_SWIG_PYTHON_SUPPORT OR BUILD_NE - - 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) -@@ -932,7 +932,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_D - # Set CMAKE_INCLUDE_DIRS_CONFIGCMAKE to the list of include directories: - - set(CMAKE_INCLUDE_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/include/opencv") --set(CMAKE_LIB_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/lib") -+set(CMAKE_LIB_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") - - #exec_program(${CMAKE_COMMAND} ARGS "-E make_directory \"${CMAKE_BINARY_DIR}/unix-install/\"") - exec_program(mkdir ARGS "-p \"${CMAKE_BINARY_DIR}/unix-install/\"") -@@ -965,19 +965,19 @@ endif() - # Part 2/2: ${BIN_DIR}/unix-install/opencv.pc -> For use *with* "make install" - # prefix=/usr - # exec_prefix=${prefix} --# libdir=${exec_prefix}/lib -+# libdir=${exec_prefix}/lib${LIB_SUFFIX} - # includedir=${prefix}/include/opencv - # ------------------------------------------------------------------------------------------- - 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() - - -diff -up OpenCV-2.1.0/interfaces/ffopencv/CMakeLists.txt.orig OpenCV-2.1.0/interfaces/ffopencv/CMakeLists.txt ---- OpenCV-2.1.0/interfaces/ffopencv/CMakeLists.txt.orig 2010-04-06 03:24:40.000000000 +0200 -+++ OpenCV-2.1.0/interfaces/ffopencv/CMakeLists.txt 2010-04-19 11:48:35.488528706 +0200 -@@ -40,6 +40,6 @@ set_target_properties(${the_target} PROP - - 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 -up OpenCV-2.1.0/src/cv/CMakeLists.txt.orig OpenCV-2.1.0/src/cv/CMakeLists.txt ---- OpenCV-2.1.0/src/cv/CMakeLists.txt.orig 2010-04-06 03:24:42.000000000 +0200 -+++ OpenCV-2.1.0/src/cv/CMakeLists.txt 2010-04-19 11:48:18.834529206 +0200 -@@ -71,8 +71,8 @@ add_dependencies(${the_target} cxcore) - - 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/opencv -diff -up OpenCV-2.1.0/src/cxcore/CMakeLists.txt.orig OpenCV-2.1.0/src/cxcore/CMakeLists.txt ---- OpenCV-2.1.0/src/cxcore/CMakeLists.txt.orig 2010-04-06 03:24:44.000000000 +0200 -+++ OpenCV-2.1.0/src/cxcore/CMakeLists.txt 2010-04-19 11:47:53.671528574 +0200 -@@ -71,8 +71,8 @@ add_dependencies(${the_target} opencv_la - - 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 each module headers separately - install(FILES ${lib_hdrs} -diff -up OpenCV-2.1.0/src/cvaux/CMakeLists.txt.orig OpenCV-2.1.0/src/cvaux/CMakeLists.txt ---- OpenCV-2.1.0/src/cvaux/CMakeLists.txt.orig 2010-04-06 03:24:43.000000000 +0200 -+++ OpenCV-2.1.0/src/cvaux/CMakeLists.txt 2010-04-23 12:24:39.197547832 +0200 -@@ -76,8 +76,8 @@ add_dependencies(${the_target} cxcore cv - - 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 ${aux_hdrs_ext} - DESTINATION include/opencv -diff -up OpenCV-2.1.0/src/highgui/CMakeLists.txt.orig OpenCV-2.1.0/src/highgui/CMakeLists.txt ---- OpenCV-2.1.0/src/highgui/CMakeLists.txt.orig 2010-04-06 03:24:44.000000000 +0200 -+++ OpenCV-2.1.0/src/highgui/CMakeLists.txt 2010-04-23 12:26:02.813546985 +0200 -@@ -282,8 +282,8 @@ endif() - - 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/opencv -diff -up OpenCV-2.1.0/src/ml/CMakeLists.txt.orig OpenCV-2.1.0/src/ml/CMakeLists.txt ---- OpenCV-2.1.0/src/ml/CMakeLists.txt.orig 2010-04-06 03:24:45.000000000 +0200 -+++ OpenCV-2.1.0/src/ml/CMakeLists.txt 2010-04-23 12:25:06.485567884 +0200 -@@ -61,8 +61,8 @@ add_dependencies(${the_target} cxcore) - - 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/opencv diff --git a/opencv.spec b/opencv.spec index 9f59769..2255dcc 100644 --- a/opencv.spec +++ b/opencv.spec @@ -3,8 +3,8 @@ %global tar_name OpenCV Name: opencv -Version: 2.1.0 -Release: 5%{?dist} +Version: 2.2.0 +Release: 1%{?dist} Summary: Collection of algorithms for computer vision Group: Development/Libraries @@ -14,20 +14,22 @@ URL: http://opencv.willowgarage.com/wiki/ Source0: http://prdownloads.sourceforge.net/opencvlibrary/%{tar_name}-%{version}.tar.bz2 Source1: opencv-samples-Makefile # Fedora cmake macros define -DLIB_SUFFIX=64 on 64 bits platforms -Patch0: opencv-cmake-libdir-2.1.0.patch -Patch1: OpenCV-2.1-nointrernal.patch -Patch2: OpenCV-2.1-lapack.patch -Patch3: OpenCV-2.1-rpath.patch +Patch0: OpenCV-2.2-libdir.patch +Patch1: OpenCV-2.2-nointrernal.patch +Patch3: OpenCV-2.2-fixpc.patch # put OpenCVConfig.cmake into %{_libdir}/cmake/opencv/ instead of %{_datadir}/opencv/ # upstreamable, up's cmake req to 2.6.3 though. Can do just %{_libdir}/opencv/ without # the cmake bump, if that's preferable -- Rex Patch4: opencv-2.1.0-opencvconfig.patch +Patch5: OpenCV-2.2-numpy.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libtool BuildRequires: cmake >= 2.6.3 BuildRequires: chrpath +BuildRequires: f2c +BuildRequires: eigen2-devel BuildRequires: gtk2-devel BuildRequires: imlib2-devel BuildRequires: libucil-devel @@ -94,11 +96,15 @@ This package contains Python bindings for the OpenCV library. %prep %setup -q -n %{tar_name}-%{version} -%patch0 -p1 +%patch0 -p1 -b .libdir %patch1 -p1 -b .nointernal -%patch2 -p1 -b .lapack -%patch3 -p1 -b .rpath +%patch3 -p1 -b .fixpc %patch4 -p1 -b .opencvconfig +%patch5 -p1 -b .numpy + +#Save some convant headers for now: +cp -p 3rdparty/include/cblas.h 3rdparty +cp -p 3rdparty/include/clapack.h 3rdparty #Remove several bundled libraries. rm -rf 3rdparty/lapack @@ -107,6 +113,13 @@ rm -rf 3rdparty/libjasper rm -rf 3rdparty/libpng rm -rf 3rdparty/libjpeg rm -rf 3rdparty/libtiff +rm -rf 3rdparty/ilmimf +rm -rf 3rdparty/include/* + +# Put back +cp -p 3rdparty/cblas.h 3rdparty/include +cp -p 3rdparty/clapack.h 3rdparty/include + #Fix spurious perm: find -perm 755 -name "*.cpp" -exec chmod -x {} ';' @@ -115,13 +128,21 @@ find -perm 755 -name "*.c" -exec chmod -x {} ';' # fix dos end of lines sed -i 's|\r||g' samples/c/adaptiveskindetector.cpp +#Fix Flags +sed -i -e 's/USE_O3 ON/USE_O3 OFF/' CMakeLists.txt +%ifarch %{ix86} +sed -i -e 's/ENABLE_SSE ON/ENABLE_SSE OFF/' CMakeLists.txt +sed -i -e 's/ENABLE_SSE2 ON/ENABLE_SSE2 OFF/' CMakeLists.txt +%endif + %build # enabled by default if libraries are presents at build time: # GTK, GSTREAMER, UNICAP, 1394, V4L # non available on Fedora: FFMPEG, XINE #BUILD_TEST is broken -%cmake -DENABLE_OPENMP=1 \ +%cmake CMAKE_VERBOSE=1 \ + -DENABLE_OPENMP=1 \ -DUSE_O3=0 \ -DUSE_FAST_MATH=0 \ -DUSE_OMIT_FRAME_POINTER=0 \ @@ -133,7 +154,8 @@ sed -i 's|\r||g' samples/c/adaptiveskindetector.cpp -DBUILD_SWIG_PYTHON_SUPPORT=1 \ -DINSTALL_C_EXAMPLES=1 \ -DINSTALL_PYTHON_EXAMPLES=1 \ -. + -DWITH_LAPACK=1 \ + . make VERBOSE=1 %{?_smp_mflags} @@ -155,13 +177,16 @@ install -pm644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/GNUmakefi rm -rf $RPM_BUILD_ROOT%{_datadir}/opencv/{doc/,samples/octave/} # Fix nonstandard executable permissions -chmod 0755 $RPM_BUILD_ROOT%{_datadir}/opencv/samples/python/*.py -chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/cv.so -chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/opencv/*.so +#chmod 0755 $RPM_BUILD_ROOT%{_datadir}/opencv/samples/python/*.py +#chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/cv.so +#chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/opencv/*.so # Remove Rpath in python shared objects: find $RPM_BUILD_ROOT%{python_sitearch} -name "*.so" -exec chrpath -d {} ';' +#Move opencv2 headers into the appropriate directory +mv $RPM_BUILD_ROOT%{_includedir}/opencv2 \ + $RPM_BUILD_ROOT%{_includedir}/opencv %check @@ -211,10 +236,13 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %{python_sitearch}/cv.so # old SWIG wrappers -%{python_sitearch}/opencv +#{python_sitearch}/opencv %changelog +* Thu Jan 06 2011 Nicolas Chauvet - 2.2.0-1 +- Update to 2.2.0 + * Wed Aug 25 2010 Rex Dieter - 2.1.0-5 - -devel: include OpenCVConfig.cmake (#627359) diff --git a/sources b/sources index 19b647b..e868606 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1d71584fb4e04214c0085108f95e24c8 OpenCV-2.1.0.tar.bz2 +122c9ac793a46854ef2819fedbbd6b1b OpenCV-2.2.0.tar.bz2