Resolves: #1408880 - new version of OpenCV (3.2.0)
This commit is contained in:
parent
567b498138
commit
e0a0df21c8
|
@ -17,3 +17,6 @@ OpenCV-2.1.0.tar.bz2
|
|||
/opencv_contrib-3.1.0.tar.gz
|
||||
/opencv-3.1.0.tar.gz
|
||||
/opencv_contrib-clean-3.1.0.tar.gz
|
||||
/opencv-clean-3.2.0.tar.gz
|
||||
/opencv-3.2.0.tar.gz
|
||||
/opencv_contrib-clean-3.2.0.tar.gz
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
diff -up OpenCV-2.4.4/modules/python/test/ticket_6.py.pillow OpenCV-2.4.4/modules/python/test/ticket_6.py
|
||||
--- OpenCV-2.4.4/modules/python/test/ticket_6.py.pillow 2013-01-28 00:00:48.000000000 +0100
|
||||
+++ OpenCV-2.4.4/modules/python/test/ticket_6.py 2013-02-18 19:58:14.288877399 +0100
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import urllib
|
||||
import cv2.cv as cv
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
import unittest
|
||||
|
||||
class TestLoadImage(unittest.TestCase):
|
|
@ -1,17 +0,0 @@
|
|||
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:38:58.763060851 -0600
|
||||
@@ -286,12 +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()
|
||||
+ set(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/OpenCV)
|
||||
endif()
|
||||
|
||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}")
|
|
@ -1,11 +0,0 @@
|
|||
--- ./modules/ts/CMakeLists.txt.orig 2015-12-18 15:02:16.000000000 +0000
|
||||
+++ ./modules/ts/CMakeLists.txt 2016-05-06 06:15:36.157614551 +0100
|
||||
@@ -4,7 +4,7 @@ if(NOT BUILD_opencv_ts AND NOT BUILD_TES
|
||||
ocv_module_disable(ts)
|
||||
endif()
|
||||
|
||||
-set(OPENCV_MODULE_TYPE STATIC)
|
||||
+#set(OPENCV_MODULE_TYPE STATIC)
|
||||
set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE)
|
||||
|
||||
if(WINRT)
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt
|
||||
index 852a8c2..6085cac 100644
|
||||
--- a/samples/gpu/CMakeLists.txt
|
||||
+++ b/samples/gpu/CMakeLists.txt
|
||||
@@ -97,7 +97,7 @@ endif()
|
||||
if(INSTALL_C_EXAMPLES AND NOT WIN32)
|
||||
file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd )
|
||||
if(NOT WITH_OPENGL)
|
||||
- list(REMOVE_ITEM all_samples "opengl.cpp")
|
||||
+ list(REMOVE_ITEM install_list "opengl.cpp")
|
||||
endif(NOT WITH_OPENGL)
|
||||
install(FILES ${install_list}
|
||||
DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/gpu
|
|
@ -0,0 +1,17 @@
|
|||
diff -urNp old/CMakeLists.txt new/CMakeLists.txt
|
||||
--- old/CMakeLists.txt 2016-12-23 13:54:44.000000000 +0100
|
||||
+++ new/CMakeLists.txt 2017-02-27 08:56:04.504933013 +0100
|
||||
@@ -402,12 +402,7 @@ else()
|
||||
ocv_update(OPENCV_OTHER_INSTALL_PATH share/OpenCV)
|
||||
|
||||
if(NOT DEFINED OPENCV_CONFIG_INSTALL_PATH)
|
||||
- math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}")
|
||||
- if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX)
|
||||
- ocv_update(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/cmake/opencv)
|
||||
- else()
|
||||
- ocv_update(OPENCV_CONFIG_INSTALL_PATH share/OpenCV)
|
||||
- endif()
|
||||
+ ocv_update(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/OpenCV)
|
||||
endif()
|
||||
endif()
|
||||
ocv_update(OPENCV_INCLUDE_INSTALL_PATH "include")
|
|
@ -0,0 +1,13 @@
|
|||
diff -urNp old/modules/optflow/samples/motempl.py new/modules/optflow/samples/motempl.py
|
||||
--- old/modules/optflow/samples/motempl.py 2016-12-23 12:09:43.000000000 +0100
|
||||
+++ new/modules/optflow/samples/motempl.py 2017-02-27 09:04:30.218887521 +0100
|
||||
@@ -37,7 +37,8 @@ if __name__ == '__main__':
|
||||
sys.exit(1)
|
||||
ret, frame = cam.read()
|
||||
if ret == False:
|
||||
- break
|
||||
+ print("could not read from " + str(video_src) + " !\n")
|
||||
+ sys.exit(1)
|
||||
h, w = frame.shape[:2]
|
||||
prev_frame = frame.copy()
|
||||
motion_history = np.zeros((h, w), np.float32)
|
|
@ -1,10 +0,0 @@
|
|||
CFLAGS := `pkg-config --cflags opencv` $(CFLAGS)
|
||||
CXXFLAGS := `pkg-config --cflags opencv` $(CXXFLAGS)
|
||||
LDFLAGS := `pkg-config --libs opencv` $(LDFLAGS)
|
||||
|
||||
PROGRAMS := $(patsubst %.c,%,$(wildcard *.c)) $(patsubst %.cpp,%,$(wildcard *.cpp))
|
||||
|
||||
.PHONY: all clean
|
||||
all: $(PROGRAMS)
|
||||
clean:
|
||||
rm -f $(PROGRAMS)
|
172
opencv.spec
172
opencv.spec
|
@ -1,6 +1,6 @@
|
|||
#global indice a
|
||||
%bcond_with ffmpeg
|
||||
%bcond_without gstreamer
|
||||
%bcond_with gstreamer
|
||||
%bcond_with eigen2
|
||||
%bcond_with eigen3
|
||||
%bcond_with openni
|
||||
|
@ -8,7 +8,10 @@
|
|||
%bcond_with sse3
|
||||
%bcond_with cuda
|
||||
%bcond_with xine
|
||||
%bcond_with atlas
|
||||
%bcond_with vtk
|
||||
%global srcname opencv
|
||||
%global abiver 3.2
|
||||
|
||||
# Required because opencv-core has lot of spurious dependencies
|
||||
# (despite supposed to be "-core")
|
||||
|
@ -17,32 +20,38 @@
|
|||
%global optflags %(echo %{optflags} -Wl,--as-needed )
|
||||
|
||||
Name: opencv
|
||||
Version: 3.1.0
|
||||
Release: 15%{?dist}
|
||||
Version: 3.2.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Collection of algorithms for computer vision
|
||||
Group: Development/Libraries
|
||||
# This is normal three clause BSD.
|
||||
License: BSD
|
||||
URL: http://opencv.org
|
||||
#Source0: %{version}.zip
|
||||
Source0: https://github.com/Itseez/opencv/archive/%{version}/opencv-%{version}.tar.gz
|
||||
#Source1: opencv-samples-Makefile
|
||||
# HOW TO PREPARE TARBALLS FOR FEDORA
|
||||
#
|
||||
# Need to remove copyrighted lena.jpg images from tarball (rhbz#1295173)
|
||||
# and SIFT/SURF from tarball, due to legal concerns.
|
||||
# Upstream tarball is available on https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz
|
||||
#
|
||||
# Need to remove SIFT/SURF from source tarball, due to legal concerns
|
||||
# export VERSION=3.1.0
|
||||
# cd opencv_contrib-${VERSION}/
|
||||
# export VERSION=3.2.0
|
||||
# wget https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz
|
||||
# tar xvf opencv-${VERSION}.tar.gz
|
||||
# cd opencv-${VERSION}
|
||||
# find ./ -iname "len*.*" -exec rm {} \;
|
||||
# rm -rf modules/xfeatures2d/
|
||||
# cd ..; tar zcf opencv-clean-${VERSION}.tar.gz opencv-${VERSION}/
|
||||
# wget https://github.com/Itseez/opencv_contrib/archive/%%{version}/opencv_contrib-%%{version}.tar.gz
|
||||
# tar xvf opencv_contrib-${VERSION}.tar.gz
|
||||
# cd opencv_contrib-${VERSION}
|
||||
# rm -rf modules/xfeatures2d/
|
||||
# cd ..; tar zcf opencv_contrib-clean-${VERSION}.tar.gz opencv_contrib-${VERSION}/
|
||||
Source2: opencv_contrib-clean-%{version}.tar.gz
|
||||
#Source2: https://github.com/Itseez/opencv_contrib/archive/%%{version}/opencv_contrib-%%{version}.tar.gz
|
||||
#http://code.opencv.org/issues/2720
|
||||
Patch2: OpenCV-2.4.4-pillow.patch
|
||||
#Patch3: opencv-2.4.9-ts_static.patch
|
||||
Source0: %{name}-clean-%{version}.tar.gz
|
||||
Source1: %{name}_contrib-clean-%{version}.tar.gz
|
||||
# fix/simplify cmake config install location (upstreamable)
|
||||
# https://bugzilla.redhat.com/1031312
|
||||
Patch4: opencv-2.4.7-cmake_paths.patch
|
||||
Patch5: opencv-3.1.0-cmake_example.patch
|
||||
Patch6: OpenCV-3.1-pillow.patch
|
||||
Patch1: opencv-3.2.0-cmake_paths.patch
|
||||
Patch2: opencv-3.1-pillow.patch
|
||||
Patch3: opencv-3.2.0-test-file-fix.patch
|
||||
|
||||
BuildRequires: libtool
|
||||
BuildRequires: cmake >= 2.6.3
|
||||
|
@ -67,7 +76,7 @@ BuildRequires: libGL-devel
|
|||
BuildRequires: libv4l-devel
|
||||
BuildRequires: gtkglext-devel
|
||||
BuildRequires: OpenEXR-devel
|
||||
%ifarch %{ix86} x86_64
|
||||
%ifarch %{ix86} x86_64 %{arm}
|
||||
%{?with_openni:
|
||||
BuildRequires: openni-devel
|
||||
BuildRequires: openni-primesense
|
||||
|
@ -102,14 +111,17 @@ BuildRequires: doxygen
|
|||
BuildRequires: gflags-devel
|
||||
BuildRequires: SFML-devel
|
||||
BuildRequires: libucil-devel
|
||||
#BuildRequires: libunicap-devel
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: mesa-libGL-devel mesa-libGLU-devel
|
||||
BuildRequires: hdf5-devel
|
||||
#ceres-solver-devel push eigen3-devel and tbb-devel, maybe we should enable all
|
||||
#by default.
|
||||
#BuildRequires: ceres-solver-devel
|
||||
#BuildRequires: plantuml
|
||||
%{?with_vtk:BuildRequires: vtk-devel}
|
||||
%{?with_atlas:BuildRequires: atlas-devel}
|
||||
#ceres-solver-devel push eigen3-devel and tbb-devel
|
||||
%{?with_tbb:
|
||||
%{?with_eigen3:
|
||||
BuildRequires: ceres-solver-devel
|
||||
}
|
||||
}
|
||||
|
||||
Requires: opencv-core%{_isa} = %{version}-%{release}
|
||||
|
||||
|
@ -181,16 +193,16 @@ distribution, since the library maintains binary compatibility, and tries
|
|||
to provide decent performance and stability.
|
||||
|
||||
%prep
|
||||
%setup -q -a2
|
||||
%setup -q -a1
|
||||
# we don't use pre-built contribs
|
||||
pwd
|
||||
rm -rf 3rdparty/
|
||||
%patch1 -p1 -b .cmake_paths
|
||||
pushd %{name}_contrib-%{version}
|
||||
# missing dependecies for dnn module in Fedora (protobuf-cpp)
|
||||
rm -rf modules/dnn/
|
||||
%patch2 -p1 -b .pillow
|
||||
#patch3 breaks build, need investigation
|
||||
#patch3 -p1 -b .ts_static
|
||||
%patch4 -p1 -b .cmake_paths
|
||||
%patch5 -p1 -b .cmake_example
|
||||
pushd opencv_contrib-%{version}
|
||||
%patch6 -p1 -b .pillow
|
||||
%patch3 -p1 -b .fixtest
|
||||
popd
|
||||
|
||||
# fix dos end of lines
|
||||
|
@ -214,6 +226,7 @@ pushd build
|
|||
-DWITH_UNICAP=ON \
|
||||
-DPYTHON_PACKAGES_PATH=%{python_sitearch} \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DWITH_CAROTENE=OFF \
|
||||
-DENABLE_PRECOMPILED_HEADERS:BOOL=OFF \
|
||||
%ifnarch x86_64 ia64
|
||||
-DENABLE_SSE=OFF \
|
||||
|
@ -223,7 +236,7 @@ pushd build
|
|||
-DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \
|
||||
-DBUILD_opencv_java=OFF \
|
||||
%ifarch %{ix86} x86_64 ia64 ppc %{power64} aarch64
|
||||
%{?with_tbb: -DWITH_TBB=ON } \
|
||||
%{?with_tbb: -DWITH_TBB=ON } \
|
||||
%endif
|
||||
%{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
|
||||
%{!?with_ffmpeg:-DWITH_FFMPEG=OFF} \
|
||||
|
@ -292,29 +305,27 @@ popd
|
|||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_bindir}/opencv_*
|
||||
%{_libdir}/libopencv_ts*
|
||||
%dir %{_datadir}/OpenCV
|
||||
%{_datadir}/OpenCV/haarcascades
|
||||
%{_datadir}/OpenCV/lbpcascades
|
||||
|
||||
%files core
|
||||
%{_libdir}/libopencv_core.so.3.1*
|
||||
%{_libdir}/libopencv_features2d.so.3.1*
|
||||
%{_libdir}/libopencv_flann.so.3.1*
|
||||
%{_libdir}/libopencv_highgui.so.3.1*
|
||||
%{_libdir}/libopencv_imgcodecs.so.3.1*
|
||||
%{_libdir}/libopencv_imgproc.so.3.1*
|
||||
%{_libdir}/libopencv_ml.so.3.1*
|
||||
%{_libdir}/libopencv_objdetect.so.3.1*
|
||||
%{_libdir}/libopencv_photo.so.3.1*
|
||||
%{_libdir}/libopencv_shape.so.3.1*
|
||||
%{_libdir}/libopencv_stitching.so.3.1*
|
||||
%{_libdir}/libopencv_superres.so.3.1*
|
||||
%{_libdir}/libopencv_video.so.3.1*
|
||||
%{_libdir}/libopencv_videoio.so.3.1*
|
||||
%{_libdir}/libopencv_videostab.so.3.1*
|
||||
%{_libdir}/libopencv_cvv.so.3.1*
|
||||
#{_libdir}/libopencv_viz.so.3.1*
|
||||
%{_libdir}/libopencv_core.so.%{abiver}*
|
||||
%{_libdir}/libopencv_features2d.so.%{abiver}*
|
||||
%{_libdir}/libopencv_flann.so.%{abiver}*
|
||||
%{_libdir}/libopencv_highgui.so.%{abiver}*
|
||||
%{_libdir}/libopencv_imgcodecs.so.%{abiver}*
|
||||
%{_libdir}/libopencv_imgproc.so.%{abiver}*
|
||||
%{_libdir}/libopencv_ml.so.%{abiver}*
|
||||
%{_libdir}/libopencv_objdetect.so.%{abiver}*
|
||||
%{_libdir}/libopencv_photo.so.%{abiver}*
|
||||
%{_libdir}/libopencv_shape.so.%{abiver}*
|
||||
%{_libdir}/libopencv_stitching.so.%{abiver}*
|
||||
%{_libdir}/libopencv_superres.so.%{abiver}*
|
||||
%{_libdir}/libopencv_video.so.%{abiver}*
|
||||
%{_libdir}/libopencv_videoio.so.%{abiver}*
|
||||
%{_libdir}/libopencv_videostab.so.%{abiver}*
|
||||
%{_libdir}/libopencv_cvv.so.%{abiver}*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/opencv
|
||||
|
@ -334,33 +345,46 @@ popd
|
|||
|
||||
|
||||
%files contrib
|
||||
%{_libdir}/libopencv_aruco.so.3.1*
|
||||
%{_libdir}/libopencv_bgsegm.so.3.1*
|
||||
%{_libdir}/libopencv_bioinspired.so.3.1*
|
||||
%{_libdir}/libopencv_calib3d.so.3.1*
|
||||
%{_libdir}/libopencv_ccalib.so.3.1*
|
||||
%{_libdir}/libopencv_datasets.so.3.1*
|
||||
%{_libdir}/libopencv_dnn.so.3.1*
|
||||
%{_libdir}/libopencv_dpm.so.3.1*
|
||||
%{_libdir}/libopencv_face.so.3.1*
|
||||
%{_libdir}/libopencv_fuzzy.so.3.1*
|
||||
%{_libdir}/libopencv_hdf.so.3.1*
|
||||
%{_libdir}/libopencv_line_descriptor.so.3.1*
|
||||
%{_libdir}/libopencv_optflow.so.3.1*
|
||||
%{_libdir}/libopencv_plot.so.3.1*
|
||||
%{_libdir}/libopencv_reg.so.3.1*
|
||||
%{_libdir}/libopencv_rgbd.so.3.1*
|
||||
%{_libdir}/libopencv_saliency.so.3.1*
|
||||
%{_libdir}/libopencv_stereo.so.3.1*
|
||||
%{_libdir}/libopencv_structured_light.so.3.1*
|
||||
%{_libdir}/libopencv_surface_matching.so.3.1*
|
||||
%{_libdir}/libopencv_text.so.3.1*
|
||||
%{_libdir}/libopencv_tracking.so.3.1*
|
||||
%{_libdir}/libopencv_ximgproc.so.3.1*
|
||||
%{_libdir}/libopencv_xobjdetect.so.3.1*
|
||||
%{_libdir}/libopencv_xphoto.so.3.1*
|
||||
%{_libdir}/libopencv_aruco.so.%{abiver}*
|
||||
%{_libdir}/libopencv_bgsegm.so.%{abiver}*
|
||||
%{_libdir}/libopencv_bioinspired.so.%{abiver}*
|
||||
%{_libdir}/libopencv_calib3d.so.%{abiver}*
|
||||
%{_libdir}/libopencv_ccalib.so.%{abiver}*
|
||||
%{_libdir}/libopencv_datasets.so.%{abiver}*
|
||||
# Disabled because of missing dependency package in fedora (protobuf-cpp)
|
||||
#{_libdir}/libopencv_dnn.so.%{abiver}*
|
||||
%{_libdir}/libopencv_dpm.so.%{abiver}*
|
||||
%{_libdir}/libopencv_face.so.%{abiver}*
|
||||
%{_libdir}/libopencv_freetype.so.%{abiver}*
|
||||
%{_libdir}/libopencv_fuzzy.so.%{abiver}*
|
||||
%{_libdir}/libopencv_hdf.so.%{abiver}*
|
||||
%{_libdir}/libopencv_line_descriptor.so.%{abiver}*
|
||||
%{_libdir}/libopencv_optflow.so.%{abiver}*
|
||||
%{_libdir}/libopencv_phase_unwrapping.so.%{abiver}*
|
||||
%{_libdir}/libopencv_plot.so.%{abiver}*
|
||||
%{_libdir}/libopencv_reg.so.%{abiver}*
|
||||
%{_libdir}/libopencv_rgbd.so.%{abiver}*
|
||||
%{_libdir}/libopencv_saliency.so.%{abiver}*
|
||||
%{_libdir}/libopencv_stereo.so.%{abiver}*
|
||||
%{_libdir}/libopencv_structured_light.so.%{abiver}*
|
||||
%{_libdir}/libopencv_surface_matching.so.%{abiver}*
|
||||
%{_libdir}/libopencv_text.so.%{abiver}*
|
||||
# Disabled becouse of unable to solve dnn dependency
|
||||
#{_libdir}/libopencv_tracking.so.%{abiver}*
|
||||
%{_libdir}/libopencv_ximgproc.so.%{abiver}*
|
||||
%{_libdir}/libopencv_xobjdetect.so.%{abiver}*
|
||||
%{_libdir}/libopencv_xphoto.so.%{abiver}*
|
||||
|
||||
%changelog
|
||||
* Mon Feb 27 2017 Josef Ridky <jridky@redhat.com> - 3.2.0-1
|
||||
- Rebase to the latest version (3.2.0) - #1408880
|
||||
- Remove unused BuildRequires and patches
|
||||
- Remove copyrighted lena.jpg images and SIFT/SURF from tarball, due to legal concerns.
|
||||
- Disable dnn module from opencv_contrib, due missing BuildRequired package in Fedora (protobuf-cpp)
|
||||
- Disable tracking module from opencv_contrib, due disabling dnn module (is required by this module)
|
||||
- Disable CAROTENE in compilation (caused error on arm and ppc64le)
|
||||
- Fix syntax error in opencv_contrib test file (opencv-3.2.0-test-file-fix.patch)
|
||||
|
||||
* Tue Feb 21 2017 Sandro Mani <manisandro@gmail.com> - 3.1.0-15
|
||||
- Rebuild (tesseract)
|
||||
|
||||
|
|
4
sources
4
sources
|
@ -1,2 +1,2 @@
|
|||
70e1dd07f0aa06606f1bc0e3fa15abd3 opencv-3.1.0.tar.gz
|
||||
1ee4a56c13393f196ae7d8600c724a8d opencv_contrib-clean-3.1.0.tar.gz
|
||||
SHA512 (opencv-clean-3.2.0.tar.gz) = 9f7e25f2f570c08d37bc996dbf38768ab43c2312aacfd00a31c82d8a55caeb57d4039db98579032e157f64c3173bfe995d3ca53212f34e764baa54415dd93f93
|
||||
SHA512 (opencv_contrib-clean-3.2.0.tar.gz) = dd1abe177f22cdb9f03c063310eb61d205841a74dd9f9e9bdc96e40ce766cc25bdfebd40bb3e226834c8b4a6c8b741f3957257b2fdd95f67a980258f7cdc654b
|
||||
|
|
Loading…
Reference in New Issue