Compare commits

..

No commits in common. "rawhide" and "f43" have entirely different histories.

4 changed files with 50 additions and 190 deletions

View file

@ -1,57 +0,0 @@
From 353b4ddf52db48ba85d2efaa33310afa0eb73a72 Mon Sep 17 00:00:00 2001
From: Kumataro <Kumataro@users.noreply.github.com>
Date: Sun, 13 Jul 2025 08:11:06 +0900
Subject: [PATCH 1/2] eigen: fix to get version from eigen master branch
---
cmake/OpenCVFindLibsPerf.cmake | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
index dfc94597bbba..55a08f72d00d 100644
--- a/cmake/OpenCVFindLibsPerf.cmake
+++ b/cmake/OpenCVFindLibsPerf.cmake
@@ -84,6 +84,12 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN)
set(EIGEN_WORLD_VERSION ${EIGEN3_WORLD_VERSION})
set(EIGEN_MAJOR_VERSION ${EIGEN3_MAJOR_VERSION})
set(EIGEN_MINOR_VERSION ${EIGEN3_MINOR_VERSION})
+ elseif(DEFINED Eigen3_VERSION_MAJOR)
+ # see https://github.com/opencv/opencv/issues/27530
+ # Case sensitive is needed to support Eigen on Master branch at 13 July,2025.
+ set(EIGEN_WORLD_VERSION ${Eigen3_VERSION_MAJOR})
+ set(EIGEN_MAJOR_VERSION ${Eigen3_VERSION_MINOR})
+ set(EIGEN_MINOR_VERSION ${Eigen3_VERSION_PATCH})
else() # Eigen config file
set(EIGEN_WORLD_VERSION ${EIGEN3_VERSION_MAJOR})
set(EIGEN_MAJOR_VERSION ${EIGEN3_VERSION_MINOR})
From 94e909d4a6811bbd4774baae8722df79d057a2bc Mon Sep 17 00:00:00 2001
From: Kumataro <Kumataro@users.noreply.github.com>
Date: Mon, 14 Jul 2025 21:25:52 +0900
Subject: [PATCH 2/2] add pointer to Eigen commit
---
cmake/OpenCVFindLibsPerf.cmake | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
index 55a08f72d00d..861a39c47f9b 100644
--- a/cmake/OpenCVFindLibsPerf.cmake
+++ b/cmake/OpenCVFindLibsPerf.cmake
@@ -84,13 +84,13 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN)
set(EIGEN_WORLD_VERSION ${EIGEN3_WORLD_VERSION})
set(EIGEN_MAJOR_VERSION ${EIGEN3_MAJOR_VERSION})
set(EIGEN_MINOR_VERSION ${EIGEN3_MINOR_VERSION})
- elseif(DEFINED Eigen3_VERSION_MAJOR)
+ elseif(DEFINED Eigen3_VERSION_MAJOR) # Recommended package config variables
# see https://github.com/opencv/opencv/issues/27530
- # Case sensitive is needed to support Eigen on Master branch at 13 July,2025.
set(EIGEN_WORLD_VERSION ${Eigen3_VERSION_MAJOR})
set(EIGEN_MAJOR_VERSION ${Eigen3_VERSION_MINOR})
set(EIGEN_MINOR_VERSION ${Eigen3_VERSION_PATCH})
- else() # Eigen config file
+ else() # Deprecated package config variables
+ # Removed on master at https://gitlab.com/libeigen/eigen/-/commit/f2984cd0778dd0a1d7e74216d826eaff2bc6bfab
set(EIGEN_WORLD_VERSION ${EIGEN3_VERSION_MAJOR})
set(EIGEN_MAJOR_VERSION ${EIGEN3_VERSION_MINOR})
set(EIGEN_MINOR_VERSION ${EIGEN3_VERSION_PATCH})

View file

@ -1,43 +0,0 @@
From 90c444abd387ffa70b2e72a34922903a2f0f4f5a Mon Sep 17 00:00:00 2001
From: Alexander Smorkalov <alexander.smorkalov@opencv.ai>
Date: Wed, 20 Aug 2025 10:53:51 +0300
Subject: [PATCH] FFmpeg 8.0 support.
---
modules/videoio/src/cap_ffmpeg_impl.hpp | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp
index 489dbe565d3d..5780b4c11361 100644
--- a/modules/videoio/src/cap_ffmpeg_impl.hpp
+++ b/modules/videoio/src/cap_ffmpeg_impl.hpp
@@ -685,7 +685,10 @@ void CvCapture_FFMPEG::close()
if( video_st )
{
#ifdef CV_FFMPEG_CODECPAR
+// avcodec_close removed in FFmpeg release 8.0
+# if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(62, 11, 100))
avcodec_close( context );
+# endif
#endif
video_st = NULL;
}
@@ -2005,7 +2008,18 @@ void CvCapture_FFMPEG::get_rotation_angle()
rotation_angle = 0;
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(57, 68, 100)
const uint8_t *data = 0;
+ // av_stream_get_side_data removed in FFmpeg release 8.0
+# if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(62, 11, 100))
data = av_stream_get_side_data(video_st, AV_PKT_DATA_DISPLAYMATRIX, NULL);
+# else
+ AVPacketSideData* sd = video_st->codecpar->coded_side_data;
+ int nb_sd = video_st->codecpar->nb_coded_side_data;
+ if (sd && nb_sd > 0)
+ {
+ const AVPacketSideData* mtx = av_packet_side_data_get(sd, nb_sd, AV_PKT_DATA_DISPLAYMATRIX);
+ data = mtx->data;
+ }
+# endif
if (data)
{
rotation_angle = -cvRound(av_display_rotation_get((const int32_t*)data));

View file

@ -9,6 +9,7 @@
%bcond_with linters
%bcond_without ffmpeg
%bcond_without gstreamer
%bcond_with eigen2
%bcond_without eigen3
%bcond_without opencl
%ifarch x86_64 %{arm}
@ -22,10 +23,9 @@
%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
# Now FlexiBLAS should be used instead: https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager
# check OpenCVFindLAPACK.cmake
%bcond_with atlas
%bcond_with openblas
%bcond_without flexiblas
%bcond_without openblas
%bcond_without gdcm
%if 0%{?rhel} >= 8
%bcond_with vtk
@ -69,13 +69,13 @@
%endif
Name: opencv
Version: 4.12.0
Version: 4.11.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: 20%{?dist}
Release: 11%{?dist}
Summary: Collection of algorithms for computer vision
# This is normal three clause BSD.
License: BSD-3-Clause AND Apache-2.0 AND ISC
@ -102,13 +102,25 @@ Source6: https://github.com/WeChatCV/opencv_3rdparty/archive/%{wechat_com
Patch0: opencv-4.1.0-install_3rdparty_licenses.patch
Patch3: opencv.python.patch
Patch4: https://github.com/opencv/opencv/pull/26750.patch
Patch5: https://github.com/opencv/opencv/pull/26786.patch
# backport all PNG patches from 4.11.0 to 45aa502549 - fixes issues
# including complete failure to read PNGs on s390x (big-endian)
# https://bugzilla.redhat.com/show_bug.cgi?id=2345306
# https://github.com/opencv/opencv/issues/26913
Patch6: 0001-Merge-pull-request-26739-from-vrabaud-png_leak.patch
Patch7: 0002-Fix-remaining-bugs-in-PNG-reader.patch
Patch8: 0003-Merge-pull-request-26782-from-vrabaud-png_leak.patch
Patch9: 0004-Move-the-checks-to-read_chunk.patch
Patch10: 0005-minor-improvement-for-better-code-readibility.patch
Patch11: 0006-Merge-pull-request-26835-from-sturkmen72-patch-4.patch
Patch12: 0007-fix-for-large-tEXt-chunk.patch
Patch13: 0008-Merge-pull-request-26854-from-vrabaud-png_leak.patch
Patch14: 0009-Merge-pull-request-26872-from-sturkmen72-ImageEncode.patch
Patch15: 0010-Merge-pull-request-26915-from-mshabunin-fix-png-be.patch
# Fix build with Qt 6.9, by Atri Bhattacharya (thanks)
# https://github.com/opencv/opencv/issues/27223#issuecomment-2797750952
Patch16: qt69.patch
# Fix build with FFmpeg 8
Patch17: https://github.com/opencv/opencv/pull/27691.patch
# Fix detect Eigen3 > 3
Patch18: https://github.com/opencv/opencv/pull/27536.patch
BuildRequires: gcc-c++
@ -121,6 +133,7 @@ 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}
BuildRequires: libtheora-devel
BuildRequires: libvorbis-devel
@ -142,7 +155,7 @@ BuildRequires: OpenEXR-devel
}
%{?with_openni:
BuildRequires: openni-devel
%if 0%{?fedora} && 0%{?fedora} < 44
%if 0%{?fedora}
BuildRequires: openni-primesense
%endif
}
@ -153,6 +166,7 @@ BuildRequires: zlib-devel
BuildRequires: pkgconfig
BuildRequires: python3-devel
BuildRequires: python3-numpy
BuildRequires: python3-setuptools
%{?with_linters:
BuildRequires: pylint
BuildRequires: python3-flake8
@ -199,6 +213,7 @@ BuildRequires: harfbuzz-devel
BuildRequires: vtk-java
}
}
%{?with_atlas:BuildRequires: atlas-devel}
#ceres-solver-devel push eigen3-devel and tbb-devel
%{?with_tbb:
%{?with_eigen3:
@ -207,9 +222,11 @@ BuildRequires: vtk-java
# BuildRequires: ceres-solver-devel
}
}
%{?with_atlas:BuildRequires: atlas-devel}
%{?with_openblas:BuildRequires: openblas-devel}
%{?with_flexiblas:BuildRequires: flexiblas-devel}
%{?with_openblas:
BuildRequires: openblas-devel
BuildRequires: blas-devel
BuildRequires: lapack-devel
}
%{?with_gdcm:BuildRequires: gdcm-devel}
%{?with_libmfx:BuildRequires: libvpl-devel}
%{?with_clp:BuildRequires: coin-or-Clp-devel}
@ -219,10 +236,7 @@ BuildRequires: ant
BuildRequires: java-devel
}
%{?with_vulkan:BuildRequires: vulkan-headers}
%ifnarch i686
BuildRequires: flatbuffers-devel
BuildRequires: flatbuffers-compiler
%endif
#BuildRequires: flatbuffers-devel
%if %{with tests}
BuildRequires: xorg-x11-drv-dummy
BuildRequires: mesa-dri-drivers
@ -289,9 +303,7 @@ This package contains the OpenCV %{moduledesc} module runtime.\
%opencv_module_subpkg -m video -d %{quote:Video Analysis}
%opencv_module_subpkg -m videoio -d %{quote:Video I/O}
# contrib/extra modules
%if %{with eigen3}
%opencv_module_subpkg -m alphamat -d %{quote:Alpha Matting}
%endif
%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}
@ -411,9 +423,19 @@ popd &>/dev/null
%patch -P 0 -p1 -b .install_3rdparty_licenses
%patch -P 3 -p1 -b .python_install_binary
%patch -P 4 -p1 -b .VSX_intrinsics
%patch -P 5 -p1 -b .GCC15
%patch -P 6 -p1 -b .png1
%patch -P 7 -p1 -b .png2
%patch -P 8 -p1 -b .png3
%patch -P 9 -p1 -b .png4
%patch -P 10 -p1 -b .png5
%patch -P 11 -p1 -b .png6
%patch -P 12 -p1 -b .png7
%patch -P 13 -p1 -b .png8
%patch -P 14 -p1 -b .png9
%patch -P 15 -p1 -b .png10
%patch -P 16 -p1 -b .qt69
%patch -P 17 -p1 -b .ffmpeg8
%patch -P 18 -p1 -b .eigen3
pushd %{name}_contrib-%{version}
#patch1 -p1 -b .install_cvv
@ -436,20 +458,14 @@ mv opencv_3rdparty-%{wechat_commit}/sr.prototxt .cache/wechat_qrcode/69db99927a7
mkdir -p .cache/ade
install -pm 0644 %{S:4} .cache/ade/
%generate_buildrequires
cd modules/python/package
%pyproject_buildrequires
%build
# TODO: Please submit an issue to upstream (rhbz#2381337)
export CMAKE_POLICY_VERSION_MINIMUM=3.5
# enabled by default if libraries are presents at build time:
# GTK, GSTREAMER, 1394, V4L, eigen3
# non available on Fedora: FFMPEG, XINE
# disabling IPP because it is closed source library from intel
%cmake \
%if 0%{?fedora} > 38 || 0%{?rhel} > 10
%if 0%{?fedora} > 38
-DCMAKE_CXX_STANDARD=17 \
%endif
-DCV_TRACE=OFF \
@ -468,9 +484,6 @@ export CMAKE_POLICY_VERSION_MINIMUM=3.5
-DWITH_CAROTENE=OFF \
%ifarch x86_64 %{ix86}
-DCPU_BASELINE=SSE2 \
%ifarch %{ix86}
-DCPU_DISPATCH=SSE4_2 \
%endif
%endif
-DCMAKE_BUILD_TYPE=Release \
%{?with_java: -DBUILD_opencv_java=ON \
@ -495,6 +508,7 @@ export CMAKE_POLICY_VERSION_MINIMUM=3.5
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DPYTHON3_EXECUTABLE=%{__python3} \
-DPYTHON3_PACKAGES_PATH=%{python3_sitearch} \
-DOPENCV_GENERATE_SETUPVARS=OFF \
%{!?with_linters: \
-DENABLE_PYLINT=OFF \
@ -510,9 +524,7 @@ export CMAKE_POLICY_VERSION_MINIMUM=3.5
-DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \
-DOPENCV_GENERATE_PKGCONFIG=ON \
%{?with_extras_tests: -DOPENCV_TEST_DATA_PATH=opencv_extra-%{version}/testdata} \
%{?without_eigen3: -DWITH_EIGEN=OFF} \
%{?with_gdcm: -DWITH_GDCM=ON } \
-DWITH_IMGCODEC_GIF=ON \
%{?with_libmfx: -DWITH_MFX=ON -DWITH_GAPI_ONEVPL=ON} \
%{?with_clp: -DWITH_CLP=ON } \
%{?with_libva: -DWITH_VA=ON } \
@ -521,24 +533,11 @@ export CMAKE_POLICY_VERSION_MINIMUM=3.5
%cmake_build
cd %{__cmake_builddir}/python_loader/
%pyproject_wheel
%install
%cmake_install
cd %{__cmake_builddir}/python_loader/
%pyproject_install
%pyproject_save_files cv2
# Hack - move the binary
%ifnarch i686
mkdir -p %{buildroot}/%{python3_sitearch}/cv2
mv %{buildroot}/%{python3_sitelib}/cv2/cv2.cpython-*-linux-gnu.so \
%{buildroot}/%{python3_sitearch}/cv2
%endif
# Correct reference in config-x.yz, keep build one for testing
mkdir test_python
cp %{buildroot}/%{python3_sitelib}/cv2/config-*.py test_python
sed -i -e "s#/builddir[^']*#%{python3_sitearch}/cv2#g" %{buildroot}/%{python3_sitelib}/cv2/config-*.py
%py3_install -- --install-lib %{python3_sitearch}
rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/
%if %{with java}
@ -553,14 +552,6 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
%check
export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/%{__cmake_builddir}/lib:$LD_LIBARY_PATH
# Due to complex import method, we need to point to builddir temporarily at least to have test working, undoing
# the fix above and then removing this again
cp %{buildroot}/%{python3_sitelib}/cv2/config-*.py .
cp %{__cmake_builddir}/python_loader/test_python/config-*.py %{buildroot}/%{python3_sitelib}/cv2/
%pyproject_check_import -e cv2.config
cp config-*.py %{buildroot}/%{python3_sitelib}/cv2/
#ifnarch ppc64
%if %{with tests}
cp %{S:5} %{__cmake_builddir}
@ -571,6 +562,7 @@ cp config-*.py %{buildroot}/%{python3_sitelib}/cv2/
fi
$Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf -configdir . :99 &
export DISPLAY=:99
export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/%{__cmake_builddir}/lib:$LD_LIBARY_PATH
%ctest || :
%endif
#endif
@ -606,14 +598,9 @@ cp config-*.py %{buildroot}/%{python3_sitelib}/cv2/
%files doc
%{_datadir}/opencv4/samples
# some files aren't properly listed
#files -n python3-opencv -f %%{pyproject_files}
%files -n python3-opencv
%{python3_sitelib}/opencv*.dist-info
%{python3_sitelib}/cv2
%ifnarch i686
%{python3_sitearch}/cv2
%endif
%{python3_sitearch}/opencv-*.egg-info
%if %{with java}
%files java
@ -625,33 +612,6 @@ cp config-*.py %{buildroot}/%{python3_sitelib}/cv2/
%changelog
* Sun Nov 23 2025 Sandro Mani <manisandro@gmail.com> - 4.11.0-20
- Rebuild (gdal)
* Tue Nov 11 2025 Cristian Le <git@lecris.dev> - 4.11.0-19
- Allow to build with CMake 4.0 (rhbz#2381337)
* Wed Nov 05 2025 Dominik Mierzejewski <dominik@greysector.net> - 4.11.0-18
- Rebuilt for FFmpeg 8
* Wed Oct 29 2025 Federico Pellegrin <fede@evolware.org> - 4.11.0-17
- Fix importing of Python module (#2406800)
* Mon Oct 20 2025 Nicolas Chauvet <kwizart@gmail.com> - 4.11.0-16
- Fix build with i686
* Mon Oct 20 2025 Iñaki Úcar <iucar@fedoraproject.org> - 4.11.0-15
- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager
* Fri Oct 17 2025 Dominik Mierzejewski <dominik@greysector.net> - 4.11.0-14
- Fix build with FFmpeg 8
* Thu Oct 16 2025 Nicolas Chauvet <kwizart@gmail.com> - 4.11.0-13
- Use pyprojectize - thanks Miro !
* Tue Sep 30 2025 Nicolas Chauvet <kwizart@gmail.com> - 4.11.0-12
- Drop retired openni-primesense in fedora >= 44
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 4.11.0-11
- Rebuilt for Python 3.14.0rc3 bytecode

View file

@ -1,5 +1,5 @@
SHA512 (opencv-clean-4.12.0.tar.gz) = 7bcbe3629dda78e63cd737568ed94ef3f63dd7b11196247ffd03f93fed5ae9a96483d9fae25385dfd6f30c8c2e11677fd9f5c26b2f7a1bd88ca303b06a98b87d
SHA512 (opencv_contrib-clean-4.12.0.tar.gz) = e279bd46d2b4a3e4d8c98401e2abdd873ee15b63d14d16b7c9980f84fee02c08491cab4d8cd6b4e493d0892e254e56dd759235f3606332a1b264a41be3c8f9d8
SHA512 (opencv-clean-4.11.0.tar.gz) = 276f83a3cc3c7cecb626e3867655415198c204b1e8199b1aff2f8ee2d7995f53e9e1f44589d1ae77fb494b6ab064a1e1c5127f998137a562514767e62e4c6497
SHA512 (wechat-20230712.git3487ef7.tar.gz) = bc4f220465de41df8af0cb35312c1db155976d05f13a60e43c1798b161d8f56388e34a59108fb3e27e8c97b53acfd198256d9ae420b5f70a32ddc1ea65c3c8a6
SHA512 (opencv_contrib-clean-4.11.0.tar.gz) = 1e10e8b9a5fd9069c0851d7838716196349fcf4f0db7eafd4a86bd536f4224d88f97bd740ecaa317daa3b5784d3273fb31ac90bb8c64448086eac85a9faaad5d
SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307
SHA512 (962ce79e0b95591f226431f7b5f152cd-v0.1.2e.zip) = 87c65716498ca2e4f64fb9a1f78f7e5c48fffff5fc6735027edfb7d7ccc0d9f5b01c85f4b956ddc7e1c35c69ee2513d48a7da91764c2fd01d073ee5a1fc90c6f