From 85dcc3a0ce55e5781fc670381996af2b43b38e8d Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 18 Nov 2013 14:29:23 -0600 Subject: [PATCH] OpenCV cmake configuration broken (#1031312) --- opencv-2.4.7-cmake_paths.patch | 18 ++++++++++++++++++ opencv.spec | 18 ++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 opencv-2.4.7-cmake_paths.patch diff --git a/opencv-2.4.7-cmake_paths.patch b/opencv-2.4.7-cmake_paths.patch new file mode 100644 index 0000000..4d775d8 --- /dev/null +++ b/opencv-2.4.7-cmake_paths.patch @@ -0,0 +1,18 @@ +diff -up opencv-2.4.7/CMakeLists.txt.cmake_paths opencv-2.4.7/CMakeLists.txt +--- opencv-2.4.7/CMakeLists.txt.cmake_paths 2013-11-06 08:26:39.000000000 -0600 ++++ opencv-2.4.7/CMakeLists.txt 2013-11-18 14:26:06.015747361 -0600 +@@ -286,13 +286,7 @@ else() + endif() + set(OPENCV_INCLUDE_INSTALL_PATH "include") + +- math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}") +- if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX) +- set(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/cmake/opencv) +- else() +- set(OPENCV_CONFIG_INSTALL_PATH share/OpenCV) +- endif() +-endif() ++ set(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/OpenCV) + + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}") + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) diff --git a/opencv.spec b/opencv.spec index 8d2d316..eec6a43 100644 --- a/opencv.spec +++ b/opencv.spec @@ -2,7 +2,7 @@ Name: opencv Version: 2.4.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision Group: Development/Libraries @@ -22,6 +22,9 @@ Patch1: opencv-pkgcmake2.patch #http://code.opencv.org/issues/2720 Patch2: OpenCV-2.4.4-pillow.patch Patch3: opencv-2.4.7-ts_static.patch +# fix/simplify cmake config install location (upstreamable) +# https://bugzilla.redhat.com/1031312 +Patch4: opencv-2.4.7-cmake_paths.patch BuildRequires: libtool BuildRequires: cmake >= 2.6.3 @@ -120,6 +123,7 @@ This package contains Python bindings for the OpenCV library. %patch1 -p1 -b .pkgcmake2 %patch2 -p1 -b .pillow %patch3 -p1 -b .ts_static +%patch4 -p1 -b .cmake_paths # fix dos end of lines sed -i 's|\r||g' samples/c/adaptiveskindetector.cpp @@ -189,11 +193,6 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/OpenCV/doc popd -#Cmake mess -mkdir -p $RPM_BUILD_ROOT%{_libdir}/cmake/OpenCV -mv $RPM_BUILD_ROOT%{_datadir}/OpenCV/*.cmake \ - $RPM_BUILD_ROOT%{_libdir}/cmake/OpenCV - %check # Check fails since we don't support most video @@ -247,8 +246,8 @@ popd %{_includedir}/opencv2 %{_libdir}/lib*.so %{_libdir}/pkgconfig/opencv.pc -# own cmake dir avoiding dep on cmake -%{_libdir}/cmake/ +%dir %{_libdir}/OpenCV/ +%{_libdir}/OpenCV/*.cmake %files devel-docs @@ -261,6 +260,9 @@ popd %changelog +* Mon Nov 18 2013 Rex Dieter 2.4.7-2 +- OpenCV cmake configuration broken (#1031312) + * Wed Nov 13 2013 Nicolas Chauvet - 2.4.7-1 - Update to 2.4.7