forked from pool/opencv
Accepting request 499529 from KDE:Extra
1 OBS-URL: https://build.opensuse.org/request/show/499529 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv?expand=0&rev=65
This commit is contained in:
23
opencv.spec
23
opencv.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package opencv
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -19,10 +19,10 @@
|
||||
%bcond_without ffmpeg
|
||||
|
||||
%define libname lib%{name}
|
||||
%define soname 3_1
|
||||
%define soname 3_2
|
||||
|
||||
Name: opencv
|
||||
Version: 3.1.0
|
||||
Version: 3.2.0
|
||||
Release: 0
|
||||
Summary: Collection of algorithms for computer vision
|
||||
License: BSD-3-Clause
|
||||
@@ -31,12 +31,10 @@ Url: http://opencv.org/
|
||||
Source0: https://github.com/Itseez/opencv/archive/%{version}.tar.gz
|
||||
# This is the FACE module from the opencv_contrib package. Packaged separately to prevent too much usntable modules
|
||||
Source1: opencv_contrib_face-3.1.0.tar.bz2
|
||||
# PATCH-FIX-UPSTREAM opencv-gcc5.patch -- support gcc versions without minor version coolo@suse.de
|
||||
Patch6: opencv-gcc5.patch
|
||||
# PATCH-FIX-OPENSUSE opencv-build-compare.patch -- avoid republish if some random external version number changes
|
||||
Patch8: opencv-build-compare.patch
|
||||
# PATCH-FIX-OPENSUSE opencv-gcc6-disable-pch.patch -- Disable PCH for GCC6.
|
||||
Patch9: opencv-gcc6-disable-pch.patch
|
||||
# PATCH-FIX-UPSTREAM opencv-gcc6-fix-pch-support-PR8345.patch -- fix PCH support on GCC 6.x
|
||||
Patch10: opencv-gcc6-fix-pch-support-PR8345.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: unzip
|
||||
@@ -74,6 +72,7 @@ BuildRequires: libilmbase-devel
|
||||
%endif
|
||||
BuildRequires: libpng16-compat-devel
|
||||
BuildRequires: libpng16-devel
|
||||
BuildRequires: openblas-devel
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-numpy-devel
|
||||
BuildRequires: python3-devel
|
||||
@@ -81,6 +80,7 @@ BuildRequires: python3-numpy-devel
|
||||
%if 0%{?suse_version} != 1315 || 0%{?is_opensuse}
|
||||
BuildRequires: python-sphinx
|
||||
%endif
|
||||
BuildRequires: tbb-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig(glu)
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@@ -101,8 +101,8 @@ utilizes Intel Integrated Performance Primitives for better performance.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for using the OpenCV library
|
||||
Group: Development/Libraries/C and C++
|
||||
# Since 2.4.7
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: %{name}-devel-static = %{version}
|
||||
Requires: %{libname}%{soname} = %{version}
|
||||
Requires: %{name} = %{version}
|
||||
@@ -146,9 +146,8 @@ This package contains the documentation and examples for the OpenCV library.
|
||||
|
||||
%prep
|
||||
%setup -q -a 1
|
||||
%patch6 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
|
||||
# Remove Windows specific files
|
||||
rm -f doc/packaging.txt
|
||||
@@ -165,6 +164,7 @@ export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
|
||||
export CXXFLAGS="%{optflags} ${mlra} $(getconf LFS_CFLAGS)"
|
||||
mkdir build
|
||||
cd build
|
||||
# TODO for OCV 3.3: https://github.com/opencv/opencv/wiki/CPU-optimizations-build-options
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX='%{_prefix}' \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
@@ -178,6 +178,7 @@ cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DWITH_UNICAP=ON \
|
||||
-DWITH_XINE=ON \
|
||||
-DWITH_IPP=OFF \
|
||||
-DWITH_TBB=ON \
|
||||
%if 0%{?suse_version} <= 1310
|
||||
-DWITH_GSTREAMER_0_10=ON \
|
||||
%endif
|
||||
@@ -194,6 +195,8 @@ cd build
|
||||
make DESTDIR=%{?buildroot:%{buildroot}} install/fast
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}-doc
|
||||
mv %{buildroot}%{_datadir}/OpenCV/samples %{buildroot}%{_docdir}/%{name}-doc/examples
|
||||
# OpenCV 3.2 no longer install libopencv_ts.a if the tests are not enabled
|
||||
install lib/libopencv_ts.a %{buildroot}%{_libdir}
|
||||
|
||||
# Fix rpmlint warning "doc-file-dependency"
|
||||
chmod 644 %{buildroot}%{_docdir}/%{name}-doc/examples/python/*.py
|
||||
|
Reference in New Issue
Block a user