Accepting request 30829 from KDE:KDE4:Factory:Desktop

Copy from KDE:KDE4:Factory:Desktop/opencv based on submit request 30829 from user llunak

OBS-URL: https://build.opensuse.org/request/show/30829
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv?expand=0&rev=1
This commit is contained in:
OBS User autobuild 2010-03-08 17:16:50 +00:00 committed by Git OBS Bridge
commit e880a9095f
8 changed files with 455 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
OpenCV-2.0.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c17db9974d87290aefc12bf7987a9f417946bc313823985de4df48ae3e1e0022
size 12779856

172
libopencv-libdir.patch Normal file
View File

@ -0,0 +1,172 @@
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -405,8 +405,8 @@ if(BUILD_SWIG_PYTHON_SUPPORT OR BUILD_NE
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)
@@ -731,7 +731,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_D
# Set CMAKE_INCLUDE_DIRS_CONFIGCMAKE to the list of include directories:
set(CMAKE_INCLUDE_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/include/opencv")
-set(CMAKE_LIB_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/lib")
+set(CMAKE_LIB_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
#exec_program(${CMAKE_COMMAND} ARGS "-E make_directory \"${CMAKE_BINARY_DIR}/unix-install/\"")
exec_program(mkdir ARGS "-p \"${CMAKE_BINARY_DIR}/unix-install/\"")
@@ -764,19 +764,19 @@ endif()
# Part 2/2: ${BIN_DIR}/unix-install/opencv.pc -> For use *with* "make install"
# prefix=/usr
# exec_prefix=${prefix}
-# libdir=${exec_prefix}/lib
+# libdir=${exec_prefix}/lib${LIB_SUFFIX}
# includedir=${prefix}/include/opencv
# -------------------------------------------------------------------------------------------
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()
Index: 3rdparty/flann/CMakeLists.txt
===================================================================
--- 3rdparty/flann/CMakeLists.txt.orig
+++ 3rdparty/flann/CMakeLists.txt
@@ -86,8 +86,8 @@ ENDIF(WIN32)
INSTALL (
TARGETS flann flann_s
RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
# INSTALL (
Index: interfaces/ffopencv/CMakeLists.txt
===================================================================
--- interfaces/ffopencv/CMakeLists.txt.orig
+++ interfaces/ffopencv/CMakeLists.txt
@@ -33,5 +33,5 @@ set_target_properties(${the_target} PROP
install(TARGETS ${the_target}
RUNTIME DESTINATION bin COMPONENT main
- LIBRARY DESTINATION lib COMPONENT main
+ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT main
)
Index: src/cv/CMakeLists.txt
===================================================================
--- src/cv/CMakeLists.txt.orig
+++ src/cv/CMakeLists.txt
@@ -66,8 +66,8 @@ add_dependencies(${the_target} cxcore)
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/opencv
Index: src/cvaux/CMakeLists.txt
===================================================================
--- src/cvaux/CMakeLists.txt.orig
+++ src/cvaux/CMakeLists.txt
@@ -76,8 +76,8 @@ add_dependencies(${the_target} cxcore cv
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 ${aux_hdrs_ext}
DESTINATION include/opencv
Index: src/cxcore/CMakeLists.txt
===================================================================
--- src/cxcore/CMakeLists.txt.orig
+++ src/cxcore/CMakeLists.txt
@@ -66,8 +66,8 @@ add_dependencies(${the_target} opencv_la
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 each module headers separately
install(FILES ${lib_hdrs}
Index: src/highgui/CMakeLists.txt
===================================================================
--- src/highgui/CMakeLists.txt.orig
+++ src/highgui/CMakeLists.txt
@@ -191,8 +191,8 @@ endif()
if(WIN32)
target_link_libraries(${the_target} comctl32 gdi32 ole32)
- if (MSVC)
- target_link_libraries(${the_target} vfw32)
+ if (MSVC)
+ target_link_libraries(${the_target} vfw32)
endif()
if(MINGW)
@@ -206,8 +206,8 @@ endif()
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/opencv
Index: src/ml/CMakeLists.txt
===================================================================
--- src/ml/CMakeLists.txt.orig
+++ src/ml/CMakeLists.txt
@@ -61,8 +61,8 @@ add_dependencies(${the_target} cxcore)
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/opencv
Index: tests/cxts/CMakeLists.txt
===================================================================
--- tests/cxts/CMakeLists.txt.orig
+++ tests/cxts/CMakeLists.txt
@@ -63,6 +63,6 @@ target_link_libraries(${the_target} ${OP
if(WIN32)
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)
endif()

64
libopencv-samples.patch Normal file
View File

@ -0,0 +1,64 @@
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -866,7 +866,7 @@ endif()
add_subdirectory(doc)
add_subdirectory(data)
-if(BUILD_EXAMPLES OR INSTALL_PYTHON_EXAMPLES OR INSTALL_OCTAVE_EXAMPLES)
+if(BUILD_EXAMPLES OR INSTALL_C_EXAMPLES OR INSTALL_PYTHON_EXAMPLES OR INSTALL_OCTAVE_EXAMPLES)
add_subdirectory(samples)
endif()
Index: samples/CMakeLists.txt
===================================================================
--- samples/CMakeLists.txt.orig
+++ samples/CMakeLists.txt
@@ -3,6 +3,15 @@
#
# ----------------------------------------------------------------------------
+if(BUILD_EXAMPLES OR INSTALL_C_EXAMPLES)
add_subdirectory(c)
+endif()
+if(INSTALL_PYTHON_EXAMPLES AND BUILD_NEW_PYTHON_SUPPORT)
+add_subdirectory(python)
+endif()
+if(INSTALL_PYTHON_EXAMPLES AND BUILD_SWIG_PYTHON_SUPPORT)
add_subdirectory(swig_python)
+endif()
+if(INSTALL_OCTAVE_EXAMPLES)
add_subdirectory(octave)
+endif()
Index: samples/python/CMakeLists.txt
===================================================================
--- /dev/null
+++ samples/python/CMakeLists.txt
@@ -0,0 +1,13 @@
+# -------------------------------------------------------------------------
+# CMake file for Python samples. See root CMakeLists.txt
+# -------------------------------------------------------------------------
+
+file(GLOB PYTHON_SAMPLES *.py)
+if(NOT WIN32)
+install(FILES ${PYTHON_SAMPLES}
+ DESTINATION share/opencv/samples/python
+ PERMISSIONS OWNER_READ OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE
+ WORLD_READ WORLD_EXECUTE)
+endif()
+
Index: samples/swig_python/CMakeLists.txt
===================================================================
--- samples/swig_python/CMakeLists.txt.orig
+++ samples/swig_python/CMakeLists.txt
@@ -5,7 +5,7 @@
file(GLOB PYTHON_SAMPLES *.py)
if(NOT WIN32)
install(FILES ${PYTHON_SAMPLES}
- DESTINATION share/opencv/samples/python
+ DESTINATION share/opencv/samples/swig_python
PERMISSIONS OWNER_READ OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)

10
opencv.changes Normal file
View File

@ -0,0 +1,10 @@
-------------------------------------------------------------------
Sat Jan 16 19:45:04 UTC 2010 - tittiatcoke@gmail.com
- Moved to the KDE repositories to enable inclusion in kipi-plugins
-------------------------------------------------------------------
Fri Oct 9 19:23:14 UTC 2009 - cmorve69@yahoo.es
- Initial package

182
opencv.spec Normal file
View File

@ -0,0 +1,182 @@
#
# spec file for package opencv (Version 2.0.0)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%bcond_with ffmpeg
Name: opencv
%define libname lib%{name}
%define soname 2
Version: 2.0.0
Release: 1
Summary: Collection of algorithms for computer vision
Group: Development/Libraries
License: BSD3c
Url: http://%{name}.willowgarage.com/wiki/
Source0: http://downloads.sourceforge.net/project/%{name}library/%{name}-unix/2.0/OpenCV-%{version}.tar.bz2
Patch0: %{libname}-libdir.patch
Patch1: %{libname}-samples.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gstreamer-0_10-devel libdc1394-devel libv4l-devel libxine-devel
BuildRequires: gtk2-devel libjasper-devel libjpeg-devel libtiff-devel
BuildRequires: cmake gcc-c++ libpng-devel python-devel swig zlib-devel
%if %{with ffmpeg}
BuildRequires: libffmpeg-devel
%endif
%description
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C
functions and a few C++ classes that implement some popular Image Processing and
Computer Vision algorithms.
%package -n %{libname}%{soname}
Summary: Development files for using the OpenCV library
Group: Development/Libraries
%description -n %{libname}%{soname}
The Open Computer Vision Library is a collection of algorithms and sample code
for various computer vision problems. The library is compatible with IPL and
utilizes Intel Integrated Performance Primitives for better performance.
%package -n %{libname}-devel
Summary: Development files for using the OpenCV library
Group: Development/Libraries
Requires: %{libname}%{soname} = %{version}
Requires: %{name} = %{version}
%description -n %{libname}-devel
This package contains the OpenCV C/C++ library and header files, as well as
documentation. It should be installed if you want to develop programs that will
use the OpenCV library.
%package -n python-%{name}
Summary: Python bindings for apps which use OpenCV
Group: Development/Libraries
Requires: python-base
%description -n python-%{name}
This package contains Python bindings for the OpenCV library.
%package -n python-%{name}-compat
Summary: Old Python bindings for apps which use OpenCV
Group: Development/Libraries
Requires: python-base
%description -n python-%{name}-compat
This package contains the old Python bindings for the OpenCV library.
%package -n %{name}-doc
Summary: Documentation and examples for OpenCV
Group: Documentation
# Since this package also contains examples that need -devel to be compiled
Recommends: %{libname}-devel
%description -n %{name}-doc
This package contains the documentation and examples for the OpenCV library.
%prep
%setup -qn OpenCV-%{version}
%patch0
%patch1
# Windows specific and with wrong end of line
%{__rm} -f doc/packaging.txt
%{__chmod} +x samples/c/build_all.sh
sed -i 's/\r$//' samples/c/adaptiveskindetector.cpp samples/python/camshift.py
%build
export CFLAGS=$RPM_OPT_FLAGS
export CXXFLAGS=$RPM_OPT_FLAGS
%{__mkdir} build
cd build
cmake -DCMAKE_SKIP_RPATH=ON \
-DCMAKE_INSTALL_PREFIX='%{_prefix}' \
-DLIB_SUFFIX=$(echo %_lib | cut -b4-) \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_OMIT_FRAME_POINTER=OFF \
-DUSE_MMX=OFF \
-DUSE_SSE=OFF \
-DUSE_SSE2=OFF \
-DUSE_SSE3=OFF \
-DBUILD_SWIG_PYTHON_SUPPORT=ON \
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
..
%{__make} %{?jobs:-j %jobs} VERBOSE=1
%install
cd build
%{__make} DESTDIR=%{?buildroot:%{buildroot}} install/fast
%{__mkdir_p} %{buildroot}%{_docdir}
%{__mv} %{buildroot}%{_datadir}/%{name}/doc %{buildroot}%{_docdir}/%{name}-doc
%{__mv} %{buildroot}%{_datadir}/%{name}/samples %{buildroot}%{_docdir}/%{name}-doc/examples
%clean
rm -rf %{buildroot}
%post -n %{libname}%{soname} -p /sbin/ldconfig
%postun -n %{libname}%{soname} -p /sbin/ldconfig
%files -n %{libname}%{soname}
%defattr(0644, root, root, 0755)
%{_libdir}/lib*.so.*
%files -n %{name}
%defattr(0644, root, root, 0755)
%doc AUTHORS COPYING THANKS TODO
%attr(0755, root, root) %{_bindir}/%{name}_*
%{_datadir}/%{name}
%exclude %{_datadir}/%{name}/OpenCVConfig.cmake
%files -n %{libname}-devel
%defattr(0644, root, root, 0755)
%{_includedir}/%{name}
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/%{name}.pc
%{_datadir}/%{name}/OpenCVConfig.cmake
%files -n python-%{name}
%defattr(0644, root, root, 0755)
%if 0%{?suse_version} < 1120
%{py_sitedir}/cv.so
%else
%{python_sitearch}/cv.so
%endif
%files -n python-%{name}-compat
%defattr(-, root, root, 0755)
%if 0%{?suse_version} < 1120
%{py_sitedir}/%{name}
%else
%{python_sitearch}/%{name}
%endif
%files -n %{name}-doc
%defattr(-, root, root, 0755)
%{_docdir}/%{name}-doc
%changelog

0
ready Normal file
View File