Compare commits

...

43 Commits

Author SHA1 Message Date
David Abdurachmanov 3923e8e37e
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-03-07 10:44:42 +02:00
Jerry James b645eac1f1 Reduce debuginfo level on i386 to avoid memory exhaustion 2024-02-24 16:38:02 -07:00
Jerry James de40c5d708 Rebuild (coin-or-Clp)
- Use uppercase connectives in SPDX expression
2024-02-23 20:11:46 -07:00
Sérgio M. Basto 8b83a73771 pkgconfig(opencv) instead pkgconfig(opencv4) still is use by packages
revert drop compat symlink to opencv.pc
2024-02-05 23:31:07 +00:00
Sérgio M. Basto 7cdfc99aae Disable openexr on epel 9 2024-02-05 11:38:21 +00:00
Sérgio M. Basto 0aedf9d836 rhbz#2058802 is fixed, reverting commit d9eb86c 2024-02-05 11:38:21 +00:00
Sérgio M. Basto 5bfb0d052e Update opencv to 4.9.0
Enable ffmpeg and xine (now they are available on Fedora)
Really drop compat symlink for includes - rhbz#1830266
  Note: conditional builds with underscrore don't have _without option
  https://github.com/rpm-software-management/rpm/issues/1929
2024-02-05 11:38:06 +00:00
Sérgio M. Basto c09c027f31 Remove unused patch 2024-02-05 11:36:21 +00:00
Sandro Mani 56850342e3 Rebuild (tesseract) 2024-01-28 11:33:36 +01:00
Fedora Release Engineering 057fbf10b8 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 11:14:46 +00:00
Fedora Release Engineering 53aa1a34a4 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 11:10:08 +00:00
Jonathan Wakely 8a7b907353 Rebuilt for TBB 2021.11 2024-01-17 23:45:11 +00:00
Benjamin A. Beasley f547902cbb Backport support for protobuf v22 and later from opencv 4.9.0 2024-01-11 10:58:50 -05:00
David Abdurachmanov 7594c3062f
Disable VTK on riscv64 for now
VTK is still building, so let's disable VTK to get OpenCV faster.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-12-08 12:49:50 +02:00
Sandro Mani 98cbcd26f4 Rebuild (gdal) 2023-11-16 09:18:20 +01:00
Sandro Mani 45ae591b34 Rebuild (tesseract) 2023-10-07 23:54:32 +02:00
Sérgio M. Basto fb84438736 Update opencv to 4.8.1 2023-09-30 05:19:56 +01:00
Yaakov Selkowitz ef2f6e9368 Fix upgradability issues 2023-09-29 10:44:39 -04:00
Yaakov Selkowitz b2d277d847 Separate per-module subpackages (#1878320) 2023-09-22 15:15:23 -04:00
Sérgio M. Basto cdd8f4a19e Upgrade C++ standard to C++17 for protobuf v4 (23.x etc.) 2023-08-07 01:42:39 +01:00
Sérgio M. Basto 06c4df6d4f add WeChat QRCode
CNN models for wechat_qrcode module, including the detector model and the super scale model.

https://github.com/WeChatCV/opencv_3rdparty

the WeChatCV project added code in opencv_contrib
2023-08-07 01:35:26 +01:00
Sérgio M. Basto 193d86a5be Update opencv to 4.8.0
Use bundle flatbuffers, tried build with flatbuffers from system but doesn't build
Use oneVPL instead libmfx
2023-08-07 01:33:58 +01:00
Fedora Release Engineering 464361d6d8 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 18:01:40 +00:00
Josef Řídký 7765b04b32 Migrate to SPDX license format 2023-07-19 08:47:19 +02:00
Sandro Mani 2076a686c0 Rebuild (tesseract) 2023-07-14 12:46:49 +02:00
Mamoru TASAKA 305eb44cc9 bump release 2023-07-07 20:27:08 +09:00
Mamoru TASAKA 05aad33f58 Drop openni support on i686 as it is no longer available 2023-07-07 20:26:27 +09:00
Python Maint 025de760b3 Rebuilt for Python 3.12 2023-07-03 13:58:12 +02:00
Nicolas Chauvet 69d8bc93aa Rebuilt 2023-06-12 21:52:13 +02:00
Nicolas Chauvet 964c2286f1 Upstream commit to fix rhbz#2190013 2023-06-12 19:51:02 +02:00
Sérgio M. Basto 0a1c546e48 Reverts things that were accidentally committed and not yet completed 2023-05-15 00:33:17 +01:00
Sérgio M. Basto 753e8836e0 Install egg-info in python3_sitearch to stay in same location as the rest of python 2023-05-14 17:12:55 +01:00
Sérgio M. Basto 6b8b992f8e The %ldconfig_scriptlets macro can be removed on all Fedoras.
Possibly also on EPEL 8. But it is required on EPEL 7.
2023-05-14 15:49:13 +01:00
Sérgio M. Basto 95f94bb5f4 Obsolete python2 only < %{version} 2023-05-13 06:42:18 +01:00
Sérgio M. Basto 6b1e0637b2 Fix patch warning 2023-05-13 06:31:35 +01:00
Sérgio M. Basto 4a71091ffe Install python egg-info 2023-05-13 06:30:55 +01:00
Sérgio M. Basto b23a2b4828 Update changelog 2023-05-11 22:57:11 +01:00
Sérgio M. Basto 8c68605e1d Disable tests, even only tests, fail to build
and generate build.log with millions of logs lines saying:

*** stack smashing detected ***: terminated

cat build.log | grep smashing | wc -l
118308609
2023-05-11 22:36:12 +01:00
Sérgio M. Basto 9c945dfe13 disable extra tests on builds 2023-05-11 22:29:53 +01:00
Sandro Mani 5be2c955a7 Rebuild (gdal) 2023-05-11 14:40:55 +02:00
Sérgio M. Basto 74127b74f8 if without tests also disable 500MB of extra tests 2023-04-14 16:59:44 +01:00
Sandro Mani f34e95b282 Re-enable tests 2023-04-06 12:34:18 +02:00
Sandro Mani 6c1185b511 Temporarily disable hanging tests to get a build through 2023-04-06 09:53:41 +02:00
5 changed files with 290 additions and 147 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@ opencv*.tar.*
face_landmark_model.dat.xz
/b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip
/fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip
/wechat-20230712.git3487ef7.tar.gz
/dbb095a8bf3008e91edbbf45d8d34885-v0.1.2d.zip

View File

@ -1,24 +0,0 @@
diff -up opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in.orig opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in
--- opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in.orig 2019-10-10 00:53:14.000000000 +0200
+++ opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in 2019-10-17 11:08:46.626400320 +0200
@@ -106,7 +106,7 @@ set(OpenCV_SHARED @BUILD_SHARED_LIBS@)
set(OpenCV_USE_MANGLED_PATHS @OpenCV_USE_MANGLED_PATHS_CONFIGCMAKE@)
set(OpenCV_LIB_COMPONENTS @OPENCV_MODULES_CONFIGCMAKE@)
-set(__OpenCV_INCLUDE_DIRS @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@)
+set(__OpenCV_INCLUDE_DIRS @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@ @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@/opencv2)
set(OpenCV_INCLUDE_DIRS "")
foreach(d ${__OpenCV_INCLUDE_DIRS})
diff -up opencv-4.1.2/cmake/templates/opencv-XXX.pc.in.orig opencv-4.1.2/cmake/templates/opencv-XXX.pc.in
--- opencv-4.1.2/cmake/templates/opencv-XXX.pc.in.orig 2019-10-10 00:53:14.000000000 +0200
+++ opencv-4.1.2/cmake/templates/opencv-XXX.pc.in 2019-10-17 11:04:11.486014573 +0200
@@ -3,7 +3,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir_old=@includedir@/opencv
+includedir_old=@includedir@/opencv2
includedir_new=@includedir@
Name: OpenCV

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=4.7.0
VERSION=4.9.0
wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz
wget -c https://github.com/opencv/opencv_contrib/archive/${VERSION}/opencv_contrib-${VERSION}.tar.gz
@ -31,4 +31,4 @@ tar zcf opencv_extra-clean-${VERSION}.tar.gz opencv_extra-${VERSION}/
rm -r opencv_extra-${VERSION}/
echo fedpkg new-sources $(spectool -l --sources opencv.spec)
echo fedpkg new-sources $(spectool -l --sources opencv.spec | sed 's/.*: //;s/.*\///')

View File

@ -1,42 +1,46 @@
%undefine __cmake_in_source_build
%bcond_without tests
%bcond_without extras
%bcond_with tests
%bcond_without compat_openvc_pc
%if %{without tests}
%bcond_with extras_tests
%else
%bcond_without extras_tests
%endif
# linters are enabled by default if BUILD_DOCS OR BUILD_EXAMPLES
%bcond_with linters
%bcond_with ffmpeg
%bcond_without ffmpeg
%bcond_without gstreamer
%bcond_with eigen2
%bcond_without eigen3
%bcond_without opencl
%if 0%{?rhel} >= 8
%bcond_with openni
%else
%ifarch %{ix86} x86_64 %{arm}
%ifarch x86_64 %{arm}
%bcond_without openni
%else
# we dont have openni in other archs
%bcond_with openni
%endif
%endif
%bcond_without tbb
%bcond_with cuda
%bcond_with xine
%bcond_without xine
# Atlas need (missing: Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY)
# LAPACK may use atlas or openblas since now it detect openblas, atlas is not used anyway, more info please
# check OpenCVFindLAPACK.cmake
%bcond_with atlas
%bcond_without openblas
%bcond_without gdcm
%ifnarch riscv64
%if 0%{?rhel} >= 8
%bcond_with vtk
%else
%bcond_without vtk
%endif
%else # riscv64
%bcond_with vtk
%endif # riscv64
%ifarch x86_64
%bcond_without libmfx
%bcond_without va
%else
%bcond_with libmfx
%endif
@ -51,6 +55,13 @@
%bcond_with java
%endif
%if 0%{?fedora}
%bcond_without openexr
%else
%bcond_with openexr
%endif
%bcond_without va
%bcond_without vulkan
%define _lto_cflags %{nil}
@ -64,16 +75,16 @@
%endif
Name: opencv
Version: 4.7.0
Version: 4.9.0
%global javaver %(foo=%{version}; echo ${foo//./})
%global majorver %(foo=%{version}; a=(${foo//./ }); echo ${a[0]} )
%global minorver %(foo=%{version}; a=(${foo//./ }); echo ${a[1]} )
%global padding %(digits=00; num=%{minorver}; echo ${digits:${#num}:${#digits}} )
%global abiver %(echo %{majorver}%{padding}%{minorver} )
Release: 4%{?dist}
Release: 3.0.riscv64%{?dist}
Summary: Collection of algorithms for computer vision
# This is normal three clause BSD.
License: BSD
License: BSD-3-Clause AND Apache-2.0 AND ISC
URL: https://opencv.org
# TO PREPARE TARBALLS FOR FEDORA
# Edit opencv-clean.sh and set VERSION, save file and run opencv-clean.sh
@ -83,14 +94,17 @@ URL: https://opencv.org
#
Source0: %{name}-clean-%{version}.tar.gz
Source1: %{name}_contrib-clean-%{version}.tar.gz
%{?with_extras:
%{?with_extras_tests:
Source2: %{name}_extra-clean-%{version}.tar.gz
}
Source3: face_landmark_model.dat.xz
# from https://github.com/opencv/ade/archive/v0.1.2a.zip
# mv v0.1.2a.zip $(md5sum v0.1.2a.zip | cut -d' ' -f1)-v0.1.2a.zip
Source4: fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip
# SRC=v0.1.2d.zip ; wget https://github.com/opencv/ade/archive/$SRC; mv $SRC $(md5sum $SRC | cut -d' ' -f1)-$SRC
Source4: dbb095a8bf3008e91edbbf45d8d34885-v0.1.2d.zip
Source5: xorg.conf
%global wechat_commit 3487ef7cde71d93c6a01bb0b84aa0f22c6128f6b
%global wechat_shortcommit %(c=%{wechat_commit}; echo ${c:0:7})
%global wechat_gitdate 20230712
Source6: https://github.com/WeChatCV/opencv_3rdparty/archive/%{wechat_commit}/wechat-%{wechat_gitdate}.git%{wechat_shortcommit}.tar.gz
Patch0: opencv-4.1.0-install_3rdparty_licenses.patch
Patch3: opencv.python.patch
@ -121,10 +135,14 @@ BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libGL-devel
BuildRequires: libv4l-devel
%{?with_openexr:
BuildRequires: OpenEXR-devel
}
%{?with_openni:
BuildRequires: openni-devel
%if 0%{?fedora}
BuildRequires: openni-primesense
%endif
}
%{?with_tbb:
BuildRequires: tbb-devel
@ -133,12 +151,19 @@ BuildRequires: zlib-devel
BuildRequires: pkgconfig
BuildRequires: python3-devel
BuildRequires: python3-numpy
BuildRequires: python3-setuptools
%{?with_linters:
BuildRequires: pylint
BuildRequires: python3-flake8
}
BuildRequires: swig >= 1.3.24
%{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9}
%{?with_ffmpeg:
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libswscale)
BuildRequires: pkgconfig(libavdevice)
}
%if 0%{?fedora} || 0%{?rhel} > 7
%{?with_gstreamer:BuildRequires: gstreamer1-devel gstreamer1-plugins-base-devel}
%else
@ -164,7 +189,7 @@ BuildRequires: hdf5-devel
BuildRequires: openjpeg2-devel
BuildRequires: freetype-devel
BuildRequires: harfbuzz-devel
# Module opencv_ovis disabled because of incompatible OGRE3D version < 1.10
# Module opencv_ovis disabled because of incompatible OGRE3D version < 1.11.5
# BuildRequires: ogre-devel
%{?with_vtk:BuildRequires: vtk-devel}
%{?with_vtk:
@ -187,7 +212,7 @@ BuildRequires: blas-devel
BuildRequires: lapack-devel
}
%{?with_gdcm:BuildRequires: gdcm-devel}
%{?with_libmfx:BuildRequires: libmfx-devel}
%{?with_libmfx:BuildRequires: oneVPL-devel}
%{?with_clp:BuildRequires: coin-or-Clp-devel}
%{?with_va:BuildRequires: libva-devel}
%{?with_java:
@ -195,12 +220,14 @@ BuildRequires: ant
BuildRequires: java-devel
}
%{?with_vulkan:BuildRequires: vulkan-headers}
#BuildRequires: flatbuffers-devel
%if %{with tests}
BuildRequires: xorg-x11-drv-dummy
BuildRequires: mesa-dri-drivers
%endif
Requires: opencv-core%{_isa} = %{version}-%{release}
Requires: opencv-data = %{version}-%{release}
%description
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of
@ -211,16 +238,119 @@ and Computer Vision algorithms.
%package core
Summary: OpenCV core libraries
Provides: bundled(quirc) = 1.0
Obsoletes: python2-%{name} < %{version}-%{release}
Obsoletes: python2-%{name} < %{version}
# any removed modules should be listed here
Obsoletes: %{name}-core < 4.8.0-2
Obsoletes: %{name}-contrib < 4.8.0-2
%description core
This package contains the OpenCV C/C++ core libraries.
%package data
Summary: OpenCV data
BuildArch: noarch
%description data
This package contains OpenCV data.
%global opencv_devel_requires %{name}-core%{_isa} = %{version}-%{release}
%define opencv_module_subpkg(m:d:) \
%global opencv_devel_requires %{opencv_devel_requires} %{name}-%{-m*}%{_isa} = %{version}-%{release}\
%define modulename %{-m:%{-m*}}%{!-m:%{error:Module name not defined}}\
%define moduledesc %{-d:%{-d*}}%{!-d:%{-m*}}\
%package %{modulename}\
Summary: OpenCV module: %{moduledesc}\
Requires: %{name}-core%{_isa} = %{version}-%{release}\
\
%description %{modulename}\
This package contains the OpenCV %{moduledesc} module runtime.\
\
%files %{modulename}\
%{_libdir}/libopencv_%{modulename}.so.{%{abiver},%{version}}
# main modules
%opencv_module_subpkg -m calib3d -d %{quote:Camera Calibration and 3D Reconstruction}
%opencv_module_subpkg -m dnn -d %{quote:Deep Neural Network}
%opencv_module_subpkg -m features2d -d %{quote:2D Feature Detection}
%opencv_module_subpkg -m flann -d %{quote:Clustering and Search in Multi-dimensional Space}
%opencv_module_subpkg -m gapi -d %{quote:Graph API}
%opencv_module_subpkg -m highgui -d %{quote:High-level GUI}
%opencv_module_subpkg -m imgcodecs -d %{quote:Image Encoding/Decoding}
%opencv_module_subpkg -m imgproc -d %{quote:Image Processing}
%opencv_module_subpkg -m ml -d %{quote:Machine Learning}
%opencv_module_subpkg -m objdetect -d %{quote:Object Detection}
%opencv_module_subpkg -m photo -d %{quote:Computational Photography}
%opencv_module_subpkg -m stitching -d %{quote:Images stitching}
%opencv_module_subpkg -m video -d %{quote:Video Analysis}
%opencv_module_subpkg -m videoio -d %{quote:Video I/O}
# contrib/extra modules
%opencv_module_subpkg -m alphamat -d %{quote:Alpha Matting}
%opencv_module_subpkg -m aruco -d %{quote:Aruco Markers}
%opencv_module_subpkg -m bgsegm -d %{quote:Background Segmentation}
%opencv_module_subpkg -m bioinspired -d %{quote:Biologically-inspired Vision Models}
%opencv_module_subpkg -m ccalib -d %{quote:Custom Calibration Pattern}
%if %{with cuda}
%opencv_module_subpkg -m cudaarithm -d %{quote:CUDA Matrix Arithmatic}
%opencv_module_subpkg -m cudabgsegm -d %{quote:CUDA Background Segmentation}
%opencv_module_subpkg -m cudacodec -d %{quote:CUDA Video Encoding/Decoding}
%opencv_module_subpkg -m cudafeatures2d -d %{quote:CUDA 2D Feature Detection}
%opencv_module_subpkg -m cudafilters -d %{quote:CUDA Image Filtering}
%opencv_module_subpkg -m cudaimgproc -d %{quote:CUDA Image Processing}
%opencv_module_subpkg -m cudalegacy -d %{quote:CUDA Legacy Support}
%opencv_module_subpkg -m cudaobjdetect -d %{quote:CUDA Object Detection}
%opencv_module_subpkg -m cudaoptflow -d %{quote:CUDA Optical Flow}
%opencv_module_subpkg -m cudastereo -d %{quote:CUDA Stereo Correspondance}
%opencv_module_subpkg -m cudawarping -d %{quote:CUDA Image Warping}
%opencv_module_subpkg -m cudev -d %{quote:CUDA Device Layer}
%endif
%opencv_module_subpkg -m cvv -d %{quote:Interactive Computer Vision Visual Debugging}
%opencv_module_subpkg -m datasets -d %{quote:Datasets Framework}
%opencv_module_subpkg -m dnn_objdetect -d %{quote:Deep Neural Network Object Detection}
%opencv_module_subpkg -m dnn_superres -d %{quote:Deep Neural Network Super Resolution}
%opencv_module_subpkg -m dpm -d %{quote:Deformable Part-based Models}
%opencv_module_subpkg -m face -d %{quote:Face Analysis}
%opencv_module_subpkg -m freetype -d %{quote:Freetype/Harfbuzz UTF-8 Strings}
%opencv_module_subpkg -m fuzzy -d %{quote:Fuzzy Math-based Image Processing}
%opencv_module_subpkg -m hdf -d %{quote:HDF Data Format I/O}
%opencv_module_subpkg -m hfs -d %{quote:Heirarchical Feature Selection}
%opencv_module_subpkg -m img_hash -d %{quote:Image Hashing}
%opencv_module_subpkg -m intensity_transform -d %{quote:Intensity Transformation}
%opencv_module_subpkg -m line_descriptor -d %{quote:Extracted Line Binary Descriptor}
%opencv_module_subpkg -m mcc -d %{quote:Macbeth Chart}
%opencv_module_subpkg -m optflow -d %{quote:Optical Flow Algorithms}
#opencv_module_subpkg -m ovis -d %%{quote:OGRE 3D Visualiser}
%opencv_module_subpkg -m phase_unwrapping -d %{quote:Phase Unwrapping}
%opencv_module_subpkg -m plot -d %{quote:2D Plotting}
%opencv_module_subpkg -m quality -d %{quote:Image Quality Analysis}
%opencv_module_subpkg -m rapid -d %{quote:Silhouette based 3D Object Tracking}
%opencv_module_subpkg -m reg -d %{quote:Image Registration}
%opencv_module_subpkg -m rgbd -d %{quote:RGB-Depth Processing}
%opencv_module_subpkg -m saliency -d %{quote:Saliency}
%opencv_module_subpkg -m shape -d %{quote:Shape Distance and Matching}
%opencv_module_subpkg -m stereo -d %{quote:Stereo Correspondance}
%opencv_module_subpkg -m structured_light -d %{quote:Structed Light}
%opencv_module_subpkg -m superres -d %{quote:Super Resolution}
%opencv_module_subpkg -m surface_matching -d %{quote:Surface Matching}
%opencv_module_subpkg -m text -d %{quote:Text Detection and Recognition}
%opencv_module_subpkg -m tracking -d %{quote:Tracking}
%opencv_module_subpkg -m videostab -d %{quote:Video Stabilization}
%if %{with vtk}
%opencv_module_subpkg -m viz -d %{quote:3D Visualizer}
%endif
%opencv_module_subpkg -m wechat_qrcode -d %{quote:WeChat QR code detector}
%opencv_module_subpkg -m ximgproc -d %{quote:Extended Image Processing}
%opencv_module_subpkg -m xobjdetect -d %{quote:Extended Object Detection}
%opencv_module_subpkg -m xphoto -d %{quote:Extended Photo Processing}
%package devel
Summary: Development files for using the OpenCV library
Requires: %{name}%{_isa} = %{version}-%{release}
Requires: %{name}-contrib%{_isa} = %{version}-%{release}
Requires: %{name}-data = %{version}-%{release}
Requires: %{opencv_devel_requires}
%description devel
This package contains the OpenCV C/C++ library and header files, as well as
@ -261,32 +391,21 @@ Requires: %{name}-core%{_isa} = %{version}-%{release}
This package contains Java bindings for the OpenCV library.
%package contrib
Summary: OpenCV contributed functionality
%description contrib
This package is intended for development of so-called "extra" modules, contributed
functionality. New modules quite often do not have stable API, and they are not
well-tested. Thus, they shouldn't be released as a part of official OpenCV
distribution, since the library maintains binary compatibility, and tries
to provide decent performance and stability.
%prep
# autosetup doesn't work with 2 sources
# https://github.com/rpm-software-management/rpm/issues/1204
%setup -q -a1 %{?with_extras:-a2}
%if 1
%setup -q -a1 %{?with_extras_tests:-a2} -a6
# we don't use pre-built contribs except quirc
pushd 3rdparty
shopt -s extglob
#rm -r !(openexr|openvx|quirc)
rm -r !(openvx|quirc)
rm -r !(openvx|quirc|flatbuffers)
shopt -u extglob
popd &>/dev/null
%endif
%patch0 -p1 -b .install_3rdparty_licenses
%patch3 -p1 -b .python_install_binary
%patch -P 0 -p1 -b .install_3rdparty_licenses
%patch -P 3 -p1 -b .python_install_binary
pushd %{name}_contrib-%{version}
#patch1 -p1 -b .install_cvv
@ -294,15 +413,20 @@ popd
# Install face_landmark_model
mkdir -p .cache/data
install -pm 0644 %{SOURCE3} .cache/data
install -pm 0644 %{S:3} .cache/data
pushd .cache/data
xz -d face_landmark_model.dat.xz
mv face_landmark_model.dat 7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat
popd
mkdir -p .cache/wechat_qrcode
mv opencv_3rdparty-%{wechat_commit}/detect.caffemodel .cache/wechat_qrcode/238e2b2d6f3c18d6c3a30de0c31e23cf-detect.caffemodel
mv opencv_3rdparty-%{wechat_commit}/detect.prototxt .cache/wechat_qrcode/6fb4976b32695f9f5c6305c19f12537d-detect.prototxt
mv opencv_3rdparty-%{wechat_commit}/sr.caffemodel .cache/wechat_qrcode/cbfcd60361a73beb8c583eea7e8e6664-sr.caffemodel
mv opencv_3rdparty-%{wechat_commit}/sr.prototxt .cache/wechat_qrcode/69db99927a70df953b471daaba03fbef-sr.prototxt
# Install ADE, needed for opencv_gapi
mkdir -p .cache/ade
install -pm 0644 %{SOURCE4} .cache/ade/
install -pm 0644 %{S:4} .cache/ade/
%build
# enabled by default if libraries are presents at build time:
@ -310,7 +434,16 @@ install -pm 0644 %{SOURCE4} .cache/ade/
# non available on Fedora: FFMPEG, XINE
# disabling IPP because it is closed source library from intel
# Workaround for "virtual memory exhausted: Cannot allocate memory"
%ifarch %{ix86}
export CFLAGS='%{build_cflags} -g1'
export CXXFLAGS='%{build_cxxflags} -g1'
%endif
%cmake \
%if 0%{?fedora} > 38
-DCMAKE_CXX_STANDARD=17 \
%endif
-DCV_TRACE=OFF \
-DWITH_IPP=OFF \
-DWITH_ITT=OFF \
@ -321,13 +454,14 @@ install -pm 0644 %{SOURCE4} .cache/ade/
%endif
-DOpenGL_GL_PREFERENCE=GLVND \
-DWITH_GDAL=ON \
-DWITH_OPENEXR=ON \
%{?with_openexr: -DWITH_OPENEXR=ON} \
%{!?with_openexr: -DWITH_OPENEXR=OFF} \
-DCMAKE_SKIP_RPATH=ON \
-DWITH_CAROTENE=OFF \
%ifarch x86_64 %{ix86}
-DCPU_BASELINE=SSE2 \
%endif
-DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \
-DCMAKE_BUILD_TYPE=Release \
%{?with_java: -DBUILD_opencv_java=ON \
-DOPENCV_JAR_INSTALL_PATH=%{_jnidir} } \
%{!?with_java: -DBUILD_opencv_java=OFF } \
@ -358,16 +492,16 @@ install -pm 0644 %{SOURCE4} .cache/ade/
} \
-DBUILD_PROTOBUF=OFF \
-DPROTOBUF_UPDATE_FILES=ON \
%{?with_opencl: -DOPENCL_INCLUDE_DIR=%{_includedir}/CL } \
%{?with_opencl: -DOPENCL_INCLUDE_DIR=%{_includedir}/CL -DOPENCV_DNN_OPENCL=ON} \
%{!?with_opencl: -DWITH_OPENCL=OFF } \
-DOPENCV_EXTRA_MODULES_PATH=opencv_contrib-%{version}/modules \
-DWITH_LIBV4L=ON \
-DWITH_OPENMP=ON \
-DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \
-DOPENCV_GENERATE_PKGCONFIG=ON \
%{?with_extras: -DOPENCV_TEST_DATA_PATH=opencv_extra-%{version}/testdata} \
%{?with_extras_tests: -DOPENCV_TEST_DATA_PATH=opencv_extra-%{version}/testdata} \
%{?with_gdcm: -DWITH_GDCM=ON } \
%{?with_libmfx: -DWITH_MFX=ON } \
%{?with_libmfx: -DWITH_MFX=ON -DWITH_GAPI_ONEVPL=ON} \
%{?with_clp: -DWITH_CLP=ON } \
%{?with_va: -DWITH_VA=ON } \
%{!?with_vtk: -DWITH_VTK=OFF} \
@ -375,9 +509,10 @@ install -pm 0644 %{SOURCE4} .cache/ade/
%cmake_build
%install
%cmake_install
cd %{__cmake_builddir}/python_loader/
%py3_install -- --install-lib %{python3_sitearch}
rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/
%if %{with java}
@ -386,7 +521,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
%endif
# For compatibility with existing opencv.pc application
%{!?without_compat_openvc_pc:
%{?with_compat_openvc_pc:
ln -s opencv4.pc %{buildroot}%{_libdir}/pkgconfig/opencv.pc
}
@ -394,7 +529,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
%check
#ifnarch ppc64
%if %{with tests}
cp %SOURCE5 %{__cmake_builddir}
cp %{S:5} %{__cmake_builddir}
if [ -x /usr/libexec/Xorg ]; then
Xorg=/usr/libexec/Xorg
else
@ -408,15 +543,12 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
#endif
%ldconfig_scriptlets core
%ldconfig_scriptlets contrib
%ldconfig_scriptlets java
%files
%doc README.md
%{_bindir}/opencv_*
%files data
%license LICENSE
%dir %{_datadir}/opencv4
%{_datadir}/opencv4/haarcascades
%{_datadir}/opencv4/lbpcascades
@ -426,27 +558,13 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
%files core
%license LICENSE
%{_datadir}/licenses/opencv4/
%{_libdir}/libopencv_calib3d.so.{%{abiver},%{version}}
%{_libdir}/libopencv_core.so.{%{abiver},%{version}}
%{_libdir}/libopencv_dnn.so.{%{abiver},%{version}}
%{_libdir}/libopencv_features2d.so.{%{abiver},%{version}}
%{_libdir}/libopencv_flann.so.{%{abiver},%{version}}
%{_libdir}/libopencv_gapi.so.{%{abiver},%{version}}
%{_libdir}/libopencv_highgui.so.{%{abiver},%{version}}
%{_libdir}/libopencv_imgcodecs.so.{%{abiver},%{version}}
%{_libdir}/libopencv_imgproc.so.{%{abiver},%{version}}
%{_libdir}/libopencv_ml.so.{%{abiver},%{version}}
%{_libdir}/libopencv_objdetect.so.{%{abiver},%{version}}
%{_libdir}/libopencv_photo.so.{%{abiver},%{version}}
%{_libdir}/libopencv_stitching.so.{%{abiver},%{version}}
%{_libdir}/libopencv_video.so.{%{abiver},%{version}}
%{_libdir}/libopencv_videoio.so.{%{abiver},%{version}}
%files devel
%dir %{_includedir}/opencv4
%{_includedir}/opencv4/opencv2
%{_libdir}/lib*.so
%{!?without_compat_openvc_pc:
%{?with_compat_openvc_pc:
%{_libdir}/pkgconfig/opencv.pc
}
%{_libdir}/pkgconfig/opencv4.pc
@ -457,6 +575,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
%files -n python3-opencv
%{python3_sitearch}/cv2
%{python3_sitearch}/opencv-*.egg-info
%if %{with java}
%files java
@ -466,56 +585,102 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
%{_jnidir}/opencv.jar
%endif
%files contrib
%{_libdir}/libopencv_alphamat.so.{%{abiver},%{version}}
%{_libdir}/libopencv_aruco.so.{%{abiver},%{version}}
%{_libdir}/libopencv_bgsegm.so.{%{abiver},%{version}}
%{_libdir}/libopencv_barcode.so.{%{abiver},%{version}}
%{_libdir}/libopencv_bioinspired.so.{%{abiver},%{version}}
%{_libdir}/libopencv_ccalib.so.{%{abiver},%{version}}
%{?with_cuda:
%{_libdir}/libopencv_cuda*.so.{%{abiver},%{version}}
%{_libdir}/libopencv_cudev.so.{%{abiver},%{version}}
}
%{_libdir}/libopencv_cvv.so.{%{abiver},%{version}}
%{_libdir}/libopencv_datasets.so.{%{abiver},%{version}}
%{_libdir}/libopencv_dnn_objdetect.so.{%{abiver},%{version}}
%{_libdir}/libopencv_dnn_superres.so.{%{abiver},%{version}}
%{_libdir}/libopencv_dpm.so.{%{abiver},%{version}}
%{_libdir}/libopencv_face.so.{%{abiver},%{version}}
%{_libdir}/libopencv_freetype.so.{%{abiver},%{version}}
%{_libdir}/libopencv_fuzzy.so.{%{abiver},%{version}}
%{_libdir}/libopencv_hdf.so.{%{abiver},%{version}}
%{_libdir}/libopencv_hfs.so.{%{abiver},%{version}}
%{_libdir}/libopencv_img_hash.so.{%{abiver},%{version}}
%{_libdir}/libopencv_intensity_transform.so.{%{abiver},%{version}}
%{_libdir}/libopencv_line_descriptor.so.{%{abiver},%{version}}
%{_libdir}/libopencv_mcc.so.{%{abiver},%{version}}
%{_libdir}/libopencv_optflow.so.{%{abiver},%{version}}
%{_libdir}/libopencv_phase_unwrapping.so.{%{abiver},%{version}}
%{_libdir}/libopencv_plot.so.{%{abiver},%{version}}
%{_libdir}/libopencv_quality.so.{%{abiver},%{version}}
%{_libdir}/libopencv_rapid.so.{%{abiver},%{version}}
%{_libdir}/libopencv_reg.so.{%{abiver},%{version}}
%{_libdir}/libopencv_rgbd.so.{%{abiver},%{version}}
%{_libdir}/libopencv_saliency.so.{%{abiver},%{version}}
%{_libdir}/libopencv_shape.so.{%{abiver},%{version}}
%{_libdir}/libopencv_stereo.so.{%{abiver},%{version}}
%{_libdir}/libopencv_structured_light.so.{%{abiver},%{version}}
%{_libdir}/libopencv_superres.so.{%{abiver},%{version}}
%{_libdir}/libopencv_surface_matching.so.{%{abiver},%{version}}
%{_libdir}/libopencv_text.so.{%{abiver},%{version}}
%{_libdir}/libopencv_tracking.so.{%{abiver},%{version}}
%{_libdir}/libopencv_videostab.so.{%{abiver},%{version}}
%if %{with vtk}
%{_libdir}/libopencv_viz.so.{%{abiver},%{version}}
%endif
%{_libdir}/libopencv_wechat_qrcode.so.{%{abiver},%{version}}
%{_libdir}/libopencv_ximgproc.so.{%{abiver},%{version}}
%{_libdir}/libopencv_xobjdetect.so.{%{abiver},%{version}}
%{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}}
%changelog
* Thu Mar 07 2024 David Abdurachmanov <davidlt@rivosinc.com> - 4.9.0-3.0.riscv64
- Disable VTK on riscv64 for now
* Fri Feb 23 2024 Jerry James <loganjerry@gmail.com> - 4.9.0-3
- Rebuild (coin-or-Clp)
- Use uppercase connectives in SPDX expression
- Reduce debuginfo level on i386 to avoid memory exhaustion
* Mon Feb 05 2024 Sérgio Basto <sergio@serjux.com> - 4.9.0-2
- Revert drop compat symlink to opencv.pc
* Sun Jan 28 2024 Sérgio Basto <sergio@serjux.com> - 4.9.0-1
- Update opencv to 4.9.0 (#2256160)
- Enable ffmpeg and xine (now they are available on Fedora)
- Really drop compat symlink for includes - rhbz#1830266
Note: conditional builds with underscrore don't have _without option
https://github.com/rpm-software-management/rpm/issues/1929
* Sun Jan 28 2024 Sandro Mani <manisandro@gmail.com> - 4.8.1-8
- Rebuild (tesseract)
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jan 17 2024 Jonathan Wakely <jwakely@redhat.com> - 4.8.1-5
- Rebuilt for TBB 2021.11
* Thu Jan 11 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 4.8.1-4
- Backport support for protobuf v22 and later from opencv 4.9.0
* Thu Nov 16 2023 Sandro Mani <manisandro@gmail.com> - 4.8.1-3
- Rebuild (gdal)
* Sat Oct 07 2023 Sandro Mani <manisandro@gmail.com> - 4.8.1-2
- Rebuild (tesseract)
* Fri Sep 29 2023 Sérgio Basto <sergio@serjux.com> - 4.8.1-1
- Update opencv to 4.8.1
* Thu Sep 14 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 4.8.0-2
- Separate per-module subpackages (#1878320)
* Mon Aug 07 2023 Sérgio Basto <sergio@serjux.com> - 4.8.0-1
- Update opencv to 4.8.0
- Use bundle flatbuffers, tried build with flatbuffers from system but doesn't build
- Use oneVPL instead libmfx
- Add WeChat QRCode
- https://src.fedoraproject.org/rpms/opencv/pull-request/23 , upgrade C++ standard to C++17 for protobuf v4 (23.x etc.)
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.7.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jul 19 2023 Josef Ridky <jridky@redhat.com> - 4.7.0-14
- Migrate to SPDX license format
* Fri Jul 14 2023 Sandro Mani <manisandro@gmail.com> - 4.7.0-13
- Rebuild (tesseract)
* Fri Jul 07 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 4.7.0-12
- Drop openni support on i686 as it is no longer available
* Mon Jul 03 2023 Python Maint <python-maint@redhat.com> - 4.7.0-11
- Rebuilt for Python 3.12
* Mon Jun 12 2023 Nicolas Chauvet <kwizart@gmail.com> - 4.7.0-10
- Rebuilt for libdc1394
* Mon Jun 12 2023 Nicolas Chauvet <kwizart@gmail.com> - 4.7.0-9
- Upstream commit to fix rhbz#2190013
* Sat May 13 2023 Sérgio Basto <sergio@serjux.com> - 4.7.0-8
- The %%ldconfig_scriptlets macro can be removed on all Fedoras. Possibly also on
EPEL 8. But it is required on EPEL 7.
- Install egg-info in python3_sitearch to stay in same location as the rest of python
* Sat May 13 2023 Sérgio Basto <sergio@serjux.com> - 4.7.0-7
- Install python egg-info
- Fix patch warning
- Obsolete python2 < %{version} (if someone want use an external python2 version}
* Thu May 11 2023 Sandro Mani <manisandro@gmail.com> - 4.7.0-6
- Rebuild (gdal)
- Disable tests, even only tests, fail to build and generate build.log with millions of logs lines saying:
*** stack smashing detected ***: terminated
cat build.log | grep smashing | wc -l
118308609
- Disable extra tests on builds
* Thu Apr 13 2023 Sérgio Basto <sergio@serjux.com> - 4.7.0-5
- if without tests also disable 500MB of extra tests
* Mon Apr 03 2023 Sandro Mani <manisandro@gmail.com> - 4.7.0-4
- Rebuild (tesseract)

View File

@ -1,5 +1,5 @@
SHA512 (opencv-clean-4.7.0.tar.gz) = 75d33e006f5a00d6eda67076b368bbf7afa7cc2c31b843040f2df54246a978f055c12902ce7a8095cf0ce493a9ebedcbfb12b1e772ed688ef49bc8cb4ce9e57e
SHA512 (opencv_contrib-clean-4.7.0.tar.gz) = 5eb985d258afa17e50426e19a0172b14036082e7e3b93e05de43734af470edf45db3fabb0eb7a440aa95e9c87f9e94ef4bec19f629f2048ff08a75a01e787608
SHA512 (opencv_extra-clean-4.7.0.tar.gz) = a2ac18661b7709269b5efc6405080c2df4195b6a0d9e6fa011789f7217fbde90b4c832bafa243e2c6cccfd8fa06fe976e33b7f3f56fd40ab40cbf360c18dbbe1
SHA512 (opencv-clean-4.9.0.tar.gz) = 534d9c8bf9759008fd409f6c2c298d33aaf56a080229dccfaec98a789e4c309fc7872d85289f5c0a685f044f6c477f7c890a6788c35bc2f0aa795ec4f33b0ef6
SHA512 (opencv_contrib-clean-4.9.0.tar.gz) = 595cb9bb5f1a57be883d7ccf448221bfad2c055a930a12f9658489d4a850be5b3f9e3ecd3949f45a183ccc4b8a62620af5d148039b4139c07d408fc3c789f076
SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307
SHA512 (fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip) = ce5af0bd5d7fb04022f92fed130898959aecb954cc09da2fc923c76b37ee92d2233888592a4c6bca8006ac4d3fda9c6da80f316c924a407a7a5961d9832a681c
SHA512 (dbb095a8bf3008e91edbbf45d8d34885-v0.1.2d.zip) = f6f87be8932c0c0ca40bec20b750ab3df27dac44f4507211c29c60f42160e3f2f2133b52c18245eff5241f216a3f5526d299937470b69b125e8eca369c8f6939
SHA512 (wechat-20230712.git3487ef7.tar.gz) = bc4f220465de41df8af0cb35312c1db155976d05f13a60e43c1798b161d8f56388e34a59108fb3e27e8c97b53acfd198256d9ae420b5f70a32ddc1ea65c3c8a6