From 37dd9300178c004bb7ec2e80102b19592d9732be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Tue, 10 Jul 2012 10:21:13 +0200 Subject: [PATCH] Update to 2.4.2 --- opencv-pkgcmake.patch | 23 ++++------------------- opencv-pkgcmake2.patch | 16 ++++++++++++++++ opencv.spec | 21 +++++++++++++-------- 3 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 opencv-pkgcmake2.patch diff --git a/opencv-pkgcmake.patch b/opencv-pkgcmake.patch index 2e57d4d..d9d01cc 100644 --- a/opencv-pkgcmake.patch +++ b/opencv-pkgcmake.patch @@ -1,13 +1,13 @@ -diff -up OpenCV-2.4.1/cmake/OpenCVGenPkgconfig.cmake.pkgcmake OpenCV-2.4.1/cmake/OpenCVGenPkgconfig.cmake ---- OpenCV-2.4.1/cmake/OpenCVGenPkgconfig.cmake.pkgcmake 2012-05-31 16:05:39.000000000 +0200 -+++ OpenCV-2.4.1/cmake/OpenCVGenPkgconfig.cmake 2012-07-03 15:00:40.127943903 +0200 +diff -up OpenCV-2.4.2/cmake/OpenCVGenPkgconfig.cmake.pkgcmake OpenCV-2.4.2/cmake/OpenCVGenPkgconfig.cmake +--- OpenCV-2.4.2/cmake/OpenCVGenPkgconfig.cmake.pkgcmake 2012-06-29 00:55:15.000000000 +0200 ++++ OpenCV-2.4.2/cmake/OpenCVGenPkgconfig.cmake 2012-07-09 14:53:33.338597708 +0200 @@ -10,7 +10,7 @@ # ------------------------------------------------------------------------------------------- set(prefix "${CMAKE_INSTALL_PREFIX}") set(exec_prefix "\${prefix}") -set(libdir "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS +set(libdir "\${prefix}/${OPENCV_LIB_INSTALL_PATH}") - set(includedir "\${prefix}/${OPENCV_INCLUDE_PREFIX}") + set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}") set(VERSION ${OPENCV_VERSION}) @@ -36,7 +36,7 @@ ocv_list_reverse(OpenCV_LIB_COMPONENTS) @@ -32,18 +32,3 @@ diff -up OpenCV-2.4.1/cmake/OpenCVGenPkgconfig.cmake.pkgcmake OpenCV-2.4.1/cmake endforeach() # add extra dependencies required for OpenCV -diff -up OpenCV-2.4.1/cmake/templates/OpenCVConfig.cmake.in.pkgcmake OpenCV-2.4.1/cmake/templates/OpenCVConfig.cmake.in ---- OpenCV-2.4.1/cmake/templates/OpenCVConfig.cmake.in.pkgcmake 2012-07-03 15:01:44.060358547 +0200 -+++ OpenCV-2.4.1/cmake/templates/OpenCVConfig.cmake.in 2012-07-03 15:02:12.787669436 +0200 -@@ -55,9 +55,9 @@ get_filename_component(OpenCV_CONFIG_PAT - if(NOT WIN32) - # Get the absolute path with no ../.. relative marks, to eliminate implicit linker warnings - if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 2.8) -- get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../.." ABSOLUTE) -+ get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../../.." ABSOLUTE) - else() -- get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../.." REALPATH) -+ get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../../.." REALPATH) - endif() - endif() - diff --git a/opencv-pkgcmake2.patch b/opencv-pkgcmake2.patch new file mode 100644 index 0000000..09d5e14 --- /dev/null +++ b/opencv-pkgcmake2.patch @@ -0,0 +1,16 @@ +diff -up OpenCV-2.4.2/cmake/templates/OpenCVConfig.cmake.in.pkgcmake2 OpenCV-2.4.2/cmake/templates/OpenCVConfig.cmake.in +--- OpenCV-2.4.2/cmake/templates/OpenCVConfig.cmake.in.pkgcmake2 2012-07-09 18:21:58.374388493 +0200 ++++ OpenCV-2.4.2/cmake/templates/OpenCVConfig.cmake.in 2012-07-09 18:22:32.465014020 +0200 +@@ -53,11 +53,7 @@ set(OpenCV_USE_MANGLED_PATHS @OpenCV_USE + get_filename_component(OpenCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH CACHE) + + if(NOT WIN32 OR OpenCV_ANDROID_NATIVE_API_LEVEL GREATER 0) +- if(OpenCV_ANDROID_NATIVE_API_LEVEL GREATER 0) +- set(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../../..") +- else() +- set(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../..") +- endif() ++ set(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../../..") + # Get the absolute path with no ../.. relative marks, to eliminate implicit linker warnings + if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 2.8) + get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_INSTALL_PATH}" ABSOLUTE) diff --git a/opencv.spec b/opencv.spec index b5a407c..ced8259 100644 --- a/opencv.spec +++ b/opencv.spec @@ -4,8 +4,8 @@ #global indice a Name: opencv -Version: 2.4.1 -Release: 2%{?dist} +Version: 2.4.2 +Release: 1%{?dist} Summary: Collection of algorithms for computer vision Group: Development/Libraries @@ -15,6 +15,7 @@ URL: http://opencv.willowgarage.com/wiki/ Source0: http://prdownloads.sourceforge.net/opencvlibrary/%{tar_name}-%{version}%{?indice}.tar.bz2 Source1: opencv-samples-Makefile Patch0: opencv-pkgcmake.patch +Patch1: opencv-pkgcmake2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libtool @@ -97,6 +98,7 @@ This package contains Python bindings for the OpenCV library. %prep %setup -q -n %{tar_name}-%{version} %patch0 -p1 -b .pkgcmake +%patch1 -p1 -b .pkgcmake2 # fix dos end of lines sed -i 's|\r||g' samples/c/adaptiveskindetector.cpp @@ -151,11 +153,11 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" CPPROG="cp -p" find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' -rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/build_all.sh \ - $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/cvsample.dsp \ - $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/cvsample.vcproj \ - $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/facedetect.cmd -install -pm644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/GNUmakefile +rm -f $RPM_BUILD_ROOT%{_datadir}/OpenCV/samples/c/build_all.sh \ + $RPM_BUILD_ROOT%{_datadir}/OpenCV/samples/c/cvsample.dsp \ + $RPM_BUILD_ROOT%{_datadir}/OpenCV/samples/c/cvsample.vcproj \ + $RPM_BUILD_ROOT%{_datadir}/OpenCV/samples/c/facedetect.cmd +install -pm644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/OpenCV/samples/c/GNUmakefile # remove unnecessary documentation rm -rf $RPM_BUILD_ROOT%{_datadir}/OpenCV/doc @@ -213,7 +215,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc doc/opencv_tutorials.pdf %doc doc/*.{htm,png,jpg} -%doc %{_datadir}/opencv/samples +%doc %{_datadir}/OpenCV/samples %files python %defattr(-,root,root,-) @@ -222,6 +224,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jul 09 2012 Honza Horak - 2.4.2-1 +- Update to 2.4.2 + * Fri Jun 29 2012 Honza Horak - 2.4.1-2 - Fixed cmake script for generating opencv.pc file - Fixed OpenCVConfig script file