- Move samples from main to -devel
- Fix spurious permission - Add BR tbb-devel - Fix CFLAGS
This commit is contained in:
parent
73057187ea
commit
65c4dc9575
33
OpenCV-2.1-lapack.patch
Normal file
33
OpenCV-2.1-lapack.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
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
|
12
OpenCV-2.1-nointrernal.patch
Normal file
12
OpenCV-2.1-nointrernal.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
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()
|
12
OpenCV-2.1-rpath.patch
Normal file
12
OpenCV-2.1-rpath.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
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)
|
@ -1 +1,2 @@
|
|||||||
opencv-2_1_0-1_fc11:HEAD:opencv-2.1.0-1.fc11.src.rpm:1273158513
|
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
|
||||||
|
75
opencv.spec
75
opencv.spec
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name: opencv
|
Name: opencv
|
||||||
Version: 2.1.0
|
Version: 2.1.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Collection of algorithms for computer vision
|
Summary: Collection of algorithms for computer vision
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -15,10 +15,14 @@ Source0: http://prdownloads.sourceforge.net/opencvlibrary/%{tar_name}-%{v
|
|||||||
Source1: opencv-samples-Makefile
|
Source1: opencv-samples-Makefile
|
||||||
# Fedora cmake macros define -DLIB_SUFFIX=64 on 64 bits platforms
|
# Fedora cmake macros define -DLIB_SUFFIX=64 on 64 bits platforms
|
||||||
Patch0: opencv-cmake-libdir-2.1.0.patch
|
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)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: cmake >= 2.4
|
BuildRequires: cmake >= 2.4
|
||||||
|
BuildRequires: chrpath
|
||||||
|
|
||||||
BuildRequires: gtk2-devel
|
BuildRequires: gtk2-devel
|
||||||
BuildRequires: imlib2-devel
|
BuildRequires: imlib2-devel
|
||||||
@ -34,7 +38,8 @@ BuildRequires: lapack-devel
|
|||||||
BuildRequires: libpng-devel
|
BuildRequires: libpng-devel
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
BuildRequires: libtiff-devel
|
BuildRequires: libtiff-devel
|
||||||
BuildRequires: libtool
|
BuildRequires: OpenEXR-devel
|
||||||
|
BuildRequires: tbb-devel
|
||||||
BuildRequires: zlib-devel, pkgconfig
|
BuildRequires: zlib-devel, pkgconfig
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-imaging, numpy, swig >= 1.3.24
|
BuildRequires: python-imaging, numpy, swig >= 1.3.24
|
||||||
@ -84,18 +89,37 @@ 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
|
%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 {} ';'
|
||||||
|
|
||||||
|
# fix dos end of lines
|
||||||
|
sed -i 's|\r||g' samples/c/adaptiveskindetector.cpp
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%ifarch i386
|
|
||||||
export CXXFLAGS="%{__global_cflags} -m32 -fasynchronous-unwind-tables"
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
# enabled by default if libraries are presents at build time:
|
# enabled by default if libraries are presents at build time:
|
||||||
# GTK, GSTREAMER, UNICAP, 1394, V4L
|
# GTK, GSTREAMER, UNICAP, 1394, V4L
|
||||||
# non available on Fedora: FFMPEG, XINE
|
# 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} \
|
%{?_without_gstreamer:-DWITH_GSTREAMER=0} \
|
||||||
%{!?_with_ffmpeg:-DWITH_FFMPEG=0} \
|
%{!?_with_ffmpeg:-DWITH_FFMPEG=0} \
|
||||||
%{!?_with_xine:-DWITH_XINE=0} \
|
%{!?_with_xine:-DWITH_XINE=0} \
|
||||||
@ -103,6 +127,7 @@ export CXXFLAGS="%{__global_cflags} -m32 -fasynchronous-unwind-tables"
|
|||||||
-DINSTALL_C_EXAMPLES=1 \
|
-DINSTALL_C_EXAMPLES=1 \
|
||||||
-DINSTALL_PYTHON_EXAMPLES=1 \
|
-DINSTALL_PYTHON_EXAMPLES=1 \
|
||||||
.
|
.
|
||||||
|
|
||||||
make VERBOSE=1 %{?_smp_mflags}
|
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"
|
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" CPPROG="cp -p"
|
||||||
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
||||||
|
|
||||||
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/build_all.sh \
|
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.dsp \
|
||||||
$RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/cvsample.vcproj \
|
$RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/cvsample.vcproj \
|
||||||
$RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/facedetect.cmd
|
$RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/facedetect.cmd
|
||||||
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/GNUmakefile
|
install -pm644 %{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}/
|
|
||||||
|
|
||||||
# fix dos end of lines
|
|
||||||
sed -i 's|\r||g' $RPM_BUILD_ROOT/%{_datadir}/%{name}/samples/c/adaptiveskindetector.cpp
|
|
||||||
# remove unnecessary documentation
|
# remove unnecessary documentation
|
||||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/opencv/{doc/,samples/octave/}
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/opencv/{doc/,samples/octave/}
|
||||||
|
|
||||||
@ -133,16 +152,12 @@ 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}/cv.so
|
||||||
chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/opencv/*.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
|
#This file is wrong - not redistributed
|
||||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/opencv/OpenCVConfig.cmake
|
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
|
%check
|
||||||
@ -168,6 +183,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_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
|
||||||
|
|
||||||
@ -181,19 +197,24 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files devel-docs
|
%files devel-docs
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc __devel-doc/*
|
%doc doc/%{name}.pdf
|
||||||
%{_datadir}/opencv/samples
|
%doc doc/*.{htm,png,jpg}
|
||||||
|
%doc %{_datadir}/opencv/samples
|
||||||
|
|
||||||
%files python
|
%files python
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{python_sitearch}/cv.so
|
%{python_sitearch}/cv.so
|
||||||
%doc %dir %{_datadir}/opencv/samples
|
|
||||||
%doc %{_datadir}/opencv/samples/python
|
|
||||||
# old SWIG wrappers
|
# old SWIG wrappers
|
||||||
%{python_sitearch}/opencv
|
%{python_sitearch}/opencv
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 25 2010 Nicolas Chauvet <kwizart@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@fedoraproject.org> - 2.1.0-1
|
* Fri Apr 23 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 2.1.0-1
|
||||||
- Update to 2.1.0
|
- Update to 2.1.0
|
||||||
- Update libdir patch
|
- Update libdir patch
|
||||||
|
Loading…
Reference in New Issue
Block a user