rpms/opencv/devel OpenCV-2.1-lapack.patch, NONE, 1.1 OpenCV-2.1-nointrernal.patch, NONE, 1.1 OpenCV-2.1-rpath.patch, NONE, 1.1 import.log, 1.1, 1.2 opencv.spec, 1.48, 1.49

Nicolas Chauvet kwizart at fedoraproject.org
Fri Jun 25 16:50:54 UTC 2010


Author: kwizart

Update of /cvs/pkgs/rpms/opencv/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv19146/devel

Modified Files:
	import.log opencv.spec 
Added Files:
	OpenCV-2.1-lapack.patch OpenCV-2.1-nointrernal.patch 
	OpenCV-2.1-rpath.patch 
Log Message:
- Move samples from main to -devel
- Fix spurious permission
- Add BR tbb-devel
- Fix CFLAGS


OpenCV-2.1-lapack.patch:
 CMakeLists.txt            |    2 +-
 src/cxcore/CMakeLists.txt |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

--- NEW FILE OpenCV-2.1-lapack.patch ---
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

OpenCV-2.1-nointrernal.patch:
 CMakeLists.txt |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE OpenCV-2.1-nointrernal.patch ---
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()

OpenCV-2.1-rpath.patch:
 CMakeLists.txt |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE OpenCV-2.1-rpath.patch ---
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)


Index: import.log
===================================================================
RCS file: /cvs/pkgs/rpms/opencv/devel/import.log,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- import.log	6 May 2010 15:08:45 -0000	1.1
+++ import.log	25 Jun 2010 16:50:54 -0000	1.2
@@ -1 +1,2 @@
 opencv-2_1_0-1_fc11:HEAD:opencv-2.1.0-1.fc11.src.rpm:1273158513
+opencv-2_1_0-2_fc13:HEAD:opencv-2.1.0-2.fc13.src.rpm:1277484612


Index: opencv.spec
===================================================================
RCS file: /cvs/pkgs/rpms/opencv/devel/opencv.spec,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -p -r1.48 -r1.49
--- opencv.spec	6 May 2010 15:08:46 -0000	1.48
+++ opencv.spec	25 Jun 2010 16:50:54 -0000	1.49
@@ -4,7 +4,7 @@
 
 Name:           opencv
 Version:        2.1.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Collection of algorithms for computer vision
 
 Group:          Development/Libraries
@@ -15,10 +15,14 @@ Source0:        http://prdownloads.sourc
 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
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libtool
 BuildRequires:  cmake >= 2.4
+BuildRequires:  chrpath
 
 BuildRequires:  gtk2-devel
 BuildRequires:  imlib2-devel
@@ -34,7 +38,8 @@ BuildRequires:  lapack-devel
 BuildRequires:  libpng-devel
 BuildRequires:  libjpeg-devel
 BuildRequires:  libtiff-devel
-BuildRequires:  libtool
+BuildRequires:  OpenEXR-devel
+BuildRequires:  tbb-devel
 BuildRequires:  zlib-devel, pkgconfig
 BuildRequires:  python-devel
 BuildRequires:  python-imaging, numpy, swig >= 1.3.24
@@ -84,18 +89,37 @@ This package contains Python bindings fo
 %prep
 %setup -q -n %{tar_name}-%{version}
 %patch0 -p1
+%patch1 -p1 -b .nointernal
+%patch2 -p1 -b .lapack
+%patch3 -p1 -b .rpath
+
+#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
+
+#Fix spurious perm:
+find -perm 755 -name "*.cpp" -exec chmod -x  {} ';'
+find -perm 755 -name "*.c" -exec chmod -x  {} ';'
 
-
-%build
-%ifarch i386
-export CXXFLAGS="%{__global_cflags} -m32 -fasynchronous-unwind-tables"
-%endif
+# fix dos end of lines
+sed -i 's|\r||g'  samples/c/adaptiveskindetector.cpp
 
 
+%build
 # enabled by default if libraries are presents at build time:
 # GTK, GSTREAMER, UNICAP, 1394, V4L
 # non available on Fedora: FFMPEG, XINE
-%cmake -DENABLE_OPENMP=1\
+#BUILD_TEST is broken
+%cmake -DENABLE_OPENMP=1 \
+ -DUSE_O3=0 \
+ -DUSE_FAST_MATH=0 \
+ -DUSE_OMIT_FRAME_POINTER=0 \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_TESTS=0 \
  %{?_without_gstreamer:-DWITH_GSTREAMER=0} \
  %{!?_with_ffmpeg:-DWITH_FFMPEG=0} \
  %{!?_with_xine:-DWITH_XINE=0} \
@@ -103,6 +127,7 @@ export CXXFLAGS="%{__global_cflags} -m32
  -DINSTALL_C_EXAMPLES=1 \
  -DINSTALL_PYTHON_EXAMPLES=1 \
 .
+
 make VERBOSE=1 %{?_smp_mflags}
 
 
@@ -112,19 +137,13 @@ rm -rf $RPM_BUILD_ROOT  __devel-doc
 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 -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/GNUmakefile
-install -m644 cvconfig.h $RPM_BUILD_ROOT%{_includedir}/%{name}/cvconfig.h
-mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/
-# install documentation
-install -m644 doc/%{name}.pdf $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/%{name}.pdf
-install -m644 doc/*.{htm,png,jpg} $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/
+install -pm644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/GNUmakefile
 
-# fix dos end of lines
-sed -i 's|\r||g'  $RPM_BUILD_ROOT/%{_datadir}/%{name}/samples/c/adaptiveskindetector.cpp
 # remove unnecessary documentation
 rm -rf $RPM_BUILD_ROOT%{_datadir}/opencv/{doc/,samples/octave/}
 
@@ -133,16 +152,12 @@ chmod 0755 $RPM_BUILD_ROOT%{_datadir}/op
 chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/cv.so
 chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/opencv/*.so
 
-#Remove uneeded README.txt (howto install related)
-rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/opencv-%{version}/
-#Use appropriate _docdir
-mkdir -p  __devel-doc
-cp -apR $RPM_BUILD_ROOT%{_datadir}/doc/opencv-doc-%{version}/  __devel-doc
-rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/opencv-doc-%{version}/
-
 #This file is wrong - not redistributed
 rm -rf $RPM_BUILD_ROOT%{_datadir}/opencv/OpenCVConfig.cmake
 
+# Remove Rpath in python shared objects:
+find $RPM_BUILD_ROOT%{python_sitearch} -name "*.so" -exec chrpath -d {} ';'
+
 
 
 %check
@@ -168,6 +183,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/opencv_*
 %{_libdir}/lib*.so.*
 %dir %{_datadir}/opencv
+%exclude %{_datadir}/opencv/samples
 %{_datadir}/opencv/haarcascades
 %{_datadir}/opencv/lbpcascades
 
@@ -181,22 +197,27 @@ rm -rf $RPM_BUILD_ROOT
 
 %files devel-docs
 %defattr(-,root,root,-)
-%doc __devel-doc/*
-%{_datadir}/opencv/samples
+%doc doc/%{name}.pdf
+%doc doc/*.{htm,png,jpg}
+%doc %{_datadir}/opencv/samples
 
 %files python
 %defattr(-,root,root,-)
 %{python_sitearch}/cv.so
-%doc %dir %{_datadir}/opencv/samples
-%doc %{_datadir}/opencv/samples/python
 # old SWIG wrappers
 %{python_sitearch}/opencv
 
 
 %changelog
+* Fri Jun 25 2010 Nicolas Chauvet <kwizart at gmail.com> - 2.1.0-2
+- Move samples from main to -devel
+- Fix spurious permission
+- Add BR tbb-devel
+- Fix CFLAGS
+
 * Fri Apr 23 2010 Nicolas Chauvet <kwizart at fedoraproject.org> - 2.1.0-1
 - Update to 2.1.0
-- Update libdir patch 
+- Update libdir patch
 
 * Tue Apr 13 2010 Karel Klic <kklic at redhat.com> - 2.0.0-10
 - Fix nonstandard executable permissions



More information about the scm-commits mailing list