From ec4ea19d197ac89ac540475600cab608bd9ea309 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 30 Sep 2025 20:40:45 +0200 Subject: [PATCH 01/29] Drop openni-primesense --- opencv.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index c4d1dab..56cfdb8 100644 --- a/opencv.spec +++ b/opencv.spec @@ -75,7 +75,7 @@ Version: 4.11.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: 11%{?dist} +Release: 12%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -155,7 +155,7 @@ BuildRequires: OpenEXR-devel } %{?with_openni: BuildRequires: openni-devel -%if 0%{?fedora} +%if 0%{?fedora} && 0%{?fedora} < 44 BuildRequires: openni-primesense %endif } @@ -612,6 +612,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Tue Sep 30 2025 Nicolas Chauvet - 4.11.0-12 +- Drop retired openni-primesense in fedora >= 44 + * Fri Sep 19 2025 Python Maint - 4.11.0-11 - Rebuilt for Python 3.14.0rc3 bytecode From ddca32a9345750687356e4f4d3974db6e7ae069f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 16 Oct 2025 14:52:54 +0200 Subject: [PATCH 02/29] Use pyprojectize - thanks Miro ! --- opencv.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/opencv.spec b/opencv.spec index 56cfdb8..96c3887 100644 --- a/opencv.spec +++ b/opencv.spec @@ -166,7 +166,6 @@ BuildRequires: zlib-devel BuildRequires: pkgconfig BuildRequires: python3-devel BuildRequires: python3-numpy -BuildRequires: python3-setuptools %{?with_linters: BuildRequires: pylint BuildRequires: python3-flake8 @@ -458,6 +457,9 @@ mv opencv_3rdparty-%{wechat_commit}/sr.prototxt .cache/wechat_qrcode/69db99927a7 mkdir -p .cache/ade install -pm 0644 %{S:4} .cache/ade/ +%generate_buildrequires +%pyproject_buildrequires + %build # enabled by default if libraries are presents at build time: # GTK, GSTREAMER, 1394, V4L, eigen3 @@ -537,7 +539,8 @@ install -pm 0644 %{S:4} .cache/ade/ %install %cmake_install cd %{__cmake_builddir}/python_loader/ -%py3_install -- --install-lib %{python3_sitearch} +%pyproject_install} +%pyproject_save_files cv2 rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ %if %{with java} @@ -552,6 +555,8 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %check +%pyproject_check_import + #ifnarch ppc64 %if %{with tests} cp %{S:5} %{__cmake_builddir} @@ -598,9 +603,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %files doc %{_datadir}/opencv4/samples -%files -n python3-opencv -%{python3_sitearch}/cv2 -%{python3_sitearch}/opencv-*.egg-info +%files -n python3-opencv -f %{pyproject_files} %if %{with java} %files java From a3caee55c6cd8dbabdd85ef4e1760859f3e3e559 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 16 Oct 2025 14:54:32 +0200 Subject: [PATCH 03/29] Update changelog --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 96c3887..a6784c6 100644 --- a/opencv.spec +++ b/opencv.spec @@ -75,7 +75,7 @@ Version: 4.11.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: 12%{?dist} +Release: 13%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -615,6 +615,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Thu Oct 16 2025 Nicolas Chauvet - 4.11.0-13 +- Use pyprojectize - thanks Miro ! + * Tue Sep 30 2025 Nicolas Chauvet - 4.11.0-12 - Drop retired openni-primesense in fedora >= 44 From 9b977f4e00531182f05bd14c6e7e15d42dafef80 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 16 Oct 2025 15:27:17 +0200 Subject: [PATCH 04/29] Add missing option --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index a6784c6..9de67c7 100644 --- a/opencv.spec +++ b/opencv.spec @@ -458,7 +458,7 @@ mkdir -p .cache/ade install -pm 0644 %{S:4} .cache/ade/ %generate_buildrequires -%pyproject_buildrequires +%pyproject_buildrequires -N %build # enabled by default if libraries are presents at build time: From 16a14b4b000df6367465ed6de02857b76c687259 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 15 Oct 2025 18:38:21 +0200 Subject: [PATCH 05/29] Enable IMGCODEC_GIF --- opencv.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/opencv.spec b/opencv.spec index 9de67c7..951d2ed 100644 --- a/opencv.spec +++ b/opencv.spec @@ -527,6 +527,7 @@ install -pm 0644 %{S:4} .cache/ade/ -DOPENCV_GENERATE_PKGCONFIG=ON \ %{?with_extras_tests: -DOPENCV_TEST_DATA_PATH=opencv_extra-%{version}/testdata} \ %{?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 } \ From b5b2dac5f488f25091e74850b92da7cac218a6aa Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 16 Oct 2025 19:40:34 +0200 Subject: [PATCH 06/29] Disable eigen3 on f44 i686 for now --- opencv.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/opencv.spec b/opencv.spec index 951d2ed..3b5360b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -11,6 +11,15 @@ %bcond_without gstreamer %bcond_with eigen2 %bcond_without eigen3 +# Disable eigen3 on i686 for now +# /usr/include/eigen3/Eigen/src/Core/arch/AVX/PacketMath.h:2837:10: error: ‘_mm_cvtsi64_si128’ was not declared in this scope; did you mean ‘_mm_cvtsi64_si32’? +# only available on x86_64 +# https://github.com/gcc-mirror/gcc/blob/4a3895903c29ed85da6fcb886f31ff23d4c6e935/gcc/config/i386/emmintrin.h#L228C1-L234 +%if 0%{?fedora} > 43 +%ifarch i686 +%global __without_eigen3 1 +%endif +%endif %bcond_without opencl %ifarch x86_64 %{arm} %bcond_without openni From a4104bd4922665df4ba41f92a2da09dddd23e8f5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 16 Oct 2025 19:41:03 +0200 Subject: [PATCH 07/29] Add missing pyproject_wheel --- opencv.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 3b5360b..65aa100 100644 --- a/opencv.spec +++ b/opencv.spec @@ -545,11 +545,13 @@ install -pm 0644 %{S:4} .cache/ade/ %cmake_build +cd %{__cmake_builddir}/python_loader/ +%pyproject_wheel %install %cmake_install cd %{__cmake_builddir}/python_loader/ -%pyproject_install} +%pyproject_install %pyproject_save_files cv2 rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ From 566a1c2362fbd858e8e7d70e734f582440e025be Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 16 Oct 2025 21:51:36 +0200 Subject: [PATCH 08/29] Fixup disable eigen3 on i686 --- opencv.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opencv.spec b/opencv.spec index 65aa100..e435249 100644 --- a/opencv.spec +++ b/opencv.spec @@ -10,15 +10,14 @@ %bcond_without ffmpeg %bcond_without gstreamer %bcond_with eigen2 -%bcond_without eigen3 # Disable eigen3 on i686 for now # /usr/include/eigen3/Eigen/src/Core/arch/AVX/PacketMath.h:2837:10: error: ‘_mm_cvtsi64_si128’ was not declared in this scope; did you mean ‘_mm_cvtsi64_si32’? # only available on x86_64 # https://github.com/gcc-mirror/gcc/blob/4a3895903c29ed85da6fcb886f31ff23d4c6e935/gcc/config/i386/emmintrin.h#L228C1-L234 -%if 0%{?fedora} > 43 %ifarch i686 -%global __without_eigen3 1 -%endif +%bcond_with eigen3 +%else +%bcond_without eigen3 %endif %bcond_without opencl %ifarch x86_64 %{arm} @@ -502,6 +501,7 @@ install -pm 0644 %{S:4} .cache/ade/ %{!?with_java: -DBUILD_opencv_java=OFF } \ %{?with_tbb: -DWITH_TBB=ON } \ %{!?with_gstreamer: -DWITH_GSTREAMER=OFF } \ + %{!?with_eigen3: -DWITH_EIGEN=OFF } \ %{!?with_ffmpeg: -DWITH_FFMPEG=OFF } \ %{?with_cuda: \ -DWITH_CUDA=ON \ From f7ff54a5810c2ca0988519a4dff31be3bc6bc309 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 16 Oct 2025 22:45:48 +0200 Subject: [PATCH 09/29] Add missing br python3-pip --- opencv.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencv.spec b/opencv.spec index e435249..d332b6f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -173,6 +173,9 @@ BuildRequires: tbb-devel BuildRequires: zlib-devel BuildRequires: pkgconfig BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: python3-types-setuptools BuildRequires: python3-numpy %{?with_linters: BuildRequires: pylint From f5faab5a89a6318a0ab073d522a836b0e319f9f0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 17 Oct 2025 11:44:57 +0200 Subject: [PATCH 10/29] Hack for pyprojects with opencv --- opencv.spec | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index d332b6f..12e3520 100644 --- a/opencv.spec +++ b/opencv.spec @@ -522,7 +522,6 @@ install -pm 0644 %{S:4} .cache/ade/ -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 \ @@ -556,6 +555,12 @@ cd %{__cmake_builddir}/python_loader/ 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 rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ %if %{with java} @@ -570,7 +575,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %check -%pyproject_check_import +# Currently fails during build with: +# ImportError: libopencv_hdf.so.411: cannot open shared object file: No such file or directory +%pyproject_check_import || : #ifnarch ppc64 %if %{with tests} @@ -618,7 +625,14 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %files doc %{_datadir}/opencv4/samples -%files -n python3-opencv -f %{pyproject_files} +# 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 %if %{with java} %files java From a3c6808be9f722894e561578d8034fe471a0fdcd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 17 Oct 2025 14:05:57 +0200 Subject: [PATCH 11/29] Revert disabling eigen3 on i686 This disable some modules, so fix it another way instead --- opencv.spec | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/opencv.spec b/opencv.spec index 12e3520..10774e0 100644 --- a/opencv.spec +++ b/opencv.spec @@ -10,15 +10,7 @@ %bcond_without ffmpeg %bcond_without gstreamer %bcond_with eigen2 -# Disable eigen3 on i686 for now -# /usr/include/eigen3/Eigen/src/Core/arch/AVX/PacketMath.h:2837:10: error: ‘_mm_cvtsi64_si128’ was not declared in this scope; did you mean ‘_mm_cvtsi64_si32’? -# only available on x86_64 -# https://github.com/gcc-mirror/gcc/blob/4a3895903c29ed85da6fcb886f31ff23d4c6e935/gcc/config/i386/emmintrin.h#L228C1-L234 -%ifarch i686 -%bcond_with eigen3 -%else %bcond_without eigen3 -%endif %bcond_without opencl %ifarch x86_64 %{arm} %bcond_without openni @@ -141,7 +133,6 @@ 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 @@ -504,7 +495,6 @@ install -pm 0644 %{S:4} .cache/ade/ %{!?with_java: -DBUILD_opencv_java=OFF } \ %{?with_tbb: -DWITH_TBB=ON } \ %{!?with_gstreamer: -DWITH_GSTREAMER=OFF } \ - %{!?with_eigen3: -DWITH_EIGEN=OFF } \ %{!?with_ffmpeg: -DWITH_FFMPEG=OFF } \ %{?with_cuda: \ -DWITH_CUDA=ON \ From 6e87dd17aff34c8ff5ea75f6a5a372d3e07b9ee7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 17 Oct 2025 14:16:15 +0200 Subject: [PATCH 12/29] Reduce optimization on i686 This avoid the case where some AVX code is used while not been available for x86_64 like with eigen3 --- opencv.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opencv.spec b/opencv.spec index 10774e0..3a349d7 100644 --- a/opencv.spec +++ b/opencv.spec @@ -488,6 +488,10 @@ install -pm 0644 %{S:4} .cache/ade/ -DWITH_CAROTENE=OFF \ %ifarch x86_64 %{ix86} -DCPU_BASELINE=SSE2 \ +%ifarch %{ix86} + -DCV_DISABLE_OPTIMIZATION=ON \ + -DCPU_DISPATCH=SSE4.2 \ +%endif %endif -DCMAKE_BUILD_TYPE=Release \ %{?with_java: -DBUILD_opencv_java=ON \ From 9db5b7b826e8e54d3eaccd16d2685eb5956864db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 20 Oct 2025 15:22:00 +0200 Subject: [PATCH 13/29] Conversion to %pyproject macros followup --- opencv.spec | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/opencv.spec b/opencv.spec index 3a349d7..3bc6f39 100644 --- a/opencv.spec +++ b/opencv.spec @@ -164,9 +164,6 @@ BuildRequires: tbb-devel BuildRequires: zlib-devel BuildRequires: pkgconfig BuildRequires: python3-devel -BuildRequires: python3-pip -BuildRequires: python3-setuptools -BuildRequires: python3-types-setuptools BuildRequires: python3-numpy %{?with_linters: BuildRequires: pylint @@ -460,7 +457,8 @@ mkdir -p .cache/ade install -pm 0644 %{S:4} .cache/ade/ %generate_buildrequires -%pyproject_buildrequires -N +cd modules/python/package +%pyproject_buildrequires %build # enabled by default if libraries are presents at build time: @@ -569,9 +567,8 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %check -# Currently fails during build with: -# ImportError: libopencv_hdf.so.411: cannot open shared object file: No such file or directory -%pyproject_check_import || : +export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/%{__cmake_builddir}/lib:$LD_LIBARY_PATH +%pyproject_check_import -e cv2.config #ifnarch ppc64 %if %{with tests} @@ -583,7 +580,6 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope 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 From 81d1bbe53c6a431300f1f5f163d20bfd19d6e250 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Sun, 19 Oct 2025 08:20:53 +0000 Subject: [PATCH 14/29] Fixed build with FFmpeg 8 --- 27691.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ opencv.spec | 8 +++++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 27691.patch diff --git a/27691.patch b/27691.patch new file mode 100644 index 0000000..c08b882 --- /dev/null +++ b/27691.patch @@ -0,0 +1,43 @@ +From 90c444abd387ffa70b2e72a34922903a2f0f4f5a Mon Sep 17 00:00:00 2001 +From: Alexander Smorkalov +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)); diff --git a/opencv.spec b/opencv.spec index 3bc6f39..6c1cc7e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -75,7 +75,7 @@ Version: 4.11.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: 13%{?dist} +Release: 14%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -121,6 +121,8 @@ 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 BuildRequires: gcc-c++ @@ -434,6 +436,7 @@ popd &>/dev/null %patch -P 14 -p1 -b .png9 %patch -P 15 -p1 -b .png10 %patch -P 16 -p1 -b .qt69 +%patch -P 17 -p1 -b .ffmpeg8 pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv @@ -634,6 +637,9 @@ export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/%{__cmake_builddir}/lib:$ %changelog +* Fri Oct 17 2025 Dominik Mierzejewski - 4.11.0-14 +- Fix build with FFmpeg 8 + * Thu Oct 16 2025 Nicolas Chauvet - 4.11.0-13 - Use pyprojectize - thanks Miro ! From 84191fa7b94aaaf4cc9c8a64590a183b69a45b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20=C3=9Acar?= Date: Thu, 7 Aug 2025 18:39:25 +0200 Subject: [PATCH 15/29] https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager --- opencv.spec | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/opencv.spec b/opencv.spec index 6c1cc7e..7d966ca 100644 --- a/opencv.spec +++ b/opencv.spec @@ -23,9 +23,10 @@ %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 +# Now FlexiBLAS should be used instead: https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager %bcond_with atlas -%bcond_without openblas +%bcond_with openblas +%bcond_without flexiblas %bcond_without gdcm %if 0%{?rhel} >= 8 %bcond_with vtk @@ -75,7 +76,7 @@ Version: 4.11.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: 14%{?dist} +Release: 15%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -213,7 +214,6 @@ BuildRequires: harfbuzz-devel BuildRequires: vtk-java } } -%{?with_atlas:BuildRequires: atlas-devel} #ceres-solver-devel push eigen3-devel and tbb-devel %{?with_tbb: %{?with_eigen3: @@ -222,11 +222,9 @@ BuildRequires: vtk-java # BuildRequires: ceres-solver-devel } } -%{?with_openblas: -BuildRequires: openblas-devel -BuildRequires: blas-devel -BuildRequires: lapack-devel -} +%{?with_atlas:BuildRequires: atlas-devel} +%{?with_openblas:BuildRequires: openblas-devel} +%{?with_flexiblas:BuildRequires: flexiblas-devel} %{?with_gdcm:BuildRequires: gdcm-devel} %{?with_libmfx:BuildRequires: libvpl-devel} %{?with_clp:BuildRequires: coin-or-Clp-devel} @@ -637,6 +635,9 @@ export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/%{__cmake_builddir}/lib:$ %changelog +* Mon Oct 20 2025 Iñaki Úcar - 4.11.0-15 +- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager + * Fri Oct 17 2025 Dominik Mierzejewski - 4.11.0-14 - Fix build with FFmpeg 8 From c610b9652ac68b7237db22fc6b6b9376a84c86f1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 20 Oct 2025 20:50:26 +0200 Subject: [PATCH 16/29] Add flatbuffers --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 7d966ca..2af66a0 100644 --- a/opencv.spec +++ b/opencv.spec @@ -234,7 +234,10 @@ BuildRequires: ant BuildRequires: java-devel } %{?with_vulkan:BuildRequires: vulkan-headers} -#BuildRequires: flatbuffers-devel +%ifnarch i686 +BuildRequires: flatbuffers-devel +BuildRequires: flatbuffers-compiler +%endif %if %{with tests} BuildRequires: xorg-x11-drv-dummy BuildRequires: mesa-dri-drivers From ef49f5c10afe9f60252881f895246847b1ec2636 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 20 Oct 2025 20:51:19 +0200 Subject: [PATCH 17/29] Workaround fix build for i686 with eigen 5 Disabling AVX for i686 fixes build with eigen-5.0.0 https://gitlab.com/libeigen/eigen/-/issues/2991 --- opencv.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 2af66a0..77532a7 100644 --- a/opencv.spec +++ b/opencv.spec @@ -491,8 +491,7 @@ cd modules/python/package %ifarch x86_64 %{ix86} -DCPU_BASELINE=SSE2 \ %ifarch %{ix86} - -DCV_DISABLE_OPTIMIZATION=ON \ - -DCPU_DISPATCH=SSE4.2 \ + -DCPU_DISPATCH=SSE4_2 \ %endif %endif -DCMAKE_BUILD_TYPE=Release \ From 50e2f38acd47a0445a27fc9caff27b3d1b31121f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 20 Oct 2025 20:52:35 +0200 Subject: [PATCH 18/29] Add changelog --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 77532a7..5e62218 100644 --- a/opencv.spec +++ b/opencv.spec @@ -76,7 +76,7 @@ Version: 4.11.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: 15%{?dist} +Release: 16%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -637,6 +637,9 @@ export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/%{__cmake_builddir}/lib:$ %changelog +* Mon Oct 20 2025 Nicolas Chauvet - 4.11.0-16 +- Fix build with i686 + * Mon Oct 20 2025 Iñaki Úcar - 4.11.0-15 - https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager From 544ff83f8c983f9409ad3cb5b4b3d2b329f7e110 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Tue, 21 Oct 2025 12:48:21 +0200 Subject: [PATCH 19/29] fix build without eigen --- opencv.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opencv.spec b/opencv.spec index 5e62218..a6aa56b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -304,7 +304,9 @@ 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} From 63f9fb5af312b12a0c63404619911e97651e5d70 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 21 Oct 2025 17:54:38 +0200 Subject: [PATCH 20/29] Set without eigen off --- opencv.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/opencv.spec b/opencv.spec index a6aa56b..75629c1 100644 --- a/opencv.spec +++ b/opencv.spec @@ -534,6 +534,7 @@ cd modules/python/package -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} \ From 6bc8b75d589c18557d2dc42a97a17fb5d4bcebcd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 21 Oct 2025 17:57:23 +0200 Subject: [PATCH 21/29] Drop eigen2 condition --- opencv.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 75629c1..0c0f648 100644 --- a/opencv.spec +++ b/opencv.spec @@ -9,7 +9,6 @@ %bcond_with linters %bcond_without ffmpeg %bcond_without gstreamer -%bcond_with eigen2 %bcond_without eigen3 %bcond_without opencl %ifarch x86_64 %{arm} From e035a958ac878d72d5faa66d51c64173023bf653 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 29 Oct 2025 17:53:07 -0400 Subject: [PATCH 22/29] Enable C++17 on RHEL 11 While this was originally intended for the future inclusion of Protobuf v4, rawhide and ELN now include Eigen 5.0 which requires a newer C++ standard. --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 0c0f648..bdddf71 100644 --- a/opencv.spec +++ b/opencv.spec @@ -472,7 +472,7 @@ cd modules/python/package # disabling IPP because it is closed source library from intel %cmake \ -%if 0%{?fedora} > 38 +%if 0%{?fedora} > 38 || 0%{?rhel} > 10 -DCMAKE_CXX_STANDARD=17 \ %endif -DCV_TRACE=OFF \ From 1aebdc2c48cd8f620ee328115d57c266459b8b00 Mon Sep 17 00:00:00 2001 From: Federico Pellegrin Date: Wed, 29 Oct 2025 22:03:57 +0100 Subject: [PATCH 23/29] Fix importing of Python module (#2406800) --- opencv.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 0c0f648..e9f24f4 100644 --- a/opencv.spec +++ b/opencv.spec @@ -75,7 +75,7 @@ Version: 4.11.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: 16%{?dist} +Release: 17%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -558,6 +558,10 @@ 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 rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ %if %{with java} @@ -573,7 +577,12 @@ 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} @@ -639,6 +648,9 @@ export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/%{__cmake_builddir}/lib:$ %changelog +* Wed Oct 29 2025 Federico Pellegrin - 4.11.0-17 +- Fix importing of Python module (#2406800) + * Mon Oct 20 2025 Nicolas Chauvet - 4.11.0-16 - Fix build with i686 From 97b0aa4a26e24e08d6cd7c9d0d651d0da2d94196 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Wed, 5 Nov 2025 10:08:20 +0100 Subject: [PATCH 24/29] Rebuilt for FFmpeg 8 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 417858c..6c8b425 100644 --- a/opencv.spec +++ b/opencv.spec @@ -75,7 +75,7 @@ Version: 4.11.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: 17%{?dist} +Release: 18%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -648,6 +648,9 @@ cp config-*.py %{buildroot}/%{python3_sitelib}/cv2/ %changelog +* Wed Nov 05 2025 Dominik Mierzejewski - 4.11.0-18 +- Rebuilt for FFmpeg 8 + * Wed Oct 29 2025 Federico Pellegrin - 4.11.0-17 - Fix importing of Python module (#2406800) From fb65d41d94c16aa4f12fee7c0230d0070dfaea90 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Tue, 11 Nov 2025 14:11:59 +0100 Subject: [PATCH 25/29] Allow to build with CMake 4.0 (rhbz#2381337) --- opencv.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 6c8b425..55d3636 100644 --- a/opencv.spec +++ b/opencv.spec @@ -75,7 +75,7 @@ Version: 4.11.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: 18%{?dist} +Release: 19%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -466,6 +466,8 @@ 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 @@ -648,6 +650,9 @@ cp config-*.py %{buildroot}/%{python3_sitelib}/cv2/ %changelog +* Tue Nov 11 2025 Cristian Le - 4.11.0-19 +- Allow to build with CMake 4.0 (rhbz#2381337) + * Wed Nov 05 2025 Dominik Mierzejewski - 4.11.0-18 - Rebuilt for FFmpeg 8 From e4430f2027e1789e6b19f171a12525a737eb2f3b Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sun, 23 Nov 2025 22:38:24 +0100 Subject: [PATCH 26/29] Rebuild (gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 55d3636..f50f058 100644 --- a/opencv.spec +++ b/opencv.spec @@ -75,7 +75,7 @@ Version: 4.11.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: 19%{?dist} +Release: 20%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -650,6 +650,9 @@ cp config-*.py %{buildroot}/%{python3_sitelib}/cv2/ %changelog +* Sun Nov 23 2025 Sandro Mani - 4.11.0-20 +- Rebuild (gdal) + * Tue Nov 11 2025 Cristian Le - 4.11.0-19 - Allow to build with CMake 4.0 (rhbz#2381337) From 7c6a57d532128c0e513543da67538dc0a660951f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 15 Oct 2025 18:36:58 +0200 Subject: [PATCH 27/29] Update to 4.12.0 --- opencv.spec | 30 +----------------------------- sources | 4 ++-- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/opencv.spec b/opencv.spec index f50f058..9dcc9cc 100644 --- a/opencv.spec +++ b/opencv.spec @@ -69,7 +69,7 @@ %endif Name: opencv -Version: 4.11.0 +Version: 4.12.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]} ) @@ -102,22 +102,6 @@ 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 @@ -425,18 +409,6 @@ 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 diff --git a/sources b/sources index d27f031..696874a 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (opencv-clean-4.11.0.tar.gz) = 276f83a3cc3c7cecb626e3867655415198c204b1e8199b1aff2f8ee2d7995f53e9e1f44589d1ae77fb494b6ab064a1e1c5127f998137a562514767e62e4c6497 +SHA512 (opencv-clean-4.12.0.tar.gz) = 7bcbe3629dda78e63cd737568ed94ef3f63dd7b11196247ffd03f93fed5ae9a96483d9fae25385dfd6f30c8c2e11677fd9f5c26b2f7a1bd88ca303b06a98b87d +SHA512 (opencv_contrib-clean-4.12.0.tar.gz) = e279bd46d2b4a3e4d8c98401e2abdd873ee15b63d14d16b7c9980f84fee02c08491cab4d8cd6b4e493d0892e254e56dd759235f3606332a1b264a41be3c8f9d8 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 From 781cdc0ccbe28826f9c9b0a77542e8c28f441b36 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 15 Oct 2025 18:06:22 +0200 Subject: [PATCH 28/29] Fix build with Eigen3 > 3 --- 27536.patch | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++ opencv.spec | 2 ++ 2 files changed, 59 insertions(+) create mode 100644 27536.patch diff --git a/27536.patch b/27536.patch new file mode 100644 index 0000000..0b7a4ce --- /dev/null +++ b/27536.patch @@ -0,0 +1,57 @@ +From 353b4ddf52db48ba85d2efaa33310afa0eb73a72 Mon Sep 17 00:00:00 2001 +From: Kumataro +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 +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}) diff --git a/opencv.spec b/opencv.spec index 9dcc9cc..eec89b8 100644 --- a/opencv.spec +++ b/opencv.spec @@ -107,6 +107,8 @@ Patch3: opencv.python.patch 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++ From ce6c184c9e516366df15b8f071d4356d856d51d5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 10 Dec 2025 15:13:37 +0100 Subject: [PATCH 29/29] Apply patch18 --- opencv.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/opencv.spec b/opencv.spec index eec89b8..c197a96 100644 --- a/opencv.spec +++ b/opencv.spec @@ -413,6 +413,7 @@ popd &>/dev/null %patch -P 3 -p1 -b .python_install_binary %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