Update to 2.3.1

epel9
Nicolas Chauvet 14 years ago
parent 0ca263c377
commit 04c7529f05

1
.gitignore vendored

@ -1,2 +1,3 @@
OpenCV-2.1.0.tar.bz2 OpenCV-2.1.0.tar.bz2
/OpenCV-2.2.0.tar.bz2 /OpenCV-2.2.0.tar.bz2
/OpenCV-2.3.1.tar.bz2

File diff suppressed because it is too large Load Diff

@ -1,53 +0,0 @@
ndex: cvconfig.h.cmake
===================================================================
--- cvconfig.h.cmake (révision 5098)
+++ cvconfig.h.cmake (révision 5099)
@@ -19,6 +19,9 @@
/* V4L2 capturing support */
#cmakedefine HAVE_CAMV4L2
+/* V4L/V4L2 capturing support via libv4l */
+#cmakedefine HAVE_LIBV4L
+
/* Carbon windowing environment */
#cmakedefine HAVE_CARBON
Index: modules/highgui/src/cap.cpp
===================================================================
--- modules/highgui/src/cap.cpp (révision 5098)
+++ modules/highgui/src/cap.cpp (révision 5099)
@@ -173,7 +173,7 @@
if (capture)
return capture;
#endif
- #if defined (HAVE_CAMV4L) || defined (HAVE_CAMV4L2)
+ #if defined HAVE_LIBV4L || (defined (HAVE_CAMV4L) && defined (HAVE_CAMV4L2))
capture = cvCreateCameraCapture_V4L (index);
if (capture)
return capture;
Index: modules/highgui/src/cap_libv4l.cpp
===================================================================
--- modules/highgui/src/cap_libv4l.cpp (révision 5098)
+++ modules/highgui/src/cap_libv4l.cpp (révision 5099)
@@ -224,7 +224,7 @@
#include "highgui.h"
#include "precomp.hpp"
-#if !defined WIN32 && (defined HAVE_CAMV4L || defined HAVE_CAMV4L2)
+#if !defined WIN32 && defined HAVE_LIBV4L
#define CLEAR(x) memset (&(x), 0, sizeof (x))
@@ -241,8 +241,12 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
+#ifdef HAVE_CAMV4L
#include <linux/videodev.h>
+#endif
+#ifdef HAVE_CAMV4L2
#include <linux/videodev2.h>
+#endif
#include <libv4l1.h>
#include <libv4l2.h>

@ -1,31 +0,0 @@
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()

@ -1,11 +0,0 @@
diff -up OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp.gcc46 OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp
--- OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp.gcc46 2010-12-05 04:35:24.000000000 +0100
+++ OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp 2011-02-02 16:44:02.177243993 +0100
@@ -52,6 +52,7 @@
#ifdef __cplusplus
#ifndef SKIP_INCLUDES
+#include <cstddef>
#include <limits.h>
#include <algorithm>
#include <cmath>

@ -1,132 +0,0 @@
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"
)

@ -1,69 +0,0 @@
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)

@ -1,12 +0,0 @@
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()

@ -0,0 +1,12 @@
diff -up OpenCV-2.3.1/CMakeLists.txt.numpy OpenCV-2.3.1/CMakeLists.txt
--- OpenCV-2.3.1/CMakeLists.txt.numpy 2011-08-19 21:50:27.217998274 +0200
+++ OpenCV-2.3.1/CMakeLists.txt 2011-08-19 21:58:06.677495479 +0200
@@ -687,7 +687,7 @@ execute_process(COMMAND ${PYTHON_EXECUTA
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 NumPy headers from: ${PYTHON_NUMPY_INCLUDE_DIRS}")
else()

@ -0,0 +1,23 @@
diff -up OpenCV-2.3.1/CMakeLists.txt.opencvconfig OpenCV-2.3.1/CMakeLists.txt
--- OpenCV-2.3.1/CMakeLists.txt.opencvconfig 2011-08-20 14:25:43.592615724 +0200
+++ OpenCV-2.3.1/CMakeLists.txt 2011-08-20 14:28:40.814017029 +0200
@@ -36,7 +36,7 @@ endif(NOT CMAKE_TOOLCHAIN_FILE)
# --------------------------------------------------------------
# Top level OpenCV project
# --------------------------------------------------------------
-cmake_minimum_required(VERSION 2.4)
+cmake_minimum_required(VERSION 2.6.3)
project(OpenCV)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE)
@@ -1370,8 +1370,8 @@ if(UNIX)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake DESTINATION share/OpenCV-${OPENCV_VERSION}/)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake DESTINATION share/OpenCV-${OPENCV_VERSION}/)
else()
- install(FILES "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" DESTINATION share/OpenCV/)
- install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake DESTINATION share/OpenCV/)
+ install(FILES "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/cmake/opencv/)
+ install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/cmake/opencv/)
endif()
endif()

@ -1,23 +0,0 @@
diff -up OpenCV-2.1.0/CMakeLists.txt.opencvconfig OpenCV-2.1.0/CMakeLists.txt
--- OpenCV-2.1.0/CMakeLists.txt.opencvconfig 2010-08-26 08:26:56.403276842 -0500
+++ OpenCV-2.1.0/CMakeLists.txt 2010-08-26 08:31:20.543277559 -0500
@@ -38,7 +38,7 @@ set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEB
project(OpenCV)
-cmake_minimum_required(VERSION 2.4)
+cmake_minimum_required(VERSION 2.6.3)
if(MSVC)
set(CMAKE_USE_RELATIVE_PATHS ON CACHE INTERNAL "" FORCE)
@@ -939,8 +939,8 @@ exec_program(mkdir ARGS "-p \"${CMAKE_BI
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" IMMEDIATE @ONLY)
if(UNIX)
- # For a command "FIND_PACKAGE(FOO)", CMake will look at the directory /usr/share|lib/FOO/FOOConfig.cmake, so:
- install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/share/opencv/)
+ # For a command "FIND_PACKAGE(FOO)", CMake will look at the directory /usr/share|lib/cmake/FOO/FOOConfig.cmake, so:
+ install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/cmake/opencv/)
endif()
# --------------------------------------------------------------------------------------------

@ -3,8 +3,8 @@
%global tar_name OpenCV %global tar_name OpenCV
Name: opencv Name: opencv
Version: 2.2.0 Version: 2.3.1
Release: 6%{?dist} Release: 1%{?dist}
Summary: Collection of algorithms for computer vision Summary: Collection of algorithms for computer vision
Group: Development/Libraries Group: Development/Libraries
@ -13,17 +13,8 @@ License: BSD
URL: http://opencv.willowgarage.com/wiki/ URL: http://opencv.willowgarage.com/wiki/
Source0: http://prdownloads.sourceforge.net/opencvlibrary/%{tar_name}-%{version}.tar.bz2 Source0: http://prdownloads.sourceforge.net/opencvlibrary/%{tar_name}-%{version}.tar.bz2
Source1: opencv-samples-Makefile Source1: opencv-samples-Makefile
# Fedora cmake macros define -DLIB_SUFFIX=64 on 64 bits platforms Patch0: OpenCV-2.3.1-numpy.patch
Patch0: OpenCV-2.2-libdir.patch Patch1: OpenCV-2.3.1-opencvconfig.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
Patch6: OpenCV-2.2-gcc46.patch
Patch7: OpenCV-2.2-b22-backport_20110526.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libtool BuildRequires: libtool
@ -99,48 +90,12 @@ This package contains Python bindings for the OpenCV library.
%prep %prep
%setup -q -n %{tar_name}-%{version} %setup -q -n %{tar_name}-%{version}
%patch0 -p1 -b .libdir %patch0 -p1 -b .numpy
%patch1 -p1 -b .nointernal %patch1 -p1 -b .opencvconfig
%patch3 -p1 -b .fixpc
%patch4 -p1 -b .opencvconfig
%patch5 -p1 -b .numpy
%patch6 -p1 -b .gcc46
%global _default_patch_fuzz 2
%patch7 -p1
#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
rm -rf 3rdparty/zlib
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 {} ';'
find -perm 755 -name "*.c" -exec chmod -x {} ';'
# fix dos end of lines # fix dos end of lines
sed -i 's|\r||g' samples/c/adaptiveskindetector.cpp 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 %build
# enabled by default if libraries are presents at build time: # enabled by default if libraries are presents at build time:
@ -148,6 +103,8 @@ sed -i -e 's/ENABLE_SSE2 ON/ENABLE_SSE2 OFF/' CMakeLists.txt
# non available on Fedora: FFMPEG, XINE # non available on Fedora: FFMPEG, XINE
#BUILD_TEST is broken #BUILD_TEST is broken
%cmake CMAKE_VERBOSE=1 \ %cmake CMAKE_VERBOSE=1 \
-DPYTHON_PACKAGES_PATH=%{python_sitearch} \
-DCMAKE_SKIP_RPATH=ON \
-DENABLE_OPENMP=1 \ -DENABLE_OPENMP=1 \
-DUSE_O3=0 \ -DUSE_O3=0 \
-DUSE_FAST_MATH=0 \ -DUSE_FAST_MATH=0 \
@ -180,15 +137,8 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/build_all.sh \
install -pm644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/GNUmakefile install -pm644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/GNUmakefile
# remove unnecessary documentation # remove unnecessary documentation
rm -rf $RPM_BUILD_ROOT%{_datadir}/opencv/{doc/,samples/octave/} rm -rf $RPM_BUILD_ROOT%{_datadir}/OpenCV/doc
# 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
# Remove Rpath in python shared objects:
find $RPM_BUILD_ROOT%{python_sitearch} -name "*.so" -exec chrpath -d {} ';'
%check %check
@ -210,13 +160,12 @@ rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc doc/README.txt %doc doc/license.txt
%{_bindir}/opencv_* %{_bindir}/opencv_*
%{_libdir}/lib*.so.* %{_libdir}/lib*.so.*
%dir %{_datadir}/opencv %dir %{_datadir}/OpenCV
%exclude %{_datadir}/opencv/samples %{_datadir}/OpenCV/haarcascades
%{_datadir}/opencv/haarcascades %{_datadir}/OpenCV/lbpcascades
%{_datadir}/opencv/lbpcascades
%files devel %files devel
@ -231,18 +180,20 @@ rm -rf $RPM_BUILD_ROOT
%files devel-docs %files devel-docs
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc doc/%{name}.pdf %doc doc/opencv_tutorials.pdf
%doc doc/*.{htm,png,jpg} %doc doc/*.{htm,png,jpg}
%doc %{_datadir}/opencv/samples %doc %{_datadir}/opencv/samples
%files python %files python
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{python_sitearch}/cv.so %{python_sitearch}/cv.py*
# old SWIG wrappers %{python_sitearch}/cv2.so
#{python_sitearch}/opencv
%changelog %changelog
* Fri Aug 19 2011 Nicolas Chauvet <kwizart@gmail.com> - 2.3.1-1
- Update to 2.3.1
* Thu May 26 2011 Nicolas Chauvet <kwizart@gmail.com> - 2.2.0-6 * Thu May 26 2011 Nicolas Chauvet <kwizart@gmail.com> - 2.2.0-6
- Backport fixes from branch 2.2 to date - Backport fixes from branch 2.2 to date

@ -1 +1 @@
122c9ac793a46854ef2819fedbbd6b1b OpenCV-2.2.0.tar.bz2 827c9f8aa14384c531c73aa165f9b777 OpenCV-2.3.1.tar.bz2

Loading…
Cancel
Save