diff --git a/opencv.spec b/opencv.spec index 942ba86..20cf754 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,5 +1,11 @@ %undefine __cmake_in_source_build +# Tests are disabled with gcc-11 +# See https://bugzilla.redhat.com/1944536 +%if 0%{?fedora} > 33 +%bcond_with tests +%else %bcond_without tests +%endif %bcond_with ffmpeg %bcond_without gstreamer %bcond_with eigen2 @@ -40,12 +46,19 @@ %global srcname opencv +# If _cuda_version is unset +%if 0%{!?_cuda_version:1} && 0%{?with_cuda:1} +%global _cuda_version 11.2 +%global _cuda_rpm_version 11-2 +%global _cuda_prefix /usr/local/cuda-%{_cuda_version} +%bcond_without dnn_cuda +%endif Name: opencv -Version: 4.5.1 +Version: 4.5.2 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 6%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -71,9 +84,11 @@ BuildRequires: libtool BuildRequires: cmake >= 2.6.3 BuildRequires: chrpath %{?with_cuda: -BuildRequires: pkgconfig(cublas-%{?_cuda_rpm_version}) -BuildRequires: pkgconfig(cufft-%{?_cuda_rpm_version}) -BuildRequires: pkgconfig(nppc-%{?_cuda_rpm_version}) +BuildRequires: cuda-minimal-build-%{?_cuda_rpm_version} +BuildRequires: pkgconfig(cublas-%{?_cuda_version}) +BuildRequires: pkgconfig(cufft-%{?_cuda_version}) +BuildRequires: pkgconfig(nppc-%{?_cuda_version}) +%{?with_dnn_cuda:BuildRequires: libcudnn8-devel} } %{?with_eigen2:BuildRequires: eigen2-devel} %{?with_eigen3:BuildRequires: eigen3-devel} @@ -133,7 +148,7 @@ BuildRequires: hdf5-devel BuildRequires: openjpeg2-devel # Module opencv_ovis disabled because of incompatible OGRE3D version < 1.10 # BuildRequires: ogre-devel -%{?with_vtk:BuildRequires: vtk-devel} +%{?with_vtk:BuildRequires: vtk-devel vtk-java} %{?with_atlas:BuildRequires: atlas-devel} #ceres-solver-devel push eigen3-devel and tbb-devel %{?with_tbb: @@ -271,6 +286,9 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -DWITH_ITT=OFF \ -DWITH_QT=ON \ -DWITH_OPENGL=ON \ +%if ! %{with tests} + -DBUILD_TESTS=OFF \ +%endif -DOpenGL_GL_PREFERENCE=GLVND \ -DWITH_GDAL=ON \ -DWITH_OPENEXR=ON \ @@ -293,6 +311,8 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -DCUDA_TOOLKIT_ROOT_DIR=%{?_cuda_prefix} \ -DCUDA_VERBOSE_BUILD=ON \ -DCUDA_PROPAGATE_HOST_FLAGS=OFF \ + -DCUDA_NVCC_FLAGS="-Xcompiler -fPIC" \ + %{?with_dnn_cuda:-DOPENCV_DNN_CUDA=ON} \ } \ %{?with_openni: -DWITH_OPENNI=ON } \ %{!?with_xine: -DWITH_XINE=OFF } \ @@ -424,6 +444,10 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_bgsegm.so.%{abiver}* %{_libdir}/libopencv_bioinspired.so.%{abiver}* %{_libdir}/libopencv_ccalib.so.%{abiver}* +%{?with_cuda: +%{_libdir}/libopencv_cuda*.so.%{abiver}* +%{_libdir}/libopencv_cudev.so.%{abiver}* +} %{_libdir}/libopencv_cvv.so.%{abiver}* %{_libdir}/libopencv_datasets.so.%{abiver}* %{_libdir}/libopencv_dnn_objdetect.so.%{abiver}* @@ -457,11 +481,24 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %if %{with vtk} %{_libdir}/libopencv_viz.so.%{abiver}* %endif +%{_libdir}/libopencv_wechat_qrcode.so.%{abiver}* %{_libdir}/libopencv_ximgproc.so.%{abiver}* %{_libdir}/libopencv_xobjdetect.so.%{abiver}* %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sat Jun 19 2021 Jiri Kucera - 4.5.2-2 +- Rebuild for gdal & vtk + +* Sat Apr 03 2021 Nicolas Chauvet - 4.5.2-1 +- Update to 4.5.2 + +* Wed Mar 31 2021 Nicolas Chauvet - 4.5.1-8 +- Disable tests for now + +* Tue Mar 30 2021 Jonathan Wakely - 4.5.1-7 +- Rebuilt for removed libstdc++ symbol (#1937698) + * Wed Feb 10 2021 Jiri Kucera - 4.5.1-6 - Fix file lists Based on comparison of `opencv-4.5.1/modules/` and diff --git a/sources b/sources index 1a230c9..31d286b 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (opencv-clean-4.5.1.tar.gz) = b93df3e0bc9162b350d6e921a1a21eb351dab6f785b08be2cdd5a5b912565cafbe45d3125dbc66f0b7642ccffe00fb8eb199729e07d1426d4f0956f8c63e8653 -SHA512 (opencv_contrib-clean-4.5.1.tar.gz) = f85e9e1ce08efa1eb31a4286387b77a9cb3466ec278db5db1a30318887fe905165559e56249e6aebaf4e33dee98063a790b230942ddf838df0e57a1535fbbf0b -SHA512 (opencv_extra-clean-4.5.1.tar.gz) = 2c260978c6aacfc699e7e47cd70dc04d819c891f6bc7cc4d554cb0a6ad1bc05917d2d0ec1099c5c7c28c5fdf84531a14726fcd9ae4aff76e720650ddd6a88a21 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 +SHA512 (opencv-clean-4.5.2.tar.gz) = f3083e8c31305f3ed6ba6f333524b0fd15ed55beafbb6480a044a4d44fc3d8d2be9e379ccbe555c3cfce48f3180d5a64169f86e584454e9b992bdaa35d1af847 +SHA512 (opencv_contrib-clean-4.5.2.tar.gz) = 15a494771ed41895de066e50798c663a35587ebf6a6e5b899571a289d9f644173322b388b387f543dec241bf6d262d868a49e3cd6d6d66180630484834697727 +SHA512 (opencv_extra-clean-4.5.2.tar.gz) = 4e3da960cd7535b64373b5cc3398d98856c6c4a26e5fce961fef6eb476a425c6a7583e11382b192db64b5838696aa0d399cdeb16a2db17d51bdc59db046460c9