From 35e6529cd23a7c3c382292bea587f1d7a2dc6bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 8 Jun 2019 02:23:51 +0100 Subject: [PATCH 001/274] Update to 3.4.6 --- .gitignore | 2 + ...b79e3f98b4ce30481e0299cca550ed77aef0.patch | 82 ------------------- ...43c69c654344d2e2fb7b2d21121ca89224e6.patch | 35 -------- ...9e4e65a8d9e0b5a15e9a5242453f261bee46.patch | 28 ------- opencv-3.4.1-cmake_paths.patch | 24 ------ opencv-4.1.0-install_3rdparty_licenses.patch | 11 +++ opencv-clean.sh | 2 +- opencv.spec | 27 +++--- sources | 4 +- 9 files changed, 28 insertions(+), 187 deletions(-) delete mode 100644 ad35b79e3f98b4ce30481e0299cca550ed77aef0.patch delete mode 100644 c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch delete mode 100644 c4419e4e65a8d9e0b5a15e9a5242453f261bee46.patch delete mode 100644 opencv-3.4.1-cmake_paths.patch create mode 100644 opencv-4.1.0-install_3rdparty_licenses.patch diff --git a/.gitignore b/.gitignore index 3baf801..b508527 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ OpenCV-2.1.0.tar.bz2 /opencv-clean-3.4.3.tar.gz /opencv-clean-3.4.4.tar.gz /opencv_contrib-clean-3.4.4.tar.gz +/opencv-clean-3.4.6.tar.gz +/opencv_contrib-3.4.6.tar.gz diff --git a/ad35b79e3f98b4ce30481e0299cca550ed77aef0.patch b/ad35b79e3f98b4ce30481e0299cca550ed77aef0.patch deleted file mode 100644 index dea8d45..0000000 --- a/ad35b79e3f98b4ce30481e0299cca550ed77aef0.patch +++ /dev/null @@ -1,82 +0,0 @@ -From ad35b79e3f98b4ce30481e0299cca550ed77aef0 Mon Sep 17 00:00:00 2001 -From: Alexander Alekhin -Date: Thu, 22 Nov 2018 21:06:33 +0000 -Subject: [PATCH] python: update install paths - -- don't require "OPENCV_PYTHON{2,3}_INSTALL_PATH" if OPENCV_SKIP_PYTHON_LOADER=ON -- avoid unnecessary relative paths in generated config-X.Y.py ---- - CMakeLists.txt | 4 ++-- - modules/python/common.cmake | 14 +++++++++----- - 2 files changed, 11 insertions(+), 7 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fde8b578ba0..6298f4438c2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1494,7 +1494,7 @@ if(BUILD_opencv_python2) - status(" Libraries:" HAVE_opencv_python2 THEN "${PYTHON2_LIBRARIES}" ELSE NO) - endif() - status(" numpy:" PYTHON2_NUMPY_INCLUDE_DIRS THEN "${PYTHON2_NUMPY_INCLUDE_DIRS} (ver ${PYTHON2_NUMPY_VERSION})" ELSE "NO (Python wrappers can not be generated)") -- status(" packages path:" PYTHON2_EXECUTABLE THEN "${PYTHON2_PACKAGES_PATH}" ELSE "-") -+ status(" install path:" HAVE_opencv_python2 THEN "${__INSTALL_PATH_PYTHON2}" ELSE "-") - endif() - - if(BUILD_opencv_python3) -@@ -1507,7 +1507,7 @@ if(BUILD_opencv_python3) - status(" Libraries:" HAVE_opencv_python3 THEN "${PYTHON3_LIBRARIES}" ELSE NO) - endif() - status(" numpy:" PYTHON3_NUMPY_INCLUDE_DIRS THEN "${PYTHON3_NUMPY_INCLUDE_DIRS} (ver ${PYTHON3_NUMPY_VERSION})" ELSE "NO (Python3 wrappers can not be generated)") -- status(" packages path:" PYTHON3_EXECUTABLE THEN "${PYTHON3_PACKAGES_PATH}" ELSE "-") -+ status(" install path:" HAVE_opencv_python3 THEN "${__INSTALL_PATH_PYTHON3}" ELSE "-") - endif() - - status("") -diff --git a/modules/python/common.cmake b/modules/python/common.cmake -index 14912297eae..4b4eaa6e7f8 100644 ---- a/modules/python/common.cmake -+++ b/modules/python/common.cmake -@@ -122,6 +122,8 @@ endif() - - if(NOT " ${PYTHON}" STREQUAL " PYTHON" AND DEFINED OPENCV_${PYTHON}_INSTALL_PATH) - set(__python_binary_install_path "${OPENCV_${PYTHON}_INSTALL_PATH}") -+elseif(OPENCV_SKIP_PYTHON_LOADER AND DEFINED ${PYTHON}_PACKAGES_PATH) -+ set(__python_binary_install_path "${${PYTHON}_PACKAGES_PATH}") - else() - ocv_assert(DEFINED OPENCV_PYTHON_INSTALL_PATH) - set(__python_binary_install_path "${OPENCV_PYTHON_INSTALL_PATH}/${__python_loader_subdir}python-${${PYTHON}_VERSION_MAJOR}.${${PYTHON}_VERSION_MINOR}") -@@ -134,6 +136,8 @@ install(TARGETS ${the_module} - ${PYTHON_INSTALL_ARCHIVE} - ) - -+set(__INSTALL_PATH_${PYTHON} "${__python_binary_install_path}" CACHE INTERNAL "") # CMake status -+ - if(NOT OPENCV_SKIP_PYTHON_LOADER) - ocv_assert(DEFINED OPENCV_PYTHON_INSTALL_PATH) - if(OpenCV_FOUND) -@@ -143,12 +147,11 @@ if(NOT OPENCV_SKIP_PYTHON_LOADER) - endif() - - set(__python_loader_install_tmp_path "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/install/python_loader/") -+ set(OpenCV_PYTHON_LOADER_FULL_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_PYTHON_INSTALL_PATH}/cv2") - if(IS_ABSOLUTE "${OPENCV_PYTHON_INSTALL_PATH}") -- set(OpenCV_PYTHON_INSTALL_PATH_RELATIVE_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/") -- set(CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE "'${CMAKE_INSTALL_PREFIX}'") -+ set(CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE "'${OPENCV_PYTHON_INSTALL_PATH}/cv2'") - else() -- file(RELATIVE_PATH OpenCV_PYTHON_INSTALL_PATH_RELATIVE_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/${OPENCV_PYTHON_INSTALL_PATH}/cv2" ${CMAKE_INSTALL_PREFIX}) -- set(CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE "os.path.join(LOADER_DIR, '${OpenCV_PYTHON_INSTALL_PATH_RELATIVE_CONFIGCMAKE}')") -+ set(CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE "LOADER_DIR") - endif() - - if(DEFINED ${PYTHON}_VERSION_MINOR) -@@ -167,7 +170,8 @@ if(NOT OPENCV_SKIP_PYTHON_LOADER) - if(IS_ABSOLUTE __python_binary_install_path) - set(CMAKE_PYTHON_EXTENSION_PATH "'${__python_binary_install_path}'") - else() -- set(CMAKE_PYTHON_EXTENSION_PATH "os.path.join(${CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE}, '${__python_binary_install_path}')") -+ file(RELATIVE_PATH OpenCV_PYTHON_BINARY_RELATIVE_INSTALL_PATH "${OpenCV_PYTHON_LOADER_FULL_INSTALL_PATH}" "${CMAKE_INSTALL_PREFIX}/${__python_binary_install_path}") -+ set(CMAKE_PYTHON_EXTENSION_PATH "os.path.join(${CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE}, '${OpenCV_PYTHON_BINARY_RELATIVE_INSTALL_PATH}')") - endif() - configure_file("${PYTHON_SOURCE_DIR}/package/template/config-x.y.py.in" "${__python_loader_install_tmp_path}/cv2/${__target_config}" @ONLY) - install(FILES "${__python_loader_install_tmp_path}/cv2/${__target_config}" DESTINATION "${OPENCV_PYTHON_INSTALL_PATH}/cv2/" COMPONENT python) diff --git a/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch b/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch deleted file mode 100644 index 13b28b9..0000000 --- a/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c26c43c69c654344d2e2fb7b2d21121ca89224e6 Mon Sep 17 00:00:00 2001 -From: Maksim Shabunin -Date: Mon, 3 Dec 2018 17:16:09 +0300 -Subject: [PATCH] Fixed compilation with VA-interop on 32-bit platforms - ---- - modules/core/src/va_intel.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/modules/core/src/va_intel.cpp b/modules/core/src/va_intel.cpp -index ac74f0c5337..c571b90b5fe 100644 ---- a/modules/core/src/va_intel.cpp -+++ b/modules/core/src/va_intel.cpp -@@ -340,8 +340,8 @@ static void copy_convert_yv12_to_bgr(const VAImage& image, const unsigned char* - 1.5959997177f - }; - -- CV_CheckEQ(image.format.fourcc, VA_FOURCC_YV12, "Unexpected image format"); -- CV_CheckEQ(image.num_planes, 3, ""); -+ CV_CheckEQ((size_t)image.format.fourcc, (size_t)VA_FOURCC_YV12, "Unexpected image format"); -+ CV_CheckEQ((size_t)image.num_planes, (size_t)3, ""); - - const size_t srcOffsetY = image.offsets[0]; - const size_t srcOffsetV = image.offsets[1]; -@@ -417,8 +417,8 @@ static void copy_convert_bgr_to_yv12(const VAImage& image, const Mat& bgr, unsig - -0.2909994125f, 0.438999176f, -0.3679990768f, -0.0709991455f - }; - -- CV_CheckEQ(image.format.fourcc, VA_FOURCC_YV12, "Unexpected image format"); -- CV_CheckEQ(image.num_planes, 3, ""); -+ CV_CheckEQ((size_t)image.format.fourcc, (size_t)VA_FOURCC_YV12, "Unexpected image format"); -+ CV_CheckEQ((size_t)image.num_planes, (size_t)3, ""); - - const size_t dstOffsetY = image.offsets[0]; - const size_t dstOffsetV = image.offsets[1]; diff --git a/c4419e4e65a8d9e0b5a15e9a5242453f261bee46.patch b/c4419e4e65a8d9e0b5a15e9a5242453f261bee46.patch deleted file mode 100644 index 25a91e0..0000000 --- a/c4419e4e65a8d9e0b5a15e9a5242453f261bee46.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c4419e4e65a8d9e0b5a15e9a5242453f261bee46 Mon Sep 17 00:00:00 2001 -From: Alexander Alekhin -Date: Thu, 15 Nov 2018 06:54:35 +0000 -Subject: [PATCH] cvv: repair build - ---- - modules/cvv/src/qtutil/filter/diffFilterWidget.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/cvv/src/qtutil/filter/diffFilterWidget.cpp b/modules/cvv/src/qtutil/filter/diffFilterWidget.cpp -index a555c84983..ca2964fd16 100644 ---- a/modules/cvv/src/qtutil/filter/diffFilterWidget.cpp -+++ b/modules/cvv/src/qtutil/filter/diffFilterWidget.cpp -@@ -1,6 +1,5 @@ - #include - #include --#include - - #include - -@@ -14,6 +13,7 @@ - - namespace cvv - { -+using namespace cv; - namespace qtutil - { - diff --git a/opencv-3.4.1-cmake_paths.patch b/opencv-3.4.1-cmake_paths.patch deleted file mode 100644 index 96af291..0000000 --- a/opencv-3.4.1-cmake_paths.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- ./CMakeLists.txt.orig 2018-02-27 01:46:32.259819239 +0000 -+++ ./CMakeLists.txt 2018-02-27 19:48:19.658736383 +0000 -@@ -439,19 +439,14 @@ else() - ocv_update(OPENCV_CONFIG_INSTALL_PATH ".") - else() - include(GNUInstallDirs) -- ocv_update(OPENCV_LIB_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}) -+ ocv_update(OPENCV_LIB_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}) - ocv_update(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}) - ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH share/OpenCV/samples) - ocv_update(OPENCV_JAR_INSTALL_PATH share/OpenCV/java) - ocv_update(OPENCV_OTHER_INSTALL_PATH share/OpenCV) - - if(NOT DEFINED OPENCV_CONFIG_INSTALL_PATH) -- math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}") -- if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX) -- ocv_update(OPENCV_CONFIG_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}/cmake/opencv) -- else() -- ocv_update(OPENCV_CONFIG_INSTALL_PATH share/OpenCV) -- endif() -+ ocv_update(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/OpenCV) - endif() - endif() - ocv_update(OPENCV_INCLUDE_INSTALL_PATH "include") diff --git a/opencv-4.1.0-install_3rdparty_licenses.patch b/opencv-4.1.0-install_3rdparty_licenses.patch new file mode 100644 index 0000000..7bbc85f --- /dev/null +++ b/opencv-4.1.0-install_3rdparty_licenses.patch @@ -0,0 +1,11 @@ +--- ./cmake/OpenCVDetectOpenCL.cmake.orig 2019-05-14 00:35:41.373094435 +0100 ++++ ./cmake/OpenCVDetectOpenCL.cmake 2019-05-14 00:35:50.833189862 +0100 +@@ -5,7 +5,7 @@ if(APPLE) + else() + set(OPENCL_LIBRARY "" CACHE STRING "OpenCL library") + set(OPENCL_INCLUDE_DIR "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/1.2" CACHE PATH "OpenCL include directory") +- ocv_install_3rdparty_licenses(opencl-headers "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/LICENSE.txt") ++ #ocv_install_3rdparty_licenses(opencl-headers "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/LICENSE.txt") + endif() + mark_as_advanced(OPENCL_INCLUDE_DIR OPENCL_LIBRARY) + diff --git a/opencv-clean.sh b/opencv-clean.sh index f95e268..9e88d46 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,4 +1,4 @@ -export VERSION=3.4.4 +export VERSION=3.4.6 wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz tar xf opencv-${VERSION}.tar.gz diff --git a/opencv.spec b/opencv.spec index 1b58656..c2210c5 100644 --- a/opencv.spec +++ b/opencv.spec @@ -49,7 +49,7 @@ %global srcname opencv %global abiver 3.4 -%global javaver 344 +%global javaver 346 # Required because opencv-core has lot of spurious dependencies # (despite supposed to be "-core") @@ -58,8 +58,8 @@ %global optflags %(echo %{optflags} -Wl,--as-needed ) Name: opencv -Version: 3.4.4 -Release: 10%{?dist} +Version: 3.4.6 +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -71,12 +71,7 @@ URL: http://opencv.org # Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz -# fix/simplify cmake config install location (upstreamable) -# https://bugzilla.redhat.com/1031312 -Patch1: opencv-3.4.1-cmake_paths.patch -Patch10: https://github.com/opencv/opencv/pull/13351/commits/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch -Patch11: https://github.com/opencv/opencv_contrib/pull/1905/commits/c4419e4e65a8d9e0b5a15e9a5242453f261bee46.patch -Patch12: https://github.com/opencv/opencv/pull/13254/commits/ad35b79e3f98b4ce30481e0299cca550ed77aef0.patch +Patch2: opencv-4.1.0-install_3rdparty_licenses.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -243,15 +238,13 @@ rm -r 3rdparty/ mkdir 3rdparty/ mv quirc/ 3rdparty/ -%patch1 -p1 -b .cmake_paths -%patch10 -p1 -b .fix_support_YV12_too +%patch2 -p1 -b .install_3rdparty_licenses + %ifarch %{ix86} %{arm} %endif pushd %{name}_contrib-%{version} -%patch11 -p1 -b .cvv_repair_build popd -%patch12 -p1 -b .fix_install_of_python_bindings %build # enabled by default if libraries are presents at build time: @@ -353,7 +346,6 @@ popd %files %doc README.md -%license LICENSE %{_bindir}/opencv_* %dir %{_datadir}/OpenCV %{_datadir}/OpenCV/haarcascades @@ -361,6 +353,8 @@ popd %{_datadir}/OpenCV/valgrind* %files core +%license LICENSE +%{_datadir}/licenses/opencv3/ %{_libdir}/libopencv_core.so.%{abiver}* %{_libdir}/libopencv_cvv.so.%{abiver}* %{_libdir}/libopencv_features2d.so.%{abiver}* @@ -387,7 +381,7 @@ popd %{_includedir}/opencv2 %{_libdir}/lib*.so %{_libdir}/pkgconfig/opencv.pc -%{_libdir}/OpenCV/*.cmake +%{_datadir}/OpenCV/*.cmake %files doc %{_datadir}/OpenCV/samples @@ -438,6 +432,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu May 23 2019 Sérgio Basto - 3.4.6-1 +- Update to 3.4.6 + * Mon May 20 2019 Sérgio Basto - 3.4.4-10 - Try improve Java Bindings diff --git a/sources b/sources index 1de73fb..bc95b7c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (opencv_contrib-clean-3.4.4.tar.gz) = ccb2fd7c3034e5c6e6d5065ee74a65ad4d4861a5683a81013cc93750de81d390ff2ad40ed65fcf54807090f67b136e6bb57cd9f1a435c49d5812d5380c062fd7 -SHA512 (opencv-clean-3.4.4.tar.gz) = ee8cc8af5e8c6accb4593171c6e30848f91717d41143e74336934fa4eefe4a333623ce2cf54f663f4e70a86c2d637389d9d0636458c9d35e6a5bf75a4cd78b84 +SHA512 (opencv-clean-3.4.6.tar.gz) = df7f2ee5ab83c047e5caa8cb12f6cbd8e7c13e554fe4183c43fc4d59e6b42e7a6e8caf71de587c95e36ec720105b4e5c166f3e376bb7ad446bd1b94bc0a84192 +SHA512 (opencv_contrib-3.4.6.tar.gz) = 27e9edeed2c995fcf2bd4a1f9226911f6bca2761d0ca615723eb851bb3fd5b46b7b55531db65d12593886e2484beb4ec7c8b2efaae2638c8427913cb9f3e0cb9 From 2cdf5ee9b567cef729388b273c1f12aaafdb960d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 8 Jun 2019 02:56:24 +0100 Subject: [PATCH 002/274] Fixed uploaded sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b508527..34d8e24 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ OpenCV-2.1.0.tar.bz2 /opencv_contrib-clean-3.4.4.tar.gz /opencv-clean-3.4.6.tar.gz /opencv_contrib-3.4.6.tar.gz +/opencv_contrib-clean-3.4.6.tar.gz diff --git a/sources b/sources index bc95b7c..cbf6216 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (opencv-clean-3.4.6.tar.gz) = df7f2ee5ab83c047e5caa8cb12f6cbd8e7c13e554fe4183c43fc4d59e6b42e7a6e8caf71de587c95e36ec720105b4e5c166f3e376bb7ad446bd1b94bc0a84192 -SHA512 (opencv_contrib-3.4.6.tar.gz) = 27e9edeed2c995fcf2bd4a1f9226911f6bca2761d0ca615723eb851bb3fd5b46b7b55531db65d12593886e2484beb4ec7c8b2efaae2638c8427913cb9f3e0cb9 +SHA512 (opencv_contrib-clean-3.4.6.tar.gz) = 261628e0ce607e9ff37d49dffb0378dd50b81b216c1223cb43489441131c522567b09c022dddcc99712268b77449a00b5f03ceceb4c104c4a111e7b246613ff6 From dd2b657bf316fe05ea8dbef1118ec87c4ef0534e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 10 Jun 2019 20:52:37 +0100 Subject: [PATCH 003/274] Fix cmakes location --- opencv.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index c2210c5..11f44cb 100644 --- a/opencv.spec +++ b/opencv.spec @@ -59,7 +59,7 @@ Name: opencv Version: 3.4.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -125,6 +125,7 @@ BuildRequires: protobuf-devel BuildRequires: gdal-devel BuildRequires: glog-devel BuildRequires: doxygen +BuildRequires: python3-beautifulsoup4 #for doc/doxygen/bib2xhtml.pl BuildRequires: perl-open BuildRequires: gflags-devel @@ -168,6 +169,7 @@ and Computer Vision algorithms. %package core Summary: OpenCV core libraries +Provides: bundled(quirc) = 1.0 Obsoletes: python2-%{name} < %{version}-%{release} %description core @@ -178,7 +180,6 @@ This package contains the OpenCV C/C++ core libraries. Summary: Development files for using the OpenCV library Requires: %{name}%{_isa} = %{version}-%{release} Requires: %{name}-contrib%{_isa} = %{version}-%{release} -Provides: bundled(quirc) = 1.0 %description devel This package contains the OpenCV C/C++ library and header files, as well as @@ -296,6 +297,7 @@ pushd build -DWITH_LIBV4L=ON \ -DWITH_OPENMP=ON \ -DENABLE_PKG_CONFIG=OFF \ + -DOPENCV_CONFIG_INSTALL_PATH=%{_libdir}/cmake/OpenCV \ %{?with_gdcm: -DWITH_GDCM=ON } \ %{?with_libmfx: -DWITH_MFX=ON } \ %{?with_clp: -DWITH_CLP=ON } \ @@ -380,8 +382,11 @@ popd %{_includedir}/opencv %{_includedir}/opencv2 %{_libdir}/lib*.so +%if %{with java} +%exclude %{_libdir}/libopencv_java*.so +%endif %{_libdir}/pkgconfig/opencv.pc -%{_datadir}/OpenCV/*.cmake +%{_libdir}/cmake/OpenCV/*.cmake %files doc %{_datadir}/OpenCV/samples @@ -432,6 +437,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sun Jun 09 2019 Sérgio Basto - 3.4.6-2 +- Fix cmakes location + * Thu May 23 2019 Sérgio Basto - 3.4.6-1 - Update to 3.4.6 From 44a97246a9ee280db440094bfc04efc57f0e96e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 12 Jun 2019 20:11:30 +0100 Subject: [PATCH 004/274] Remove Obsoletes/Provides libopencv_java.so and use OPENCV_JAR_INSTALL_PATH --- opencv.spec | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/opencv.spec b/opencv.spec index 11f44cb..35cbfa0 100644 --- a/opencv.spec +++ b/opencv.spec @@ -59,7 +59,7 @@ Name: opencv Version: 3.4.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -214,8 +214,6 @@ Summary: Java bindings for apps which use OpenCV Requires: java-headless Requires: javapackages-filesystem Requires: %{name}-core%{_isa} = %{version}-%{release} -Provides: lib%{name}_java.so%{?_isa} = %{version}-%{release} -Obsoletes: lib%{name}_java.so%{?_isa} < %{version}-%{release} %description java This package contains Java bindings for the OpenCV library. @@ -268,7 +266,8 @@ pushd build -DWITH_CAROTENE=OFF \ -DENABLE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \ - %{?with_java: -DBUILD_opencv_java=ON } \ + %{?with_java: -DBUILD_opencv_java=ON \ + -DOPENCV_JAR_INSTALL_PATH=%{_jnidir} } \ %{!?with_java: -DBUILD_opencv_java=OFF } \ %{?with_tbb: -DWITH_TBB=ON } \ %{!?with_gstreamer: -DWITH_GSTREAMER=OFF } \ @@ -319,10 +318,7 @@ popd find %{buildroot} -name '*.la' -delete rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ %if %{with java} -mv %{buildroot}/usr/share/OpenCV/java/libopencv_java%{javaver}.so %{buildroot}%{_libdir} -ln -s -r %{buildroot}%{_libdir}/libopencv_java%{javaver}.so %{buildroot}%{_libdir}/libopencv_java.so -mkdir -p %{buildroot}%{_jnidir} -mv %{buildroot}/usr/share/OpenCV/java/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ +ln -s -r %{buildroot}%{_jnidir}/libopencv_java%{javaver}.so %{buildroot}%{_jnidir}/libopencv_java.so ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/opencv.jar %endif @@ -382,9 +378,6 @@ popd %{_includedir}/opencv %{_includedir}/opencv2 %{_libdir}/lib*.so -%if %{with java} -%exclude %{_libdir}/libopencv_java*.so -%endif %{_libdir}/pkgconfig/opencv.pc %{_libdir}/cmake/OpenCV/*.cmake @@ -398,9 +391,9 @@ popd %if %{with java} %files java -%{_libdir}/libopencv_java%{javaver}.so -%{_libdir}/libopencv_java.so +%{_jnidir}/libopencv_java%{javaver}.so %{_jnidir}/opencv-%{javaver}.jar +%{_jnidir}/libopencv_java.so %{_jnidir}/opencv.jar %endif @@ -437,8 +430,12 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Wed Jun 12 2019 Sérgio Basto - 3.4.6-3 +- Remove Obsoletes/Provides libopencv_java.so and use OPENCV_JAR_INSTALL_PATH + * Sun Jun 09 2019 Sérgio Basto - 3.4.6-2 - Fix cmakes location +- add BR: python3-beautifulsoup4 * Thu May 23 2019 Sérgio Basto - 3.4.6-1 - Update to 3.4.6 From f1638db7ab71d806181e0561eac2216b8b3c34ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 26 Jun 2019 22:08:14 +0100 Subject: [PATCH 005/274] cmake: use relative PATH on OPENCV_CONFIG_INSTALL_PATH, fixes rhbz #1721876 cmake: don't set ENABLE_PKG_CONFIG --- opencv.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index 35cbfa0..1ba2895 100644 --- a/opencv.spec +++ b/opencv.spec @@ -59,7 +59,7 @@ Name: opencv Version: 3.4.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -295,8 +295,7 @@ pushd build -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-%{version}/modules \ -DWITH_LIBV4L=ON \ -DWITH_OPENMP=ON \ - -DENABLE_PKG_CONFIG=OFF \ - -DOPENCV_CONFIG_INSTALL_PATH=%{_libdir}/cmake/OpenCV \ + -DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \ %{?with_gdcm: -DWITH_GDCM=ON } \ %{?with_libmfx: -DWITH_MFX=ON } \ %{?with_clp: -DWITH_CLP=ON } \ @@ -430,6 +429,10 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Jun 25 2019 Sérgio Basto - 3.4.6-4 +- cmake: use relative PATH on OPENCV_CONFIG_INSTALL_PATH, fixes rhbz #1721876 +- cmake: don't set ENABLE_PKG_CONFIG + * Wed Jun 12 2019 Sérgio Basto - 3.4.6-3 - Remove Obsoletes/Provides libopencv_java.so and use OPENCV_JAR_INSTALL_PATH From eefb8f5021917da8b4d3b985652735a9ce3d109e Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 27 Jun 2019 20:48:18 -0600 Subject: [PATCH 006/274] Rebuild for coin-or package updates. --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 1ba2895..6e57f11 100644 --- a/opencv.spec +++ b/opencv.spec @@ -59,7 +59,7 @@ Name: opencv Version: 3.4.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -429,6 +429,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Jun 27 2019 Jerry James - 3.4.6-5 +- Rebuild for coin-or package updates + * Tue Jun 25 2019 Sérgio Basto - 3.4.6-4 - cmake: use relative PATH on OPENCV_CONFIG_INSTALL_PATH, fixes rhbz #1721876 - cmake: don't set ENABLE_PKG_CONFIG From 7ceebee30f29f60c7621d9c8a6066dac59d037af Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 23:24:55 +0000 Subject: [PATCH 007/274] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 6e57f11..a09153a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -59,7 +59,7 @@ Name: opencv Version: 3.4.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -429,6 +429,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 3.4.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Thu Jun 27 2019 Jerry James - 3.4.6-5 - Rebuild for coin-or package updates From f380cb6e0c6fe9bffcea0507def17fb8f4a1ebc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 19 Aug 2019 10:21:18 +0200 Subject: [PATCH 008/274] Rebuilt for Python 3.8 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index a09153a..ea0601e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -59,7 +59,7 @@ Name: opencv Version: 3.4.6 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -429,6 +429,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Mon Aug 19 2019 Miro Hrončok - 3.4.6-7 +- Rebuilt for Python 3.8 + * Thu Jul 25 2019 Fedora Release Engineering - 3.4.6-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 1c92cba903877a8a3cd7022b7e9e250fe0a5b688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 22 Aug 2019 20:43:52 +0200 Subject: [PATCH 009/274] Drop the broken dependency on pylint --- opencv.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index ea0601e..54298e8 100644 --- a/opencv.spec +++ b/opencv.spec @@ -108,7 +108,6 @@ BuildRequires: pkgconfig BuildRequires: python3-devel BuildRequires: python3-flake8 BuildRequires: python3-numpy -BuildRequires: pylint BuildRequires: swig >= 1.3.24 %{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9} %if 0%{?fedora} || 0%{?rhel} > 7 @@ -286,7 +285,7 @@ pushd build -DINSTALL_PYTHON_EXAMPLES=ON \ -DPYTHON2_EXECUTABLE=false \ -DPYTHON3_EXECUTABLE=%{__python3} \ - -DENABLE_PYLINT=ON \ + -DENABLE_PYLINT=OFF \ -DBUILD_PROTOBUF=OFF \ -DPROTOBUF_UPDATE_FILES=ON \ %{?with_opencl: -DOPENCL_INCLUDE_DIR=%{_includedir}/CL } \ From 319098a209ed38c6ee8cf9894cb9c0a8a4a82547 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 12 Sep 2019 07:42:01 +0900 Subject: [PATCH 010/274] F-32: remove vtk gcdm dependency for now because they have broken dependency (bug 1751406) --- opencv.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 54298e8..525581e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -30,8 +30,14 @@ # check OpenCVFindLAPACK.cmake %bcond_with atlas %bcond_without openblas +# As of 2019-09-12 gdcm dependency is broken on Fedora 32 +%if 0%{?fedora} < 32 %bcond_without gdcm -%if 0%{?fedora} > 29 +%else +%bcond_with gdcm +%endif +# As of 2019-09-12 vtk dependency is broken on Fedora 32 +%if 0%{?fedora} > 29 && 0%{?fedora} < 32 %bcond_without vtk %else #VTK support disabled. Incompatible combination: OpenCV + Qt5 and VTK ver.7.1.1 + Qt4 in <= F29 @@ -59,7 +65,7 @@ Name: opencv Version: 3.4.6 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -428,6 +434,10 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Wed Sep 11 2019 Mamoru TASAKA - 3.4.6-8 +- F-32: remove vtk gcdm dependency for now because they have broken dependency + (bug 1751406) + * Mon Aug 19 2019 Miro Hrončok - 3.4.6-7 - Rebuilt for Python 3.8 From 6b88360f44e23199f66fb9779d59e96980798829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 13 Sep 2019 22:31:32 +0100 Subject: [PATCH 011/274] Reenable pylint and vtk, they are working now. --- opencv.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/opencv.spec b/opencv.spec index 525581e..7b8b872 100644 --- a/opencv.spec +++ b/opencv.spec @@ -36,8 +36,7 @@ %else %bcond_with gdcm %endif -# As of 2019-09-12 vtk dependency is broken on Fedora 32 -%if 0%{?fedora} > 29 && 0%{?fedora} < 32 +%if 0%{?fedora} > 29 %bcond_without vtk %else #VTK support disabled. Incompatible combination: OpenCV + Qt5 and VTK ver.7.1.1 + Qt4 in <= F29 @@ -65,7 +64,7 @@ Name: opencv Version: 3.4.6 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -114,6 +113,7 @@ BuildRequires: pkgconfig BuildRequires: python3-devel BuildRequires: python3-flake8 BuildRequires: python3-numpy +BuildRequires: pylint BuildRequires: swig >= 1.3.24 %{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9} %if 0%{?fedora} || 0%{?rhel} > 7 @@ -291,7 +291,7 @@ pushd build -DINSTALL_PYTHON_EXAMPLES=ON \ -DPYTHON2_EXECUTABLE=false \ -DPYTHON3_EXECUTABLE=%{__python3} \ - -DENABLE_PYLINT=OFF \ + -DENABLE_PYLINT=ON \ -DBUILD_PROTOBUF=OFF \ -DPROTOBUF_UPDATE_FILES=ON \ %{?with_opencl: -DOPENCL_INCLUDE_DIR=%{_includedir}/CL } \ @@ -434,6 +434,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri Sep 13 2019 Sérgio Basto - 3.4.6-9 +- Reenable pylint and vtk, they are working now. + * Wed Sep 11 2019 Mamoru TASAKA - 3.4.6-8 - F-32: remove vtk gcdm dependency for now because they have broken dependency (bug 1751406) From 8ea0db1b86fdd3e7f2884305c951ec8f4fa508a7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 20 May 2019 11:32:04 +0200 Subject: [PATCH 012/274] Switch to use _cuda_prefix --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 7b8b872..058561a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -279,7 +279,7 @@ pushd build %{!?with_ffmpeg: -DWITH_FFMPEG=OFF } \ %{?with_cuda: \ -DWITH_CUDA=ON \ - -DCUDA_TOOLKIT_ROOT_DIR=%{?_cuda_topdir} \ + -DCUDA_TOOLKIT_ROOT_DIR=%{?_cuda_prefix} \ -DCUDA_VERBOSE_BUILD=ON \ -DCUDA_PROPAGATE_HOST_FLAGS=OFF \ } \ From 3227082292c49074d5357ea972489698e4853cbb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 20 May 2019 13:11:18 +0200 Subject: [PATCH 013/274] Add cuda dependencies --- opencv.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opencv.spec b/opencv.spec index 058561a..f91fe1e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -82,6 +82,11 @@ BuildRequires: gcc-c++ 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}) +} %{?with_eigen2:BuildRequires: eigen2-devel} %{?with_eigen3:BuildRequires: eigen3-devel} BuildRequires: gtk3-devel From 8e36afc541ac16cd908de6c751d5bf0b185dcd22 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 13 Sep 2019 16:49:55 +0200 Subject: [PATCH 014/274] Switch to https --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index f91fe1e..be70d5f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -68,7 +68,7 @@ Release: 9%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD -URL: http://opencv.org +URL: https://opencv.org # RUN opencv-clean.sh TO PREPARE TARBALLS FOR FEDORA # # Need to remove copyrighted lena.jpg images from tarball (rhbz#1295173) From 428f643a93ab27b0c0c0b78ae276dee90384d6cf Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 13 Sep 2019 18:09:00 +0200 Subject: [PATCH 015/274] Update to 4.1.1 --- .gitignore | 2 ++ opencv-clean.sh | 2 +- opencv.spec | 26 ++++++++++++++++---------- sources | 4 ++-- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 34d8e24..177a521 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ OpenCV-2.1.0.tar.bz2 /opencv-clean-3.4.6.tar.gz /opencv_contrib-3.4.6.tar.gz /opencv_contrib-clean-3.4.6.tar.gz +/opencv-clean-4.1.1.tar.gz +/opencv_contrib-clean-4.1.1.tar.gz diff --git a/opencv-clean.sh b/opencv-clean.sh index 9e88d46..9016048 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,4 +1,4 @@ -export VERSION=3.4.6 +export VERSION=4.1.1 wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz tar xf opencv-${VERSION}.tar.gz diff --git a/opencv.spec b/opencv.spec index be70d5f..fd5a3e1 100644 --- a/opencv.spec +++ b/opencv.spec @@ -53,8 +53,8 @@ %bcond_without java %global srcname opencv -%global abiver 3.4 -%global javaver 346 +%global abiver 4.1 +%global javaver 411 # Required because opencv-core has lot of spurious dependencies # (despite supposed to be "-core") @@ -63,8 +63,8 @@ %global optflags %(echo %{optflags} -Wl,--as-needed ) Name: opencv -Version: 3.4.6 -Release: 9%{?dist} +Version: 4.1.1 +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -76,7 +76,9 @@ URL: https://opencv.org # Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz -Patch2: opencv-4.1.0-install_3rdparty_licenses.patch +#Source2: https://github.com/opencv/ade/archive/37479d90e3a5d47f132f512b22cbe206#v0.1.1d.zip +Source3: face_landmark_model.dat.xz +#Source4: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0 BuildRequires: gcc-c++ BuildRequires: libtool @@ -247,11 +249,6 @@ rm -r 3rdparty/ mkdir 3rdparty/ mv quirc/ 3rdparty/ -%patch2 -p1 -b .install_3rdparty_licenses - -%ifarch %{ix86} %{arm} -%endif - pushd %{name}_contrib-%{version} popd @@ -262,6 +259,12 @@ popd mkdir -p build pushd build +mkdir -p share/opencv4/testdata/cv/face +install -pm 0644 %{SOURCE3} share/opencv4/testdata/cv/face +pushd share/opencv4/testdata/cv/face + xz -d face_landmark_model.dat.xz +popd + # disabling IPP because it is closed source library from intel %cmake CMAKE_VERBOSE=1 \ @@ -439,6 +442,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri Sep 13 2019 Nicolas Chauvet - 4.1.1-1 +- Update to 4.1.1 + * Fri Sep 13 2019 Sérgio Basto - 3.4.6-9 - Reenable pylint and vtk, they are working now. diff --git a/sources b/sources index cbf6216..1c8d578 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (opencv-clean-3.4.6.tar.gz) = df7f2ee5ab83c047e5caa8cb12f6cbd8e7c13e554fe4183c43fc4d59e6b42e7a6e8caf71de587c95e36ec720105b4e5c166f3e376bb7ad446bd1b94bc0a84192 -SHA512 (opencv_contrib-clean-3.4.6.tar.gz) = 261628e0ce607e9ff37d49dffb0378dd50b81b216c1223cb43489441131c522567b09c022dddcc99712268b77449a00b5f03ceceb4c104c4a111e7b246613ff6 +SHA512 (opencv-clean-4.1.1.tar.gz) = 154d5c4e9d3d68638af480ca928560d12150a4e948565de362ed415adea0aa3ea38b9a803bb472d49e7d5752ea80bb4b99953813491a20162ca531adbc5a4d87 +SHA512 (opencv_contrib-clean-4.1.1.tar.gz) = e34d514716eff2eea6d953b194c8bb5554524cbf16078485d2bdbc48180ed840b1f6be2c178160ae6d64f45b4c7dd635d54433eae84ab3efa8d8d79e07114682 From d289fced97936cf753ccf026a680d6c891394904 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 13 Sep 2019 18:11:29 +0200 Subject: [PATCH 016/274] Switch to libGL-devel --- opencv.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index fd5a3e1..1ae32b1 100644 --- a/opencv.spec +++ b/opencv.spec @@ -144,8 +144,8 @@ BuildRequires: gflags-devel BuildRequires: SFML-devel BuildRequires: libucil-devel BuildRequires: qt5-qtbase-devel -BuildRequires: mesa-libGL-devel -BuildRequires: mesa-libGLU-devel +BuildRequires: libGL-devel +BuildRequires: libGLU-devel BuildRequires: hdf5-devel # Module opencv_ovis disabled because of incompatible OGRE3D version < 1.10 # BuildRequires: ogre-devel From 6d86e3fb860d5a0cf22533e6e01c4056b92fde67 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 13 Sep 2019 18:39:55 +0200 Subject: [PATCH 017/274] Remove old patch --- opencv-4.1.0-install_3rdparty_licenses.patch | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 opencv-4.1.0-install_3rdparty_licenses.patch diff --git a/opencv-4.1.0-install_3rdparty_licenses.patch b/opencv-4.1.0-install_3rdparty_licenses.patch deleted file mode 100644 index 7bbc85f..0000000 --- a/opencv-4.1.0-install_3rdparty_licenses.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./cmake/OpenCVDetectOpenCL.cmake.orig 2019-05-14 00:35:41.373094435 +0100 -+++ ./cmake/OpenCVDetectOpenCL.cmake 2019-05-14 00:35:50.833189862 +0100 -@@ -5,7 +5,7 @@ if(APPLE) - else() - set(OPENCL_LIBRARY "" CACHE STRING "OpenCL library") - set(OPENCL_INCLUDE_DIR "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/1.2" CACHE PATH "OpenCL include directory") -- ocv_install_3rdparty_licenses(opencl-headers "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/LICENSE.txt") -+ #ocv_install_3rdparty_licenses(opencl-headers "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/LICENSE.txt") - endif() - mark_as_advanced(OPENCL_INCLUDE_DIR OPENCL_LIBRARY) - From a7f630433db89546a3920d05fb1a23ff0686c63e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Fri, 13 Sep 2019 19:41:44 +0200 Subject: [PATCH 018/274] Update to 4.1.0 --- opencv.spec | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/opencv.spec b/opencv.spec index 1ae32b1..a0d3605 100644 --- a/opencv.spec +++ b/opencv.spec @@ -309,6 +309,8 @@ popd -DWITH_LIBV4L=ON \ -DWITH_OPENMP=ON \ -DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \ + -DOPENCV_GENERATE_PKGCONFIG=ON \ + -DOPENCV_PC_FILE_NAME=opencv.pc \ %{?with_gdcm: -DWITH_GDCM=ON } \ %{?with_libmfx: -DWITH_MFX=ON } \ %{?with_clp: -DWITH_CLP=ON } \ @@ -357,14 +359,14 @@ popd %files %doc README.md %{_bindir}/opencv_* -%dir %{_datadir}/OpenCV -%{_datadir}/OpenCV/haarcascades -%{_datadir}/OpenCV/lbpcascades -%{_datadir}/OpenCV/valgrind* +%dir %{_datadir}/opencv4 +%{_datadir}/opencv4/haarcascades +%{_datadir}/opencv4/lbpcascades +%{_datadir}/opencv4/valgrind* %files core %license LICENSE -%{_datadir}/licenses/opencv3/ +%{_datadir}/licenses/opencv4/ %{_libdir}/libopencv_core.so.%{abiver}* %{_libdir}/libopencv_cvv.so.%{abiver}* %{_libdir}/libopencv_features2d.so.%{abiver}* @@ -387,18 +389,18 @@ popd %endif %files devel -%{_includedir}/opencv -%{_includedir}/opencv2 +#{_includedir}/opencv +%{_includedir}/opencv4/opencv2 %{_libdir}/lib*.so %{_libdir}/pkgconfig/opencv.pc -%{_libdir}/cmake/OpenCV/*.cmake +%{_libdir}/cmake/opencv4/*.cmake %files doc -%{_datadir}/OpenCV/samples -%{_datadir}/OpenCV/doc +%{_datadir}/opencv4/samples +#{_datadir}/opencv4/doc %files -n python3-opencv -%{_bindir}/setup_vars_opencv3.sh +%{_bindir}/setup_vars_opencv4.sh %{python3_sitearch}/cv2.cpython-3*.so %if %{with java} @@ -431,6 +433,7 @@ popd %{_libdir}/libopencv_plot.so.%{abiver}* %{_libdir}/libopencv_reg.so.%{abiver}* %{_libdir}/libopencv_rgbd.so.%{abiver}* +%{_libdir}/libopencv_quality.so.%{abiver}* %{_libdir}/libopencv_saliency.so.%{abiver}* %{_libdir}/libopencv_stereo.so.%{abiver}* %{_libdir}/libopencv_structured_light.so.%{abiver}* @@ -445,6 +448,9 @@ popd * Fri Sep 13 2019 Nicolas Chauvet - 4.1.1-1 - Update to 4.1.1 +* Fri Sep 13 2019 Sérgio Basto - 4.1.0-1 +- Update opencv to 4.1.0 + * Fri Sep 13 2019 Sérgio Basto - 3.4.6-9 - Reenable pylint and vtk, they are working now. From 6376b301948add1d2d1f56fbd5b46e92c2d0089f Mon Sep 17 00:00:00 2001 From: "Christopher N. Hesse" Date: Fri, 13 Sep 2019 22:20:23 +0200 Subject: [PATCH 019/274] Add vulkan --- opencv.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index a0d3605..4b57f32 100644 --- a/opencv.spec +++ b/opencv.spec @@ -51,6 +51,7 @@ %bcond_without clp %bcond_without va %bcond_without java +%bcond_without vulkan %global srcname opencv %global abiver 4.1 @@ -170,6 +171,7 @@ BuildRequires: lapack-devel BuildRequires: ant BuildRequires: java-devel } +%{?with_vulkan:BuildRequires: vulkan-headers} Requires: opencv-core%{_isa} = %{version}-%{release} @@ -316,6 +318,7 @@ popd %{?with_clp: -DWITH_CLP=ON } \ %{?with_va: -DWITH_VA=ON } \ %{!?with_vtk: -DWITH_VTK=OFF} \ + %{?with_vulkan: -DWITH_VULKAN=ON -DVULKAN_INCLUDE_DIRS=%{_includedir}/vulkan } \ .. # -DENABLE_CXX11=ON \ @@ -451,9 +454,11 @@ popd * Fri Sep 13 2019 Sérgio Basto - 4.1.0-1 - Update opencv to 4.1.0 +* Fri Sep 13 2019 Christopher N. Hesse - 4.1.0-0 +- Enable vulkan compute backend + * Fri Sep 13 2019 Sérgio Basto - 3.4.6-9 - Reenable pylint and vtk, they are working now. - * Wed Sep 11 2019 Mamoru TASAKA - 3.4.6-8 - F-32: remove vtk gcdm dependency for now because they have broken dependency (bug 1751406) From d887b09f69df042df45179ebd5e6b657d7e46869 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 14 Sep 2019 09:01:53 +0200 Subject: [PATCH 020/274] Revert "Remove old patch" This reverts commit 6d86e3fb860d5a0cf22533e6e01c4056b92fde67. --- opencv-4.1.0-install_3rdparty_licenses.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 opencv-4.1.0-install_3rdparty_licenses.patch diff --git a/opencv-4.1.0-install_3rdparty_licenses.patch b/opencv-4.1.0-install_3rdparty_licenses.patch new file mode 100644 index 0000000..7bbc85f --- /dev/null +++ b/opencv-4.1.0-install_3rdparty_licenses.patch @@ -0,0 +1,11 @@ +--- ./cmake/OpenCVDetectOpenCL.cmake.orig 2019-05-14 00:35:41.373094435 +0100 ++++ ./cmake/OpenCVDetectOpenCL.cmake 2019-05-14 00:35:50.833189862 +0100 +@@ -5,7 +5,7 @@ if(APPLE) + else() + set(OPENCL_LIBRARY "" CACHE STRING "OpenCL library") + set(OPENCL_INCLUDE_DIR "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/1.2" CACHE PATH "OpenCL include directory") +- ocv_install_3rdparty_licenses(opencl-headers "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/LICENSE.txt") ++ #ocv_install_3rdparty_licenses(opencl-headers "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/LICENSE.txt") + endif() + mark_as_advanced(OPENCL_INCLUDE_DIR OPENCL_LIBRARY) + From 2f290e90730e7b8523302a807321e0849da181f4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 14 Sep 2019 09:16:01 +0200 Subject: [PATCH 021/274] Remove unused sources --- opencv.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 4b57f32..e1eac35 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,9 +77,7 @@ URL: https://opencv.org # Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz -#Source2: https://github.com/opencv/ade/archive/37479d90e3a5d47f132f512b22cbe206#v0.1.1d.zip Source3: face_landmark_model.dat.xz -#Source4: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0 BuildRequires: gcc-c++ BuildRequires: libtool From 4be4395d12af9326d83c4321f2429b9b201aadfa Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 14 Sep 2019 09:18:03 +0200 Subject: [PATCH 022/274] Apply old patch --- opencv.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opencv.spec b/opencv.spec index e1eac35..255d5e1 100644 --- a/opencv.spec +++ b/opencv.spec @@ -79,6 +79,8 @@ Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz Source3: face_landmark_model.dat.xz +Patch0: opencv-4.1.0-install_3rdparty_licenses.patch + BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: cmake >= 2.6.3 From 0b310fe8cd4f4a6b3c84f4dfcc6d64fdcc638c13 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 14 Sep 2019 09:18:17 +0200 Subject: [PATCH 023/274] clean-up --- opencv.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/opencv.spec b/opencv.spec index 255d5e1..11a0d65 100644 --- a/opencv.spec +++ b/opencv.spec @@ -321,10 +321,6 @@ popd %{?with_vulkan: -DWITH_VULKAN=ON -DVULKAN_INCLUDE_DIRS=%{_includedir}/vulkan } \ .. -# -DENABLE_CXX11=ON \ -# -DPYTHON2_PACKAGES_PATH=%{python2_sitearch} \ -# -DPYTHON3_PACKAGES_PATH=%{python3_sitearch} \ - %make_build VERBOSE=1 popd From 6e473cb5112c7ac25870e393b2afd7958e108da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 14 Sep 2019 16:51:06 +0100 Subject: [PATCH 024/274] Fix cmake files location, apply patch0 and add data/opencv4/quality files into package --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 11a0d65..f0d6694 100644 --- a/opencv.spec +++ b/opencv.spec @@ -251,6 +251,8 @@ rm -r 3rdparty/ mkdir 3rdparty/ mv quirc/ 3rdparty/ +%patch0 -p1 -b .install_3rdparty_licenses + pushd %{name}_contrib-%{version} popd @@ -362,6 +364,7 @@ popd %{_datadir}/opencv4/haarcascades %{_datadir}/opencv4/lbpcascades %{_datadir}/opencv4/valgrind* +%{_datadir}/opencv4/quality %files core %license LICENSE @@ -392,7 +395,7 @@ popd %{_includedir}/opencv4/opencv2 %{_libdir}/lib*.so %{_libdir}/pkgconfig/opencv.pc -%{_libdir}/cmake/opencv4/*.cmake +%{_libdir}/cmake/OpenCV/*.cmake %files doc %{_datadir}/opencv4/samples From 854a97fb82c27a3a7b73236f943100377e2d5df8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 8 Oct 2019 10:19:28 +0200 Subject: [PATCH 025/274] Fix Summary not C --- .gitignore | 1 + opencv.spec | 2 +- sources | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 177a521..49fc6c1 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ OpenCV-2.1.0.tar.bz2 /opencv_contrib-clean-3.4.6.tar.gz /opencv-clean-4.1.1.tar.gz /opencv_contrib-clean-4.1.1.tar.gz +/face_landmark_model.dat.xz diff --git a/opencv.spec b/opencv.spec index f0d6694..2e4b79a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -203,7 +203,7 @@ package. %package doc -Summary: docs files +Summary: Documentation files Requires: opencv-devel = %{version}-%{release} BuildArch: noarch Provides: %{name}-devel-docs = %{version}-%{release} diff --git a/sources b/sources index 1c8d578..7307a6c 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (opencv-clean-4.1.1.tar.gz) = 154d5c4e9d3d68638af480ca928560d12150a4e948565de362ed415adea0aa3ea38b9a803bb472d49e7d5752ea80bb4b99953813491a20162ca531adbc5a4d87 -SHA512 (opencv_contrib-clean-4.1.1.tar.gz) = e34d514716eff2eea6d953b194c8bb5554524cbf16078485d2bdbc48180ed840b1f6be2c178160ae6d64f45b4c7dd635d54433eae84ab3efa8d8d79e07114682 +SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 From 79b7475e7af6a09784cf81b439a1fd8de19d5b8d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 8 Oct 2019 12:02:45 +0200 Subject: [PATCH 026/274] Fixed gdcm in f32 --- opencv.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/opencv.spec b/opencv.spec index 2e4b79a..94271ff 100644 --- a/opencv.spec +++ b/opencv.spec @@ -30,12 +30,7 @@ # check OpenCVFindLAPACK.cmake %bcond_with atlas %bcond_without openblas -# As of 2019-09-12 gdcm dependency is broken on Fedora 32 -%if 0%{?fedora} < 32 %bcond_without gdcm -%else -%bcond_with gdcm -%endif %if 0%{?fedora} > 29 %bcond_without vtk %else From d6b2548b1181b76ce2ed9d50856722cc873934fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 13 Oct 2019 23:57:58 +0100 Subject: [PATCH 027/274] Update to 4.1.2 --- opencv-clean.sh | 2 +- opencv.spec | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/opencv-clean.sh b/opencv-clean.sh index 9016048..8014a3e 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,4 +1,4 @@ -export VERSION=4.1.1 +export VERSION=4.1.2 wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz tar xf opencv-${VERSION}.tar.gz diff --git a/opencv.spec b/opencv.spec index 94271ff..f333c6e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ %global srcname opencv %global abiver 4.1 -%global javaver 411 +%global javaver 412 # Required because opencv-core has lot of spurious dependencies # (despite supposed to be "-core") @@ -59,7 +59,7 @@ %global optflags %(echo %{optflags} -Wl,--as-needed ) Name: opencv -Version: 4.1.1 +Version: 4.1.2 Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. @@ -298,6 +298,7 @@ popd -DINSTALL_PYTHON_EXAMPLES=ON \ -DPYTHON2_EXECUTABLE=false \ -DPYTHON3_EXECUTABLE=%{__python3} \ + -DPYTHON3_PACKAGES_PATH=%{python3_sitearch} \ -DENABLE_PYLINT=ON \ -DBUILD_PROTOBUF=OFF \ -DPROTOBUF_UPDATE_FILES=ON \ @@ -415,9 +416,10 @@ popd %{_libdir}/libopencv_calib3d.so.%{abiver}* %{_libdir}/libopencv_ccalib.so.%{abiver}* #Module opencv_datasets disabled because opencv_text dependency can't be resolved! -%{_libdir}/libopencv_datasets.so.%%{abiver}* -%{_libdir}/libopencv_dnn.so.%%{abiver}* -%{_libdir}/libopencv_dnn_objdetect.so.%%{abiver}* +%{_libdir}/libopencv_datasets.so.%{abiver}* +%{_libdir}/libopencv_dnn.so.%{abiver}* +%{_libdir}/libopencv_dnn_objdetect.so.%{abiver}* +%{_libdir}/libopencv_dnn_superres.so.%{abiver}* %{_libdir}/libopencv_dpm.so.%{abiver}* %{_libdir}/libopencv_face.so.%{abiver}* %{_libdir}/libopencv_freetype.so.%{abiver}* @@ -435,13 +437,16 @@ popd %{_libdir}/libopencv_stereo.so.%{abiver}* %{_libdir}/libopencv_structured_light.so.%{abiver}* %{_libdir}/libopencv_surface_matching.so.%{abiver}* -%{_libdir}/libopencv_text.so.%%{abiver}* +%{_libdir}/libopencv_text.so.%{abiver}* %{_libdir}/libopencv_tracking.so.%{abiver}* %{_libdir}/libopencv_ximgproc.so.%{abiver}* %{_libdir}/libopencv_xobjdetect.so.%{abiver}* %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sat Oct 12 2019 Nicolas Chauvet - 4.1.2-1 +- Update to 4.1.2 + * Fri Sep 13 2019 Nicolas Chauvet - 4.1.1-1 - Update to 4.1.1 From 9f377b8d9d4fbb34e45b5c5ba00e4bf2c2eac7c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 14 Oct 2019 00:28:41 +0100 Subject: [PATCH 028/274] Update sources file --- .gitignore | 2 ++ sources | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 49fc6c1..e64dead 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,5 @@ OpenCV-2.1.0.tar.bz2 /opencv-clean-4.1.1.tar.gz /opencv_contrib-clean-4.1.1.tar.gz /face_landmark_model.dat.xz +/opencv-clean-4.1.2.tar.gz +/opencv_contrib-clean-4.1.2.tar.gz diff --git a/sources b/sources index 7307a6c..0632572 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 +SHA512 (opencv-clean-4.1.2.tar.gz) = baa1250178e6e2cf96004fc64c2b667eb970f2420109b4c00e80cbed640faa3e21f5d1f78beb50dddd9cbccd028c49796504c7a18f7c412bf090f34511901cdf +SHA512 (opencv_contrib-clean-4.1.2.tar.gz) = 72f7a4c46d44ab19ad3ec8569c1d1b77f41128609ccf3779ff6080be6144e6dd123f3590b37ab577d57631814186f1b0917973b660baaabbb5a7249051240c5a From fef2a5b4be45b508e6404125b97306802f55982a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 14 Oct 2019 00:34:35 +0100 Subject: [PATCH 029/274] Fix sources file --- sources | 1 + 1 file changed, 1 insertion(+) diff --git a/sources b/sources index 0632572..65503c5 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ +SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (opencv-clean-4.1.2.tar.gz) = baa1250178e6e2cf96004fc64c2b667eb970f2420109b4c00e80cbed640faa3e21f5d1f78beb50dddd9cbccd028c49796504c7a18f7c412bf090f34511901cdf SHA512 (opencv_contrib-clean-4.1.2.tar.gz) = 72f7a4c46d44ab19ad3ec8569c1d1b77f41128609ccf3779ff6080be6144e6dd123f3590b37ab577d57631814186f1b0917973b660baaabbb5a7249051240c5a From 4bae675be5f8cb7df84c37ddf66e04c5e853e049 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 18 Dec 2019 20:19:45 -0700 Subject: [PATCH 030/274] Rebuild for protobuf 3.11 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index f333c6e..9a8dc1b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ Name: opencv Version: 4.1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -444,6 +444,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Dec 19 2019 Orion Poplawski - 4.1.2-2 +- Rebuild for protobuf 3.11 + * Sat Oct 12 2019 Nicolas Chauvet - 4.1.2-1 - Update to 4.1.2 From c56d1e400a9b2382ecb04f95068a3c8f346c7f69 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sun, 13 Oct 2019 08:36:34 +0200 Subject: [PATCH 031/274] Update to 4.1.2 --- .gitignore | 43 +++---------------------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/.gitignore b/.gitignore index e64dead..3963c11 100644 --- a/.gitignore +++ b/.gitignore @@ -1,40 +1,3 @@ -OpenCV-2.1.0.tar.bz2 -/OpenCV-2.2.0.tar.bz2 -/OpenCV-2.3.1.tar.bz2 -/OpenCV-2.3.1a.tar.bz2 -/OpenCV-2.4.1.tar.bz2 -/OpenCV-2.4.2.tar.bz2 -/OpenCV-2.4.3.tar.bz2 -/OpenCV-2.4.4-beta.tar.bz2 -/OpenCV-2.4.4a.tar.bz2 -/OpenCV-2.4.4a-clean.tar.bz2 -/opencv-2.4.5-clean.tar.xz -/opencv-clean-2.4.6.1.tar.xz -/opencv-clean-2.4.7.tar.xz -/opencv-clean-2.4.9.tar.xz -/opencv-clean-2.4.11.tar.xz -/opencv-clean-2.4.12.3.tar.xz -/opencv_contrib-3.1.0.tar.gz -/opencv-3.1.0.tar.gz -/opencv_contrib-clean-3.1.0.tar.gz -/opencv-clean-3.2.0.tar.gz -/opencv-3.2.0.tar.gz -/opencv_contrib-clean-3.2.0.tar.gz -/opencv_contrib-clean-3.3.1.tar.gz -/opencv-clean-3.3.1.tar.gz -/opencv_contrib-clean-3.4.1.tar.gz -/opencv-clean-3.4.1.tar.gz -/opencv_contrib-clean-3.4.2.tar.gz -/opencv-clean-3.4.2.tar.gz -/opencv_contrib-clean-3.4.3.tar.gz -/opencv-clean-3.4.3.tar.gz -/opencv-clean-3.4.4.tar.gz -/opencv_contrib-clean-3.4.4.tar.gz -/opencv-clean-3.4.6.tar.gz -/opencv_contrib-3.4.6.tar.gz -/opencv_contrib-clean-3.4.6.tar.gz -/opencv-clean-4.1.1.tar.gz -/opencv_contrib-clean-4.1.1.tar.gz -/face_landmark_model.dat.xz -/opencv-clean-4.1.2.tar.gz -/opencv_contrib-clean-4.1.2.tar.gz +OpenCV*.tar.* +opencv*.tar.* +face_landmark_model.dat.xz From 9fd3a5e294dc5bb8ffdbed9a70f5513a2001c6b3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 17 Oct 2019 10:50:04 +0200 Subject: [PATCH 032/274] Add missing directory ownership --- opencv.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 9a8dc1b..29ee446 100644 --- a/opencv.spec +++ b/opencv.spec @@ -387,7 +387,7 @@ popd %endif %files devel -#{_includedir}/opencv +%dir %{_includedir}/opencv4 %{_includedir}/opencv4/opencv2 %{_libdir}/lib*.so %{_libdir}/pkgconfig/opencv.pc @@ -395,7 +395,6 @@ popd %files doc %{_datadir}/opencv4/samples -#{_datadir}/opencv4/doc %files -n python3-opencv %{_bindir}/setup_vars_opencv4.sh From ed49812c442647110b7861852d045e1bc6c2c930 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 17 Oct 2019 10:54:52 +0200 Subject: [PATCH 033/274] Lower CPU_BASELINE from SSE3 to SSE2 --- opencv.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencv.spec b/opencv.spec index 29ee446..28bfed5 100644 --- a/opencv.spec +++ b/opencv.spec @@ -276,6 +276,9 @@ popd -DWITH_UNICAP=ON \ -DCMAKE_SKIP_RPATH=ON \ -DWITH_CAROTENE=OFF \ +%ifarch x86_64 %{ix86} + -DCPU_BASELINE=SSE2 \ +%endif -DENABLE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \ %{?with_java: -DBUILD_opencv_java=ON \ From e8eab8a9acd39b280a06ae8afc2e5e64bed88174 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 17 Oct 2019 11:10:18 +0200 Subject: [PATCH 034/274] Fix includes for opencv2 --- opencv-4.1.2-includes.patch | 24 ++++++++++++++++++++++++ opencv.spec | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 opencv-4.1.2-includes.patch diff --git a/opencv-4.1.2-includes.patch b/opencv-4.1.2-includes.patch new file mode 100644 index 0000000..e69588c --- /dev/null +++ b/opencv-4.1.2-includes.patch @@ -0,0 +1,24 @@ +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 diff --git a/opencv.spec b/opencv.spec index 28bfed5..30ac293 100644 --- a/opencv.spec +++ b/opencv.spec @@ -75,6 +75,7 @@ Source1: %{name}_contrib-clean-%{version}.tar.gz Source3: face_landmark_model.dat.xz Patch0: opencv-4.1.0-install_3rdparty_licenses.patch +Patch1: opencv-4.1.2-includes.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -247,6 +248,7 @@ mkdir 3rdparty/ mv quirc/ 3rdparty/ %patch0 -p1 -b .install_3rdparty_licenses +%patch1 -p1 -b .inc2 pushd %{name}_contrib-%{version} popd From 159a977bbd181fac1ba847d66396efcb1fb7bcdb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 18 Oct 2019 12:34:23 +0200 Subject: [PATCH 035/274] Add compat symlinks --- opencv.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/opencv.spec b/opencv.spec index 30ac293..b5d6a54 100644 --- a/opencv.spec +++ b/opencv.spec @@ -338,6 +338,11 @@ ln -s -r %{buildroot}%{_jnidir}/libopencv_java%{javaver}.so %{buildroot}%{_jnidi ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/opencv.jar %endif +# For compatiblity with downstream expectation +ln -s opencv4/opencv2 %{buildroot}%{_includedir} +ln -s opencv4 %{buildroot}%{_datadir}/opencv + + %check # Check fails since we don't support most video # read/write capability and we don't provide a display @@ -361,6 +366,8 @@ popd %files %doc README.md %{_bindir}/opencv_* +# Symlink for compatibilty with older version +%{_datadir}/opencv %dir %{_datadir}/opencv4 %{_datadir}/opencv4/haarcascades %{_datadir}/opencv4/lbpcascades @@ -392,6 +399,8 @@ popd %endif %files devel +# Symlink for compatibilty with older version +%{_includedir}/opencv2 %dir %{_includedir}/opencv4 %{_includedir}/opencv4/opencv2 %{_libdir}/lib*.so From 63414db18ce897f86cadaccda327a9a1ca36e336 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 18 Oct 2019 12:34:36 +0200 Subject: [PATCH 036/274] Update changelog --- opencv.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opencv.spec b/opencv.spec index b5d6a54..df8e500 100644 --- a/opencv.spec +++ b/opencv.spec @@ -460,6 +460,12 @@ popd * Thu Dec 19 2019 Orion Poplawski - 4.1.2-2 - Rebuild for protobuf 3.11 +* Thu Oct 17 2019 Nicolas Chauvet - 4.1.2-1.1 +- Fix include path +- Drop CPU baseline to SSE2 for x86 +- Add missing directory ownership +- Add symlinks for compatibility with older versions + * Sat Oct 12 2019 Nicolas Chauvet - 4.1.2-1 - Update to 4.1.2 From 155352995892341dde381bf9d0f9677f1cb5804a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 18 Oct 2019 14:50:24 +0200 Subject: [PATCH 037/274] Restore deprecated headers --- opencv.spec | 8 ++++++++ sources | 1 + 2 files changed, 9 insertions(+) diff --git a/opencv.spec b/opencv.spec index df8e500..e9e6518 100644 --- a/opencv.spec +++ b/opencv.spec @@ -73,6 +73,8 @@ URL: https://opencv.org Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz Source3: face_landmark_model.dat.xz +# Deprecated headers from 3.x adapted for 4.x +Source4: opencv-4.x-deprecated-headers.tar.xz Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch1: opencv-4.1.2-includes.patch @@ -342,6 +344,10 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope ln -s opencv4/opencv2 %{buildroot}%{_includedir} ln -s opencv4 %{buildroot}%{_datadir}/opencv +# Deprecated headers from 3.x adapted for 4.x +mkdir -p %{buildroot}%{_includedir}/opencv +tar Jxf %{SOURCE4} -C %{buildroot}%{_includedir}/opencv + %check # Check fails since we don't support most video @@ -399,6 +405,8 @@ popd %endif %files devel +# Deprecated headers from 3.x +%{_includedir}/opencv # Symlink for compatibilty with older version %{_includedir}/opencv2 %dir %{_includedir}/opencv4 diff --git a/sources b/sources index 65503c5..4b3732b 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ +SHA512 (opencv-4.x-deprecated-headers.tar.xz) = 224354952f78948d0cefaa8f1e4d760ab17cc3765bd41cb1560865230551cdac69522556d23600f5dec9170a66f7adef0a341710ca2eb05f566eeef124ebacd9 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (opencv-clean-4.1.2.tar.gz) = baa1250178e6e2cf96004fc64c2b667eb970f2420109b4c00e80cbed640faa3e21f5d1f78beb50dddd9cbccd028c49796504c7a18f7c412bf090f34511901cdf SHA512 (opencv_contrib-clean-4.1.2.tar.gz) = 72f7a4c46d44ab19ad3ec8569c1d1b77f41128609ccf3779ff6080be6144e6dd123f3590b37ab577d57631814186f1b0917973b660baaabbb5a7249051240c5a From 51372b96b31434a9d9c29c3c6f2ba14bad5f597b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 18 Oct 2019 14:50:56 +0200 Subject: [PATCH 038/274] Update changelog --- opencv.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/opencv.spec b/opencv.spec index e9e6518..714bf09 100644 --- a/opencv.spec +++ b/opencv.spec @@ -473,6 +473,7 @@ popd - Drop CPU baseline to SSE2 for x86 - Add missing directory ownership - Add symlinks for compatibility with older versions +- Restore deprecated headers for compat * Sat Oct 12 2019 Nicolas Chauvet - 4.1.2-1 - Update to 4.1.2 From ee1708bbb563773b0c01537854fd4f046221607e Mon Sep 17 00:00:00 2001 From: kwizart Date: Thu, 19 Dec 2019 09:14:20 +0100 Subject: [PATCH 039/274] Drop libmfx from i686 - rhbz#1785079 --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 714bf09..477f02a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -38,7 +38,7 @@ %bcond_with vtk %endif -%ifarch %{ix86} x86_64 +%ifarch x86_64 %bcond_without libmfx %else %bcond_with libmfx From e5c39757ef0d8a35345931a6f4eeed767e3609c3 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sat, 28 Dec 2019 20:19:49 +0100 Subject: [PATCH 040/274] Rebuild (tesseract) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 477f02a..c50e526 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ Name: opencv Version: 4.1.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -465,6 +465,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sat Dec 28 2019 Sandro Mani - 4.1.2-3 +- Rebuild (tesseract) + * Thu Dec 19 2019 Orion Poplawski - 4.1.2-2 - Rebuild for protobuf 3.11 From 72cfdb0d6b7ea58596a4d06213d392ba74105333 Mon Sep 17 00:00:00 2001 From: kwizart Date: Tue, 31 Dec 2019 11:24:14 +0100 Subject: [PATCH 041/274] Update to 4.2.0 --- opencv-clean.sh | 4 +++- opencv.spec | 21 +++++++-------------- sources | 5 ++--- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/opencv-clean.sh b/opencv-clean.sh index 8014a3e..089b3a1 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,4 +1,6 @@ -export VERSION=4.1.2 +#!/bin/bash + +VERSION=4.2.0 wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz tar xf opencv-${VERSION}.tar.gz diff --git a/opencv.spec b/opencv.spec index c50e526..0328d5c 100644 --- a/opencv.spec +++ b/opencv.spec @@ -49,8 +49,8 @@ %bcond_without vulkan %global srcname opencv -%global abiver 4.1 -%global javaver 412 +%global abiver 4.2 +%global javaver 420 # Required because opencv-core has lot of spurious dependencies # (despite supposed to be "-core") @@ -59,8 +59,8 @@ %global optflags %(echo %{optflags} -Wl,--as-needed ) Name: opencv -Version: 4.1.2 -Release: 3%{?dist} +Version: 4.2.0 +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -73,11 +73,8 @@ URL: https://opencv.org Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz Source3: face_landmark_model.dat.xz -# Deprecated headers from 3.x adapted for 4.x -Source4: opencv-4.x-deprecated-headers.tar.xz Patch0: opencv-4.1.0-install_3rdparty_licenses.patch -Patch1: opencv-4.1.2-includes.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -250,7 +247,6 @@ mkdir 3rdparty/ mv quirc/ 3rdparty/ %patch0 -p1 -b .install_3rdparty_licenses -%patch1 -p1 -b .inc2 pushd %{name}_contrib-%{version} popd @@ -344,10 +340,6 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope ln -s opencv4/opencv2 %{buildroot}%{_includedir} ln -s opencv4 %{buildroot}%{_datadir}/opencv -# Deprecated headers from 3.x adapted for 4.x -mkdir -p %{buildroot}%{_includedir}/opencv -tar Jxf %{SOURCE4} -C %{buildroot}%{_includedir}/opencv - %check # Check fails since we don't support most video @@ -405,8 +397,6 @@ popd %endif %files devel -# Deprecated headers from 3.x -%{_includedir}/opencv # Symlink for compatibilty with older version %{_includedir}/opencv2 %dir %{_includedir}/opencv4 @@ -465,6 +455,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Dec 31 2019 Nicolas Chauvet - 4.2.0-1 +- Update to 4.2.0 + * Sat Dec 28 2019 Sandro Mani - 4.1.2-3 - Rebuild (tesseract) diff --git a/sources b/sources index 4b3732b..e4e3e1c 100644 --- a/sources +++ b/sources @@ -1,4 +1,3 @@ -SHA512 (opencv-4.x-deprecated-headers.tar.xz) = 224354952f78948d0cefaa8f1e4d760ab17cc3765bd41cb1560865230551cdac69522556d23600f5dec9170a66f7adef0a341710ca2eb05f566eeef124ebacd9 +SHA512 (opencv_contrib-clean-4.2.0.tar.gz) = ef3dfb826817b5e9b1102e7fe834d1b2fe9691c6dc41fe2207dabf6d793310c05fa6263374399315cfda9453d01a1c4b1953c74db52e6f141f3bfc853fb748ad +SHA512 (opencv-clean-4.2.0.tar.gz) = eaf5196ff9db70b50c2146cf9eb61c06a95900413480f32f76d72596e3e606343c93af73956822ccfd81132c879d5d611c8b824f7882041d306d46bbc313a5c9 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 -SHA512 (opencv-clean-4.1.2.tar.gz) = baa1250178e6e2cf96004fc64c2b667eb970f2420109b4c00e80cbed640faa3e21f5d1f78beb50dddd9cbccd028c49796504c7a18f7c412bf090f34511901cdf -SHA512 (opencv_contrib-clean-4.1.2.tar.gz) = 72f7a4c46d44ab19ad3ec8569c1d1b77f41128609ccf3779ff6080be6144e6dd123f3590b37ab577d57631814186f1b0917973b660baaabbb5a7249051240c5a From c1b0305054cd6211d75a1363c3f15823bbfaaae9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 18 Jan 2020 12:00:17 +0100 Subject: [PATCH 042/274] Enable GAPI --- opencv.spec | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/opencv.spec b/opencv.spec index 0328d5c..2cfce38 100644 --- a/opencv.spec +++ b/opencv.spec @@ -73,6 +73,7 @@ URL: https://opencv.org Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz Source3: face_landmark_model.dat.xz +Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Patch0: opencv-4.1.0-install_3rdparty_licenses.patch @@ -240,17 +241,25 @@ to provide decent performance and stability. %prep %setup -q -a1 +%if 1 # we don't use pre-built contribs except quirc -mv 3rdparty/quirc/ . -rm -r 3rdparty/ -mkdir 3rdparty/ -mv quirc/ 3rdparty/ +pushd 3rdparty +shopt -s extglob +rm -r !(openexr|openvx|quirc) +shopt -u extglob +popd &>/dev/null +%endif %patch0 -p1 -b .install_3rdparty_licenses pushd %{name}_contrib-%{version} popd +# Install ADE, needed for opencv_gapi +mkdir -p .cache/ade +install -pm 0644 %{SOURCE4} .cache/ade/ + + %build # enabled by default if libraries are presents at build time: # GTK, GSTREAMER, 1394, V4L, eigen3 @@ -273,6 +282,7 @@ popd -DWITH_OPENGL=ON \ -DOpenGL_GL_PREFERENCE=GLVND \ -DWITH_GDAL=ON \ + -DWITH_OPENEXR=ON \ -DWITH_UNICAP=ON \ -DCMAKE_SKIP_RPATH=ON \ -DWITH_CAROTENE=OFF \ @@ -297,9 +307,9 @@ popd %{!?with_xine: -DWITH_XINE=OFF } \ -DBUILD_DOCS=ON \ -DBUILD_EXAMPLES=ON \ + -DBUILD_opencv_python2=OFF \ -DINSTALL_C_EXAMPLES=ON \ -DINSTALL_PYTHON_EXAMPLES=ON \ - -DPYTHON2_EXECUTABLE=false \ -DPYTHON3_EXECUTABLE=%{__python3} \ -DPYTHON3_PACKAGES_PATH=%{python3_sitearch} \ -DENABLE_PYLINT=ON \ @@ -379,6 +389,7 @@ popd %{_libdir}/libopencv_cvv.so.%{abiver}* %{_libdir}/libopencv_features2d.so.%{abiver}* %{_libdir}/libopencv_flann.so.%{abiver}* +%{_libdir}/libopencv_gapi.so.%{abiver}* %{_libdir}/libopencv_hfs.so.%{abiver}* %{_libdir}/libopencv_highgui.so.%{abiver}* %{_libdir}/libopencv_imgcodecs.so.%{abiver}* @@ -409,7 +420,7 @@ popd %{_datadir}/opencv4/samples %files -n python3-opencv -%{_bindir}/setup_vars_opencv4.sh +%exclude %{_bindir}/setup_vars_opencv4.sh %{python3_sitearch}/cv2.cpython-3*.so %if %{with java} @@ -426,7 +437,6 @@ popd %{_libdir}/libopencv_bioinspired.so.%{abiver}* %{_libdir}/libopencv_calib3d.so.%{abiver}* %{_libdir}/libopencv_ccalib.so.%{abiver}* -#Module opencv_datasets disabled because opencv_text dependency can't be resolved! %{_libdir}/libopencv_datasets.so.%{abiver}* %{_libdir}/libopencv_dnn.so.%{abiver}* %{_libdir}/libopencv_dnn_objdetect.so.%{abiver}* From b10a4597d017a80d3c79308cc4fedb6a7e6bf185 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jan 2020 00:28:38 +0100 Subject: [PATCH 043/274] Update sources --- .gitignore | 1 + sources | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 3963c11..093975d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ OpenCV*.tar.* opencv*.tar.* face_landmark_model.dat.xz +/b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip diff --git a/sources b/sources index e4e3e1c..2c2c251 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ +SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 SHA512 (opencv_contrib-clean-4.2.0.tar.gz) = ef3dfb826817b5e9b1102e7fe834d1b2fe9691c6dc41fe2207dabf6d793310c05fa6263374399315cfda9453d01a1c4b1953c74db52e6f141f3bfc853fb748ad SHA512 (opencv-clean-4.2.0.tar.gz) = eaf5196ff9db70b50c2146cf9eb61c06a95900413480f32f76d72596e3e606343c93af73956822ccfd81132c879d5d611c8b824f7882041d306d46bbc313a5c9 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 From 635cf81c730a6888b3b35ac8211d59d36a736542 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jan 2020 08:13:25 +0100 Subject: [PATCH 044/274] Backport patch for OpenEXR --- ...334bbee3535d508af6510d9903d26ba37d34.patch | 89 +++++++++++++++++++ opencv.spec | 2 + 2 files changed, 91 insertions(+) create mode 100644 fb3a334bbee3535d508af6510d9903d26ba37d34.patch diff --git a/fb3a334bbee3535d508af6510d9903d26ba37d34.patch b/fb3a334bbee3535d508af6510d9903d26ba37d34.patch new file mode 100644 index 0000000..418c8e5 --- /dev/null +++ b/fb3a334bbee3535d508af6510d9903d26ba37d34.patch @@ -0,0 +1,89 @@ +From fb3a334bbee3535d508af6510d9903d26ba37d34 Mon Sep 17 00:00:00 2001 +From: h6197627 +Date: Mon, 6 Jan 2020 15:52:40 +0200 +Subject: [PATCH] cmake: fix Linux system OpenEXR detection + +--- + cmake/OpenCVFindOpenEXR.cmake | 55 ++++++++++++++++++----------------- + 1 file changed, 29 insertions(+), 26 deletions(-) + +diff --git a/cmake/OpenCVFindOpenEXR.cmake b/cmake/OpenCVFindOpenEXR.cmake +index fb6c2fa1469..9103f1f5a71 100644 +--- a/cmake/OpenCVFindOpenEXR.cmake ++++ b/cmake/OpenCVFindOpenEXR.cmake +@@ -20,6 +20,8 @@ if(WIN32) + elseif(MSVC) + SET(OPENEXR_LIBSEARCH_SUFFIXES Win32/Release Win32 Win32/Debug) + endif() ++elseif(UNIX) ++ SET(OPENEXR_LIBSEARCH_SUFFIXES ${CMAKE_LIBRARY_ARCHITECTURE}) + endif() + + SET(SEARCH_PATHS +@@ -39,6 +41,25 @@ MACRO(FIND_OPENEXR_LIBRARY LIBRARY_NAME LIBRARY_SUFFIX) + PATHS "${SEARCH_PATH}/lib" "${SEARCH_PATH}/lib/static") + ENDMACRO() + ++MACRO(ocv_find_openexr LIBRARY_SUFFIX) ++ IF(NOT OPENEXR_FOUND) ++ FIND_OPENEXR_LIBRARY("Half" "${LIBRARY_SUFFIX}") ++ FIND_OPENEXR_LIBRARY("Iex" "${LIBRARY_SUFFIX}") ++ FIND_OPENEXR_LIBRARY("Imath" "${LIBRARY_SUFFIX}") ++ FIND_OPENEXR_LIBRARY("IlmImf" "${LIBRARY_SUFFIX}") ++ FIND_OPENEXR_LIBRARY("IlmThread" "${LIBRARY_SUFFIX}") ++ IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY AND OPENEXR_ILMTHREAD_LIBRARY) ++ SET(OPENEXR_FOUND TRUE) ++ ELSE() ++ UNSET(OPENEXR_IMATH_LIBRARY) ++ UNSET(OPENEXR_ILMIMF_LIBRARY) ++ UNSET(OPENEXR_IEX_LIBRARY) ++ UNSET(OPENEXR_ILMTHREAD_LIBRARY) ++ UNSET(OPENEXR_HALF_LIBRARY) ++ ENDIF() ++ ENDIF() ++ENDMACRO() ++ + FOREACH(SEARCH_PATH ${SEARCH_PATHS}) + FIND_PATH(OPENEXR_INCLUDE_PATH ImfRgbaFile.h + PATH_SUFFIXES OpenEXR +@@ -64,32 +85,14 @@ FOREACH(SEARCH_PATH ${SEARCH_PATHS}) + set(OPENEXR_VERSION "${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}") + ENDIF () + +- SET(LIBRARY_SUFFIXES +- "-${OPENEXR_VERSION}" +- "-${OPENEXR_VERSION}_s" +- "-${OPENEXR_VERSION}_d" +- "-${OPEXEXR_VERSION}_s_d" +- "" +- "_s" +- "_d" +- "_s_d") +- +- FOREACH(LIBRARY_SUFFIX ${LIBRARY_SUFFIXES}) +- FIND_OPENEXR_LIBRARY("Half" ${LIBRARY_SUFFIX}) +- FIND_OPENEXR_LIBRARY("Iex" ${LIBRARY_SUFFIX}) +- FIND_OPENEXR_LIBRARY("Imath" ${LIBRARY_SUFFIX}) +- FIND_OPENEXR_LIBRARY("IlmImf" ${LIBRARY_SUFFIX}) +- FIND_OPENEXR_LIBRARY("IlmThread" ${LIBRARY_SUFFIX}) +- IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY) +- SET(OPENEXR_FOUND TRUE) +- BREAK() +- ENDIF() +- UNSET(OPENEXR_IMATH_LIBRARY) +- UNSET(OPENEXR_ILMIMF_LIBRARY) +- UNSET(OPENEXR_IEX_LIBRARY) +- UNSET(OPENEXR_ILMTHREAD_LIBRARY) +- UNSET(OPENEXR_HALF_LIBRARY) +- ENDFOREACH() ++ ocv_find_openexr("-${OPENEXR_VERSION}") ++ ocv_find_openexr("-${OPENEXR_VERSION}_s") ++ ocv_find_openexr("-${OPENEXR_VERSION}_d") ++ ocv_find_openexr("-${OPEXEXR_VERSION}_s_d") ++ ocv_find_openexr("") ++ ocv_find_openexr("_s") ++ ocv_find_openexr("_d") ++ ocv_find_openexr("_s_d") + + IF (OPENEXR_FOUND) + BREAK() diff --git a/opencv.spec b/opencv.spec index 2cfce38..036ba89 100644 --- a/opencv.spec +++ b/opencv.spec @@ -76,6 +76,7 @@ Source3: face_landmark_model.dat.xz Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Patch0: opencv-4.1.0-install_3rdparty_licenses.patch +Patch1: https://github.com/opencv/opencv/commit/fb3a334bbee3535d508af6510d9903d26ba37d34.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -251,6 +252,7 @@ popd &>/dev/null %endif %patch0 -p1 -b .install_3rdparty_licenses +%patch1 -p1 pushd %{name}_contrib-%{version} popd From dcd968ae9973755bd9d772328cfcffae00d473c9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jan 2020 08:49:09 +0100 Subject: [PATCH 045/274] Disable intrinsincs for ppc64le Upstream report https://github.com/opencv/opencv/issues/16448 --- opencv.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencv.spec b/opencv.spec index 036ba89..d304a83 100644 --- a/opencv.spec +++ b/opencv.spec @@ -290,6 +290,9 @@ popd -DWITH_CAROTENE=OFF \ %ifarch x86_64 %{ix86} -DCPU_BASELINE=SSE2 \ +%endif +%ifarch ppc64le + -DCV_ENABLE_INTRINSICS=OFF \ %endif -DENABLE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \ From 78aebdcfef7a03a0fea4030b4ecef7d6ede8c1ae Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 29 Jan 2020 08:32:36 +0100 Subject: [PATCH 046/274] Revert "Disable intrinsincs for ppc64le" This reverts commit dcd968ae9973755bd9d772328cfcffae00d473c9. --- opencv.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index d304a83..036ba89 100644 --- a/opencv.spec +++ b/opencv.spec @@ -290,9 +290,6 @@ popd -DWITH_CAROTENE=OFF \ %ifarch x86_64 %{ix86} -DCPU_BASELINE=SSE2 \ -%endif -%ifarch ppc64le - -DCV_ENABLE_INTRINSICS=OFF \ %endif -DENABLE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \ From cbd19933e6622ddda684115c7f4abaac6fd11191 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 29 Jan 2020 08:33:29 +0100 Subject: [PATCH 047/274] Backport patch for ppc64le --- ...1bd82852808f7fa403e3ee159bd62b1c08cc.patch | 128 ++++++++++++++++++ opencv.spec | 1 + 2 files changed, 129 insertions(+) create mode 100644 bd531bd82852808f7fa403e3ee159bd62b1c08cc.patch diff --git a/bd531bd82852808f7fa403e3ee159bd62b1c08cc.patch b/bd531bd82852808f7fa403e3ee159bd62b1c08cc.patch new file mode 100644 index 0000000..e83aae3 --- /dev/null +++ b/bd531bd82852808f7fa403e3ee159bd62b1c08cc.patch @@ -0,0 +1,128 @@ +From bd531bd82852808f7fa403e3ee159bd62b1c08cc Mon Sep 17 00:00:00 2001 +From: Sayed Adel +Date: Tue, 28 Jan 2020 15:16:48 +0200 +Subject: [PATCH] core:vsx fix inline asm constraints + + generalize constraints to 'wa' for VSX registers +--- + cmake/checks/cpu_vsx_asm.cpp | 2 +- + .../include/opencv2/core/hal/intrin_vsx.hpp | 4 +- + .../core/include/opencv2/core/vsx_utils.hpp | 50 ++++++++----------- + 3 files changed, 25 insertions(+), 31 deletions(-) + +diff --git a/cmake/checks/cpu_vsx_asm.cpp b/cmake/checks/cpu_vsx_asm.cpp +index bb4c25507e3..9c1bf7a946a 100644 +--- a/cmake/checks/cpu_vsx_asm.cpp ++++ b/cmake/checks/cpu_vsx_asm.cpp +@@ -16,6 +16,6 @@ int main() + { + __vector float vf; + __vector signed int vi; +- __asm__ __volatile__ ("xvcvsxwsp %x0,%x1" : "=wf" (vf) : "wa" (vi)); ++ __asm__ __volatile__ ("xvcvsxwsp %x0,%x1" : "=wa" (vf) : "wa" (vi)); + return 0; + } +\ No newline at end of file +diff --git a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp +index bda1d8558f8..6e8b439182f 100644 +--- a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp ++++ b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp +@@ -1338,7 +1338,7 @@ inline v_float32x4 v_load_expand(const float16_t* ptr) + return v_float32x4(vec_extract_fp_from_shorth(vf16)); + #elif CV_VSX3 && !defined(CV_COMPILER_VSX_BROKEN_ASM) + vec_float4 vf32; +- __asm__ __volatile__ ("xvcvhpsp %x0,%x1" : "=wf" (vf32) : "wa" (vec_mergeh(vf16, vf16))); ++ __asm__ __volatile__ ("xvcvhpsp %x0,%x1" : "=wa" (vf32) : "wa" (vec_mergeh(vf16, vf16))); + return v_float32x4(vf32); + #else + const vec_int4 z = vec_int4_z, delta = vec_int4_sp(0x38000000); +@@ -1363,7 +1363,7 @@ inline void v_pack_store(float16_t* ptr, const v_float32x4& v) + // fixme: Is there any builtin op or intrinsic that cover "xvcvsphp"? + #if CV_VSX3 && !defined(CV_COMPILER_VSX_BROKEN_ASM) + vec_ushort8 vf16; +- __asm__ __volatile__ ("xvcvsphp %x0,%x1" : "=wa" (vf16) : "wf" (v.val)); ++ __asm__ __volatile__ ("xvcvsphp %x0,%x1" : "=wa" (vf16) : "wa" (v.val)); + vec_st_l8(vec_mergesqe(vf16, vf16), ptr); + #else + const vec_int4 signmask = vec_int4_sp(0x80000000); +diff --git a/modules/core/include/opencv2/core/vsx_utils.hpp b/modules/core/include/opencv2/core/vsx_utils.hpp +index d7c71406072..bcc97fe5297 100644 +--- a/modules/core/include/opencv2/core/vsx_utils.hpp ++++ b/modules/core/include/opencv2/core/vsx_utils.hpp +@@ -110,9 +110,9 @@ VSX_FINLINE(rt) fnm(const rg& a, const rg& b) { return fn2(a, b); } + #if defined(__GNUG__) && !defined(__clang__) + + // inline asm helper +-#define VSX_IMPL_1RG(rt, rto, rg, rgo, opc, fnm) \ +-VSX_FINLINE(rt) fnm(const rg& a) \ +-{ rt rs; __asm__ __volatile__(#opc" %x0,%x1" : "="#rto (rs) : #rgo (a)); return rs; } ++#define VSX_IMPL_1RG(rt, rg, opc, fnm) \ ++VSX_FINLINE(rt) fnm(const rg& a) \ ++{ rt rs; __asm__ __volatile__(#opc" %x0,%x1" : "=wa" (rs) : "wa" (a)); return rs; } + + #define VSX_IMPL_1VRG(rt, rg, opc, fnm) \ + VSX_FINLINE(rt) fnm(const rg& a) \ +@@ -257,44 +257,38 @@ VSX_REDIRECT_1RG(vec_float4, vec_double2, vec_cvfo, __builtin_vsx_xvcvdpsp) + VSX_REDIRECT_1RG(vec_double2, vec_float4, vec_cvfo, __builtin_vsx_xvcvspdp) + + // converts word and doubleword to double-precision +-#ifdef vec_ctd +-# undef vec_ctd +-#endif +-VSX_IMPL_1RG(vec_double2, wd, vec_int4, wa, xvcvsxwdp, vec_ctdo) +-VSX_IMPL_1RG(vec_double2, wd, vec_uint4, wa, xvcvuxwdp, vec_ctdo) +-VSX_IMPL_1RG(vec_double2, wd, vec_dword2, wi, xvcvsxddp, vec_ctd) +-VSX_IMPL_1RG(vec_double2, wd, vec_udword2, wi, xvcvuxddp, vec_ctd) ++#undef vec_ctd ++VSX_IMPL_1RG(vec_double2, vec_int4, xvcvsxwdp, vec_ctdo) ++VSX_IMPL_1RG(vec_double2, vec_uint4, xvcvuxwdp, vec_ctdo) ++VSX_IMPL_1RG(vec_double2, vec_dword2, xvcvsxddp, vec_ctd) ++VSX_IMPL_1RG(vec_double2, vec_udword2, xvcvuxddp, vec_ctd) + + // converts word and doubleword to single-precision + #undef vec_ctf +-VSX_IMPL_1RG(vec_float4, wf, vec_int4, wa, xvcvsxwsp, vec_ctf) +-VSX_IMPL_1RG(vec_float4, wf, vec_uint4, wa, xvcvuxwsp, vec_ctf) +-VSX_IMPL_1RG(vec_float4, wf, vec_dword2, wi, xvcvsxdsp, vec_ctfo) +-VSX_IMPL_1RG(vec_float4, wf, vec_udword2, wi, xvcvuxdsp, vec_ctfo) ++VSX_IMPL_1RG(vec_float4, vec_int4, xvcvsxwsp, vec_ctf) ++VSX_IMPL_1RG(vec_float4, vec_uint4, xvcvuxwsp, vec_ctf) ++VSX_IMPL_1RG(vec_float4, vec_dword2, xvcvsxdsp, vec_ctfo) ++VSX_IMPL_1RG(vec_float4, vec_udword2, xvcvuxdsp, vec_ctfo) + + // converts single and double precision to signed word + #undef vec_cts +-VSX_IMPL_1RG(vec_int4, wa, vec_double2, wd, xvcvdpsxws, vec_ctso) +-VSX_IMPL_1RG(vec_int4, wa, vec_float4, wf, xvcvspsxws, vec_cts) ++VSX_IMPL_1RG(vec_int4, vec_double2, xvcvdpsxws, vec_ctso) ++VSX_IMPL_1RG(vec_int4, vec_float4, xvcvspsxws, vec_cts) + + // converts single and double precision to unsigned word + #undef vec_ctu +-VSX_IMPL_1RG(vec_uint4, wa, vec_double2, wd, xvcvdpuxws, vec_ctuo) +-VSX_IMPL_1RG(vec_uint4, wa, vec_float4, wf, xvcvspuxws, vec_ctu) ++VSX_IMPL_1RG(vec_uint4, vec_double2, xvcvdpuxws, vec_ctuo) ++VSX_IMPL_1RG(vec_uint4, vec_float4, xvcvspuxws, vec_ctu) + + // converts single and double precision to signed doubleword +-#ifdef vec_ctsl +-# undef vec_ctsl +-#endif +-VSX_IMPL_1RG(vec_dword2, wi, vec_double2, wd, xvcvdpsxds, vec_ctsl) +-VSX_IMPL_1RG(vec_dword2, wi, vec_float4, wf, xvcvspsxds, vec_ctslo) ++#undef vec_ctsl ++VSX_IMPL_1RG(vec_dword2, vec_double2, xvcvdpsxds, vec_ctsl) ++VSX_IMPL_1RG(vec_dword2, vec_float4, xvcvspsxds, vec_ctslo) + + // converts single and double precision to unsigned doubleword +-#ifdef vec_ctul +-# undef vec_ctul +-#endif +-VSX_IMPL_1RG(vec_udword2, wi, vec_double2, wd, xvcvdpuxds, vec_ctul) +-VSX_IMPL_1RG(vec_udword2, wi, vec_float4, wf, xvcvspuxds, vec_ctulo) ++#undef vec_ctul ++VSX_IMPL_1RG(vec_udword2, vec_double2, xvcvdpuxds, vec_ctul) ++VSX_IMPL_1RG(vec_udword2, vec_float4, xvcvspuxds, vec_ctulo) + + // just in case if GCC doesn't define it + #ifndef vec_xl diff --git a/opencv.spec b/opencv.spec index 036ba89..0151f31 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,6 +77,7 @@ Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch1: https://github.com/opencv/opencv/commit/fb3a334bbee3535d508af6510d9903d26ba37d34.patch +Patch2: https://github.com/opencv/opencv/commit/bd531bd82852808f7fa403e3ee159bd62b1c08cc.patch BuildRequires: gcc-c++ BuildRequires: libtool From cf9c4d33e87fdbe13eee1079043374d15b723ca5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 29 Jan 2020 08:34:31 +0100 Subject: [PATCH 048/274] Add changelog --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 0151f31..15caa99 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ Name: opencv Version: 4.2.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -468,6 +468,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Wed Jan 29 2020 Nicolas Chauvet - 4.2.0-2 +- Backport patch for ppc64le + * Tue Dec 31 2019 Nicolas Chauvet - 4.2.0-1 - Update to 4.2.0 From 17b29490a6f9f6a7dfc654872f470111da0e894b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 29 Jan 2020 08:49:46 +0100 Subject: [PATCH 049/274] Apply patch --- opencv.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/opencv.spec b/opencv.spec index 15caa99..20be8b9 100644 --- a/opencv.spec +++ b/opencv.spec @@ -254,6 +254,7 @@ popd &>/dev/null %patch0 -p1 -b .install_3rdparty_licenses %patch1 -p1 +%patch2 -p1 pushd %{name}_contrib-%{version} popd From 6a28689f2ccd0f030abf22bf2202553acb7388d5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 20:15:14 +0000 Subject: [PATCH 050/274] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 20be8b9..6e195a9 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ Name: opencv Version: 4.2.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -469,6 +469,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 4.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Wed Jan 29 2020 Nicolas Chauvet - 4.2.0-2 - Backport patch for ppc64le From 4971907f322a3ad4c71b20e30c9ff03cd32c1e64 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 3 Mar 2020 17:24:28 +0100 Subject: [PATCH 051/274] Rebuild (gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 6e195a9..db11351 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ Name: opencv Version: 4.2.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -469,6 +469,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Mar 03 2020 Sandro Mani - 4.2.0-4 +- Rebuild (gdal) + * Wed Jan 29 2020 Fedora Release Engineering - 4.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From bc40108ce3cf3f2356cf5b5a34c621103d2a4815 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 26 Mar 2020 09:10:36 +0100 Subject: [PATCH 052/274] Add without_compat_opencv_pc with conditional --- opencv.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index db11351..d59da81 100644 --- a/opencv.spec +++ b/opencv.spec @@ -327,7 +327,6 @@ popd -DWITH_OPENMP=ON \ -DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \ -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DOPENCV_PC_FILE_NAME=opencv.pc \ %{?with_gdcm: -DWITH_GDCM=ON } \ %{?with_libmfx: -DWITH_MFX=ON } \ %{?with_clp: -DWITH_CLP=ON } \ @@ -354,6 +353,11 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope ln -s opencv4/opencv2 %{buildroot}%{_includedir} ln -s opencv4 %{buildroot}%{_datadir}/opencv +# For compatibility with existing opencv.pc application +%{!?without_compat_openvc_pc: + ln -s opencv4.pc %{buildroot}%{_libdir}/pkgconfig/opencv.pc +} + %check # Check fails since we don't support most video @@ -417,7 +421,10 @@ popd %dir %{_includedir}/opencv4 %{_includedir}/opencv4/opencv2 %{_libdir}/lib*.so +%{!?without_compat_openvc_pc: %{_libdir}/pkgconfig/opencv.pc +} +%{_libdir}/pkgconfig/opencv4.pc %{_libdir}/cmake/OpenCV/*.cmake %files doc From d4fbc923e10ab5f2efd1e0def19760da9d6eaace Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 26 Mar 2020 09:11:45 +0100 Subject: [PATCH 053/274] Update changelog --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index d59da81..f887f49 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ Name: opencv Version: 4.2.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -476,6 +476,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Mar 26 2020 Nicolas Chauvet - 4.2.0-5 +- Add without_compat_opencv_pc with conditional - rhbz#1816439 + * Tue Mar 03 2020 Sandro Mani - 4.2.0-4 - Rebuild (gdal) From f5498f0349cfca9e90687459dc45b846f425047a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 8 May 2020 12:15:06 +0200 Subject: [PATCH 054/274] Drop compat symlink for includes --- opencv.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/opencv.spec b/opencv.spec index f887f49..82d455a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ Name: opencv Version: 4.2.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -349,10 +349,6 @@ ln -s -r %{buildroot}%{_jnidir}/libopencv_java%{javaver}.so %{buildroot}%{_jnidi ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/opencv.jar %endif -# For compatiblity with downstream expectation -ln -s opencv4/opencv2 %{buildroot}%{_includedir} -ln -s opencv4 %{buildroot}%{_datadir}/opencv - # For compatibility with existing opencv.pc application %{!?without_compat_openvc_pc: ln -s opencv4.pc %{buildroot}%{_libdir}/pkgconfig/opencv.pc @@ -382,8 +378,6 @@ popd %files %doc README.md %{_bindir}/opencv_* -# Symlink for compatibilty with older version -%{_datadir}/opencv %dir %{_datadir}/opencv4 %{_datadir}/opencv4/haarcascades %{_datadir}/opencv4/lbpcascades @@ -416,8 +410,6 @@ popd %endif %files devel -# Symlink for compatibilty with older version -%{_includedir}/opencv2 %dir %{_includedir}/opencv4 %{_includedir}/opencv4/opencv2 %{_libdir}/lib*.so @@ -476,6 +468,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri May 08 2020 Nicolas Chauvet - 4.2.0-6 +- Drop compat symlink for includes - rhbz#1830266 + * Thu Mar 26 2020 Nicolas Chauvet - 4.2.0-5 - Add without_compat_opencv_pc with conditional - rhbz#1816439 From f981fcc6118c5c8e9ad6755e45eaa7b632dba99b Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 21 May 2020 12:00:17 +0200 Subject: [PATCH 055/274] Rebuild (gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 82d455a..9536b6a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ Name: opencv Version: 4.2.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -468,6 +468,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu May 21 2020 Sandro Mani - 4.2.0-7 +- Rebuild (gdal) + * Fri May 08 2020 Nicolas Chauvet - 4.2.0-6 - Drop compat symlink for includes - rhbz#1830266 From 6f9cc15be1a7c2f8303530b829188d18648a58d3 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 21 May 2020 21:35:52 +0200 Subject: [PATCH 056/274] Add opencv_vulkan.patch --- opencv.spec | 3 +++ opencv_vulkan.patch | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 opencv_vulkan.patch diff --git a/opencv.spec b/opencv.spec index 9536b6a..78ccc5c 100644 --- a/opencv.spec +++ b/opencv.spec @@ -78,6 +78,8 @@ Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch1: https://github.com/opencv/opencv/commit/fb3a334bbee3535d508af6510d9903d26ba37d34.patch Patch2: https://github.com/opencv/opencv/commit/bd531bd82852808f7fa403e3ee159bd62b1c08cc.patch +# Comment out removed vulkan symbols +Patch3: opencv_vulkan.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -255,6 +257,7 @@ popd &>/dev/null %patch0 -p1 -b .install_3rdparty_licenses %patch1 -p1 %patch2 -p1 +%patch3 -p1 pushd %{name}_contrib-%{version} popd diff --git a/opencv_vulkan.patch b/opencv_vulkan.patch new file mode 100644 index 0000000..3a322a7 --- /dev/null +++ b/opencv_vulkan.patch @@ -0,0 +1,28 @@ +diff -rupN opencv-4.2.0/modules/dnn/src/vkcom/vulkan/function_list.inl.hpp opencv-4.2.0-new/modules/dnn/src/vkcom/vulkan/function_list.inl.hpp +--- opencv-4.2.0/modules/dnn/src/vkcom/vulkan/function_list.inl.hpp 2019-12-20 14:44:16.000000000 +0100 ++++ opencv-4.2.0-new/modules/dnn/src/vkcom/vulkan/function_list.inl.hpp 2020-05-21 12:39:08.652679166 +0200 +@@ -254,15 +254,15 @@ VK_FUNC(vkCmdDrawIndirectCountAMD) + VK_FUNC(vkCmdDrawIndexedIndirectCountAMD) + VK_FUNC(vkGetShaderInfoAMD) + VK_FUNC(vkGetPhysicalDeviceExternalImageFormatPropertiesNV) +-VK_FUNC(vkCmdProcessCommandsNVX) +-VK_FUNC(vkCmdReserveSpaceForCommandsNVX) +-VK_FUNC(vkCreateIndirectCommandsLayoutNVX) +-VK_FUNC(vkDestroyIndirectCommandsLayoutNVX) +-VK_FUNC(vkCreateObjectTableNVX) +-VK_FUNC(vkDestroyObjectTableNVX) +-VK_FUNC(vkRegisterObjectsNVX) +-VK_FUNC(vkUnregisterObjectsNVX) +-VK_FUNC(vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX) ++// VK_FUNC(vkCmdProcessCommandsNVX) ++// VK_FUNC(vkCmdReserveSpaceForCommandsNVX) ++// VK_FUNC(vkCreateIndirectCommandsLayoutNVX) ++// VK_FUNC(vkDestroyIndirectCommandsLayoutNVX) ++// VK_FUNC(vkCreateObjectTableNVX) ++// VK_FUNC(vkDestroyObjectTableNVX) ++// VK_FUNC(vkRegisterObjectsNVX) ++// VK_FUNC(vkUnregisterObjectsNVX) ++// VK_FUNC(vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX) + VK_FUNC(vkCmdSetViewportWScalingNV) + VK_FUNC(vkReleaseDisplayEXT) + VK_FUNC(vkGetPhysicalDeviceSurfaceCapabilities2EXT) From e3a5a2c2f52182b8adc10388c690a215f63906ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 26 May 2020 02:54:55 +0200 Subject: [PATCH 057/274] Rebuilt for Python 3.9 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 78ccc5c..7aff4a7 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ Name: opencv Version: 4.2.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -471,6 +471,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue May 26 2020 Miro Hrončok - 4.2.0-8 +- Rebuilt for Python 3.9 + * Thu May 21 2020 Sandro Mani - 4.2.0-7 - Rebuild (gdal) From 940542629b9746306026c80c77bb0eaeb9f34d18 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 28 May 2020 16:34:44 +0200 Subject: [PATCH 058/274] Remove flake8 build requirement --- opencv.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 7aff4a7..64d46ea 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ Name: opencv Version: 4.2.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -119,7 +119,6 @@ BuildRequires: tbb-devel BuildRequires: zlib-devel BuildRequires: pkgconfig BuildRequires: python3-devel -BuildRequires: python3-flake8 BuildRequires: python3-numpy BuildRequires: pylint BuildRequires: swig >= 1.3.24 @@ -471,6 +470,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu May 28 2020 Charalampos Stratakis - 4.2.0-9 +- Remove flake8 build requirement + * Tue May 26 2020 Miro Hrončok - 4.2.0-8 - Rebuilt for Python 3.9 From 17d4b123bad941365e4e3c7821024d41c93d8ea1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 28 May 2020 17:11:38 +0200 Subject: [PATCH 059/274] Update to 4.3.0 --- opencv-clean.sh | 2 +- opencv.spec | 18 ++++++++++-------- sources | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/opencv-clean.sh b/opencv-clean.sh index 089b3a1..e2c3564 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.2.0 +VERSION=4.3.0 wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz tar xf opencv-${VERSION}.tar.gz diff --git a/opencv.spec b/opencv.spec index 64d46ea..620b26e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -49,8 +49,8 @@ %bcond_without vulkan %global srcname opencv -%global abiver 4.2 -%global javaver 420 +%global abiver 4.3 +%global javaver 430 # Required because opencv-core has lot of spurious dependencies # (despite supposed to be "-core") @@ -59,8 +59,8 @@ %global optflags %(echo %{optflags} -Wl,--as-needed ) Name: opencv -Version: 4.2.0 -Release: 9%{?dist} +Version: 4.3.0 +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -76,8 +76,6 @@ Source3: face_landmark_model.dat.xz Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Patch0: opencv-4.1.0-install_3rdparty_licenses.patch -Patch1: https://github.com/opencv/opencv/commit/fb3a334bbee3535d508af6510d9903d26ba37d34.patch -Patch2: https://github.com/opencv/opencv/commit/bd531bd82852808f7fa403e3ee159bd62b1c08cc.patch # Comment out removed vulkan symbols Patch3: opencv_vulkan.patch @@ -254,8 +252,6 @@ popd &>/dev/null %endif %patch0 -p1 -b .install_3rdparty_licenses -%patch1 -p1 -%patch2 -p1 %patch3 -p1 pushd %{name}_contrib-%{version} @@ -389,6 +385,7 @@ popd %files core %license LICENSE %{_datadir}/licenses/opencv4/ +%{_libdir}/libopencv_alphamat.so.%{abiver}* %{_libdir}/libopencv_core.so.%{abiver}* %{_libdir}/libopencv_cvv.so.%{abiver}* %{_libdir}/libopencv_features2d.so.%{abiver}* @@ -398,9 +395,11 @@ popd %{_libdir}/libopencv_highgui.so.%{abiver}* %{_libdir}/libopencv_imgcodecs.so.%{abiver}* %{_libdir}/libopencv_imgproc.so.%{abiver}* +%{_libdir}/libopencv_intensity_transform.so.%{abiver}* %{_libdir}/libopencv_ml.so.%{abiver}* %{_libdir}/libopencv_objdetect.so.%{abiver}* %{_libdir}/libopencv_photo.so.%{abiver}* +%{_libdir}/libopencv_rapid.so.%{abiver}* %{_libdir}/libopencv_shape.so.%{abiver}* %{_libdir}/libopencv_stitching.so.%{abiver}* %{_libdir}/libopencv_superres.so.%{abiver}* @@ -470,6 +469,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue May 26 2020 Nicolas Chauvet - 4.3.0-1 +- Update to 4.3.0 + * Thu May 28 2020 Charalampos Stratakis - 4.2.0-9 - Remove flake8 build requirement diff --git a/sources b/sources index 2c2c251..e50d2d3 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ +SHA512 (opencv-clean-4.3.0.tar.gz) = f582ffc45d1143abf62eac7d6ed416986e6aa0e26d9a4a2cb4d88458e1eecb24ad33570dccd99004998a4899b0a9c05de7dfa405564c0e59bc91a48b7e9d2343 SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 -SHA512 (opencv_contrib-clean-4.2.0.tar.gz) = ef3dfb826817b5e9b1102e7fe834d1b2fe9691c6dc41fe2207dabf6d793310c05fa6263374399315cfda9453d01a1c4b1953c74db52e6f141f3bfc853fb748ad -SHA512 (opencv-clean-4.2.0.tar.gz) = eaf5196ff9db70b50c2146cf9eb61c06a95900413480f32f76d72596e3e606343c93af73956822ccfd81132c879d5d611c8b824f7882041d306d46bbc313a5c9 +SHA512 (opencv_contrib-clean-4.3.0.tar.gz) = bc4f88f3624cf4aed237f8cf36ef62b20f31205e891948797e416faa5e1dd215d1bad85506aa4afacb5c11988a6fc3f81f282fd82fe491f5ffa070f97cc793d5 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 From b0c14a21fbed5981bc0527cd50fc3442973f4acb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 29 May 2020 14:48:37 +0200 Subject: [PATCH 060/274] Fixup date --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 620b26e..b541039 100644 --- a/opencv.spec +++ b/opencv.spec @@ -469,7 +469,7 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog -* Tue May 26 2020 Nicolas Chauvet - 4.3.0-1 +* Fri May 28 2020 Nicolas Chauvet - 4.3.0-1 - Update to 4.3.0 * Thu May 28 2020 Charalampos Stratakis - 4.2.0-9 From 99add5aa1c29c48389adb233126e3a3a6f17872f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 29 May 2020 15:29:49 +0200 Subject: [PATCH 061/274] Disable vtk for now - rhbz#45140228 --- opencv.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opencv.spec b/opencv.spec index b541039..ed6d300 100644 --- a/opencv.spec +++ b/opencv.spec @@ -31,12 +31,12 @@ %bcond_with atlas %bcond_without openblas %bcond_without gdcm -%if 0%{?fedora} > 29 -%bcond_without vtk -%else +#if 0%{?fedora} > 29 +#bcond_without vtk +#else #VTK support disabled. Incompatible combination: OpenCV + Qt5 and VTK ver.7.1.1 + Qt4 in <= F29 %bcond_with vtk -%endif +#endif %ifarch x86_64 %bcond_without libmfx From 656fd9bcc5d0eb5b238be19495758383abc5c498 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 31 May 2020 20:09:03 -0600 Subject: [PATCH 062/274] Add upstream patches for VTK 9.0 support (bz#1840977) --- 17431.patch | 24 +++ 2549.patch | 507 ++++++++++++++++++++++++++++++++++++++++++++++++++++ opencv.spec | 16 +- 3 files changed, 540 insertions(+), 7 deletions(-) create mode 100644 17431.patch create mode 100644 2549.patch diff --git a/17431.patch b/17431.patch new file mode 100644 index 0000000..860a9b4 --- /dev/null +++ b/17431.patch @@ -0,0 +1,24 @@ +From 7856f14558f37021c1d5b76ade40ac78e59a422d Mon Sep 17 00:00:00 2001 +From: Maksim Shabunin +Date: Sat, 30 May 2020 06:07:39 +0300 +Subject: [PATCH] Added VTK 9 support + +--- + cmake/OpenCVDetectVTK.cmake | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/cmake/OpenCVDetectVTK.cmake b/cmake/OpenCVDetectVTK.cmake +index 0f2b9584e12..23d17c35241 100644 +--- a/cmake/OpenCVDetectVTK.cmake ++++ b/cmake/OpenCVDetectVTK.cmake +@@ -1,3 +1,10 @@ ++# VTK 9.0 ++find_package(VTK QUIET NAMES vtk COMPONENTS InteractionStyle RenderingLOD IOPLY FiltersTexture RenderingFreeType IOExport IOGeometry FiltersExtraction RenderingCore NO_MODULE) ++if(VTK_FOUND) ++ set(HAVE_VTK ON) ++ return() ++endif() ++ + # VTK 6.x components + find_package(VTK QUIET COMPONENTS vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE) + IF(VTK_FOUND) diff --git a/2549.patch b/2549.patch new file mode 100644 index 0000000..8d66918 --- /dev/null +++ b/2549.patch @@ -0,0 +1,507 @@ +From c4b3b920461f9c7207d4c184a5bedf7608a51ed1 Mon Sep 17 00:00:00 2001 +From: Maksim Shabunin +Date: Sat, 30 May 2020 06:09:02 +0300 +Subject: [PATCH 1/3] Added VTK 9 support + +--- + modules/viz/CMakeLists.txt | 4 +++- + modules/viz/src/precomp.hpp | 8 +++++++- + modules/viz/src/types.cpp | 3 ++- + modules/viz/src/vizimpl.cpp | 13 +++++++++++-- + modules/viz/src/vtk/vtkOBJWriter.cpp | 14 +++++++++----- + modules/viz/src/vtk/vtkXYZReader.cpp | 2 +- + modules/viz/src/vtk/vtkXYZWriter.cpp | 2 +- + 7 files changed, 34 insertions(+), 12 deletions(-) + +diff --git a/modules/viz/CMakeLists.txt b/modules/viz/CMakeLists.txt +index 89a9c3e098..3426e1dd26 100644 +--- a/modules/viz/CMakeLists.txt ++++ b/modules/viz/CMakeLists.txt +@@ -3,7 +3,9 @@ if(NOT HAVE_VTK) + endif() + + set(the_description "Viz") +-include(${VTK_USE_FILE}) ++if(VTK_VERSION VERSION_LESS 8.90) ++ include(${VTK_USE_FILE}) ++endif() + + if(NOT BUILD_SHARED_LIBS) + # We observed conflict between builtin 3rdparty libraries and +diff --git a/modules/viz/src/precomp.hpp b/modules/viz/src/precomp.hpp +index f92fdb6ac2..4c4bf7c599 100644 +--- a/modules/viz/src/precomp.hpp ++++ b/modules/viz/src/precomp.hpp +@@ -133,7 +133,8 @@ + #include + #include + #include +-#include "vtkCallbackCommand.h" ++#include ++#include + + #if !defined(_WIN32) || defined(__CYGWIN__) + # include /* unlink */ +@@ -149,6 +150,11 @@ + #include "vtk/vtkTrajectorySource.h" + #include "vtk/vtkImageMatSource.h" + ++#if VTK_MAJOR_VERSION >= 9 ++typedef vtkIdType const * CellIterT; ++#else ++typedef vtkIdType * CellIterT; ++#endif + + #include + #include +diff --git a/modules/viz/src/types.cpp b/modules/viz/src/types.cpp +index 65571a192e..0e14477891 100644 +--- a/modules/viz/src/types.cpp ++++ b/modules/viz/src/types.cpp +@@ -100,7 +100,8 @@ cv::viz::Mesh cv::viz::Mesh::load(const String& file, int type) + int* poly_ptr = mesh.polygons.ptr(); + + polygons->InitTraversal(); +- vtkIdType nr_cell_points, *cell_points; ++ vtkIdType nr_cell_points; ++ CellIterT cell_points; + while (polygons->GetNextCell(nr_cell_points, cell_points)) + { + *poly_ptr++ = nr_cell_points; +diff --git a/modules/viz/src/vizimpl.cpp b/modules/viz/src/vizimpl.cpp +index 2c291c0569..2c7ce997a4 100644 +--- a/modules/viz/src/vizimpl.cpp ++++ b/modules/viz/src/vizimpl.cpp +@@ -55,8 +55,17 @@ cv::viz::Viz3d::VizImpl::VizImpl(const String &name) : spin_once_state_(false), + + // Create render window + window_ = vtkSmartPointer::New(); +- cv::Vec2i window_size = cv::Vec2i(window_->GetScreenSize()) / 2; +- window_->SetSize(window_size.val); ++ int * sz = window_->GetScreenSize(); ++ if (sz) ++ { ++ cv::Vec2i window_size = cv::Vec2i(sz) / 2; ++ window_->SetSize(window_size.val); ++ } ++ else ++ { ++ int new_sz[2] = { 640, 480 }; ++ window_->SetSize(new_sz); ++ } + window_->AddRenderer(renderer_); + + // Create the interactor style +diff --git a/modules/viz/src/vtk/vtkOBJWriter.cpp b/modules/viz/src/vtk/vtkOBJWriter.cpp +index 296b6eb065..2e5764fc27 100644 +--- a/modules/viz/src/vtk/vtkOBJWriter.cpp ++++ b/modules/viz/src/vtk/vtkOBJWriter.cpp +@@ -72,7 +72,7 @@ void cv::viz::vtkOBJWriter::WriteData() + } + + vtkDebugMacro(<<"Opening vtk file for writing..."); +- ostream *outfilep = new ofstream(this->FileName, ios::out); ++ std::ostream *outfilep = new std::ofstream(this->FileName, ios::out); + if (outfilep->fail()) + { + vtkErrorMacro(<< "Unable to open file: "<< this->FileName); +@@ -127,7 +127,8 @@ void cv::viz::vtkOBJWriter::WriteData() + // write out verts if any + if (input->GetNumberOfVerts() > 0) + { +- vtkIdType npts = 0, *index = 0; ++ vtkIdType npts = 0; ++ CellIterT index = 0; + vtkCellArray *cells = input->GetVerts(); + for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) + { +@@ -141,7 +142,8 @@ void cv::viz::vtkOBJWriter::WriteData() + // write out lines if any + if (input->GetNumberOfLines() > 0) + { +- vtkIdType npts = 0, *index = 0; ++ vtkIdType npts = 0; ++ CellIterT index = 0; + vtkCellArray *cells = input->GetLines(); + for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) + { +@@ -162,7 +164,8 @@ void cv::viz::vtkOBJWriter::WriteData() + // write out polys if any + if (input->GetNumberOfPolys() > 0) + { +- vtkIdType npts = 0, *index = 0; ++ vtkIdType npts = 0; ++ CellIterT index = 0; + vtkCellArray *cells = input->GetPolys(); + for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) + { +@@ -191,7 +194,8 @@ void cv::viz::vtkOBJWriter::WriteData() + // write out tstrips if any + if (input->GetNumberOfStrips() > 0) + { +- vtkIdType npts = 0, *index = 0; ++ vtkIdType npts = 0; ++ CellIterT index = 0; + vtkCellArray *cells = input->GetStrips(); + for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) + { +diff --git a/modules/viz/src/vtk/vtkXYZReader.cpp b/modules/viz/src/vtk/vtkXYZReader.cpp +index 57726eae9b..3b9265fed6 100644 +--- a/modules/viz/src/vtk/vtkXYZReader.cpp ++++ b/modules/viz/src/vtk/vtkXYZReader.cpp +@@ -77,7 +77,7 @@ int cv::viz::vtkXYZReader::RequestData(vtkInformation*, vtkInformationVector**, + } + + // Open the input file. +- ifstream fin(this->FileName); ++ std::ifstream fin(this->FileName); + if(!fin) + { + vtkErrorMacro("Error opening file " << this->FileName); +diff --git a/modules/viz/src/vtk/vtkXYZWriter.cpp b/modules/viz/src/vtk/vtkXYZWriter.cpp +index cf95e3c6a0..56a26b38a0 100644 +--- a/modules/viz/src/vtk/vtkXYZWriter.cpp ++++ b/modules/viz/src/vtk/vtkXYZWriter.cpp +@@ -69,7 +69,7 @@ void cv::viz::vtkXYZWriter::WriteData() + } + + vtkDebugMacro(<<"Opening vtk file for writing..."); +- ostream *outfilep = new ofstream(this->FileName, ios::out); ++ std::ostream *outfilep = new std::ofstream(this->FileName, ios::out); + if (outfilep->fail()) + { + vtkErrorMacro(<< "Unable to open file: "<< this->FileName); + +From 4281df7fe0090c03b6a40db44292ba6268239cbb Mon Sep 17 00:00:00 2001 +From: Maksim Shabunin +Date: Tue, 2 Jun 2020 19:21:19 +0300 +Subject: [PATCH 2/3] viz: tests are non-interactive now + +--- + modules/viz/test/test_tutorial2.cpp | 4 +-- + modules/viz/test/test_tutorial3.cpp | 2 +- + modules/viz/test/test_viz3d.cpp | 2 +- + modules/viz/test/tests_simple.cpp | 56 ++++++++++++++--------------- + 4 files changed, 32 insertions(+), 32 deletions(-) + +diff --git a/modules/viz/test/test_tutorial2.cpp b/modules/viz/test/test_tutorial2.cpp +index 6b2972f0af..a4b5b99582 100644 +--- a/modules/viz/test/test_tutorial2.cpp ++++ b/modules/viz/test/test_tutorial2.cpp +@@ -28,7 +28,7 @@ static void tutorial2() + /// Rodrigues vector + Vec3d rot_vec = Vec3d::all(0); + double translation_phase = 0.0, translation = 0.0; +- while(!myWindow.wasStopped()) ++ for(unsigned num = 0; num < 50; ++num) + { + /* Rotation using rodrigues */ + /// Rotate around (1,1,1) +@@ -45,7 +45,7 @@ static void tutorial2() + + myWindow.setWidgetPose("Cube Widget", pose); + +- myWindow.spinOnce(1, true); ++ myWindow.spinOnce(100, true); + } + } + +diff --git a/modules/viz/test/test_tutorial3.cpp b/modules/viz/test/test_tutorial3.cpp +index 232130f0a6..32e33b1902 100644 +--- a/modules/viz/test/test_tutorial3.cpp ++++ b/modules/viz/test/test_tutorial3.cpp +@@ -48,7 +48,7 @@ static void tutorial3(bool camera_pov) + myWindow.setViewerPose(camera_pose); + + /// Start event loop. +- myWindow.spin(); ++ myWindow.spinOnce(500, true); + } + + TEST(Viz, tutorial3_global_view) +diff --git a/modules/viz/test/test_viz3d.cpp b/modules/viz/test/test_viz3d.cpp +index cdf8a00ad7..4ab05c3e0a 100644 +--- a/modules/viz/test/test_viz3d.cpp ++++ b/modules/viz/test/test_viz3d.cpp +@@ -59,7 +59,7 @@ TEST(Viz_viz3d, DISABLED_develop) + //cv::Mat cloud = cv::viz::readCloud(get_dragon_ply_file_path()); + //---->>>>> + +- viz.spin(); ++ viz.spinOnce(500, true); + } + + }} // namespace +diff --git a/modules/viz/test/tests_simple.cpp b/modules/viz/test/tests_simple.cpp +index 12d696dfba..5584483f4f 100644 +--- a/modules/viz/test/tests_simple.cpp ++++ b/modules/viz/test/tests_simple.cpp +@@ -56,7 +56,7 @@ TEST(Viz, show_cloud_bluberry) + viz.showWidget("dragon", WCloud(dragon_cloud, Color::bluberry()), pose); + + viz.showWidget("text2d", WText("Bluberry cloud", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_cloud_random_color) +@@ -73,7 +73,7 @@ TEST(Viz, show_cloud_random_color) + viz.showWidget("coosys", WCoordinateSystem()); + viz.showWidget("dragon", WCloud(dragon_cloud, colors), pose); + viz.showWidget("text2d", WText("Random color cloud", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_cloud_masked) +@@ -91,7 +91,7 @@ TEST(Viz, show_cloud_masked) + viz.showWidget("coosys", WCoordinateSystem()); + viz.showWidget("dragon", WCloud(dragon_cloud), pose); + viz.showWidget("text2d", WText("Nan masked cloud", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_cloud_collection) +@@ -109,7 +109,7 @@ TEST(Viz, show_cloud_collection) + viz.showWidget("coosys", WCoordinateSystem()); + viz.showWidget("ccol", ccol); + viz.showWidget("text2d", WText("Cloud collection", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_painted_clouds) +@@ -124,7 +124,7 @@ TEST(Viz, show_painted_clouds) + viz.showWidget("cloud3", WPaintedCloud(cloud, Vec3d(0.0, 0.0, -1.0), Vec3d(0.0, 0.0, 1.0), Color::blue(), Color::red())); + viz.showWidget("arrow", WArrow(Vec3d(0.0, 1.0, -1.0), Vec3d(0.0, 1.0, 1.0), 0.009, Color::raspberry())); + viz.showWidget("text2d", WText("Painted clouds", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_mesh) +@@ -137,7 +137,7 @@ TEST(Viz, show_mesh) + viz.showWidget("coosys", WCoordinateSystem()); + viz.showWidget("mesh", WMesh(mesh), pose); + viz.showWidget("text2d", WText("Just mesh", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_mesh_random_colors) +@@ -152,7 +152,7 @@ TEST(Viz, show_mesh_random_colors) + viz.showWidget("mesh", WMesh(mesh), pose); + viz.setRenderingProperty("mesh", SHADING, SHADING_PHONG); + viz.showWidget("text2d", WText("Random color mesh", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_widget_merger) +@@ -173,7 +173,7 @@ TEST(Viz, show_widget_merger) + viz.showWidget("coo", WCoordinateSystem()); + viz.showWidget("merger", merger); + viz.showWidget("text2d", WText("Widget merger", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_textured_mesh) +@@ -210,7 +210,7 @@ TEST(Viz, show_textured_mesh) + viz.showWidget("mesh", WMesh(mesh)); + viz.setRenderingProperty("mesh", SHADING, SHADING_PHONG); + viz.showWidget("text2d", WText("Textured mesh", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_polyline) +@@ -229,7 +229,7 @@ TEST(Viz, show_polyline) + viz.showWidget("polyline", WPolyLine(polyline, colors)); + viz.showWidget("coosys", WCoordinateSystem()); + viz.showWidget("text2d", WText("Polyline", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_sampled_normals) +@@ -244,7 +244,7 @@ TEST(Viz, show_sampled_normals) + viz.showWidget("normals", WCloudNormals(mesh.cloud, mesh.normals, 30, 0.1f, Color::green()), pose); + viz.setRenderingProperty("normals", LINE_WIDTH, 2.0); + viz.showWidget("text2d", WText("Cloud or mesh normals", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_cloud_shaded_by_normals) +@@ -260,7 +260,7 @@ TEST(Viz, show_cloud_shaded_by_normals) + Viz3d viz("show_cloud_shaded_by_normals"); + viz.showWidget("cloud", cloud, pose); + viz.showWidget("text2d", WText("Cloud shaded by normals", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_trajectories) +@@ -287,15 +287,15 @@ TEST(Viz, show_trajectories) + viz.showWidget("text2d", WText("Different kinds of supported trajectories", Point(20, 20), 20, Color::green())); + + int i = 0; +- while(!viz.wasStopped()) ++ for(unsigned num = 0; num < 50; ++num) + { + double a = --i % 360; + Vec3d pose(sin(a * CV_PI/180), 0.7, cos(a * CV_PI/180)); + viz.setViewerPose(makeCameraPose(pose * 7.5, Vec3d(0.0, 0.5, 0.0), Vec3d(0.0, 0.1, 0.0))); +- viz.spinOnce(20, true); ++ viz.spinOnce(100, true); + } + viz.resetCamera(); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_trajectory_reposition) +@@ -306,7 +306,7 @@ TEST(Viz, show_trajectory_reposition) + viz.showWidget("coos", WCoordinateSystem()); + viz.showWidget("sub3", WTrajectory(Mat(path).rowRange(0, (int)path.size()/3), WTrajectory::BOTH, 0.2, Color::brown()), path.front().inv()); + viz.showWidget("text2d", WText("Trajectory resposition to origin", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_camera_positions) +@@ -330,7 +330,7 @@ TEST(Viz, show_camera_positions) + viz.showWidget("pos3", WCameraPosition(0.75), poses[1]); + viz.showWidget("pos4", WCameraPosition(K, gray, 3, Color::indigo()), poses[1]); + viz.showWidget("text2d", WText("Camera positions with images", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_overlay_image) +@@ -353,16 +353,16 @@ TEST(Viz, show_overlay_image) + viz.showWidget("text2d", WText("Overlay images", Point(20, 20), 20, Color::green())); + + int i = 0; +- while(!viz.wasStopped()) ++ for(unsigned num = 0; num < 50; ++num) + { + double a = ++i % 360; + Vec3d pose(sin(a * CV_PI/180), 0.7, cos(a * CV_PI/180)); + viz.setViewerPose(makeCameraPose(pose * 3, Vec3d(0.0, 0.5, 0.0), Vec3d(0.0, 0.1, 0.0))); + viz.getWidget("img1").cast().setImage(lena * pow(sin(i*10*CV_PI/180) * 0.5 + 0.5, 1.0)); +- viz.spinOnce(1, true); ++ viz.spinOnce(100, true); + } + viz.showWidget("text2d", WText("Overlay images (stopped)", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + +@@ -376,7 +376,7 @@ TEST(Viz, show_image_method) + viz.showImage(lena, lena.size()); + viz.spinOnce(1500, true); + +- cv::viz::imshow("show_image_method", make_gray(lena)).spin(); ++ cv::viz::imshow("show_image_method", make_gray(lena)).spinOnce(500, true); + } + + TEST(Viz, show_image_3d) +@@ -398,13 +398,13 @@ TEST(Viz, show_image_3d) + viz.showWidget("text2d", WText("Images in 3D", Point(20, 20), 20, Color::green())); + + int i = 0; +- while(!viz.wasStopped()) ++ for(unsigned num = 0; num < 50; ++num) + { + viz.getWidget("img0").cast().setImage(lena * pow(sin(i++*7.5*CV_PI/180) * 0.5 + 0.5, 1.0)); +- viz.spinOnce(1, true); ++ viz.spinOnce(100, true); + } + viz.showWidget("text2d", WText("Images in 3D (stopped)", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_simple_widgets) +@@ -431,10 +431,10 @@ TEST(Viz, show_simple_widgets) + + viz.showWidget("grid1", WGrid(Vec2i(7,7), Vec2d::all(0.75), Color::gray()), Affine3d().translate(Vec3d(0.0, 0.0, -1.0))); + +- viz.spin(); ++ viz.spinOnce(500, true); + viz.getWidget("text2d").cast().setText("Different simple widgets (updated)"); + viz.getWidget("text3d").cast().setText("Updated text 3D"); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_follower) +@@ -446,9 +446,9 @@ TEST(Viz, show_follower) + viz.showWidget("t3d_2", WText3D("Simple 3D follower", Point3d(-0.5, -0.5, 0.5), 0.125, true, Color::green())); + viz.showWidget("text2d", WText("Follower: text always facing camera", Point(20, 20), 20, Color::green())); + viz.setBackgroundMeshLab(); +- viz.spin(); ++ viz.spinOnce(500, true); + viz.getWidget("t3d_2").cast().setText("Updated follower 3D"); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + }} // namespace + +From f46c6cadbe751b2dbf60b34e85aaf575511e9794 Mon Sep 17 00:00:00 2001 +From: Maksim Shabunin +Date: Tue, 2 Jun 2020 22:46:53 +0300 +Subject: [PATCH 3/3] fixup! Added VTK 9 support + +--- + modules/viz/CMakeLists.txt | 12 ++++++++---- + modules/viz/src/types.cpp | 1 + + 2 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/modules/viz/CMakeLists.txt b/modules/viz/CMakeLists.txt +index 3426e1dd26..cd225960ce 100644 +--- a/modules/viz/CMakeLists.txt ++++ b/modules/viz/CMakeLists.txt +@@ -3,9 +3,6 @@ if(NOT HAVE_VTK) + endif() + + set(the_description "Viz") +-if(VTK_VERSION VERSION_LESS 8.90) +- include(${VTK_USE_FILE}) +-endif() + + if(NOT BUILD_SHARED_LIBS) + # We observed conflict between builtin 3rdparty libraries and +@@ -37,7 +34,14 @@ ocv_add_accuracy_tests() + ocv_add_perf_tests() + ocv_add_samples(opencv_imgproc opencv_calib3d opencv_features2d opencv_flann) + +-ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES}) ++ ++if (VTK_VERSION VERSION_LESS "8.90.0") ++ include(${VTK_USE_FILE}) ++ ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES}) ++else () ++ ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES}) ++ vtk_module_autoinit(TARGETS ${the_module} MODULES ${VTK_LIBRARIES}) ++endif() + + if(APPLE AND BUILD_opencv_viz) + ocv_target_link_libraries(${the_module} PRIVATE "-framework Cocoa") +diff --git a/modules/viz/src/types.cpp b/modules/viz/src/types.cpp +index 0e14477891..e9a470cf83 100644 +--- a/modules/viz/src/types.cpp ++++ b/modules/viz/src/types.cpp +@@ -97,6 +97,7 @@ cv::viz::Mesh cv::viz::Mesh::load(const String& file, int type) + // Now handle the polygons + vtkSmartPointer polygons = polydata->GetPolys(); + mesh.polygons.create(1, polygons->GetSize(), CV_32SC1); ++ mesh.polygons = 0; + int* poly_ptr = mesh.polygons.ptr(); + + polygons->InitTraversal(); diff --git a/opencv.spec b/opencv.spec index ed6d300..1ffe6b9 100644 --- a/opencv.spec +++ b/opencv.spec @@ -31,12 +31,7 @@ %bcond_with atlas %bcond_without openblas %bcond_without gdcm -#if 0%{?fedora} > 29 -#bcond_without vtk -#else -#VTK support disabled. Incompatible combination: OpenCV + Qt5 and VTK ver.7.1.1 + Qt4 in <= F29 -%bcond_with vtk -#endif +%bcond_without vtk %ifarch x86_64 %bcond_without libmfx @@ -60,7 +55,7 @@ Name: opencv Version: 4.3.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -76,6 +71,8 @@ Source3: face_landmark_model.dat.xz Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Patch0: opencv-4.1.0-install_3rdparty_licenses.patch +Patch1: https://patch-diff.githubusercontent.com/raw/opencv/opencv/pull/17431.patch +Patch2: https://patch-diff.githubusercontent.com/raw/opencv/opencv_contrib/pull/2549.patch # Comment out removed vulkan symbols Patch3: opencv_vulkan.patch @@ -252,9 +249,11 @@ popd &>/dev/null %endif %patch0 -p1 -b .install_3rdparty_licenses +%patch1 -p1 %patch3 -p1 pushd %{name}_contrib-%{version} +%patch2 -p1 popd # Install ADE, needed for opencv_gapi @@ -469,6 +468,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Jun 02 2020 Orion Poplawski - 4.3.0-2 +- Add upstream patches for VTK 9.0 support (bz#1840977) + * Fri May 28 2020 Nicolas Chauvet - 4.3.0-1 - Update to 4.3.0 From 66ce8244e8135ba0acd69a3cd9e4e36c9daede7d Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 31 May 2020 20:09:03 -0600 Subject: [PATCH 063/274] - Run tests --- opencv-clean.sh | 11 +++++- opencv.spec | 25 +++++++++++-- sources | 1 + xorg.conf | 98 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 130 insertions(+), 5 deletions(-) create mode 100644 xorg.conf diff --git a/opencv-clean.sh b/opencv-clean.sh index e2c3564..2a29de3 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -2,17 +2,26 @@ VERSION=4.3.0 +rm -rf opencv-${VERSION}/ wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz tar xf opencv-${VERSION}.tar.gz cd opencv-${VERSION}/ -find ./ -iname "len*.*" -exec rm {} \; +find ./ -iname "len*.*" -exec rm {} + rm -rf modules/xfeatures2d/ cd ..; tar zcf opencv-clean-${VERSION}.tar.gz opencv-${VERSION}/ rm -rf opencv-${VERSION}/ +rm -rf opencv_contrib-${VERSION}/ wget -c https://github.com/opencv/opencv_contrib/archive/${VERSION}/opencv_contrib-${VERSION}.tar.gz tar xf opencv_contrib-${VERSION}.tar.gz cd opencv_contrib-${VERSION}/ rm -rf modules/xfeatures2d/ cd ..; tar zcf opencv_contrib-clean-${VERSION}.tar.gz opencv_contrib-${VERSION}/ rm -rf opencv_contrib-${VERSION}/ + +rm -rf opencv_extra-${VERSION}/ +wget -c https://github.com/opencv/opencv_extra/archive/${VERSION}/opencv_extra-${VERSION}.tar.gz +tar xf opencv_extra-${VERSION}.tar.gz +find opencv_extra-${VERSION} \( -iname "len*.*" -o -iname "*lena*.png" -o -iname "*lena*.jpg" \) -exec rm {} + +tar zcf opencv_extra-clean-${VERSION}.tar.gz opencv_extra-${VERSION}/ +rm -rf opencv_extra-${VERSION}/ diff --git a/opencv.spec b/opencv.spec index 1ffe6b9..f7cd605 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,6 +1,6 @@ #global indice a %undefine _strict_symbol_defs_build -%bcond_with tests +%bcond_without tests %bcond_with ffmpeg %bcond_without gstreamer %bcond_with eigen2 @@ -55,7 +55,7 @@ Name: opencv Version: 4.3.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -67,8 +67,10 @@ URL: https://opencv.org # Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz +Source2: https://github.com/opencv/opencv_extra/archive/%{version}/opencv_extra-%{version}.tar.gz Source3: face_landmark_model.dat.xz Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip +Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch1: https://patch-diff.githubusercontent.com/raw/opencv/opencv/pull/17431.patch @@ -166,6 +168,10 @@ BuildRequires: ant BuildRequires: java-devel } %{?with_vulkan:BuildRequires: vulkan-headers} +%if %{with tests} +BuildRequires: xorg-x11-drv-dummy +BuildRequires: mesa-dri-drivers +%endif Requires: opencv-core%{_isa} = %{version}-%{release} @@ -238,7 +244,7 @@ distribution, since the library maintains binary compatibility, and tries to provide decent performance and stability. %prep -%setup -q -a1 +%setup -q -a1 -a2 %if 1 # we don't use pre-built contribs except quirc pushd 3rdparty @@ -324,6 +330,7 @@ popd -DWITH_OPENMP=ON \ -DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \ -DOPENCV_GENERATE_PKGCONFIG=ON \ + -DOPENCV_TEST_DATA_PATH=opencv_extra-%{version}/testdata \ %{?with_gdcm: -DWITH_GDCM=ON } \ %{?with_libmfx: -DWITH_MFX=ON } \ %{?with_clp: -DWITH_CLP=ON } \ @@ -356,10 +363,17 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope # Check fails since we don't support most video # read/write capability and we don't provide a display # ARGS=-V increases output verbosity -# Make test is unavailble as of 2.3.1 #ifnarch ppc64 %if %{with tests} pushd build + cp %SOURCE5 . + if [ -x /usr/libexec/Xorg ]; then + Xorg=/usr/libexec/Xorg + else + Xorg=/usr/libexec/Xorg.bin + fi + $Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf -configdir . :99 & + export DISPLAY=:99 LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/build/lib:$LD_LIBARY_PATH make test ARGS=-V || : popd %endif @@ -468,6 +482,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Jun 02 2020 Orion Poplawski - 4.3.0-3 +- Run tests + * Tue Jun 02 2020 Orion Poplawski - 4.3.0-2 - Add upstream patches for VTK 9.0 support (bz#1840977) diff --git a/sources b/sources index e50d2d3..09e268e 100644 --- a/sources +++ b/sources @@ -2,3 +2,4 @@ SHA512 (opencv-clean-4.3.0.tar.gz) = f582ffc45d1143abf62eac7d6ed416986e6aa0e26d9 SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 SHA512 (opencv_contrib-clean-4.3.0.tar.gz) = bc4f88f3624cf4aed237f8cf36ef62b20f31205e891948797e416faa5e1dd215d1bad85506aa4afacb5c11988a6fc3f81f282fd82fe491f5ffa070f97cc793d5 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 +SHA512 (opencv_extra-clean-4.3.0.tar.gz) = 0f9f8b027ed7a105a6ed09d8953bb5d8c44a03ea99495aaf1dd4380a1488ca1acc614ad160a59080be4723469116d1213f3af6dfda0062d56f3575f6d2179bc4 diff --git a/xorg.conf b/xorg.conf new file mode 100644 index 0000000..8edc240 --- /dev/null +++ b/xorg.conf @@ -0,0 +1,98 @@ +# This xorg configuration file is meant to be used +# to start a dummy X11 server for graphical testing. + +Section "ServerFlags" + Option "DontVTSwitch" "true" + Option "AllowMouseOpenFail" "true" + Option "PciForceNone" "true" + Option "AutoEnableDevices" "false" + Option "AutoAddDevices" "false" +EndSection + +Section "InputDevice" + Identifier "dummy_mouse" + Option "CorePointer" "true" + Driver "void" +EndSection + +Section "InputDevice" + Identifier "dummy_keyboard" + Option "CoreKeyboard" "true" + Driver "void" +EndSection + +Section "Device" + Identifier "dummy_videocard" + Driver "dummy" + Option "ConstantDPI" "true" + #VideoRam 4096000 + #VideoRam 256000 + VideoRam 192000 +EndSection + +Section "Monitor" + Identifier "dummy_monitor" + HorizSync 5.0 - 1000.0 + VertRefresh 5.0 - 200.0 + #This can be used to get a specific DPI, but only for the default resolution: + #DisplaySize 508 317 + #NOTE: the highest modes will not work without increasing the VideoRam + # for the dummy video card. + Modeline "32768x32768" 15226.50 32768 35800 39488 46208 32768 32771 32781 32953 + Modeline "32768x16384" 7516.25 32768 35544 39192 45616 16384 16387 16397 16478 + Modeline "16384x8192" 2101.93 16384 16416 24400 24432 8192 8390 8403 8602 + Modeline "8192x4096" 424.46 8192 8224 9832 9864 4096 4195 4202 4301 + Modeline "5496x1200" 199.13 5496 5528 6280 6312 1200 1228 1233 1261 + Modeline "5280x1080" 169.96 5280 5312 5952 5984 1080 1105 1110 1135 + Modeline "5280x1200" 191.40 5280 5312 6032 6064 1200 1228 1233 1261 + Modeline "5120x3200" 199.75 5120 5152 5904 5936 3200 3277 3283 3361 + Modeline "4800x1200" 64.42 4800 4832 5072 5104 1200 1229 1231 1261 + Modeline "3840x2880" 133.43 3840 3872 4376 4408 2880 2950 2955 3025 + Modeline "3840x2560" 116.93 3840 3872 4312 4344 2560 2622 2627 2689 + Modeline "3840x2048" 91.45 3840 3872 4216 4248 2048 2097 2101 2151 + Modeline "3840x1080" 100.38 3840 3848 4216 4592 1080 1081 1084 1093 + Modeline "3600x1200" 106.06 3600 3632 3984 4368 1200 1201 1204 1214 + Modeline "3288x1080" 39.76 3288 3320 3464 3496 1080 1106 1108 1135 + Modeline "2048x2048" 49.47 2048 2080 2264 2296 2048 2097 2101 2151 + Modeline "2048x1536" 80.06 2048 2104 2312 2576 1536 1537 1540 1554 + Modeline "2560x1600" 47.12 2560 2592 2768 2800 1600 1639 1642 1681 + Modeline "2560x1440" 42.12 2560 2592 2752 2784 1440 1475 1478 1513 + Modeline "1920x1440" 69.47 1920 1960 2152 2384 1440 1441 1444 1457 + Modeline "1920x1200" 26.28 1920 1952 2048 2080 1200 1229 1231 1261 + Modeline "1920x1080" 23.53 1920 1952 2040 2072 1080 1106 1108 1135 + Modeline "1680x1050" 20.08 1680 1712 1784 1816 1050 1075 1077 1103 + Modeline "1600x1200" 22.04 1600 1632 1712 1744 1200 1229 1231 1261 + Modeline "1600x900" 33.92 1600 1632 1760 1792 900 921 924 946 + Modeline "1440x900" 30.66 1440 1472 1584 1616 900 921 924 946 + ModeLine "1366x768" 72.00 1366 1414 1446 1494 768 771 777 803 + Modeline "1280x1024" 31.50 1280 1312 1424 1456 1024 1048 1052 1076 + Modeline "1280x800" 24.15 1280 1312 1400 1432 800 819 822 841 + Modeline "1280x768" 23.11 1280 1312 1392 1424 768 786 789 807 + Modeline "1360x768" 24.49 1360 1392 1480 1512 768 786 789 807 + Modeline "1024x768" 18.71 1024 1056 1120 1152 768 786 789 807 + Modeline "768x1024" 19.50 768 800 872 904 1024 1048 1052 1076 +EndSection + +Section "Screen" + Identifier "dummy_screen" + Device "dummy_videocard" + Monitor "dummy_monitor" + DefaultDepth 24 + SubSection "Display" + Viewport 0 0 + Depth 24 + #Modes "32768x32768" "32768x16384" "16384x8192" "8192x4096" "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" + Modes "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" + #Virtual 32000 32000 + #Virtual 16384 8192 + Virtual 8192 4096 + #Virtual 5120 3200 + EndSubSection +EndSection + +Section "ServerLayout" + Identifier "dummy_layout" + Screen "dummy_screen" + InputDevice "dummy_mouse" + InputDevice "dummy_keyboard" +EndSection From 9506b6566a2fd971b621a067b502c80ecfe2f4af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 30 May 2020 02:14:52 +0000 Subject: [PATCH 064/274] Delete old patches --- ...1bd82852808f7fa403e3ee159bd62b1c08cc.patch | 128 ------------------ ...334bbee3535d508af6510d9903d26ba37d34.patch | 89 ------------ 2 files changed, 217 deletions(-) delete mode 100644 bd531bd82852808f7fa403e3ee159bd62b1c08cc.patch delete mode 100644 fb3a334bbee3535d508af6510d9903d26ba37d34.patch diff --git a/bd531bd82852808f7fa403e3ee159bd62b1c08cc.patch b/bd531bd82852808f7fa403e3ee159bd62b1c08cc.patch deleted file mode 100644 index e83aae3..0000000 --- a/bd531bd82852808f7fa403e3ee159bd62b1c08cc.patch +++ /dev/null @@ -1,128 +0,0 @@ -From bd531bd82852808f7fa403e3ee159bd62b1c08cc Mon Sep 17 00:00:00 2001 -From: Sayed Adel -Date: Tue, 28 Jan 2020 15:16:48 +0200 -Subject: [PATCH] core:vsx fix inline asm constraints - - generalize constraints to 'wa' for VSX registers ---- - cmake/checks/cpu_vsx_asm.cpp | 2 +- - .../include/opencv2/core/hal/intrin_vsx.hpp | 4 +- - .../core/include/opencv2/core/vsx_utils.hpp | 50 ++++++++----------- - 3 files changed, 25 insertions(+), 31 deletions(-) - -diff --git a/cmake/checks/cpu_vsx_asm.cpp b/cmake/checks/cpu_vsx_asm.cpp -index bb4c25507e3..9c1bf7a946a 100644 ---- a/cmake/checks/cpu_vsx_asm.cpp -+++ b/cmake/checks/cpu_vsx_asm.cpp -@@ -16,6 +16,6 @@ int main() - { - __vector float vf; - __vector signed int vi; -- __asm__ __volatile__ ("xvcvsxwsp %x0,%x1" : "=wf" (vf) : "wa" (vi)); -+ __asm__ __volatile__ ("xvcvsxwsp %x0,%x1" : "=wa" (vf) : "wa" (vi)); - return 0; - } -\ No newline at end of file -diff --git a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp -index bda1d8558f8..6e8b439182f 100644 ---- a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp -+++ b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp -@@ -1338,7 +1338,7 @@ inline v_float32x4 v_load_expand(const float16_t* ptr) - return v_float32x4(vec_extract_fp_from_shorth(vf16)); - #elif CV_VSX3 && !defined(CV_COMPILER_VSX_BROKEN_ASM) - vec_float4 vf32; -- __asm__ __volatile__ ("xvcvhpsp %x0,%x1" : "=wf" (vf32) : "wa" (vec_mergeh(vf16, vf16))); -+ __asm__ __volatile__ ("xvcvhpsp %x0,%x1" : "=wa" (vf32) : "wa" (vec_mergeh(vf16, vf16))); - return v_float32x4(vf32); - #else - const vec_int4 z = vec_int4_z, delta = vec_int4_sp(0x38000000); -@@ -1363,7 +1363,7 @@ inline void v_pack_store(float16_t* ptr, const v_float32x4& v) - // fixme: Is there any builtin op or intrinsic that cover "xvcvsphp"? - #if CV_VSX3 && !defined(CV_COMPILER_VSX_BROKEN_ASM) - vec_ushort8 vf16; -- __asm__ __volatile__ ("xvcvsphp %x0,%x1" : "=wa" (vf16) : "wf" (v.val)); -+ __asm__ __volatile__ ("xvcvsphp %x0,%x1" : "=wa" (vf16) : "wa" (v.val)); - vec_st_l8(vec_mergesqe(vf16, vf16), ptr); - #else - const vec_int4 signmask = vec_int4_sp(0x80000000); -diff --git a/modules/core/include/opencv2/core/vsx_utils.hpp b/modules/core/include/opencv2/core/vsx_utils.hpp -index d7c71406072..bcc97fe5297 100644 ---- a/modules/core/include/opencv2/core/vsx_utils.hpp -+++ b/modules/core/include/opencv2/core/vsx_utils.hpp -@@ -110,9 +110,9 @@ VSX_FINLINE(rt) fnm(const rg& a, const rg& b) { return fn2(a, b); } - #if defined(__GNUG__) && !defined(__clang__) - - // inline asm helper --#define VSX_IMPL_1RG(rt, rto, rg, rgo, opc, fnm) \ --VSX_FINLINE(rt) fnm(const rg& a) \ --{ rt rs; __asm__ __volatile__(#opc" %x0,%x1" : "="#rto (rs) : #rgo (a)); return rs; } -+#define VSX_IMPL_1RG(rt, rg, opc, fnm) \ -+VSX_FINLINE(rt) fnm(const rg& a) \ -+{ rt rs; __asm__ __volatile__(#opc" %x0,%x1" : "=wa" (rs) : "wa" (a)); return rs; } - - #define VSX_IMPL_1VRG(rt, rg, opc, fnm) \ - VSX_FINLINE(rt) fnm(const rg& a) \ -@@ -257,44 +257,38 @@ VSX_REDIRECT_1RG(vec_float4, vec_double2, vec_cvfo, __builtin_vsx_xvcvdpsp) - VSX_REDIRECT_1RG(vec_double2, vec_float4, vec_cvfo, __builtin_vsx_xvcvspdp) - - // converts word and doubleword to double-precision --#ifdef vec_ctd --# undef vec_ctd --#endif --VSX_IMPL_1RG(vec_double2, wd, vec_int4, wa, xvcvsxwdp, vec_ctdo) --VSX_IMPL_1RG(vec_double2, wd, vec_uint4, wa, xvcvuxwdp, vec_ctdo) --VSX_IMPL_1RG(vec_double2, wd, vec_dword2, wi, xvcvsxddp, vec_ctd) --VSX_IMPL_1RG(vec_double2, wd, vec_udword2, wi, xvcvuxddp, vec_ctd) -+#undef vec_ctd -+VSX_IMPL_1RG(vec_double2, vec_int4, xvcvsxwdp, vec_ctdo) -+VSX_IMPL_1RG(vec_double2, vec_uint4, xvcvuxwdp, vec_ctdo) -+VSX_IMPL_1RG(vec_double2, vec_dword2, xvcvsxddp, vec_ctd) -+VSX_IMPL_1RG(vec_double2, vec_udword2, xvcvuxddp, vec_ctd) - - // converts word and doubleword to single-precision - #undef vec_ctf --VSX_IMPL_1RG(vec_float4, wf, vec_int4, wa, xvcvsxwsp, vec_ctf) --VSX_IMPL_1RG(vec_float4, wf, vec_uint4, wa, xvcvuxwsp, vec_ctf) --VSX_IMPL_1RG(vec_float4, wf, vec_dword2, wi, xvcvsxdsp, vec_ctfo) --VSX_IMPL_1RG(vec_float4, wf, vec_udword2, wi, xvcvuxdsp, vec_ctfo) -+VSX_IMPL_1RG(vec_float4, vec_int4, xvcvsxwsp, vec_ctf) -+VSX_IMPL_1RG(vec_float4, vec_uint4, xvcvuxwsp, vec_ctf) -+VSX_IMPL_1RG(vec_float4, vec_dword2, xvcvsxdsp, vec_ctfo) -+VSX_IMPL_1RG(vec_float4, vec_udword2, xvcvuxdsp, vec_ctfo) - - // converts single and double precision to signed word - #undef vec_cts --VSX_IMPL_1RG(vec_int4, wa, vec_double2, wd, xvcvdpsxws, vec_ctso) --VSX_IMPL_1RG(vec_int4, wa, vec_float4, wf, xvcvspsxws, vec_cts) -+VSX_IMPL_1RG(vec_int4, vec_double2, xvcvdpsxws, vec_ctso) -+VSX_IMPL_1RG(vec_int4, vec_float4, xvcvspsxws, vec_cts) - - // converts single and double precision to unsigned word - #undef vec_ctu --VSX_IMPL_1RG(vec_uint4, wa, vec_double2, wd, xvcvdpuxws, vec_ctuo) --VSX_IMPL_1RG(vec_uint4, wa, vec_float4, wf, xvcvspuxws, vec_ctu) -+VSX_IMPL_1RG(vec_uint4, vec_double2, xvcvdpuxws, vec_ctuo) -+VSX_IMPL_1RG(vec_uint4, vec_float4, xvcvspuxws, vec_ctu) - - // converts single and double precision to signed doubleword --#ifdef vec_ctsl --# undef vec_ctsl --#endif --VSX_IMPL_1RG(vec_dword2, wi, vec_double2, wd, xvcvdpsxds, vec_ctsl) --VSX_IMPL_1RG(vec_dword2, wi, vec_float4, wf, xvcvspsxds, vec_ctslo) -+#undef vec_ctsl -+VSX_IMPL_1RG(vec_dword2, vec_double2, xvcvdpsxds, vec_ctsl) -+VSX_IMPL_1RG(vec_dword2, vec_float4, xvcvspsxds, vec_ctslo) - - // converts single and double precision to unsigned doubleword --#ifdef vec_ctul --# undef vec_ctul --#endif --VSX_IMPL_1RG(vec_udword2, wi, vec_double2, wd, xvcvdpuxds, vec_ctul) --VSX_IMPL_1RG(vec_udword2, wi, vec_float4, wf, xvcvspuxds, vec_ctulo) -+#undef vec_ctul -+VSX_IMPL_1RG(vec_udword2, vec_double2, xvcvdpuxds, vec_ctul) -+VSX_IMPL_1RG(vec_udword2, vec_float4, xvcvspuxds, vec_ctulo) - - // just in case if GCC doesn't define it - #ifndef vec_xl diff --git a/fb3a334bbee3535d508af6510d9903d26ba37d34.patch b/fb3a334bbee3535d508af6510d9903d26ba37d34.patch deleted file mode 100644 index 418c8e5..0000000 --- a/fb3a334bbee3535d508af6510d9903d26ba37d34.patch +++ /dev/null @@ -1,89 +0,0 @@ -From fb3a334bbee3535d508af6510d9903d26ba37d34 Mon Sep 17 00:00:00 2001 -From: h6197627 -Date: Mon, 6 Jan 2020 15:52:40 +0200 -Subject: [PATCH] cmake: fix Linux system OpenEXR detection - ---- - cmake/OpenCVFindOpenEXR.cmake | 55 ++++++++++++++++++----------------- - 1 file changed, 29 insertions(+), 26 deletions(-) - -diff --git a/cmake/OpenCVFindOpenEXR.cmake b/cmake/OpenCVFindOpenEXR.cmake -index fb6c2fa1469..9103f1f5a71 100644 ---- a/cmake/OpenCVFindOpenEXR.cmake -+++ b/cmake/OpenCVFindOpenEXR.cmake -@@ -20,6 +20,8 @@ if(WIN32) - elseif(MSVC) - SET(OPENEXR_LIBSEARCH_SUFFIXES Win32/Release Win32 Win32/Debug) - endif() -+elseif(UNIX) -+ SET(OPENEXR_LIBSEARCH_SUFFIXES ${CMAKE_LIBRARY_ARCHITECTURE}) - endif() - - SET(SEARCH_PATHS -@@ -39,6 +41,25 @@ MACRO(FIND_OPENEXR_LIBRARY LIBRARY_NAME LIBRARY_SUFFIX) - PATHS "${SEARCH_PATH}/lib" "${SEARCH_PATH}/lib/static") - ENDMACRO() - -+MACRO(ocv_find_openexr LIBRARY_SUFFIX) -+ IF(NOT OPENEXR_FOUND) -+ FIND_OPENEXR_LIBRARY("Half" "${LIBRARY_SUFFIX}") -+ FIND_OPENEXR_LIBRARY("Iex" "${LIBRARY_SUFFIX}") -+ FIND_OPENEXR_LIBRARY("Imath" "${LIBRARY_SUFFIX}") -+ FIND_OPENEXR_LIBRARY("IlmImf" "${LIBRARY_SUFFIX}") -+ FIND_OPENEXR_LIBRARY("IlmThread" "${LIBRARY_SUFFIX}") -+ IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY AND OPENEXR_ILMTHREAD_LIBRARY) -+ SET(OPENEXR_FOUND TRUE) -+ ELSE() -+ UNSET(OPENEXR_IMATH_LIBRARY) -+ UNSET(OPENEXR_ILMIMF_LIBRARY) -+ UNSET(OPENEXR_IEX_LIBRARY) -+ UNSET(OPENEXR_ILMTHREAD_LIBRARY) -+ UNSET(OPENEXR_HALF_LIBRARY) -+ ENDIF() -+ ENDIF() -+ENDMACRO() -+ - FOREACH(SEARCH_PATH ${SEARCH_PATHS}) - FIND_PATH(OPENEXR_INCLUDE_PATH ImfRgbaFile.h - PATH_SUFFIXES OpenEXR -@@ -64,32 +85,14 @@ FOREACH(SEARCH_PATH ${SEARCH_PATHS}) - set(OPENEXR_VERSION "${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}") - ENDIF () - -- SET(LIBRARY_SUFFIXES -- "-${OPENEXR_VERSION}" -- "-${OPENEXR_VERSION}_s" -- "-${OPENEXR_VERSION}_d" -- "-${OPEXEXR_VERSION}_s_d" -- "" -- "_s" -- "_d" -- "_s_d") -- -- FOREACH(LIBRARY_SUFFIX ${LIBRARY_SUFFIXES}) -- FIND_OPENEXR_LIBRARY("Half" ${LIBRARY_SUFFIX}) -- FIND_OPENEXR_LIBRARY("Iex" ${LIBRARY_SUFFIX}) -- FIND_OPENEXR_LIBRARY("Imath" ${LIBRARY_SUFFIX}) -- FIND_OPENEXR_LIBRARY("IlmImf" ${LIBRARY_SUFFIX}) -- FIND_OPENEXR_LIBRARY("IlmThread" ${LIBRARY_SUFFIX}) -- IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY) -- SET(OPENEXR_FOUND TRUE) -- BREAK() -- ENDIF() -- UNSET(OPENEXR_IMATH_LIBRARY) -- UNSET(OPENEXR_ILMIMF_LIBRARY) -- UNSET(OPENEXR_IEX_LIBRARY) -- UNSET(OPENEXR_ILMTHREAD_LIBRARY) -- UNSET(OPENEXR_HALF_LIBRARY) -- ENDFOREACH() -+ ocv_find_openexr("-${OPENEXR_VERSION}") -+ ocv_find_openexr("-${OPENEXR_VERSION}_s") -+ ocv_find_openexr("-${OPENEXR_VERSION}_d") -+ ocv_find_openexr("-${OPEXEXR_VERSION}_s_d") -+ ocv_find_openexr("") -+ ocv_find_openexr("_s") -+ ocv_find_openexr("_d") -+ ocv_find_openexr("_s_d") - - IF (OPENEXR_FOUND) - BREAK() From 41bf1081fad363295d2d52ea138c088902aedecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 30 May 2020 02:23:15 +0000 Subject: [PATCH 065/274] Generates the variable javaver instead of setting it manually --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index f7cd605..d54372d 100644 --- a/opencv.spec +++ b/opencv.spec @@ -45,7 +45,6 @@ %global srcname opencv %global abiver 4.3 -%global javaver 430 # Required because opencv-core has lot of spurious dependencies # (despite supposed to be "-core") @@ -55,6 +54,7 @@ Name: opencv Version: 4.3.0 +%global javaver %(foo=%{version}; echo ${foo//./}) Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. From e838799268f4452ed09e70da120863de41b0a57a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 30 May 2020 02:28:15 +0000 Subject: [PATCH 066/274] Add full path to ade location --- .gitignore | 1 + opencv.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 093975d..dda2f54 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ OpenCV*.tar.* opencv*.tar.* face_landmark_model.dat.xz /b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip +/v0.1.1f.zip diff --git a/opencv.spec b/opencv.spec index d54372d..b99f77e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -69,7 +69,7 @@ Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz Source2: https://github.com/opencv/opencv_extra/archive/%{version}/opencv_extra-%{version}.tar.gz Source3: face_landmark_model.dat.xz -Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip +Source4: https://github.com/opencv/ade/archive/v0.1.1f.zip Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch diff --git a/sources b/sources index 09e268e..fba09af 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (opencv-clean-4.3.0.tar.gz) = f582ffc45d1143abf62eac7d6ed416986e6aa0e26d9a4a2cb4d88458e1eecb24ad33570dccd99004998a4899b0a9c05de7dfa405564c0e59bc91a48b7e9d2343 -SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 SHA512 (opencv_contrib-clean-4.3.0.tar.gz) = bc4f88f3624cf4aed237f8cf36ef62b20f31205e891948797e416faa5e1dd215d1bad85506aa4afacb5c11988a6fc3f81f282fd82fe491f5ffa070f97cc793d5 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 +SHA512 (v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 SHA512 (opencv_extra-clean-4.3.0.tar.gz) = 0f9f8b027ed7a105a6ed09d8953bb5d8c44a03ea99495aaf1dd4380a1488ca1acc614ad160a59080be4723469116d1213f3af6dfda0062d56f3575f6d2179bc4 From 90a944412390205a716bf90327b5ffc3315ce37b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 4 Jun 2020 17:25:00 +0200 Subject: [PATCH 067/274] fixup_date --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index b99f77e..fc4bd56 100644 --- a/opencv.spec +++ b/opencv.spec @@ -488,7 +488,7 @@ popd * Tue Jun 02 2020 Orion Poplawski - 4.3.0-2 - Add upstream patches for VTK 9.0 support (bz#1840977) -* Fri May 28 2020 Nicolas Chauvet - 4.3.0-1 +* Thu May 28 2020 Nicolas Chauvet - 4.3.0-1 - Update to 4.3.0 * Thu May 28 2020 Charalampos Stratakis - 4.2.0-9 From 7f1071138ae78cef515530e5dc326cccce50d417 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 4 Jun 2020 17:31:17 +0200 Subject: [PATCH 068/274] fixup opencv_extra-clean --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index fc4bd56..52fbd21 100644 --- a/opencv.spec +++ b/opencv.spec @@ -67,7 +67,7 @@ URL: https://opencv.org # Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz -Source2: https://github.com/opencv/opencv_extra/archive/%{version}/opencv_extra-%{version}.tar.gz +Source2: %{name}_extra-clean-%{version}.tar.gz Source3: face_landmark_model.dat.xz Source4: https://github.com/opencv/ade/archive/v0.1.1f.zip Source5: xorg.conf From 38c46099f0e9ae94cc6960ff8919e7500d8debc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 6 Jun 2020 07:20:05 +0100 Subject: [PATCH 069/274] Revert "Add full path to ade location" Because we need copy file with the name b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip copy with name v0.1.1f.zip doesn't work Reference: install -pm 0644 /builddir/build/SOURCES/b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip .cache/ade/ --- .gitignore | 1 - opencv.spec | 3 ++- sources | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index dda2f54..093975d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ OpenCV*.tar.* opencv*.tar.* face_landmark_model.dat.xz /b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip -/v0.1.1f.zip diff --git a/opencv.spec b/opencv.spec index 52fbd21..e6d0924 100644 --- a/opencv.spec +++ b/opencv.spec @@ -69,7 +69,8 @@ Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz Source2: %{name}_extra-clean-%{version}.tar.gz Source3: face_landmark_model.dat.xz -Source4: https://github.com/opencv/ade/archive/v0.1.1f.zip +# from https://github.com/opencv/ade/archive/v0.1.1f.zip +Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch diff --git a/sources b/sources index fba09af..09e268e 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (opencv-clean-4.3.0.tar.gz) = f582ffc45d1143abf62eac7d6ed416986e6aa0e26d9a4a2cb4d88458e1eecb24ad33570dccd99004998a4899b0a9c05de7dfa405564c0e59bc91a48b7e9d2343 +SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 SHA512 (opencv_contrib-clean-4.3.0.tar.gz) = bc4f88f3624cf4aed237f8cf36ef62b20f31205e891948797e416faa5e1dd215d1bad85506aa4afacb5c11988a6fc3f81f282fd82fe491f5ffa070f97cc793d5 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 -SHA512 (v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 SHA512 (opencv_extra-clean-4.3.0.tar.gz) = 0f9f8b027ed7a105a6ed09d8953bb5d8c44a03ea99495aaf1dd4380a1488ca1acc614ad160a59080be4723469116d1213f3af6dfda0062d56f3575f6d2179bc4 From edc24a2596cf9708918c719b3ac43c39f93731c9 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Sun, 21 Jun 2020 17:23:48 +0200 Subject: [PATCH 070/274] Rebuilt for protobuf 3.12 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index e6d0924..f67dc51 100644 --- a/opencv.spec +++ b/opencv.spec @@ -55,7 +55,7 @@ Name: opencv Version: 4.3.0 %global javaver %(foo=%{version}; echo ${foo//./}) -Release: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -483,6 +483,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sun Jun 14 2020 Adrian Reber - 4.3.0-4 +- Rebuilt for protobuf 3.12 + * Tue Jun 02 2020 Orion Poplawski - 4.3.0-3 - Run tests From 394be8c0da18429243be5385b9f57efc63330b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 22 Jun 2020 01:08:53 +0100 Subject: [PATCH 071/274] Readd flake8 build requirement Fix build because pangox has been retired for F33 so we need remove the BR gtkglext Also remove all gtk stuff (we have to choose between gtk or qt when build opencv) https://answers.opencv.org/question/215066/gtk-or-qt-when-build-opencv/ Doxygen requires gtk2, disabling for now --- opencv.spec | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/opencv.spec b/opencv.spec index f67dc51..d2d60b8 100644 --- a/opencv.spec +++ b/opencv.spec @@ -90,7 +90,6 @@ BuildRequires: pkgconfig(nppc-%{?_cuda_rpm_version}) } %{?with_eigen2:BuildRequires: eigen2-devel} %{?with_eigen3:BuildRequires: eigen3-devel} -BuildRequires: gtk3-devel BuildRequires: libtheora-devel BuildRequires: libvorbis-devel %if 0%{?fedora} || 0%{?rhel} > 7 @@ -105,7 +104,6 @@ BuildRequires: libpng-devel BuildRequires: libtiff-devel BuildRequires: libGL-devel BuildRequires: libv4l-devel -BuildRequires: gtkglext-devel BuildRequires: OpenEXR-devel %{?with_openni: BuildRequires: openni-devel @@ -119,6 +117,7 @@ BuildRequires: pkgconfig BuildRequires: python3-devel BuildRequires: python3-numpy BuildRequires: pylint +BuildRequires: python3-flake8 BuildRequires: swig >= 1.3.24 %{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9} %if 0%{?fedora} || 0%{?rhel} > 7 @@ -134,10 +133,10 @@ BuildRequires: tesseract-devel BuildRequires: protobuf-devel BuildRequires: gdal-devel BuildRequires: glog-devel -BuildRequires: doxygen +#BuildRequires: doxygen BuildRequires: python3-beautifulsoup4 #for doc/doxygen/bib2xhtml.pl -BuildRequires: perl-open +#BuildRequires: perl-open BuildRequires: gflags-devel BuildRequires: SFML-devel BuildRequires: libucil-devel @@ -483,7 +482,15 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog -* Sun Jun 14 2020 Adrian Reber - 4.3.0-4 +* Sun Jun 21 2020 Sérgio Basto - 4.3.0-4 +- Readd flake8 build requirement +- Fix build because pangox has been retired for F33 so we need remove the BR + gtkglext +- Also remove all gtk stuff (we have to choose between gtk or qt when build opencv) + https://answers.opencv.org/question/215066/gtk-or-qt-when-build-opencv/ +- Doxygen requires gtk2, disabling for now + +* Sun Jun 14 2020 Adrian Reber - Rebuilt for protobuf 3.12 * Tue Jun 02 2020 Orion Poplawski - 4.3.0-3 From a1de500a5d2e3b9264c26b0df5aff0da92c6478a Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Tue, 23 Jun 2020 14:26:26 +0200 Subject: [PATCH 072/274] Rebuilt for protobuf 3.12 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index d2d60b8..bcbf3b8 100644 --- a/opencv.spec +++ b/opencv.spec @@ -55,7 +55,7 @@ Name: opencv Version: 4.3.0 %global javaver %(foo=%{version}; echo ${foo//./}) -Release: 4%{?dist} +Release: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -482,6 +482,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Jun 23 2020 Adrian Reber - 4.3.0-5 +- Rebuilt for protobuf 3.12 + * Sun Jun 21 2020 Sérgio Basto - 4.3.0-4 - Readd flake8 build requirement - Fix build because pangox has been retired for F33 so we need remove the BR From 1c5682e5aa5aec4e7acdb63f85204d6fb9d879e6 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 25 Jun 2020 20:07:59 -0600 Subject: [PATCH 073/274] Rebuild for hdf5 1.10.6 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index bcbf3b8..6727762 100644 --- a/opencv.spec +++ b/opencv.spec @@ -55,7 +55,7 @@ Name: opencv Version: 4.3.0 %global javaver %(foo=%{version}; echo ${foo//./}) -Release: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -482,6 +482,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri Jun 26 2020 Orion Poplawski - 4.3.0-6 +- Rebuild for hdf5 1.10.6 + * Tue Jun 23 2020 Adrian Reber - 4.3.0-5 - Rebuilt for protobuf 3.12 From eeabf8bd1c2306f79301361984ca8b2c02a4ca3e Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 11 Jul 2020 03:42:02 +0200 Subject: [PATCH 074/274] Rebuilt for JDK-11 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 6727762..2f27949 100644 --- a/opencv.spec +++ b/opencv.spec @@ -55,7 +55,7 @@ Name: opencv Version: 4.3.0 %global javaver %(foo=%{version}; echo ${foo//./}) -Release: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -482,6 +482,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sat Jul 11 2020 Jiri Vanek - 4.3.0-7 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + * Fri Jun 26 2020 Orion Poplawski - 4.3.0-6 - Rebuild for hdf5 1.10.6 From 89f9da9d18d882674cfaa21dda79092f8c5c1232 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 24 Jul 2020 12:24:48 +0200 Subject: [PATCH 075/274] Rebuilt --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 2f27949..a45970e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -55,7 +55,7 @@ Name: opencv Version: 4.3.0 %global javaver %(foo=%{version}; echo ${foo//./}) -Release: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -482,6 +482,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri Jul 24 2020 Nicolas Chauvet - 4.3.0-8 +- Rebuilt + * Sat Jul 11 2020 Jiri Vanek - 4.3.0-7 - Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 From 02774e9201bea7bf66e73ca07e3ed2aacb733ff6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 27 Jul 2020 09:46:17 +0200 Subject: [PATCH 076/274] Install face_landmark_model --- opencv.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/opencv.spec b/opencv.spec index a45970e..4232e30 100644 --- a/opencv.spec +++ b/opencv.spec @@ -262,6 +262,13 @@ pushd %{name}_contrib-%{version} %patch2 -p1 popd +# Install face_landmark_model +mkdir -p .cache/data +install -pm 0644 %{SOURCE3} .cache/data +pushd .cache/data + xz -d face_landmark_model.dat.xz +popd + # Install ADE, needed for opencv_gapi mkdir -p .cache/ade install -pm 0644 %{SOURCE4} .cache/ade/ @@ -273,13 +280,6 @@ install -pm 0644 %{SOURCE4} .cache/ade/ # non available on Fedora: FFMPEG, XINE mkdir -p build pushd build - -mkdir -p share/opencv4/testdata/cv/face -install -pm 0644 %{SOURCE3} share/opencv4/testdata/cv/face -pushd share/opencv4/testdata/cv/face - xz -d face_landmark_model.dat.xz -popd - # disabling IPP because it is closed source library from intel %cmake CMAKE_VERBOSE=1 \ From 663cf5c0ba959e822de4b7f7f11c8933c737aca3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 27 Jul 2020 09:46:41 +0200 Subject: [PATCH 077/274] CV_TRACE OFF --- opencv.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/opencv.spec b/opencv.spec index 4232e30..dcea783 100644 --- a/opencv.spec +++ b/opencv.spec @@ -283,6 +283,7 @@ pushd build # disabling IPP because it is closed source library from intel %cmake CMAKE_VERBOSE=1 \ + -DCV_TRACE=OFF \ -DWITH_IPP=OFF \ -DWITH_ITT=OFF \ -DWITH_QT=ON \ From bceb48cb6479006e7fe5743d1e5d9847999f5451 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2020 08:15:32 +0200 Subject: [PATCH 078/274] Switch to cmake_build,install --- opencv.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index dcea783..f320c16 100644 --- a/opencv.spec +++ b/opencv.spec @@ -340,14 +340,14 @@ pushd build %{?with_vulkan: -DWITH_VULKAN=ON -DVULKAN_INCLUDE_DIRS=%{_includedir}/vulkan } \ .. -%make_build VERBOSE=1 +%cmake_build popd %install -%make_install -C build -find %{buildroot} -name '*.la' -delete +%cmake_install + rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ %if %{with java} ln -s -r %{buildroot}%{_jnidir}/libopencv_java%{javaver}.so %{buildroot}%{_jnidir}/libopencv_java.so From f75af83ce7146324f626e4d53d13f8fee1f97b39 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2020 08:59:16 +0200 Subject: [PATCH 079/274] Fix cmake_install --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index f320c16..f9b1a34 100644 --- a/opencv.spec +++ b/opencv.spec @@ -346,7 +346,7 @@ popd %install -%cmake_install +%cmake_install -C build rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ %if %{with java} From 9e86c663f2b63860885796a13cb3552e2948255f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2020 09:03:47 +0200 Subject: [PATCH 080/274] fixup --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index f9b1a34..e919ae0 100644 --- a/opencv.spec +++ b/opencv.spec @@ -346,7 +346,7 @@ popd %install -%cmake_install -C build +%make_install -C build rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ %if %{with java} From fb2c54e4ff925f63417cfe9ea0b65e4f431fef2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Tue, 28 Jul 2020 23:40:37 +0100 Subject: [PATCH 081/274] Fix cmake build --- opencv.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/opencv.spec b/opencv.spec index e919ae0..2246b5a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -278,11 +278,9 @@ install -pm 0644 %{SOURCE4} .cache/ade/ # enabled by default if libraries are presents at build time: # GTK, GSTREAMER, 1394, V4L, eigen3 # non available on Fedora: FFMPEG, XINE -mkdir -p build -pushd build # disabling IPP because it is closed source library from intel -%cmake CMAKE_VERBOSE=1 \ +%cmake \ -DCV_TRACE=OFF \ -DWITH_IPP=OFF \ -DWITH_ITT=OFF \ @@ -326,7 +324,7 @@ pushd build %{?with_opencl: -DOPENCL_INCLUDE_DIR=%{_includedir}/CL } \ %{!?with_opencl: -DWITH_OPENCL=OFF } \ -DOPENCV_SKIP_PYTHON_LOADER=ON \ - -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-%{version}/modules \ + -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib-%{version}/modules \ -DWITH_LIBV4L=ON \ -DWITH_OPENMP=ON \ -DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \ @@ -337,16 +335,13 @@ pushd build %{?with_clp: -DWITH_CLP=ON } \ %{?with_va: -DWITH_VA=ON } \ %{!?with_vtk: -DWITH_VTK=OFF} \ - %{?with_vulkan: -DWITH_VULKAN=ON -DVULKAN_INCLUDE_DIRS=%{_includedir}/vulkan } \ - .. + %{?with_vulkan: -DWITH_VULKAN=ON -DVULKAN_INCLUDE_DIRS=%{_includedir}/vulkan } %cmake_build -popd - %install -%make_install -C build +%cmake_install rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ %if %{with java} From 5f489979f270e1262b0f8bcadecebc88f8149d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 29 Jul 2020 01:04:56 +0100 Subject: [PATCH 082/274] Fix cmake build --- opencv.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index 2246b5a..3e1f989 100644 --- a/opencv.spec +++ b/opencv.spec @@ -361,7 +361,6 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope # ARGS=-V increases output verbosity #ifnarch ppc64 %if %{with tests} -pushd build cp %SOURCE5 . if [ -x /usr/libexec/Xorg ]; then Xorg=/usr/libexec/Xorg @@ -370,8 +369,7 @@ pushd build fi $Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf -configdir . :99 & export DISPLAY=:99 - LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/build/lib:$LD_LIBARY_PATH make test ARGS=-V || : -popd + LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/build/lib:$LD_LIBARY_PATH %ctest || : %endif #endif From d8ec2071a838c32af2c702d8d2c194aaad3499f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 2 Aug 2020 01:30:04 +0100 Subject: [PATCH 083/274] Disable LTO on ppc64le, add undefine __cmake_in_source_build to allow build on Fedora < 33 --- opencv.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/opencv.spec b/opencv.spec index 3e1f989..e2090f5 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,5 +1,6 @@ #global indice a %undefine _strict_symbol_defs_build +%undefine __cmake_in_source_build %bcond_without tests %bcond_with ffmpeg %bcond_without gstreamer @@ -43,6 +44,10 @@ %bcond_without java %bcond_without vulkan +%ifarch ppc64le +%define _lto_cflags %{nil} +%endif + %global srcname opencv %global abiver 4.3 @@ -478,6 +483,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog * Fri Jul 24 2020 Nicolas Chauvet - 4.3.0-8 - Rebuilt +- Fix cmake build +- Disable LTO on ppc64le +- Add undefine __cmake_in_source_build to allow build on Fedora < 33 * Sat Jul 11 2020 Jiri Vanek - 4.3.0-7 - Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 From f4647943a42fa68f89940f2b3232b663878c360a Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Thu, 24 Sep 2020 07:36:56 +0200 Subject: [PATCH 084/274] Rebuilt for protobuf 3.13 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index e2090f5..3aaca28 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ Name: opencv Version: 4.3.0 %global javaver %(foo=%{version}; echo ${foo//./}) -Release: 8%{?dist} +Release: 9%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -481,6 +481,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Sep 24 2020 Adrian Reber - 4.3.0-9 +- Rebuilt for protobuf 3.13 + * Fri Jul 24 2020 Nicolas Chauvet - 4.3.0-8 - Rebuilt - Fix cmake build From dfdbb6495c88e15a6989c07dcbc36425566f5d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Tue, 20 Oct 2020 23:11:52 +0100 Subject: [PATCH 085/274] Update 4.5.0 --- opencv-clean.sh | 21 +++++++++++++-------- opencv.spec | 37 ++++++++++++------------------------- opencv_vulkan.patch | 28 ---------------------------- sources | 8 ++++---- 4 files changed, 29 insertions(+), 65 deletions(-) delete mode 100644 opencv_vulkan.patch diff --git a/opencv-clean.sh b/opencv-clean.sh index 2a29de3..21c4be2 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,27 +1,32 @@ #!/bin/bash -VERSION=4.3.0 +VERSION=4.5.0 rm -rf opencv-${VERSION}/ wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz tar xf opencv-${VERSION}.tar.gz cd opencv-${VERSION}/ -find ./ -iname "len*.*" -exec rm {} + -rm -rf modules/xfeatures2d/ +find -iname "*lena*" -exec rm {} ';' -print +find -iname "*lenna*" -exec rm {} ';' -print +rm -r modules/xfeatures2d/ cd ..; tar zcf opencv-clean-${VERSION}.tar.gz opencv-${VERSION}/ -rm -rf opencv-${VERSION}/ +rm -r opencv-${VERSION}/ rm -rf opencv_contrib-${VERSION}/ wget -c https://github.com/opencv/opencv_contrib/archive/${VERSION}/opencv_contrib-${VERSION}.tar.gz tar xf opencv_contrib-${VERSION}.tar.gz cd opencv_contrib-${VERSION}/ -rm -rf modules/xfeatures2d/ +find -iname "*lena*" -exec rm {} ';' -print +find -iname "*lenna*" -exec rm {} ';' -print +rm -r modules/xfeatures2d/ cd ..; tar zcf opencv_contrib-clean-${VERSION}.tar.gz opencv_contrib-${VERSION}/ -rm -rf opencv_contrib-${VERSION}/ +rm -r opencv_contrib-${VERSION}/ rm -rf opencv_extra-${VERSION}/ wget -c https://github.com/opencv/opencv_extra/archive/${VERSION}/opencv_extra-${VERSION}.tar.gz tar xf opencv_extra-${VERSION}.tar.gz -find opencv_extra-${VERSION} \( -iname "len*.*" -o -iname "*lena*.png" -o -iname "*lena*.jpg" \) -exec rm {} + +find opencv_extra-${VERSION} -iname "*lena*" -exec rm {} ';' -print +find opencv_extra-${VERSION} -iname "*lenna*" -exec rm {} ';' -print +find opencv_extra-${VERSION} \( -iname "len*.*" -o -iname "*lena*.png" -o -iname "*lena*.jpg" \) -exec rm {} ';' -print tar zcf opencv_extra-clean-${VERSION}.tar.gz opencv_extra-${VERSION}/ -rm -rf opencv_extra-${VERSION}/ +rm -r opencv_extra-${VERSION}/ diff --git a/opencv.spec b/opencv.spec index 3aaca28..1135cf5 100644 --- a/opencv.spec +++ b/opencv.spec @@ -6,17 +6,7 @@ %bcond_without gstreamer %bcond_with eigen2 %bcond_without eigen3 -%ifnarch ppc64le %bcond_without opencl -%else -# https://bugzilla.redhat.com/show_bug.cgi?id=1487174 -# fixed on f30 -%if 0%{?fedora} > 29 -%bcond_without opencl -%else -%bcond_with opencl -%endif -%endif %ifarch %{ix86} x86_64 %{arm} %bcond_without openni %else @@ -49,18 +39,13 @@ %endif %global srcname opencv -%global abiver 4.3 -# Required because opencv-core has lot of spurious dependencies -# (despite supposed to be "-core") -# TODO: to be fixed properly upstream -# https://github.com/opencv/opencv/issues/7001 -%global optflags %(echo %{optflags} -Wl,--as-needed ) Name: opencv -Version: 4.3.0 +Version: 4.5.0 %global javaver %(foo=%{version}; echo ${foo//./}) -Release: 9%{?dist} +%global abiver %(foo=%{version}; echo ${foo:0:3}) +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -79,10 +64,6 @@ Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch -Patch1: https://patch-diff.githubusercontent.com/raw/opencv/opencv/pull/17431.patch -Patch2: https://patch-diff.githubusercontent.com/raw/opencv/opencv_contrib/pull/2549.patch -# Comment out removed vulkan symbols -Patch3: opencv_vulkan.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -149,6 +130,7 @@ BuildRequires: qt5-qtbase-devel BuildRequires: libGL-devel BuildRequires: libGLU-devel 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} @@ -260,11 +242,8 @@ popd &>/dev/null %endif %patch0 -p1 -b .install_3rdparty_licenses -%patch1 -p1 -%patch3 -p1 pushd %{name}_contrib-%{version} -%patch2 -p1 popd # Install face_landmark_model @@ -464,6 +443,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_hdf.so.%{abiver}* %{_libdir}/libopencv_img_hash.so.%{abiver}* %{_libdir}/libopencv_line_descriptor.so.%{abiver}* +%{_libdir}/libopencv_mcc.so.%{abiver}* %{_libdir}/libopencv_optflow.so.%{abiver}* %{_libdir}/libopencv_phase_unwrapping.so.%{abiver}* %{_libdir}/libopencv_plot.so.%{abiver}* @@ -481,6 +461,13 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Oct 15 2020 Sérgio Basto - 4.5.0-1 +- Update 4.5.0 + +* Wed Oct 07 2020 Sérgio Basto - 4.4.0-1 +- Update 4.4.0 +- opencv_vulkan.patch already applied in upstream + * Thu Sep 24 2020 Adrian Reber - 4.3.0-9 - Rebuilt for protobuf 3.13 diff --git a/opencv_vulkan.patch b/opencv_vulkan.patch deleted file mode 100644 index 3a322a7..0000000 --- a/opencv_vulkan.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -rupN opencv-4.2.0/modules/dnn/src/vkcom/vulkan/function_list.inl.hpp opencv-4.2.0-new/modules/dnn/src/vkcom/vulkan/function_list.inl.hpp ---- opencv-4.2.0/modules/dnn/src/vkcom/vulkan/function_list.inl.hpp 2019-12-20 14:44:16.000000000 +0100 -+++ opencv-4.2.0-new/modules/dnn/src/vkcom/vulkan/function_list.inl.hpp 2020-05-21 12:39:08.652679166 +0200 -@@ -254,15 +254,15 @@ VK_FUNC(vkCmdDrawIndirectCountAMD) - VK_FUNC(vkCmdDrawIndexedIndirectCountAMD) - VK_FUNC(vkGetShaderInfoAMD) - VK_FUNC(vkGetPhysicalDeviceExternalImageFormatPropertiesNV) --VK_FUNC(vkCmdProcessCommandsNVX) --VK_FUNC(vkCmdReserveSpaceForCommandsNVX) --VK_FUNC(vkCreateIndirectCommandsLayoutNVX) --VK_FUNC(vkDestroyIndirectCommandsLayoutNVX) --VK_FUNC(vkCreateObjectTableNVX) --VK_FUNC(vkDestroyObjectTableNVX) --VK_FUNC(vkRegisterObjectsNVX) --VK_FUNC(vkUnregisterObjectsNVX) --VK_FUNC(vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX) -+// VK_FUNC(vkCmdProcessCommandsNVX) -+// VK_FUNC(vkCmdReserveSpaceForCommandsNVX) -+// VK_FUNC(vkCreateIndirectCommandsLayoutNVX) -+// VK_FUNC(vkDestroyIndirectCommandsLayoutNVX) -+// VK_FUNC(vkCreateObjectTableNVX) -+// VK_FUNC(vkDestroyObjectTableNVX) -+// VK_FUNC(vkRegisterObjectsNVX) -+// VK_FUNC(vkUnregisterObjectsNVX) -+// VK_FUNC(vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX) - VK_FUNC(vkCmdSetViewportWScalingNV) - VK_FUNC(vkReleaseDisplayEXT) - VK_FUNC(vkGetPhysicalDeviceSurfaceCapabilities2EXT) diff --git a/sources b/sources index 09e268e..7fdf782 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (opencv-clean-4.3.0.tar.gz) = f582ffc45d1143abf62eac7d6ed416986e6aa0e26d9a4a2cb4d88458e1eecb24ad33570dccd99004998a4899b0a9c05de7dfa405564c0e59bc91a48b7e9d2343 -SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 -SHA512 (opencv_contrib-clean-4.3.0.tar.gz) = bc4f88f3624cf4aed237f8cf36ef62b20f31205e891948797e416faa5e1dd215d1bad85506aa4afacb5c11988a6fc3f81f282fd82fe491f5ffa070f97cc793d5 +SHA512 (opencv-clean-4.5.0.tar.gz) = 536897f0fddaadb4cf5b23df7703e0826852867fdef0d9b9ee029c2c8df374246b9cb78795d1e8e4ef6da3285e1b6e4c74bea7aee16e974694d1ffa7a1d1d09f +SHA512 (opencv_contrib-clean-4.5.0.tar.gz) = b9b42630847f0fbe083d2a3c8816ca676de668e25194b623973f351ba579a39144c858749087fc723333d41f44b0e0e30dd0ce86353e63ca3e4939fa590e0aea +SHA512 (opencv_extra-clean-4.5.0.tar.gz) = 410693ca3a976ccf146ea04d5efa3a808f89c880b88dfa10dc9e7f1f37f639d4a3629fd5c402f44f2a68b22f6e7986ceb285d18a13af56ca866d49c4c6936180 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 -SHA512 (opencv_extra-clean-4.3.0.tar.gz) = 0f9f8b027ed7a105a6ed09d8953bb5d8c44a03ea99495aaf1dd4380a1488ca1acc614ad160a59080be4723469116d1213f3af6dfda0062d56f3575f6d2179bc4 +SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 From 7b959abfa3868667cb4cb48d96aa90afd460f761 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 12 Nov 2020 13:11:00 +0100 Subject: [PATCH 086/274] Rebuild (proj, gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 1135cf5..967af71 100644 --- a/opencv.spec +++ b/opencv.spec @@ -45,7 +45,7 @@ Name: opencv Version: 4.5.0 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -461,6 +461,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri Nov 6 22:47:45 CET 2020 Sandro Mani - 4.5.0-2 +- Rebuild (proj, gdal) + * Thu Oct 15 2020 Sérgio Basto - 4.5.0-1 - Update 4.5.0 From 8d08ab7e12b04adfa93417908cedb556191327c2 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Sat, 5 Dec 2020 16:35:23 -0700 Subject: [PATCH 087/274] Fix missing #include for gcc-11 --- opencv-gcc11.patch | 12 ++++++++++++ opencv.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 opencv-gcc11.patch diff --git a/opencv-gcc11.patch b/opencv-gcc11.patch new file mode 100644 index 0000000..a51a741 --- /dev/null +++ b/opencv-gcc11.patch @@ -0,0 +1,12 @@ +diff --git a/modules/gapi/test/gapi_async_test.cpp b/modules/gapi/test/gapi_async_test.cpp +index 66b8be4..aa0c9c7 100644 +--- a/modules/gapi/test/gapi_async_test.cpp ++++ b/modules/gapi/test/gapi_async_test.cpp +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + namespace opencv_test + { diff --git a/opencv.spec b/opencv.spec index 967af71..ec01a3a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -45,7 +45,7 @@ Name: opencv Version: 4.5.0 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -64,6 +64,7 @@ Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch +Patch1: %{name}-gcc11.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -242,6 +243,7 @@ popd &>/dev/null %endif %patch0 -p1 -b .install_3rdparty_licenses +%patch1 -p1 -b .gcc11 pushd %{name}_contrib-%{version} popd @@ -461,6 +463,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sat Dec 5 2020 Jeff Law - 4.5.0-3 +- Fix missing #include for gcc-11 + * Fri Nov 6 22:47:45 CET 2020 Sandro Mani - 4.5.0-2 - Rebuild (proj, gdal) From ea40db6e60e8646af4f3cc7026d3af1d2d731c80 Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Fri, 1 Jan 2021 16:21:33 -0600 Subject: [PATCH 088/274] Rebuild for OpenEXR 2.5.3. --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index ec01a3a..3243d4d 100644 --- a/opencv.spec +++ b/opencv.spec @@ -45,7 +45,7 @@ Name: opencv Version: 4.5.0 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -463,6 +463,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri Jan 01 2021 Richard Shaw - 4.5.0-4 +- Rebuild for OpenEXR 2.5.3. + * Sat Dec 5 2020 Jeff Law - 4.5.0-3 - Fix missing #include for gcc-11 From 076923ec6dbe143cb728bf1daa01eef11dc18bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 24 Dec 2020 13:59:43 +0000 Subject: [PATCH 089/274] remove old defines that aren't in use --- opencv.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 3243d4d..142e8a1 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,5 +1,3 @@ -#global indice a -%undefine _strict_symbol_defs_build %undefine __cmake_in_source_build %bcond_without tests %bcond_with ffmpeg From f3284ced7dff3f9fc526e25412ed6149df93e45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 3 Jan 2021 23:34:09 +0000 Subject: [PATCH 090/274] Update to 4.5.1 --- opencv-clean.sh | 27 +++++++++++++-------------- opencv.spec | 7 +++++-- sources | 6 +++--- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/opencv-clean.sh b/opencv-clean.sh index 21c4be2..6d34466 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,29 +1,28 @@ #!/bin/bash -VERSION=4.5.0 +VERSION=4.5.1 + +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 +wget -c https://github.com/opencv/opencv_extra/archive/${VERSION}/opencv_extra-${VERSION}.tar.gz rm -rf opencv-${VERSION}/ -wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz tar xf opencv-${VERSION}.tar.gz -cd opencv-${VERSION}/ -find -iname "*lena*" -exec rm {} ';' -print -find -iname "*lenna*" -exec rm {} ';' -print -rm -r modules/xfeatures2d/ -cd ..; tar zcf opencv-clean-${VERSION}.tar.gz opencv-${VERSION}/ +find opencv-${VERSION}/ -iname "*lena*" -exec rm {} ';' -print +find opencv-${VERSION}/ -iname "*lenna*" -exec rm {} ';' -print +rm -r opencv-${VERSION}/modules/xfeatures2d/ +tar zcf opencv-clean-${VERSION}.tar.gz opencv-${VERSION}/ rm -r opencv-${VERSION}/ rm -rf opencv_contrib-${VERSION}/ -wget -c https://github.com/opencv/opencv_contrib/archive/${VERSION}/opencv_contrib-${VERSION}.tar.gz tar xf opencv_contrib-${VERSION}.tar.gz -cd opencv_contrib-${VERSION}/ -find -iname "*lena*" -exec rm {} ';' -print -find -iname "*lenna*" -exec rm {} ';' -print -rm -r modules/xfeatures2d/ -cd ..; tar zcf opencv_contrib-clean-${VERSION}.tar.gz opencv_contrib-${VERSION}/ +find opencv_contrib-${VERSION}/ -iname "*lena*" -exec rm {} ';' -print +find opencv_contrib-${VERSION}/ -iname "*lenna*" -exec rm {} ';' -print +rm -r opencv_contrib-${VERSION}/modules/xfeatures2d/ +tar zcf opencv_contrib-clean-${VERSION}.tar.gz opencv_contrib-${VERSION}/ rm -r opencv_contrib-${VERSION}/ rm -rf opencv_extra-${VERSION}/ -wget -c https://github.com/opencv/opencv_extra/archive/${VERSION}/opencv_extra-${VERSION}.tar.gz tar xf opencv_extra-${VERSION}.tar.gz find opencv_extra-${VERSION} -iname "*lena*" -exec rm {} ';' -print find opencv_extra-${VERSION} -iname "*lenna*" -exec rm {} ';' -print diff --git a/opencv.spec b/opencv.spec index 142e8a1..8d3c20a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -40,10 +40,10 @@ Name: opencv -Version: 4.5.0 +Version: 4.5.1 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 4%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -461,6 +461,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sat Jan 02 2021 Sérgio Basto - 4.5.1-1 +- Update to 4.5.1 + * Fri Jan 01 2021 Richard Shaw - 4.5.0-4 - Rebuild for OpenEXR 2.5.3. diff --git a/sources b/sources index 7fdf782..1a230c9 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (opencv-clean-4.5.0.tar.gz) = 536897f0fddaadb4cf5b23df7703e0826852867fdef0d9b9ee029c2c8df374246b9cb78795d1e8e4ef6da3285e1b6e4c74bea7aee16e974694d1ffa7a1d1d09f -SHA512 (opencv_contrib-clean-4.5.0.tar.gz) = b9b42630847f0fbe083d2a3c8816ca676de668e25194b623973f351ba579a39144c858749087fc723333d41f44b0e0e30dd0ce86353e63ca3e4939fa590e0aea -SHA512 (opencv_extra-clean-4.5.0.tar.gz) = 410693ca3a976ccf146ea04d5efa3a808f89c880b88dfa10dc9e7f1f37f639d4a3629fd5c402f44f2a68b22f6e7986ceb285d18a13af56ca866d49c4c6936180 +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 From 64e493f1d2b400c42c4b5dea38aeea86227dcf62 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 11 Jan 2021 20:16:08 +0100 Subject: [PATCH 091/274] Disable lto on all arches #1910121 --- opencv.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 8d3c20a..1b98e38 100644 --- a/opencv.spec +++ b/opencv.spec @@ -32,9 +32,7 @@ %bcond_without java %bcond_without vulkan -%ifarch ppc64le %define _lto_cflags %{nil} -%endif %global srcname opencv From 4054376b364f1c610efbf310de6c2c011b060ceb Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Tue, 12 Jan 2021 14:20:58 +0100 Subject: [PATCH 092/274] Rebuilt for protobuf 3.14 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 1b98e38..bd60f55 100644 --- a/opencv.spec +++ b/opencv.spec @@ -41,7 +41,7 @@ Name: opencv Version: 4.5.1 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -459,6 +459,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Jan 12 14:20:57 CET 2021 Adrian Reber - 4.5.1-2 +- Rebuilt for protobuf 3.14 + * Sat Jan 02 2021 Sérgio Basto - 4.5.1-1 - Update to 4.5.1 From 33789082e3af6be9f5ab297f97417e848f3828e0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 22:29:00 +0000 Subject: [PATCH 093/274] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index bd60f55..d874e8f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -41,7 +41,7 @@ Name: opencv Version: 4.5.1 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -459,6 +459,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 4.5.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jan 12 14:20:57 CET 2021 Adrian Reber - 4.5.1-2 - Rebuilt for protobuf 3.14 From 1f613a5952c96a8fb770daca0c9c398cfce57d5a Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Thu, 28 Jan 2021 08:05:17 +0100 Subject: [PATCH 094/274] Drop unused BR on SFML and disable VTK support on RHEL 8+ --- opencv.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index d874e8f..03673ef 100644 --- a/opencv.spec +++ b/opencv.spec @@ -20,7 +20,11 @@ %bcond_with atlas %bcond_without openblas %bcond_without gdcm +%if 0%{?rhel} >= 8 +%bcond_with vtk +%else %bcond_without vtk +%endif %ifarch x86_64 %bcond_without libmfx @@ -41,7 +45,7 @@ Name: opencv Version: 4.5.1 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -121,7 +125,6 @@ BuildRequires: python3-beautifulsoup4 #for doc/doxygen/bib2xhtml.pl #BuildRequires: perl-open BuildRequires: gflags-devel -BuildRequires: SFML-devel BuildRequires: libucil-devel BuildRequires: qt5-qtbase-devel BuildRequires: libGL-devel @@ -459,6 +462,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Wed Jan 27 2021 Tomas Popela - 4.5.1-4 +- Drop unused BR on SFML and disable VTK support on RHEL 8+ + * Tue Jan 26 2021 Fedora Release Engineering - 4.5.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 6052aa5107847804d3c11e40a6a514d1a20ba5d6 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 31 Jan 2021 09:11:02 -0700 Subject: [PATCH 095/274] Rebuild for VTK 9 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 03673ef..43d480c 100644 --- a/opencv.spec +++ b/opencv.spec @@ -45,7 +45,7 @@ Name: opencv Version: 4.5.1 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 4%{?dist} +Release: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -462,6 +462,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sun Jan 31 2021 Orion Poplawski - 4.5.1-5 +- Rebuild for VTK 9 + * Wed Jan 27 2021 Tomas Popela - 4.5.1-4 - Drop unused BR on SFML and disable VTK support on RHEL 8+ From 0a5887a0d1dd62efec577ab7daa161e525ea5af2 Mon Sep 17 00:00:00 2001 From: Jiri Kucera Date: Wed, 10 Feb 2021 15:54:49 +0100 Subject: [PATCH 096/274] Fix file lists Based on comparison of `opencv-4.5.1/modules/` and `opencv-4.5.1/opencv_contrib-4.5.1/modules/`, move some *.so's between core and contrib rpms. --- opencv.spec | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/opencv.spec b/opencv.spec index 43d480c..942ba86 100644 --- a/opencv.spec +++ b/opencv.spec @@ -45,7 +45,7 @@ Name: opencv Version: 4.5.1 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -377,30 +377,21 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %files core %license LICENSE %{_datadir}/licenses/opencv4/ -%{_libdir}/libopencv_alphamat.so.%{abiver}* +%{_libdir}/libopencv_calib3d.so.%{abiver}* %{_libdir}/libopencv_core.so.%{abiver}* -%{_libdir}/libopencv_cvv.so.%{abiver}* +%{_libdir}/libopencv_dnn.so.%{abiver}* %{_libdir}/libopencv_features2d.so.%{abiver}* %{_libdir}/libopencv_flann.so.%{abiver}* %{_libdir}/libopencv_gapi.so.%{abiver}* -%{_libdir}/libopencv_hfs.so.%{abiver}* %{_libdir}/libopencv_highgui.so.%{abiver}* %{_libdir}/libopencv_imgcodecs.so.%{abiver}* %{_libdir}/libopencv_imgproc.so.%{abiver}* -%{_libdir}/libopencv_intensity_transform.so.%{abiver}* %{_libdir}/libopencv_ml.so.%{abiver}* %{_libdir}/libopencv_objdetect.so.%{abiver}* %{_libdir}/libopencv_photo.so.%{abiver}* -%{_libdir}/libopencv_rapid.so.%{abiver}* -%{_libdir}/libopencv_shape.so.%{abiver}* %{_libdir}/libopencv_stitching.so.%{abiver}* -%{_libdir}/libopencv_superres.so.%{abiver}* %{_libdir}/libopencv_video.so.%{abiver}* %{_libdir}/libopencv_videoio.so.%{abiver}* -%{_libdir}/libopencv_videostab.so.%{abiver}* -%if %{with vtk} -%{_libdir}/libopencv_viz.so.%{abiver}* -%endif %files devel %dir %{_includedir}/opencv4 @@ -428,13 +419,13 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %endif %files contrib +%{_libdir}/libopencv_alphamat.so.%{abiver}* %{_libdir}/libopencv_aruco.so.%{abiver}* %{_libdir}/libopencv_bgsegm.so.%{abiver}* %{_libdir}/libopencv_bioinspired.so.%{abiver}* -%{_libdir}/libopencv_calib3d.so.%{abiver}* %{_libdir}/libopencv_ccalib.so.%{abiver}* +%{_libdir}/libopencv_cvv.so.%{abiver}* %{_libdir}/libopencv_datasets.so.%{abiver}* -%{_libdir}/libopencv_dnn.so.%{abiver}* %{_libdir}/libopencv_dnn_objdetect.so.%{abiver}* %{_libdir}/libopencv_dnn_superres.so.%{abiver}* %{_libdir}/libopencv_dpm.so.%{abiver}* @@ -442,26 +433,41 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_freetype.so.%{abiver}* %{_libdir}/libopencv_fuzzy.so.%{abiver}* %{_libdir}/libopencv_hdf.so.%{abiver}* +%{_libdir}/libopencv_hfs.so.%{abiver}* %{_libdir}/libopencv_img_hash.so.%{abiver}* +%{_libdir}/libopencv_intensity_transform.so.%{abiver}* %{_libdir}/libopencv_line_descriptor.so.%{abiver}* %{_libdir}/libopencv_mcc.so.%{abiver}* %{_libdir}/libopencv_optflow.so.%{abiver}* %{_libdir}/libopencv_phase_unwrapping.so.%{abiver}* %{_libdir}/libopencv_plot.so.%{abiver}* +%{_libdir}/libopencv_quality.so.%{abiver}* +%{_libdir}/libopencv_rapid.so.%{abiver}* %{_libdir}/libopencv_reg.so.%{abiver}* %{_libdir}/libopencv_rgbd.so.%{abiver}* -%{_libdir}/libopencv_quality.so.%{abiver}* %{_libdir}/libopencv_saliency.so.%{abiver}* +%{_libdir}/libopencv_shape.so.%{abiver}* %{_libdir}/libopencv_stereo.so.%{abiver}* %{_libdir}/libopencv_structured_light.so.%{abiver}* +%{_libdir}/libopencv_superres.so.%{abiver}* %{_libdir}/libopencv_surface_matching.so.%{abiver}* %{_libdir}/libopencv_text.so.%{abiver}* %{_libdir}/libopencv_tracking.so.%{abiver}* +%{_libdir}/libopencv_videostab.so.%{abiver}* +%if %{with vtk} +%{_libdir}/libopencv_viz.so.%{abiver}* +%endif %{_libdir}/libopencv_ximgproc.so.%{abiver}* %{_libdir}/libopencv_xobjdetect.so.%{abiver}* %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Wed Feb 10 2021 Jiri Kucera - 4.5.1-6 +- Fix file lists + Based on comparison of `opencv-4.5.1/modules/` and + `opencv-4.5.1/opencv_contrib-4.5.1/modules/`, move some *.so's between core + and contrib rpms + * Sun Jan 31 2021 Orion Poplawski - 4.5.1-5 - Rebuild for VTK 9 From e2830d3e000395d50b82c91d840e5fb5c91e2fa5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 12 Mar 2021 15:33:02 +0100 Subject: [PATCH 097/274] Update with_cuda options Initial patch from "Eric Sandeen " See rhbz#1938054 --- opencv.spec | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index 942ba86..259efe1 100644 --- a/opencv.spec +++ b/opencv.spec @@ -40,6 +40,12 @@ %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} +%endif Name: opencv Version: 4.5.1 @@ -71,9 +77,10 @@ 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_eigen2:BuildRequires: eigen2-devel} %{?with_eigen3:BuildRequires: eigen3-devel} @@ -293,6 +300,7 @@ 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_openni: -DWITH_OPENNI=ON } \ %{!?with_xine: -DWITH_XINE=OFF } \ @@ -424,6 +432,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}* From 8b199e9c3348e66d1aa273385d80b7127f91d0de Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 12 Mar 2021 17:23:45 +0100 Subject: [PATCH 098/274] Add cuda_dnn option --- opencv.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencv.spec b/opencv.spec index 259efe1..21c7bef 100644 --- a/opencv.spec +++ b/opencv.spec @@ -45,6 +45,7 @@ %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 @@ -81,6 +82,7 @@ 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} @@ -301,6 +303,7 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -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 } \ From c181e0be6143c560c4eea06a8ee6f2090eb3b0f7 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 30 Mar 2021 19:38:30 +0100 Subject: [PATCH 099/274] Rebuilt for removed libstdc++ symbol (#1937698) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 21c7bef..6609d72 100644 --- a/opencv.spec +++ b/opencv.spec @@ -52,7 +52,7 @@ Name: opencv Version: 4.5.1 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -477,6 +477,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* 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 From 311f2f5e307c4fee6d1a39ddca4ec4b3f71184af Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 31 Mar 2021 12:01:05 +0200 Subject: [PATCH 100/274] Attempt to fix build --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 6609d72..05df7f8 100644 --- a/opencv.spec +++ b/opencv.spec @@ -142,7 +142,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: From add0af2a88eff3b1483c3bc0672790b0bf68a725 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 31 Mar 2021 15:12:29 +0200 Subject: [PATCH 101/274] Disable tests for now --- opencv.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/opencv.spec b/opencv.spec index 05df7f8..fda3980 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 @@ -280,6 +286,9 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -DWITH_ITT=OFF \ -DWITH_QT=ON \ -DWITH_OPENGL=ON \ +%if ! %{with tests} + -BUILD_TESTS=OFF \ +%endif -DOpenGL_GL_PREFERENCE=GLVND \ -DWITH_GDAL=ON \ -DWITH_OPENEXR=ON \ From 6a41b2a5328d996a84dbf5021c09ea89a3ab6f09 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 31 Mar 2021 15:12:55 +0200 Subject: [PATCH 102/274] Update changelog --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index fda3980..4b7fefe 100644 --- a/opencv.spec +++ b/opencv.spec @@ -58,7 +58,7 @@ Name: opencv Version: 4.5.1 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -486,6 +486,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* 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) From 05673093bbc207ad6759a7e60159afa76ca4a5d4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 31 Mar 2021 17:16:34 +0200 Subject: [PATCH 103/274] Fixup --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 4b7fefe..655ecf1 100644 --- a/opencv.spec +++ b/opencv.spec @@ -287,7 +287,7 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -DWITH_QT=ON \ -DWITH_OPENGL=ON \ %if ! %{with tests} - -BUILD_TESTS=OFF \ + -DBUILD_TESTS=OFF \ %endif -DOpenGL_GL_PREFERENCE=GLVND \ -DWITH_GDAL=ON \ From 6b9379fedfd88183ede2ef86c68d27cb2e973044 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 3 Apr 2021 10:51:25 +0200 Subject: [PATCH 104/274] Update to 4.5.2 --- opencv.spec | 8 ++++++-- sources | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/opencv.spec b/opencv.spec index 655ecf1..bedc683 100644 --- a/opencv.spec +++ b/opencv.spec @@ -55,10 +55,10 @@ %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: 8%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -481,11 +481,15 @@ 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 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 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 From 9f66169420af341f817ab07c7b57a09e1110a5df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 30 Apr 2021 10:20:46 +0100 Subject: [PATCH 105/274] Upstream fixed GCC11 issues, so we can re-enable the tests --- 17431.patch | 24 --- 2549.patch | 507 --------------------------------------------- opencv-gcc11.patch | 12 -- opencv.spec | 13 +- 4 files changed, 4 insertions(+), 552 deletions(-) delete mode 100644 17431.patch delete mode 100644 2549.patch delete mode 100644 opencv-gcc11.patch diff --git a/17431.patch b/17431.patch deleted file mode 100644 index 860a9b4..0000000 --- a/17431.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 7856f14558f37021c1d5b76ade40ac78e59a422d Mon Sep 17 00:00:00 2001 -From: Maksim Shabunin -Date: Sat, 30 May 2020 06:07:39 +0300 -Subject: [PATCH] Added VTK 9 support - ---- - cmake/OpenCVDetectVTK.cmake | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/cmake/OpenCVDetectVTK.cmake b/cmake/OpenCVDetectVTK.cmake -index 0f2b9584e12..23d17c35241 100644 ---- a/cmake/OpenCVDetectVTK.cmake -+++ b/cmake/OpenCVDetectVTK.cmake -@@ -1,3 +1,10 @@ -+# VTK 9.0 -+find_package(VTK QUIET NAMES vtk COMPONENTS InteractionStyle RenderingLOD IOPLY FiltersTexture RenderingFreeType IOExport IOGeometry FiltersExtraction RenderingCore NO_MODULE) -+if(VTK_FOUND) -+ set(HAVE_VTK ON) -+ return() -+endif() -+ - # VTK 6.x components - find_package(VTK QUIET COMPONENTS vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE) - IF(VTK_FOUND) diff --git a/2549.patch b/2549.patch deleted file mode 100644 index 8d66918..0000000 --- a/2549.patch +++ /dev/null @@ -1,507 +0,0 @@ -From c4b3b920461f9c7207d4c184a5bedf7608a51ed1 Mon Sep 17 00:00:00 2001 -From: Maksim Shabunin -Date: Sat, 30 May 2020 06:09:02 +0300 -Subject: [PATCH 1/3] Added VTK 9 support - ---- - modules/viz/CMakeLists.txt | 4 +++- - modules/viz/src/precomp.hpp | 8 +++++++- - modules/viz/src/types.cpp | 3 ++- - modules/viz/src/vizimpl.cpp | 13 +++++++++++-- - modules/viz/src/vtk/vtkOBJWriter.cpp | 14 +++++++++----- - modules/viz/src/vtk/vtkXYZReader.cpp | 2 +- - modules/viz/src/vtk/vtkXYZWriter.cpp | 2 +- - 7 files changed, 34 insertions(+), 12 deletions(-) - -diff --git a/modules/viz/CMakeLists.txt b/modules/viz/CMakeLists.txt -index 89a9c3e098..3426e1dd26 100644 ---- a/modules/viz/CMakeLists.txt -+++ b/modules/viz/CMakeLists.txt -@@ -3,7 +3,9 @@ if(NOT HAVE_VTK) - endif() - - set(the_description "Viz") --include(${VTK_USE_FILE}) -+if(VTK_VERSION VERSION_LESS 8.90) -+ include(${VTK_USE_FILE}) -+endif() - - if(NOT BUILD_SHARED_LIBS) - # We observed conflict between builtin 3rdparty libraries and -diff --git a/modules/viz/src/precomp.hpp b/modules/viz/src/precomp.hpp -index f92fdb6ac2..4c4bf7c599 100644 ---- a/modules/viz/src/precomp.hpp -+++ b/modules/viz/src/precomp.hpp -@@ -133,7 +133,8 @@ - #include - #include - #include --#include "vtkCallbackCommand.h" -+#include -+#include - - #if !defined(_WIN32) || defined(__CYGWIN__) - # include /* unlink */ -@@ -149,6 +150,11 @@ - #include "vtk/vtkTrajectorySource.h" - #include "vtk/vtkImageMatSource.h" - -+#if VTK_MAJOR_VERSION >= 9 -+typedef vtkIdType const * CellIterT; -+#else -+typedef vtkIdType * CellIterT; -+#endif - - #include - #include -diff --git a/modules/viz/src/types.cpp b/modules/viz/src/types.cpp -index 65571a192e..0e14477891 100644 ---- a/modules/viz/src/types.cpp -+++ b/modules/viz/src/types.cpp -@@ -100,7 +100,8 @@ cv::viz::Mesh cv::viz::Mesh::load(const String& file, int type) - int* poly_ptr = mesh.polygons.ptr(); - - polygons->InitTraversal(); -- vtkIdType nr_cell_points, *cell_points; -+ vtkIdType nr_cell_points; -+ CellIterT cell_points; - while (polygons->GetNextCell(nr_cell_points, cell_points)) - { - *poly_ptr++ = nr_cell_points; -diff --git a/modules/viz/src/vizimpl.cpp b/modules/viz/src/vizimpl.cpp -index 2c291c0569..2c7ce997a4 100644 ---- a/modules/viz/src/vizimpl.cpp -+++ b/modules/viz/src/vizimpl.cpp -@@ -55,8 +55,17 @@ cv::viz::Viz3d::VizImpl::VizImpl(const String &name) : spin_once_state_(false), - - // Create render window - window_ = vtkSmartPointer::New(); -- cv::Vec2i window_size = cv::Vec2i(window_->GetScreenSize()) / 2; -- window_->SetSize(window_size.val); -+ int * sz = window_->GetScreenSize(); -+ if (sz) -+ { -+ cv::Vec2i window_size = cv::Vec2i(sz) / 2; -+ window_->SetSize(window_size.val); -+ } -+ else -+ { -+ int new_sz[2] = { 640, 480 }; -+ window_->SetSize(new_sz); -+ } - window_->AddRenderer(renderer_); - - // Create the interactor style -diff --git a/modules/viz/src/vtk/vtkOBJWriter.cpp b/modules/viz/src/vtk/vtkOBJWriter.cpp -index 296b6eb065..2e5764fc27 100644 ---- a/modules/viz/src/vtk/vtkOBJWriter.cpp -+++ b/modules/viz/src/vtk/vtkOBJWriter.cpp -@@ -72,7 +72,7 @@ void cv::viz::vtkOBJWriter::WriteData() - } - - vtkDebugMacro(<<"Opening vtk file for writing..."); -- ostream *outfilep = new ofstream(this->FileName, ios::out); -+ std::ostream *outfilep = new std::ofstream(this->FileName, ios::out); - if (outfilep->fail()) - { - vtkErrorMacro(<< "Unable to open file: "<< this->FileName); -@@ -127,7 +127,8 @@ void cv::viz::vtkOBJWriter::WriteData() - // write out verts if any - if (input->GetNumberOfVerts() > 0) - { -- vtkIdType npts = 0, *index = 0; -+ vtkIdType npts = 0; -+ CellIterT index = 0; - vtkCellArray *cells = input->GetVerts(); - for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) - { -@@ -141,7 +142,8 @@ void cv::viz::vtkOBJWriter::WriteData() - // write out lines if any - if (input->GetNumberOfLines() > 0) - { -- vtkIdType npts = 0, *index = 0; -+ vtkIdType npts = 0; -+ CellIterT index = 0; - vtkCellArray *cells = input->GetLines(); - for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) - { -@@ -162,7 +164,8 @@ void cv::viz::vtkOBJWriter::WriteData() - // write out polys if any - if (input->GetNumberOfPolys() > 0) - { -- vtkIdType npts = 0, *index = 0; -+ vtkIdType npts = 0; -+ CellIterT index = 0; - vtkCellArray *cells = input->GetPolys(); - for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) - { -@@ -191,7 +194,8 @@ void cv::viz::vtkOBJWriter::WriteData() - // write out tstrips if any - if (input->GetNumberOfStrips() > 0) - { -- vtkIdType npts = 0, *index = 0; -+ vtkIdType npts = 0; -+ CellIterT index = 0; - vtkCellArray *cells = input->GetStrips(); - for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) - { -diff --git a/modules/viz/src/vtk/vtkXYZReader.cpp b/modules/viz/src/vtk/vtkXYZReader.cpp -index 57726eae9b..3b9265fed6 100644 ---- a/modules/viz/src/vtk/vtkXYZReader.cpp -+++ b/modules/viz/src/vtk/vtkXYZReader.cpp -@@ -77,7 +77,7 @@ int cv::viz::vtkXYZReader::RequestData(vtkInformation*, vtkInformationVector**, - } - - // Open the input file. -- ifstream fin(this->FileName); -+ std::ifstream fin(this->FileName); - if(!fin) - { - vtkErrorMacro("Error opening file " << this->FileName); -diff --git a/modules/viz/src/vtk/vtkXYZWriter.cpp b/modules/viz/src/vtk/vtkXYZWriter.cpp -index cf95e3c6a0..56a26b38a0 100644 ---- a/modules/viz/src/vtk/vtkXYZWriter.cpp -+++ b/modules/viz/src/vtk/vtkXYZWriter.cpp -@@ -69,7 +69,7 @@ void cv::viz::vtkXYZWriter::WriteData() - } - - vtkDebugMacro(<<"Opening vtk file for writing..."); -- ostream *outfilep = new ofstream(this->FileName, ios::out); -+ std::ostream *outfilep = new std::ofstream(this->FileName, ios::out); - if (outfilep->fail()) - { - vtkErrorMacro(<< "Unable to open file: "<< this->FileName); - -From 4281df7fe0090c03b6a40db44292ba6268239cbb Mon Sep 17 00:00:00 2001 -From: Maksim Shabunin -Date: Tue, 2 Jun 2020 19:21:19 +0300 -Subject: [PATCH 2/3] viz: tests are non-interactive now - ---- - modules/viz/test/test_tutorial2.cpp | 4 +-- - modules/viz/test/test_tutorial3.cpp | 2 +- - modules/viz/test/test_viz3d.cpp | 2 +- - modules/viz/test/tests_simple.cpp | 56 ++++++++++++++--------------- - 4 files changed, 32 insertions(+), 32 deletions(-) - -diff --git a/modules/viz/test/test_tutorial2.cpp b/modules/viz/test/test_tutorial2.cpp -index 6b2972f0af..a4b5b99582 100644 ---- a/modules/viz/test/test_tutorial2.cpp -+++ b/modules/viz/test/test_tutorial2.cpp -@@ -28,7 +28,7 @@ static void tutorial2() - /// Rodrigues vector - Vec3d rot_vec = Vec3d::all(0); - double translation_phase = 0.0, translation = 0.0; -- while(!myWindow.wasStopped()) -+ for(unsigned num = 0; num < 50; ++num) - { - /* Rotation using rodrigues */ - /// Rotate around (1,1,1) -@@ -45,7 +45,7 @@ static void tutorial2() - - myWindow.setWidgetPose("Cube Widget", pose); - -- myWindow.spinOnce(1, true); -+ myWindow.spinOnce(100, true); - } - } - -diff --git a/modules/viz/test/test_tutorial3.cpp b/modules/viz/test/test_tutorial3.cpp -index 232130f0a6..32e33b1902 100644 ---- a/modules/viz/test/test_tutorial3.cpp -+++ b/modules/viz/test/test_tutorial3.cpp -@@ -48,7 +48,7 @@ static void tutorial3(bool camera_pov) - myWindow.setViewerPose(camera_pose); - - /// Start event loop. -- myWindow.spin(); -+ myWindow.spinOnce(500, true); - } - - TEST(Viz, tutorial3_global_view) -diff --git a/modules/viz/test/test_viz3d.cpp b/modules/viz/test/test_viz3d.cpp -index cdf8a00ad7..4ab05c3e0a 100644 ---- a/modules/viz/test/test_viz3d.cpp -+++ b/modules/viz/test/test_viz3d.cpp -@@ -59,7 +59,7 @@ TEST(Viz_viz3d, DISABLED_develop) - //cv::Mat cloud = cv::viz::readCloud(get_dragon_ply_file_path()); - //---->>>>> - -- viz.spin(); -+ viz.spinOnce(500, true); - } - - }} // namespace -diff --git a/modules/viz/test/tests_simple.cpp b/modules/viz/test/tests_simple.cpp -index 12d696dfba..5584483f4f 100644 ---- a/modules/viz/test/tests_simple.cpp -+++ b/modules/viz/test/tests_simple.cpp -@@ -56,7 +56,7 @@ TEST(Viz, show_cloud_bluberry) - viz.showWidget("dragon", WCloud(dragon_cloud, Color::bluberry()), pose); - - viz.showWidget("text2d", WText("Bluberry cloud", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_cloud_random_color) -@@ -73,7 +73,7 @@ TEST(Viz, show_cloud_random_color) - viz.showWidget("coosys", WCoordinateSystem()); - viz.showWidget("dragon", WCloud(dragon_cloud, colors), pose); - viz.showWidget("text2d", WText("Random color cloud", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_cloud_masked) -@@ -91,7 +91,7 @@ TEST(Viz, show_cloud_masked) - viz.showWidget("coosys", WCoordinateSystem()); - viz.showWidget("dragon", WCloud(dragon_cloud), pose); - viz.showWidget("text2d", WText("Nan masked cloud", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_cloud_collection) -@@ -109,7 +109,7 @@ TEST(Viz, show_cloud_collection) - viz.showWidget("coosys", WCoordinateSystem()); - viz.showWidget("ccol", ccol); - viz.showWidget("text2d", WText("Cloud collection", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_painted_clouds) -@@ -124,7 +124,7 @@ TEST(Viz, show_painted_clouds) - viz.showWidget("cloud3", WPaintedCloud(cloud, Vec3d(0.0, 0.0, -1.0), Vec3d(0.0, 0.0, 1.0), Color::blue(), Color::red())); - viz.showWidget("arrow", WArrow(Vec3d(0.0, 1.0, -1.0), Vec3d(0.0, 1.0, 1.0), 0.009, Color::raspberry())); - viz.showWidget("text2d", WText("Painted clouds", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_mesh) -@@ -137,7 +137,7 @@ TEST(Viz, show_mesh) - viz.showWidget("coosys", WCoordinateSystem()); - viz.showWidget("mesh", WMesh(mesh), pose); - viz.showWidget("text2d", WText("Just mesh", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_mesh_random_colors) -@@ -152,7 +152,7 @@ TEST(Viz, show_mesh_random_colors) - viz.showWidget("mesh", WMesh(mesh), pose); - viz.setRenderingProperty("mesh", SHADING, SHADING_PHONG); - viz.showWidget("text2d", WText("Random color mesh", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_widget_merger) -@@ -173,7 +173,7 @@ TEST(Viz, show_widget_merger) - viz.showWidget("coo", WCoordinateSystem()); - viz.showWidget("merger", merger); - viz.showWidget("text2d", WText("Widget merger", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_textured_mesh) -@@ -210,7 +210,7 @@ TEST(Viz, show_textured_mesh) - viz.showWidget("mesh", WMesh(mesh)); - viz.setRenderingProperty("mesh", SHADING, SHADING_PHONG); - viz.showWidget("text2d", WText("Textured mesh", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_polyline) -@@ -229,7 +229,7 @@ TEST(Viz, show_polyline) - viz.showWidget("polyline", WPolyLine(polyline, colors)); - viz.showWidget("coosys", WCoordinateSystem()); - viz.showWidget("text2d", WText("Polyline", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_sampled_normals) -@@ -244,7 +244,7 @@ TEST(Viz, show_sampled_normals) - viz.showWidget("normals", WCloudNormals(mesh.cloud, mesh.normals, 30, 0.1f, Color::green()), pose); - viz.setRenderingProperty("normals", LINE_WIDTH, 2.0); - viz.showWidget("text2d", WText("Cloud or mesh normals", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_cloud_shaded_by_normals) -@@ -260,7 +260,7 @@ TEST(Viz, show_cloud_shaded_by_normals) - Viz3d viz("show_cloud_shaded_by_normals"); - viz.showWidget("cloud", cloud, pose); - viz.showWidget("text2d", WText("Cloud shaded by normals", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_trajectories) -@@ -287,15 +287,15 @@ TEST(Viz, show_trajectories) - viz.showWidget("text2d", WText("Different kinds of supported trajectories", Point(20, 20), 20, Color::green())); - - int i = 0; -- while(!viz.wasStopped()) -+ for(unsigned num = 0; num < 50; ++num) - { - double a = --i % 360; - Vec3d pose(sin(a * CV_PI/180), 0.7, cos(a * CV_PI/180)); - viz.setViewerPose(makeCameraPose(pose * 7.5, Vec3d(0.0, 0.5, 0.0), Vec3d(0.0, 0.1, 0.0))); -- viz.spinOnce(20, true); -+ viz.spinOnce(100, true); - } - viz.resetCamera(); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_trajectory_reposition) -@@ -306,7 +306,7 @@ TEST(Viz, show_trajectory_reposition) - viz.showWidget("coos", WCoordinateSystem()); - viz.showWidget("sub3", WTrajectory(Mat(path).rowRange(0, (int)path.size()/3), WTrajectory::BOTH, 0.2, Color::brown()), path.front().inv()); - viz.showWidget("text2d", WText("Trajectory resposition to origin", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_camera_positions) -@@ -330,7 +330,7 @@ TEST(Viz, show_camera_positions) - viz.showWidget("pos3", WCameraPosition(0.75), poses[1]); - viz.showWidget("pos4", WCameraPosition(K, gray, 3, Color::indigo()), poses[1]); - viz.showWidget("text2d", WText("Camera positions with images", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_overlay_image) -@@ -353,16 +353,16 @@ TEST(Viz, show_overlay_image) - viz.showWidget("text2d", WText("Overlay images", Point(20, 20), 20, Color::green())); - - int i = 0; -- while(!viz.wasStopped()) -+ for(unsigned num = 0; num < 50; ++num) - { - double a = ++i % 360; - Vec3d pose(sin(a * CV_PI/180), 0.7, cos(a * CV_PI/180)); - viz.setViewerPose(makeCameraPose(pose * 3, Vec3d(0.0, 0.5, 0.0), Vec3d(0.0, 0.1, 0.0))); - viz.getWidget("img1").cast().setImage(lena * pow(sin(i*10*CV_PI/180) * 0.5 + 0.5, 1.0)); -- viz.spinOnce(1, true); -+ viz.spinOnce(100, true); - } - viz.showWidget("text2d", WText("Overlay images (stopped)", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - -@@ -376,7 +376,7 @@ TEST(Viz, show_image_method) - viz.showImage(lena, lena.size()); - viz.spinOnce(1500, true); - -- cv::viz::imshow("show_image_method", make_gray(lena)).spin(); -+ cv::viz::imshow("show_image_method", make_gray(lena)).spinOnce(500, true); - } - - TEST(Viz, show_image_3d) -@@ -398,13 +398,13 @@ TEST(Viz, show_image_3d) - viz.showWidget("text2d", WText("Images in 3D", Point(20, 20), 20, Color::green())); - - int i = 0; -- while(!viz.wasStopped()) -+ for(unsigned num = 0; num < 50; ++num) - { - viz.getWidget("img0").cast().setImage(lena * pow(sin(i++*7.5*CV_PI/180) * 0.5 + 0.5, 1.0)); -- viz.spinOnce(1, true); -+ viz.spinOnce(100, true); - } - viz.showWidget("text2d", WText("Images in 3D (stopped)", Point(20, 20), 20, Color::green())); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_simple_widgets) -@@ -431,10 +431,10 @@ TEST(Viz, show_simple_widgets) - - viz.showWidget("grid1", WGrid(Vec2i(7,7), Vec2d::all(0.75), Color::gray()), Affine3d().translate(Vec3d(0.0, 0.0, -1.0))); - -- viz.spin(); -+ viz.spinOnce(500, true); - viz.getWidget("text2d").cast().setText("Different simple widgets (updated)"); - viz.getWidget("text3d").cast().setText("Updated text 3D"); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - TEST(Viz, show_follower) -@@ -446,9 +446,9 @@ TEST(Viz, show_follower) - viz.showWidget("t3d_2", WText3D("Simple 3D follower", Point3d(-0.5, -0.5, 0.5), 0.125, true, Color::green())); - viz.showWidget("text2d", WText("Follower: text always facing camera", Point(20, 20), 20, Color::green())); - viz.setBackgroundMeshLab(); -- viz.spin(); -+ viz.spinOnce(500, true); - viz.getWidget("t3d_2").cast().setText("Updated follower 3D"); -- viz.spin(); -+ viz.spinOnce(500, true); - } - - }} // namespace - -From f46c6cadbe751b2dbf60b34e85aaf575511e9794 Mon Sep 17 00:00:00 2001 -From: Maksim Shabunin -Date: Tue, 2 Jun 2020 22:46:53 +0300 -Subject: [PATCH 3/3] fixup! Added VTK 9 support - ---- - modules/viz/CMakeLists.txt | 12 ++++++++---- - modules/viz/src/types.cpp | 1 + - 2 files changed, 9 insertions(+), 4 deletions(-) - -diff --git a/modules/viz/CMakeLists.txt b/modules/viz/CMakeLists.txt -index 3426e1dd26..cd225960ce 100644 ---- a/modules/viz/CMakeLists.txt -+++ b/modules/viz/CMakeLists.txt -@@ -3,9 +3,6 @@ if(NOT HAVE_VTK) - endif() - - set(the_description "Viz") --if(VTK_VERSION VERSION_LESS 8.90) -- include(${VTK_USE_FILE}) --endif() - - if(NOT BUILD_SHARED_LIBS) - # We observed conflict between builtin 3rdparty libraries and -@@ -37,7 +34,14 @@ ocv_add_accuracy_tests() - ocv_add_perf_tests() - ocv_add_samples(opencv_imgproc opencv_calib3d opencv_features2d opencv_flann) - --ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES}) -+ -+if (VTK_VERSION VERSION_LESS "8.90.0") -+ include(${VTK_USE_FILE}) -+ ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES}) -+else () -+ ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES}) -+ vtk_module_autoinit(TARGETS ${the_module} MODULES ${VTK_LIBRARIES}) -+endif() - - if(APPLE AND BUILD_opencv_viz) - ocv_target_link_libraries(${the_module} PRIVATE "-framework Cocoa") -diff --git a/modules/viz/src/types.cpp b/modules/viz/src/types.cpp -index 0e14477891..e9a470cf83 100644 ---- a/modules/viz/src/types.cpp -+++ b/modules/viz/src/types.cpp -@@ -97,6 +97,7 @@ cv::viz::Mesh cv::viz::Mesh::load(const String& file, int type) - // Now handle the polygons - vtkSmartPointer polygons = polydata->GetPolys(); - mesh.polygons.create(1, polygons->GetSize(), CV_32SC1); -+ mesh.polygons = 0; - int* poly_ptr = mesh.polygons.ptr(); - - polygons->InitTraversal(); diff --git a/opencv-gcc11.patch b/opencv-gcc11.patch deleted file mode 100644 index a51a741..0000000 --- a/opencv-gcc11.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/modules/gapi/test/gapi_async_test.cpp b/modules/gapi/test/gapi_async_test.cpp -index 66b8be4..aa0c9c7 100644 ---- a/modules/gapi/test/gapi_async_test.cpp -+++ b/modules/gapi/test/gapi_async_test.cpp -@@ -13,6 +13,7 @@ - - #include - #include -+#include - - namespace opencv_test - { diff --git a/opencv.spec b/opencv.spec index bedc683..715e602 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,11 +1,5 @@ %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 @@ -58,7 +52,7 @@ Name: opencv Version: 4.5.2 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -77,7 +71,6 @@ Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch -Patch1: %{name}-gcc11.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -257,7 +250,6 @@ popd &>/dev/null %endif %patch0 -p1 -b .install_3rdparty_licenses -%patch1 -p1 -b .gcc11 pushd %{name}_contrib-%{version} popd @@ -487,6 +479,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Apr 29 2021 Sérgio Basto - 4.5.2-2 +- Upstream fixed GCC11 issues, so we can re-enable the tests + * Sat Apr 03 2021 Nicolas Chauvet - 4.5.2-1 - Update to 4.5.2 From 16450b46341e234da0206536bc3860e3dc545e7e Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Fri, 7 May 2021 12:13:31 +0200 Subject: [PATCH 106/274] Rebuild (gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 715e602..92ce967 100644 --- a/opencv.spec +++ b/opencv.spec @@ -52,7 +52,7 @@ Name: opencv Version: 4.5.2 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -479,6 +479,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri May 07 2021 Sandro Mani - 4.5.2-3 +- Rebuild (gdal) + * Thu Apr 29 2021 Sérgio Basto - 4.5.2-2 - Upstream fixed GCC11 issues, so we can re-enable the tests From 9b14a657507ba9e6240835238d76d62a447b5162 Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Thu, 20 May 2021 10:56:13 -0500 Subject: [PATCH 107/274] Rebuild for gdal 3.3.0. --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 92ce967..160a998 100644 --- a/opencv.spec +++ b/opencv.spec @@ -52,7 +52,7 @@ Name: opencv Version: 4.5.2 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -479,6 +479,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu May 20 2021 Richard Shaw - 4.5.2-4 +- Rebuild for gdal 3.3.0. + * Fri May 07 2021 Sandro Mani - 4.5.2-3 - Rebuild (gdal) From 3e129d6efd4e450a67a488c863b41dfee0e7fd33 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Fri, 21 May 2021 20:28:17 +0200 Subject: [PATCH 108/274] Rebuild (gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 160a998..ed4caab 100644 --- a/opencv.spec +++ b/opencv.spec @@ -52,7 +52,7 @@ Name: opencv Version: 4.5.2 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 4%{?dist} +Release: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -479,6 +479,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri May 21 2021 Sandro Mani - 4.5.2-5 +- Rebuild (gdal) + * Thu May 20 2021 Richard Shaw - 4.5.2-4 - Rebuild for gdal 3.3.0. From 23acf4b4a36696db38dbc8b59723598c69519e43 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 20:13:48 +0200 Subject: [PATCH 109/274] Rebuilt for Python 3.10 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index ed4caab..c94966b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -52,7 +52,7 @@ Name: opencv Version: 4.5.2 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -479,6 +479,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri Jun 04 2021 Python Maint - 4.5.2-6 +- Rebuilt for Python 3.10 + * Fri May 21 2021 Sandro Mani - 4.5.2-5 - Rebuild (gdal) From 6b1661459f36c0a2fbb405e9d06040623b5b30b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 17 Jul 2021 01:24:53 +0100 Subject: [PATCH 110/274] Update to 4.5.3 --- opencv-clean.sh | 2 +- opencv.spec | 11 ++++++++--- sources | 6 +++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/opencv-clean.sh b/opencv-clean.sh index 6d34466..e4b69e6 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.5.1 +VERSION=4.5.3 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 diff --git a/opencv.spec b/opencv.spec index c94966b..472d55e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -49,10 +49,10 @@ %endif Name: opencv -Version: 4.5.2 +Version: 4.5.3 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 6%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -244,7 +244,8 @@ to provide decent performance and stability. # we don't use pre-built contribs except quirc pushd 3rdparty shopt -s extglob -rm -r !(openexr|openvx|quirc) +#rm -r !(openexr|openvx|quirc) +rm -r !(openvx|quirc) shopt -u extglob popd &>/dev/null %endif @@ -434,6 +435,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_alphamat.so.%{abiver}* %{_libdir}/libopencv_aruco.so.%{abiver}* %{_libdir}/libopencv_bgsegm.so.%{abiver}* +%{_libdir}/libopencv_barcode.so.%{abiver}* %{_libdir}/libopencv_bioinspired.so.%{abiver}* %{_libdir}/libopencv_ccalib.so.%{abiver}* %{?with_cuda: @@ -479,6 +481,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Jul 15 2021 Sérgio Basto - 4.5.3-1 +- Update to 4.5.3 + * Fri Jun 04 2021 Python Maint - 4.5.2-6 - Rebuilt for Python 3.10 diff --git a/sources b/sources index 31d286b..7cde274 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ 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 +SHA512 (opencv-clean-4.5.3.tar.gz) = 85f6d145da8b4c0c0ad8d3d4a0f99de1043ea3bc41f6957ce8fe3ef746d4c255ad502495a58fba31e76b527b2e6fea875ec6f5e5e2ced880235678122089fd21 +SHA512 (opencv_contrib-clean-4.5.3.tar.gz) = 4c1fa68f0b2c523504cd3fa46e1109e8e615714c4bca6701ad1dec37440e0ae7a5303eb3c0668df1a07062c59a64088c3d39f3adff93a1637e73e95683bfa7f2 +SHA512 (opencv_extra-clean-4.5.3.tar.gz) = e5eb9aedcf7e36cda8a5df9ddfca493c6edb32a70331320877d75628db0f372d8826daaa7000f54fa9d89e176b480a69dcf2ede0e3f3e851692ad2be037b4473 From 720ac91eaa6974fa68ff263714ab802a26956b61 Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Tue, 20 Jul 2021 07:12:58 -0500 Subject: [PATCH 111/274] Rebuild for openexr 3. --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 472d55e..a5031c4 100644 --- a/opencv.spec +++ b/opencv.spec @@ -52,7 +52,7 @@ Name: opencv Version: 4.5.3 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -481,6 +481,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Jul 20 2021 Richard Shaw - 4.5.3-2 +- Rebuild for openexr 3. + * Thu Jul 15 2021 Sérgio Basto - 4.5.3-1 - Update to 4.5.3 From 0deaaace01925cc1423d25ef060561725e6844b9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 17:12:21 +0000 Subject: [PATCH 112/274] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index a5031c4..7e93f19 100644 --- a/opencv.spec +++ b/opencv.spec @@ -52,7 +52,7 @@ Name: opencv Version: 4.5.3 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -481,6 +481,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 4.5.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Jul 20 2021 Richard Shaw - 4.5.3-2 - Rebuild for openexr 3. From fe7fb71bd8f3486686e4095090349cee89176615 Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Sat, 31 Jul 2021 11:08:14 -0500 Subject: [PATCH 113/274] Rebuild for OpenEXR/Imath 3. --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 7e93f19..f54c974 100644 --- a/opencv.spec +++ b/opencv.spec @@ -52,7 +52,7 @@ Name: opencv Version: 4.5.3 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -481,6 +481,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sat Jul 31 2021 Richard Shaw - 4.5.3-4 +- Rebuild for OpenEXR/Imath 3. + * Thu Jul 22 2021 Fedora Release Engineering - 4.5.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 0ecf696d0e74954aad2e90c6fa56f3f990239133 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 9 Aug 2021 20:10:28 -0600 Subject: [PATCH 114/274] Rebuild for hdf5 1.10.7 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index f54c974..c02d38b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -52,7 +52,7 @@ Name: opencv Version: 4.5.3 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 4%{?dist} +Release: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -481,6 +481,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Aug 10 2021 Orion Poplawski - 4.5.3-5 +- Rebuild for hdf5 1.10.7 + * Sat Jul 31 2021 Richard Shaw - 4.5.3-4 - Rebuild for OpenEXR/Imath 3. From 37d3d10b19f2a899f8abd2e46051c5269bee86d5 Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Fri, 20 Aug 2021 18:30:27 -0500 Subject: [PATCH 115/274] Rebuild for OpenEXR/Imath 3.1. --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index c02d38b..8913e70 100644 --- a/opencv.spec +++ b/opencv.spec @@ -52,7 +52,7 @@ Name: opencv Version: 4.5.3 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -481,6 +481,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri Aug 20 2021 Richard Shaw - 4.5.3-6 +- Rebuild for OpenEXR/Imath 3.1. + * Tue Aug 10 2021 Orion Poplawski - 4.5.3-5 - Rebuild for hdf5 1.10.7 From c810b39bfba6d2856a28dfd65a6c3033a394f47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 10 Oct 2021 14:28:46 +0100 Subject: [PATCH 116/274] Use %py_provides and remove srcname variable --- opencv.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index 8913e70..50441ba 100644 --- a/opencv.spec +++ b/opencv.spec @@ -38,8 +38,6 @@ %define _lto_cflags %{nil} -%global srcname opencv - # If _cuda_version is unset %if 0%{!?_cuda_version:1} && 0%{?with_cuda:1} %global _cuda_version 11.2 @@ -212,7 +210,7 @@ This package contains the OpenCV documentation, samples and examples programs. Summary: Python3 bindings for apps which use OpenCV Requires: opencv%{_isa} = %{version}-%{release} Requires: python3-numpy -%{?python_provide:%python_provide python3-%{srcname}} +%{?%py_provides:%py_provides python3-%{name}} %description -n python3-opencv This package contains Python3 bindings for the OpenCV library. From 9d58856c2294f306813e68acf004a50c99c4e1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 10 Oct 2021 23:54:27 +0100 Subject: [PATCH 117/274] Update to 4.5.4 --- opencv-clean.sh | 2 +- opencv.spec | 10 ++++++++-- opencv_contrib-4.5.4-enable_cvv.patch | 8 ++++++++ sources | 6 +++--- 4 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 opencv_contrib-4.5.4-enable_cvv.patch diff --git a/opencv-clean.sh b/opencv-clean.sh index e4b69e6..d4952c0 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.5.3 +VERSION=4.5.4 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 diff --git a/opencv.spec b/opencv.spec index 50441ba..54b67df 100644 --- a/opencv.spec +++ b/opencv.spec @@ -47,10 +47,10 @@ %endif Name: opencv -Version: 4.5.3 +Version: 4.5.4 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 6%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -69,6 +69,7 @@ Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch +Patch1: opencv_contrib-4.5.4-enable_cvv.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -251,6 +252,7 @@ popd &>/dev/null %patch0 -p1 -b .install_3rdparty_licenses pushd %{name}_contrib-%{version} +%patch1 -p1 -b .install_cvv popd # Install face_landmark_model @@ -258,6 +260,7 @@ mkdir -p .cache/data install -pm 0644 %{SOURCE3} .cache/data pushd .cache/data xz -d face_landmark_model.dat.xz + mv face_landmark_model.dat 7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat popd # Install ADE, needed for opencv_gapi @@ -479,6 +482,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sun Oct 10 2021 Sérgio Basto - 4.5.4-1 +- Update to 4.5.4 + * Fri Aug 20 2021 Richard Shaw - 4.5.3-6 - Rebuild for OpenEXR/Imath 3.1. diff --git a/opencv_contrib-4.5.4-enable_cvv.patch b/opencv_contrib-4.5.4-enable_cvv.patch new file mode 100644 index 0000000..3dbf031 --- /dev/null +++ b/opencv_contrib-4.5.4-enable_cvv.patch @@ -0,0 +1,8 @@ +--- opencv_contrib-4.5.4/modules/cvv/CMakeLists.txt.orig 2021-10-10 20:30:59.898095647 +0100 ++++ opencv_contrib-4.5.4/modules/cvv/CMakeLists.txt 2021-10-10 20:31:11.609057069 +0100 +@@ -1,4 +1,4 @@ +-if(NOT HAVE_QT5 OR NOT HAVE_CXX11) ++if(NOT HAVE_QT OR NOT HAVE_CXX11) + ocv_module_disable(cvv) + return() + endif() diff --git a/sources b/sources index 7cde274..cb2a5ce 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 -SHA512 (opencv-clean-4.5.3.tar.gz) = 85f6d145da8b4c0c0ad8d3d4a0f99de1043ea3bc41f6957ce8fe3ef746d4c255ad502495a58fba31e76b527b2e6fea875ec6f5e5e2ced880235678122089fd21 -SHA512 (opencv_contrib-clean-4.5.3.tar.gz) = 4c1fa68f0b2c523504cd3fa46e1109e8e615714c4bca6701ad1dec37440e0ae7a5303eb3c0668df1a07062c59a64088c3d39f3adff93a1637e73e95683bfa7f2 -SHA512 (opencv_extra-clean-4.5.3.tar.gz) = e5eb9aedcf7e36cda8a5df9ddfca493c6edb32a70331320877d75628db0f372d8826daaa7000f54fa9d89e176b480a69dcf2ede0e3f3e851692ad2be037b4473 +SHA512 (opencv-clean-4.5.4.tar.gz) = 630b57d8d499213a825915ac16735d93217e68872a174e9d82137300e0be49d287c26c3e8f23e44bccd428ba92cd890d6301cff35e275dc7ec5a269876d8eb2c +SHA512 (opencv_contrib-clean-4.5.4.tar.gz) = f00b2c3c56620191c244332f608087754a85c3d6b0331eb2b3038062f6b1e095f9995f93554175184e1d58d4c943be8e87e8e3cf1aeceb464ec57284ce794bc8 +SHA512 (opencv_extra-clean-4.5.4.tar.gz) = 4ee5deba106e7becdb3dddb0c62267dbae2ec172e6dbcd664a991a5186a33c50ab3956e4eab21e22a746a4e5b8953086ee9d4e32ed6bafa2b26877f644f90fc5 From 9e9a395ba3fd2a1739bbc80f86b48d7cfae49348 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Mon, 25 Oct 2021 08:57:11 +0200 Subject: [PATCH 118/274] Rebuilt for protobuf 3.18.1 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 54b67df..1cfa325 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.4 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -482,6 +482,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Mon Oct 25 2021 Adrian Reber - 4.5.4-2 +- Rebuilt for protobuf 3.18.1 + * Sun Oct 10 2021 Sérgio Basto - 4.5.4-1 - Update to 4.5.4 From e52407b01d76cf9aac9e073bbff4fc1e60f957d5 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Fri, 5 Nov 2021 23:22:33 +0100 Subject: [PATCH 119/274] Rebuilt for protobuf 3.19.0 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 1cfa325..38dd314 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.4 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -482,6 +482,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Fri Nov 05 2021 Adrian Reber - 4.5.4-3 +- Rebuilt for protobuf 3.19.0 + * Mon Oct 25 2021 Adrian Reber - 4.5.4-2 - Rebuilt for protobuf 3.18.1 From b3d22ee509130366f062e4e835b9356a92b6be37 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Sat, 6 Nov 2021 12:59:56 +0100 Subject: [PATCH 120/274] Rebuilt for protobuf 3.19.0 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 38dd314..6f3214d 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.4 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -482,6 +482,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sat Nov 06 2021 Adrian Reber - 4.5.4-4 +- Rebuilt for protobuf 3.19.0 + * Fri Nov 05 2021 Adrian Reber - 4.5.4-3 - Rebuilt for protobuf 3.19.0 From 65130b65fb279052f2a25c1779e21fd45a6f0ee4 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 11 Nov 2021 12:08:28 +0100 Subject: [PATCH 121/274] Rebuild (gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 6f3214d..20a9f30 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.4 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 4%{?dist} +Release: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -482,6 +482,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Nov 11 2021 Sandro Mani - 4.5.4-5 +- Rebuild (gdal) + * Sat Nov 06 2021 Adrian Reber - 4.5.4-4 - Rebuilt for protobuf 3.19.0 From 606e86c6b14d6bded1cbd186cbecaafc6e8118cb Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 22 Nov 2021 12:13:46 -0700 Subject: [PATCH 122/274] Rebuild for hdf5 1.12.1 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 20a9f30..e69bb0f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.4 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -482,6 +482,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Mon Nov 22 2021 Orion Poplawski - 4.5.4-6 +- Rebuild for hdf5 1.12.1 + * Thu Nov 11 2021 Sandro Mani - 4.5.4-5 - Rebuild (gdal) From 7fcdce3f447d193f4b806163cb6508246356f505 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 14 Dec 2021 14:57:44 +0100 Subject: [PATCH 123/274] Rebuild (tesseract) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index e69bb0f..3a1a5b1 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.4 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -482,6 +482,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Dec 14 2021 Sandro Mani - 4.5.4-7 +- Rebuild (tesseract) + * Mon Nov 22 2021 Orion Poplawski - 4.5.4-6 - Rebuild for hdf5 1.12.1 From c0ffc900837952f477cd5cd67cff6e2441473c01 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sun, 19 Dec 2021 18:58:21 +0100 Subject: [PATCH 124/274] Rebuild (tesseract) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 3a1a5b1..c729601 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.4 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -482,6 +482,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sun Dec 19 2021 Sandro Mani - 4.5.4-8 +- Rebuild (tesseract) + * Tue Dec 14 2021 Sandro Mani - 4.5.4-7 - Rebuild (tesseract) From 7a7944b9e74bc71d649ffd1ed40b78bf117e477c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Tue, 28 Dec 2021 17:13:16 +0000 Subject: [PATCH 125/274] Update opencv to 4.5.5 (#2035628) --- ...d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch | 28 +++++++++++++++++++ opencv-clean.sh | 2 +- opencv.spec | 16 +++++++---- opencv_contrib-4.5.4-enable_cvv.patch | 8 ------ sources | 6 ++-- 5 files changed, 42 insertions(+), 18 deletions(-) create mode 100644 81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch delete mode 100644 opencv_contrib-4.5.4-enable_cvv.patch diff --git a/81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch b/81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch new file mode 100644 index 0000000..7050703 --- /dev/null +++ b/81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch @@ -0,0 +1,28 @@ +From 81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c Mon Sep 17 00:00:00 2001 +From: Alexander Alekhin +Date: Thu, 2 Dec 2021 13:32:59 +0000 +Subject: [PATCH] cmake: update SOVERSION + +- OpenCV 4.x doesn't guarantee or maintain ABI compatibility +- We should increase SO version on each release +--- + cmake/OpenCVVersion.cmake | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/cmake/OpenCVVersion.cmake b/cmake/OpenCVVersion.cmake +index a2b4926cf0d2..6ffaab94cf02 100644 +--- a/cmake/OpenCVVersion.cmake ++++ b/cmake/OpenCVVersion.cmake +@@ -10,8 +10,10 @@ set(OPENCV_VERSION_PLAIN "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPEN + + set(OPENCV_VERSION "${OPENCV_VERSION_PLAIN}${OPENCV_VERSION_STATUS}") + +-set(OPENCV_SOVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}") +-set(OPENCV_LIBVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}") ++string(REGEX MATCH "[0-9][0-9]$" OPENCV_VERSION_MINOR_2DIGITS "00${OPENCV_VERSION_MINOR}") ++string(REGEX MATCH "[0-9][0-9]$" OPENCV_VERSION_PATCH_2DIGITS "00${OPENCV_VERSION_PATCH}") ++ocv_update(OPENCV_SOVERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR_2DIGITS}") ++ocv_update(OPENCV_LIBVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}") + + # create a dependency on the version file + # we never use the output of the following command but cmake will rerun automatically if the version file changes diff --git a/opencv-clean.sh b/opencv-clean.sh index d4952c0..f9ca324 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.5.4 +VERSION=4.5.5 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 diff --git a/opencv.spec b/opencv.spec index c729601..987d270 100644 --- a/opencv.spec +++ b/opencv.spec @@ -47,15 +47,16 @@ %endif Name: opencv -Version: 4.5.4 +Version: 4.5.5 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 8%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD URL: https://opencv.org -# RUN opencv-clean.sh TO PREPARE TARBALLS FOR FEDORA +# TO PREPARE TARBALLS FOR FEDORA +# Edit opencv-clean.sh and set VERSION, save file, after run opencv-clean.sh # # Need to remove copyrighted lena.jpg images from tarball (rhbz#1295173) # and SIFT/SURF from tarball, due to legal concerns. @@ -69,10 +70,9 @@ Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch -Patch1: opencv_contrib-4.5.4-enable_cvv.patch +Patch1: 81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch BuildRequires: gcc-c++ -BuildRequires: libtool BuildRequires: cmake >= 2.6.3 BuildRequires: chrpath %{?with_cuda: @@ -250,9 +250,10 @@ popd &>/dev/null %endif %patch0 -p1 -b .install_3rdparty_licenses +%patch1 -p1 -R -b .soversion pushd %{name}_contrib-%{version} -%patch1 -p1 -b .install_cvv +#patch1 -p1 -b .install_cvv popd # Install face_landmark_model @@ -482,6 +483,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Mon Dec 27 2021 Sérgio Basto - 4.5.5-1 +- Update opencv to 4.5.5 (#2035628) + * Sun Dec 19 2021 Sandro Mani - 4.5.4-8 - Rebuild (tesseract) diff --git a/opencv_contrib-4.5.4-enable_cvv.patch b/opencv_contrib-4.5.4-enable_cvv.patch deleted file mode 100644 index 3dbf031..0000000 --- a/opencv_contrib-4.5.4-enable_cvv.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- opencv_contrib-4.5.4/modules/cvv/CMakeLists.txt.orig 2021-10-10 20:30:59.898095647 +0100 -+++ opencv_contrib-4.5.4/modules/cvv/CMakeLists.txt 2021-10-10 20:31:11.609057069 +0100 -@@ -1,4 +1,4 @@ --if(NOT HAVE_QT5 OR NOT HAVE_CXX11) -+if(NOT HAVE_QT OR NOT HAVE_CXX11) - ocv_module_disable(cvv) - return() - endif() diff --git a/sources b/sources index cb2a5ce..1812050 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ +SHA512 (opencv-clean-4.5.5.tar.gz) = e98c7a864c9747185cda7711761fb5a15dee77c11d9082c53f43922fc77c44d808acb489fc3384fc4be1255e03529ae36202b013b04d1b5e7208cdcce76a8477 +SHA512 (opencv_contrib-clean-4.5.5.tar.gz) = 7fb0d65a0a808b80538bbf9c108c84d45f1e416b6924b0d1e3b7b5cebfeca192a6cad26d282e7d74e804ee8186dea0d08e959472bb68f159cb2575b637b3ed40 +SHA512 (opencv_extra-clean-4.5.5.tar.gz) = 5e12e33dbd63785cd857cff2bde3297abf01726c0b54a7cd33eb594c510b524d69ea8ee4e89574bf33a8ac9a1d275a3d9f4f40b53180d3709cc58842b5ad5107 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 -SHA512 (opencv-clean-4.5.4.tar.gz) = 630b57d8d499213a825915ac16735d93217e68872a174e9d82137300e0be49d287c26c3e8f23e44bccd428ba92cd890d6301cff35e275dc7ec5a269876d8eb2c -SHA512 (opencv_contrib-clean-4.5.4.tar.gz) = f00b2c3c56620191c244332f608087754a85c3d6b0331eb2b3038062f6b1e095f9995f93554175184e1d58d4c943be8e87e8e3cf1aeceb464ec57284ce794bc8 -SHA512 (opencv_extra-clean-4.5.4.tar.gz) = 4ee5deba106e7becdb3dddb0c62267dbae2ec172e6dbcd664a991a5186a33c50ab3956e4eab21e22a746a4e5b8953086ee9d4e32ed6bafa2b26877f644f90fc5 From 6bf54b5d27b9009323080be20a254c0773f05157 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 22:20:26 +0000 Subject: [PATCH 126/274] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 987d270..53c1480 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.5 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -483,6 +483,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 4.5.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Mon Dec 27 2021 Sérgio Basto - 4.5.5-1 - Update opencv to 4.5.5 (#2035628) From 9211c6b53473c785a80a9a2d52ad0a5fec6ecac8 Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 5 Feb 2022 23:13:22 +0100 Subject: [PATCH 127/274] Rebuilt for java-17-openjdk as system jdk https://fedoraproject.org/wiki/Changes/Java17 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 53c1480..1cfe8c9 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.5 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -483,6 +483,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sat Feb 05 2022 Jiri Vanek - 4.5.5-3 +- Rebuilt for java-17-openjdk as system jdk + * Thu Jan 20 2022 Fedora Release Engineering - 4.5.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 10a0fa3a19817ba3e8ab76f2885809b775d30e9a Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sun, 13 Feb 2022 22:42:00 +0900 Subject: [PATCH 128/274] Disable some altivec vectorization optimization on ppc64le (bug 2051193) --- opencv.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 1cfe8c9..ce4512b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.5 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -268,6 +268,11 @@ popd mkdir -p .cache/ade install -pm 0644 %{SOURCE4} .cache/ade/ +%ifarch ppc64le +# Disable some altivec vectorization optimization on ppc64le (bug 2051193) +sed -i modules/core/include/opencv2/core/hal/intrin.hpp \ + -e '\@ifdef CV_FORCE_SIMD128_CPP@i #define CV_FORCE_SIMD128_CPP' +%endif %build # enabled by default if libraries are presents at build time: @@ -483,6 +488,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sun Feb 13 2022 Mamoru TASAKA - 4.5.5-4 +- Disable some altivec vectorization optimization on ppc64le (bug 2051193) + * Sat Feb 05 2022 Jiri Vanek - 4.5.5-3 - Rebuilt for java-17-openjdk as system jdk From a17785dfcdeefcc33858af6fecd18f563b71e40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 13 Feb 2022 20:06:05 +0000 Subject: [PATCH 129/274] add comment with more information about the workaround on ppc64le --- opencv.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencv.spec b/opencv.spec index ce4512b..0522448 100644 --- a/opencv.spec +++ b/opencv.spec @@ -270,6 +270,9 @@ install -pm 0644 %{SOURCE4} .cache/ade/ %ifarch ppc64le # Disable some altivec vectorization optimization on ppc64le (bug 2051193) +# Workaround is to force defining CV_FORCE_SIMD128_CPP on ppc64le so as NOT to use intrin_vsx.hpp . +# https://github.com/opencv/opencv/issues/21465 +# https://github.com/opencv/opencv/issues/19020 sed -i modules/core/include/opencv2/core/hal/intrin.hpp \ -e '\@ifdef CV_FORCE_SIMD128_CPP@i #define CV_FORCE_SIMD128_CPP' %endif From f873fc3d71a80ee1484f5452cdaf5df0474a3fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Tue, 15 Feb 2022 14:39:37 +0000 Subject: [PATCH 130/274] The upstream fix https://github.com/opencv/opencv/pull/21614 and remove the previous workaround --- ...bb06b230b5c4b5bca78d84102f5d1adf48cf.patch | 23 +++++++++++++++++++ opencv.spec | 19 +++++++-------- 2 files changed, 31 insertions(+), 11 deletions(-) create mode 100644 8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch diff --git a/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch b/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch new file mode 100644 index 0000000..114a6d6 --- /dev/null +++ b/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch @@ -0,0 +1,23 @@ +From 8d88bb06b230b5c4b5bca78d84102f5d1adf48cf Mon Sep 17 00:00:00 2001 +From: Alexander Alekhin +Date: Tue, 15 Feb 2022 07:23:32 +0300 +Subject: [PATCH] core(vsx): update vec_absd() workaround condition + +--- + modules/core/include/opencv2/core/vsx_utils.hpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules/core/include/opencv2/core/vsx_utils.hpp b/modules/core/include/opencv2/core/vsx_utils.hpp +index 68863ffb36f2..5cbc066784d0 100644 +--- a/modules/core/include/opencv2/core/vsx_utils.hpp ++++ b/modules/core/include/opencv2/core/vsx_utils.hpp +@@ -684,7 +684,8 @@ VSX_IMPL_LOAD_L8(vec_double2, double) + #endif + + // absolute difference +-#ifndef vec_absd ++#ifndef _ARCH_PWR9 ++# undef vec_absd + # define vec_absd(a, b) vec_sub(vec_max(a, b), vec_min(a, b)) + #endif + diff --git a/opencv.spec b/opencv.spec index 0522448..c3c47d6 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.5 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 4%{?dist} +Release: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -70,7 +70,8 @@ Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch -Patch1: 81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch +Patch1: https://github.com/opencv/opencv/commit/81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch +Patch2: https://github.com/opencv/opencv/commit/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch BuildRequires: gcc-c++ BuildRequires: cmake >= 2.6.3 @@ -251,6 +252,7 @@ popd &>/dev/null %patch0 -p1 -b .install_3rdparty_licenses %patch1 -p1 -R -b .soversion +%patch2 -p1 -b .ppc64le_builtin_altivec_vadub pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv @@ -268,15 +270,6 @@ popd mkdir -p .cache/ade install -pm 0644 %{SOURCE4} .cache/ade/ -%ifarch ppc64le -# Disable some altivec vectorization optimization on ppc64le (bug 2051193) -# Workaround is to force defining CV_FORCE_SIMD128_CPP on ppc64le so as NOT to use intrin_vsx.hpp . -# https://github.com/opencv/opencv/issues/21465 -# https://github.com/opencv/opencv/issues/19020 -sed -i modules/core/include/opencv2/core/hal/intrin.hpp \ - -e '\@ifdef CV_FORCE_SIMD128_CPP@i #define CV_FORCE_SIMD128_CPP' -%endif - %build # enabled by default if libraries are presents at build time: # GTK, GSTREAMER, 1394, V4L, eigen3 @@ -491,6 +484,10 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Feb 15 2022 Sérgio Basto - 4.5.5-5 +- The upstream fix https://github.com/opencv/opencv/pull/21614 + and remove the previous workaround + * Sun Feb 13 2022 Mamoru TASAKA - 4.5.5-4 - Disable some altivec vectorization optimization on ppc64le (bug 2051193) From 30d51f5a61ea3e70935d3369b8d3b442828b334e Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 10 Mar 2022 00:16:09 +0100 Subject: [PATCH 131/274] Rebuild for tesseract-5.1.0 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index c3c47d6..6334b6a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,7 +50,7 @@ Name: opencv Version: 4.5.5 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -484,6 +484,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu Mar 10 2022 Sandro Mani - 4.5.5-6 +- Rebuild for tesseract 5.1.0 + * Tue Feb 15 2022 Sérgio Basto - 4.5.5-5 - The upstream fix https://github.com/opencv/opencv/pull/21614 and remove the previous workaround From 6eab18dcc362947222204739069645dece9c4eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 19 Mar 2022 23:45:16 +0000 Subject: [PATCH 132/274] opencv package dont need setup_vars we may turn OFF setup_vars_opencv --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 6334b6a..f156b51 100644 --- a/opencv.spec +++ b/opencv.spec @@ -319,6 +319,7 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -DINSTALL_PYTHON_EXAMPLES=ON \ -DPYTHON3_EXECUTABLE=%{__python3} \ -DPYTHON3_PACKAGES_PATH=%{python3_sitearch} \ + -DOPENCV_GENERATE_SETUPVARS=OFF \ -DENABLE_PYLINT=ON \ -DBUILD_PROTOBUF=OFF \ -DPROTOBUF_UPDATE_FILES=ON \ @@ -423,7 +424,6 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_datadir}/opencv4/samples %files -n python3-opencv -%exclude %{_bindir}/setup_vars_opencv4.sh %{python3_sitearch}/cv2.cpython-3*.so %if %{with java} From 27e100e162ecffe8a7539fcda7bfb38793cb387c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 20 Mar 2022 02:12:43 +0000 Subject: [PATCH 133/274] allow not include extras with his 500 MB --- opencv.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index f156b51..c52f1e0 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,5 +1,6 @@ %undefine __cmake_in_source_build %bcond_without tests +%bcond_without extras %bcond_with ffmpeg %bcond_without gstreamer %bcond_with eigen2 @@ -63,7 +64,9 @@ URL: https://opencv.org # Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz +%{?with_extras: Source2: %{name}_extra-clean-%{version}.tar.gz +} Source3: face_landmark_model.dat.xz # from https://github.com/opencv/ade/archive/v0.1.1f.zip Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip @@ -239,7 +242,7 @@ distribution, since the library maintains binary compatibility, and tries to provide decent performance and stability. %prep -%setup -q -a1 -a2 +%setup -q -a1 %{?with_extras:-a2} %if 1 # we don't use pre-built contribs except quirc pushd 3rdparty @@ -331,7 +334,7 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -DWITH_OPENMP=ON \ -DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \ -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DOPENCV_TEST_DATA_PATH=opencv_extra-%{version}/testdata \ +%{?with_extras: -DOPENCV_TEST_DATA_PATH=opencv_extra-%{version}/testdata} \ %{?with_gdcm: -DWITH_GDCM=ON } \ %{?with_libmfx: -DWITH_MFX=ON } \ %{?with_clp: -DWITH_CLP=ON } \ From 8b91b9f51fa59de660c72b36c571c6cd96fbb30d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 3 Jan 2022 17:25:49 +0100 Subject: [PATCH 134/274] Drop 1394 on rhel --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index c52f1e0..13288a2 100644 --- a/opencv.spec +++ b/opencv.spec @@ -90,7 +90,7 @@ BuildRequires: pkgconfig(nppc-%{?_cuda_version}) %{?with_eigen3:BuildRequires: eigen3-devel} BuildRequires: libtheora-devel BuildRequires: libvorbis-devel -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?fedora} %ifnarch s390 s390x BuildRequires: libraw1394-devel BuildRequires: libdc1394-devel From d9eb86cc344e6169fab7333f0ed313755553796a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 3 Jan 2022 17:29:06 +0100 Subject: [PATCH 135/274] On RHEL libva is x86_64 only Done also in fedora to simplify see also rhbz#2058802 --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 13288a2..1ce865b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -29,11 +29,11 @@ %ifarch x86_64 %bcond_without libmfx +%bcond_without va %else %bcond_with libmfx %endif %bcond_without clp -%bcond_without va %bcond_without java %bcond_without vulkan From feee2b1ca875ab0d3c8fb8a83e8f5f310c28d809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 14 Apr 2022 15:38:25 +0100 Subject: [PATCH 136/274] Switch to new Python loader, doesn't fix rhbz #2054951 but can be a step --- opencv.python.patch | 11 +++++++++++ opencv.spec | 10 +++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 opencv.python.patch diff --git a/opencv.python.patch b/opencv.python.patch new file mode 100644 index 0000000..afe9b11 --- /dev/null +++ b/opencv.python.patch @@ -0,0 +1,11 @@ +--- opencv-4.5.5/modules/python/common.cmake.orig 2022-04-11 18:40:18.925266930 +0100 ++++ opencv-4.5.5/modules/python/common.cmake 2022-04-11 18:42:17.753849346 +0100 +@@ -179,7 +179,7 @@ else() + else() + set(__python_binary_subdir "python-${${PYTHON}_VERSION_MAJOR}.${${PYTHON}_VERSION_MINOR}") + endif() +- set(__python_binary_install_path "${OPENCV_PYTHON_INSTALL_PATH}/${__python_loader_subdir}${__python_binary_subdir}") ++ set(__python_binary_install_path "${OPENCV_PYTHON_INSTALL_PATH}/${__python_loader_subdir}") + endif() + + install(TARGETS ${the_module} diff --git a/opencv.spec b/opencv.spec index 1ce865b..d80cd57 100644 --- a/opencv.spec +++ b/opencv.spec @@ -51,7 +51,7 @@ Name: opencv Version: 4.5.5 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -75,6 +75,7 @@ Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch1: https://github.com/opencv/opencv/commit/81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch Patch2: https://github.com/opencv/opencv/commit/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch +Patch3: opencv.python.patch BuildRequires: gcc-c++ BuildRequires: cmake >= 2.6.3 @@ -256,6 +257,7 @@ popd &>/dev/null %patch0 -p1 -b .install_3rdparty_licenses %patch1 -p1 -R -b .soversion %patch2 -p1 -b .ppc64le_builtin_altivec_vadub +%patch3 -p1 -b .python_install_binary pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv @@ -328,7 +330,6 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -DPROTOBUF_UPDATE_FILES=ON \ %{?with_opencl: -DOPENCL_INCLUDE_DIR=%{_includedir}/CL } \ %{!?with_opencl: -DWITH_OPENCL=OFF } \ - -DOPENCV_SKIP_PYTHON_LOADER=ON \ -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib-%{version}/modules \ -DWITH_LIBV4L=ON \ -DWITH_OPENMP=ON \ @@ -427,7 +428,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_datadir}/opencv4/samples %files -n python3-opencv -%{python3_sitearch}/cv2.cpython-3*.so +%{python3_sitearch}/cv2 %if %{with java} %files java @@ -487,6 +488,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sun Mar 20 2022 Sérgio Basto - 4.5.5-7 +- Switch to new Python loader, doesn't fix rhbz #2054951 but can be a step + * Thu Mar 10 2022 Sandro Mani - 4.5.5-6 - Rebuild for tesseract 5.1.0 From 478358c96b154737c957417f44410fc2c9182ad4 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sat, 21 May 2022 18:00:12 +0200 Subject: [PATCH 137/274] Rebuild for gdal-3.5.0 and/or openjpeg-2.5.0 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index d80cd57..b5b31de 100644 --- a/opencv.spec +++ b/opencv.spec @@ -51,7 +51,7 @@ Name: opencv Version: 4.5.5 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -488,6 +488,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Sat May 21 2022 Sandro Mani - 4.5.5-8 +- Rebuild for gdal-3.5.0 and/or openjpeg-2.5.0 + * Sun Mar 20 2022 Sérgio Basto - 4.5.5-7 - Switch to new Python loader, doesn't fix rhbz #2054951 but can be a step From 9e8ea0958fb947314af1314809c37a8d6e988b59 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sat, 21 May 2022 22:44:08 +0200 Subject: [PATCH 138/274] Make doc package arched --- opencv.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index b5b31de..34ff262 100644 --- a/opencv.spec +++ b/opencv.spec @@ -204,7 +204,8 @@ package. %package doc Summary: Documentation files Requires: opencv-devel = %{version}-%{release} -BuildArch: noarch +# Doc dependes on architecture, specifically whether the va_intel sample is installed depends on HAVE_VA +# BuildArch: noarch Provides: %{name}-devel-docs = %{version}-%{release} Obsoletes: %{name}-devel-docs < %{version}-%{release} From 95176bb4133f22465bd3bcf81643c2d35d6cf271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 29 May 2022 18:06:42 +0100 Subject: [PATCH 139/274] Disable PRECOMPILED_HEADERS is not needed anymore --- opencv.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 34ff262..dde2c62 100644 --- a/opencv.spec +++ b/opencv.spec @@ -300,7 +300,6 @@ install -pm 0644 %{SOURCE4} .cache/ade/ %ifarch x86_64 %{ix86} -DCPU_BASELINE=SSE2 \ %endif - -DENABLE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \ %{?with_java: -DBUILD_opencv_java=ON \ -DOPENCV_JAR_INSTALL_PATH=%{_jnidir} } \ From 6b89fb12ba5241413c000ace0c8ce8ba3fefaa96 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 14 Jun 2022 09:33:06 +0200 Subject: [PATCH 140/274] Rebuilt for Python 3.11 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index dde2c62..0064a00 100644 --- a/opencv.spec +++ b/opencv.spec @@ -51,7 +51,7 @@ Name: opencv Version: 4.5.5 %global javaver %(foo=%{version}; echo ${foo//./}) %global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 8%{?dist} +Release: 9%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -488,6 +488,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Jun 14 2022 Python Maint - 4.5.5-9 +- Rebuilt for Python 3.11 + * Sat May 21 2022 Sandro Mani - 4.5.5-8 - Rebuild for gdal-3.5.0 and/or openjpeg-2.5.0 From 69ea132829f343079f5327a8b01c5f60d60412c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 17 Jun 2022 20:21:10 +0100 Subject: [PATCH 141/274] remove hack to keep old so version --- ...d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch | 28 ------------------- opencv.spec | 2 -- 2 files changed, 30 deletions(-) delete mode 100644 81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch diff --git a/81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch b/81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch deleted file mode 100644 index 7050703..0000000 --- a/81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c Mon Sep 17 00:00:00 2001 -From: Alexander Alekhin -Date: Thu, 2 Dec 2021 13:32:59 +0000 -Subject: [PATCH] cmake: update SOVERSION - -- OpenCV 4.x doesn't guarantee or maintain ABI compatibility -- We should increase SO version on each release ---- - cmake/OpenCVVersion.cmake | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/cmake/OpenCVVersion.cmake b/cmake/OpenCVVersion.cmake -index a2b4926cf0d2..6ffaab94cf02 100644 ---- a/cmake/OpenCVVersion.cmake -+++ b/cmake/OpenCVVersion.cmake -@@ -10,8 +10,10 @@ set(OPENCV_VERSION_PLAIN "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPEN - - set(OPENCV_VERSION "${OPENCV_VERSION_PLAIN}${OPENCV_VERSION_STATUS}") - --set(OPENCV_SOVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}") --set(OPENCV_LIBVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}") -+string(REGEX MATCH "[0-9][0-9]$" OPENCV_VERSION_MINOR_2DIGITS "00${OPENCV_VERSION_MINOR}") -+string(REGEX MATCH "[0-9][0-9]$" OPENCV_VERSION_PATCH_2DIGITS "00${OPENCV_VERSION_PATCH}") -+ocv_update(OPENCV_SOVERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR_2DIGITS}") -+ocv_update(OPENCV_LIBVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}") - - # create a dependency on the version file - # we never use the output of the following command but cmake will rerun automatically if the version file changes diff --git a/opencv.spec b/opencv.spec index 0064a00..ee14cdb 100644 --- a/opencv.spec +++ b/opencv.spec @@ -73,7 +73,6 @@ Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch -Patch1: https://github.com/opencv/opencv/commit/81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch Patch2: https://github.com/opencv/opencv/commit/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch Patch3: opencv.python.patch @@ -256,7 +255,6 @@ popd &>/dev/null %endif %patch0 -p1 -b .install_3rdparty_licenses -%patch1 -p1 -R -b .soversion %patch2 -p1 -b .ppc64le_builtin_altivec_vadub %patch3 -p1 -b .python_install_binary From 8d3790a855f224d41655b5cc698e77b5eded6b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 18 Jun 2022 00:43:22 +0100 Subject: [PATCH 142/274] Update opencv to 4.6.0 (#2094603) Remove hack to keep old so version Adapt spec to new so version ${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR_2DIGITS} and drop OPENCV_VERSION_PATCH --- opencv-clean.sh | 5 +- opencv.spec | 135 +++++++++++++++++++++++++----------------------- sources | 6 +-- 3 files changed, 78 insertions(+), 68 deletions(-) diff --git a/opencv-clean.sh b/opencv-clean.sh index f9ca324..d62ee9b 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.5.5 +VERSION=4.6.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 @@ -29,3 +29,6 @@ find opencv_extra-${VERSION} -iname "*lenna*" -exec rm {} ';' -print find opencv_extra-${VERSION} \( -iname "len*.*" -o -iname "*lena*.png" -o -iname "*lena*.jpg" \) -exec rm {} ';' -print 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) diff --git a/opencv.spec b/opencv.spec index ee14cdb..f1b1467 100644 --- a/opencv.spec +++ b/opencv.spec @@ -48,16 +48,19 @@ %endif Name: opencv -Version: 4.5.5 +Version: 4.6.0 %global javaver %(foo=%{version}; echo ${foo//./}) -%global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 9%{?dist} +%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: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD URL: https://opencv.org # TO PREPARE TARBALLS FOR FEDORA -# Edit opencv-clean.sh and set VERSION, save file, after run opencv-clean.sh +# Edit opencv-clean.sh and set VERSION, save file and run opencv-clean.sh # # Need to remove copyrighted lena.jpg images from tarball (rhbz#1295173) # and SIFT/SURF from tarball, due to legal concerns. @@ -73,7 +76,6 @@ Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch -Patch2: https://github.com/opencv/opencv/commit/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch Patch3: opencv.python.patch BuildRequires: gcc-c++ @@ -255,7 +257,6 @@ popd &>/dev/null %endif %patch0 -p1 -b .install_3rdparty_licenses -%patch2 -p1 -b .ppc64le_builtin_altivec_vadub %patch3 -p1 -b .python_install_binary pushd %{name}_contrib-%{version} @@ -396,21 +397,21 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %files core %license LICENSE %{_datadir}/licenses/opencv4/ -%{_libdir}/libopencv_calib3d.so.%{abiver}* -%{_libdir}/libopencv_core.so.%{abiver}* -%{_libdir}/libopencv_dnn.so.%{abiver}* -%{_libdir}/libopencv_features2d.so.%{abiver}* -%{_libdir}/libopencv_flann.so.%{abiver}* -%{_libdir}/libopencv_gapi.so.%{abiver}* -%{_libdir}/libopencv_highgui.so.%{abiver}* -%{_libdir}/libopencv_imgcodecs.so.%{abiver}* -%{_libdir}/libopencv_imgproc.so.%{abiver}* -%{_libdir}/libopencv_ml.so.%{abiver}* -%{_libdir}/libopencv_objdetect.so.%{abiver}* -%{_libdir}/libopencv_photo.so.%{abiver}* -%{_libdir}/libopencv_stitching.so.%{abiver}* -%{_libdir}/libopencv_video.so.%{abiver}* -%{_libdir}/libopencv_videoio.so.%{abiver}* +%{_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 @@ -437,55 +438,61 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %endif %files contrib -%{_libdir}/libopencv_alphamat.so.%{abiver}* -%{_libdir}/libopencv_aruco.so.%{abiver}* -%{_libdir}/libopencv_bgsegm.so.%{abiver}* -%{_libdir}/libopencv_barcode.so.%{abiver}* -%{_libdir}/libopencv_bioinspired.so.%{abiver}* -%{_libdir}/libopencv_ccalib.so.%{abiver}* +%{_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}* -%{_libdir}/libopencv_cudev.so.%{abiver}* +%{_libdir}/libopencv_cuda*.so.{%{abiver},%{version}} +%{_libdir}/libopencv_cudev.so.{%{abiver},%{version}} } -%{_libdir}/libopencv_cvv.so.%{abiver}* -%{_libdir}/libopencv_datasets.so.%{abiver}* -%{_libdir}/libopencv_dnn_objdetect.so.%{abiver}* -%{_libdir}/libopencv_dnn_superres.so.%{abiver}* -%{_libdir}/libopencv_dpm.so.%{abiver}* -%{_libdir}/libopencv_face.so.%{abiver}* -%{_libdir}/libopencv_freetype.so.%{abiver}* -%{_libdir}/libopencv_fuzzy.so.%{abiver}* -%{_libdir}/libopencv_hdf.so.%{abiver}* -%{_libdir}/libopencv_hfs.so.%{abiver}* -%{_libdir}/libopencv_img_hash.so.%{abiver}* -%{_libdir}/libopencv_intensity_transform.so.%{abiver}* -%{_libdir}/libopencv_line_descriptor.so.%{abiver}* -%{_libdir}/libopencv_mcc.so.%{abiver}* -%{_libdir}/libopencv_optflow.so.%{abiver}* -%{_libdir}/libopencv_phase_unwrapping.so.%{abiver}* -%{_libdir}/libopencv_plot.so.%{abiver}* -%{_libdir}/libopencv_quality.so.%{abiver}* -%{_libdir}/libopencv_rapid.so.%{abiver}* -%{_libdir}/libopencv_reg.so.%{abiver}* -%{_libdir}/libopencv_rgbd.so.%{abiver}* -%{_libdir}/libopencv_saliency.so.%{abiver}* -%{_libdir}/libopencv_shape.so.%{abiver}* -%{_libdir}/libopencv_stereo.so.%{abiver}* -%{_libdir}/libopencv_structured_light.so.%{abiver}* -%{_libdir}/libopencv_superres.so.%{abiver}* -%{_libdir}/libopencv_surface_matching.so.%{abiver}* -%{_libdir}/libopencv_text.so.%{abiver}* -%{_libdir}/libopencv_tracking.so.%{abiver}* -%{_libdir}/libopencv_videostab.so.%{abiver}* +%{_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}* +%{_libdir}/libopencv_viz.so.{%{abiver},%{version}} %endif -%{_libdir}/libopencv_wechat_qrcode.so.%{abiver}* -%{_libdir}/libopencv_ximgproc.so.%{abiver}* -%{_libdir}/libopencv_xobjdetect.so.%{abiver}* -%{_libdir}/libopencv_xphoto.so.%{abiver}* +%{_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 +* Fri Jun 17 2022 Sérgio Basto - 4.6.0-1 +- Update opencv to 4.6.0 (#2094603) +- Remove hack to keep old so version +- Adapt spec to new so version ${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR_2DIGITS} + and drop OPENCV_VERSION_PATCH + * Tue Jun 14 2022 Python Maint - 4.5.5-9 - Rebuilt for Python 3.11 diff --git a/sources b/sources index 1812050..22c9213 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (opencv-clean-4.5.5.tar.gz) = e98c7a864c9747185cda7711761fb5a15dee77c11d9082c53f43922fc77c44d808acb489fc3384fc4be1255e03529ae36202b013b04d1b5e7208cdcce76a8477 -SHA512 (opencv_contrib-clean-4.5.5.tar.gz) = 7fb0d65a0a808b80538bbf9c108c84d45f1e416b6924b0d1e3b7b5cebfeca192a6cad26d282e7d74e804ee8186dea0d08e959472bb68f159cb2575b637b3ed40 -SHA512 (opencv_extra-clean-4.5.5.tar.gz) = 5e12e33dbd63785cd857cff2bde3297abf01726c0b54a7cd33eb594c510b524d69ea8ee4e89574bf33a8ac9a1d275a3d9f4f40b53180d3709cc58842b5ad5107 +SHA512 (opencv-clean-4.6.0.tar.gz) = 73815df0df4b93b3df19d66e0957a781de25c78ee51d0f026129df9302d45b114bf3cd249ed13121c160df7b4c01b9e348fe2ba75949d3e25fe6f6168d2b0576 +SHA512 (opencv_contrib-clean-4.6.0.tar.gz) = 8f4a6569671eb161beac6c9bc52f51b3a9e1ac257478477d5238ddcac959612055ab8554a5815f5b55fe8405a34885e63c1c9995468e5641b9d47d1120ef0113 +SHA512 (opencv_extra-clean-4.6.0.tar.gz) = 2b576a2ed87e1a41fddb351bbc66fa23397aa6952866aec3d172976d261f035dc0c1f3e7c66e85e0684bb050862c368fe7fdc34804a9c6171cf1b2a96b621a33 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 From 2eb243a8da24372101c502398f36024abc0740bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 20 Jun 2022 15:52:24 +0100 Subject: [PATCH 143/274] Rebuilt for Python 3.11 (is just arrived to rawhide) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index f1b1467..0faa6ee 100644 --- a/opencv.spec +++ b/opencv.spec @@ -54,7 +54,7 @@ Version: 4.6.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: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -487,6 +487,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Mon Jun 20 2022 Sérgio Basto - 4.6.0-2 +- Rebuilt for Python 3.11 (is just arrived to rawhide) + * Fri Jun 17 2022 Sérgio Basto - 4.6.0-1 - Update opencv to 4.6.0 (#2094603) - Remove hack to keep old so version From e8bdd3b6ca9f665c405d97e86e597095895a37e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 20 Jun 2022 20:15:36 +0100 Subject: [PATCH 144/274] remove unused patch --- ...bb06b230b5c4b5bca78d84102f5d1adf48cf.patch | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch diff --git a/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch b/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch deleted file mode 100644 index 114a6d6..0000000 --- a/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 8d88bb06b230b5c4b5bca78d84102f5d1adf48cf Mon Sep 17 00:00:00 2001 -From: Alexander Alekhin -Date: Tue, 15 Feb 2022 07:23:32 +0300 -Subject: [PATCH] core(vsx): update vec_absd() workaround condition - ---- - modules/core/include/opencv2/core/vsx_utils.hpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules/core/include/opencv2/core/vsx_utils.hpp b/modules/core/include/opencv2/core/vsx_utils.hpp -index 68863ffb36f2..5cbc066784d0 100644 ---- a/modules/core/include/opencv2/core/vsx_utils.hpp -+++ b/modules/core/include/opencv2/core/vsx_utils.hpp -@@ -684,7 +684,8 @@ VSX_IMPL_LOAD_L8(vec_double2, double) - #endif - - // absolute difference --#ifndef vec_absd -+#ifndef _ARCH_PWR9 -+# undef vec_absd - # define vec_absd(a, b) vec_sub(vec_max(a, b), vec_min(a, b)) - #endif - From 4b9a0658c8db6c76f0e2c16278e04b6d5a679c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 6 Jul 2022 14:51:36 +0100 Subject: [PATCH 145/274] (#2104082) only build Java sub package on arches that java is supported --- opencv.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 0faa6ee..272acd6 100644 --- a/opencv.spec +++ b/opencv.spec @@ -34,7 +34,12 @@ %bcond_with libmfx %endif %bcond_without clp +%ifarch %{java_arches} %bcond_without java +%else +%bcond_with java +%endif + %bcond_without vulkan %define _lto_cflags %{nil} @@ -54,7 +59,7 @@ Version: 4.6.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: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -487,6 +492,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Wed Jul 06 2022 Sérgio Basto - 4.6.0-3 +- (#2104082) only build Java sub package on arches that java is supported + * Mon Jun 20 2022 Sérgio Basto - 4.6.0-2 - Rebuilt for Python 3.11 (is just arrived to rawhide) From e1ab0faa4170a348d5842f43c44fde4eb1d6a7cf Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Fri, 8 Jul 2022 10:50:24 +0200 Subject: [PATCH 146/274] Rebuild (tesseract) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 272acd6..24c7ad2 100644 --- a/opencv.spec +++ b/opencv.spec @@ -59,7 +59,7 @@ Version: 4.6.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: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -492,6 +492,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Fri Jul 08 2022 Sandro Mani - 4.6.0-4 +- Rebuild (tesseract) + * Wed Jul 06 2022 Sérgio Basto - 4.6.0-3 - (#2104082) only build Java sub package on arches that java is supported From d120efa9ea9740759a14f0c474e8b64e8674837b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 02:03:29 +0000 Subject: [PATCH 147/274] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 24c7ad2..b0d2a62 100644 --- a/opencv.spec +++ b/opencv.spec @@ -59,7 +59,7 @@ Version: 4.6.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: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -492,6 +492,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 4.6.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Fri Jul 08 2022 Sandro Mani - 4.6.0-4 - Rebuild (tesseract) From a81f14f90ae3a8c44c0ef4fef27936cc76076bf9 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 29 Jul 2022 01:01:49 +0900 Subject: [PATCH 148/274] BR vte-java only on %java_arches --- opencv.spec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index b0d2a62..836b9f0 100644 --- a/opencv.spec +++ b/opencv.spec @@ -59,7 +59,7 @@ Version: 4.6.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: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -151,7 +151,12 @@ 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 vtk-java} +%{?with_vtk:BuildRequires: vtk-devel} +%{?with_vtk: + %{?with_java: +BuildRequires: vtk-java + } +} %{?with_atlas:BuildRequires: atlas-devel} #ceres-solver-devel push eigen3-devel and tbb-devel %{?with_tbb: @@ -492,6 +497,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Fri Jul 29 2022 Mamoru TASAKA - 4.6.0-6 +- BR vte-java only on %%java_arches + * Fri Jul 22 2022 Fedora Release Engineering - 4.6.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 07e2572dcb6493d282c80ed9d0ee4203d2dbace7 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Wed, 28 Sep 2022 18:05:30 -0700 Subject: [PATCH 149/274] Remove unicap Upstream removed unicap support around 4.0 with this change commit 5869415a57524cf2dfb5eaba5aafa86ceb395d15 (HEAD) Author: Alexander Alekhin Date: Wed Nov 7 19:49:09 2018 +0300 videoio: drop obsolete backends - VFW - QuickTime/QtKit - Unicap - GPL, no active support: https://github.com/unicap/unicap - DC1394 (1st version) / CMU1394 So remove the configury and build requires for unicap. Reported-by: Robert Scheck Signed-off-by: Tom Rix --- opencv.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index 836b9f0..9c8a549 100644 --- a/opencv.spec +++ b/opencv.spec @@ -59,7 +59,7 @@ Version: 4.6.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: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -143,7 +143,6 @@ BuildRequires: python3-beautifulsoup4 #for doc/doxygen/bib2xhtml.pl #BuildRequires: perl-open BuildRequires: gflags-devel -BuildRequires: libucil-devel BuildRequires: qt5-qtbase-devel BuildRequires: libGL-devel BuildRequires: libGLU-devel @@ -303,7 +302,6 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -DOpenGL_GL_PREFERENCE=GLVND \ -DWITH_GDAL=ON \ -DWITH_OPENEXR=ON \ - -DWITH_UNICAP=ON \ -DCMAKE_SKIP_RPATH=ON \ -DWITH_CAROTENE=OFF \ %ifarch x86_64 %{ix86} @@ -497,6 +495,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Wed Sep 28 2022 Tom Rix - 4.6.0-7 +- Remove Unicap + * Fri Jul 29 2022 Mamoru TASAKA - 4.6.0-6 - BR vte-java only on %%java_arches From bc3e3bc266ffd54a49912546f3f0b194a6a67c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 1 Oct 2022 15:08:01 +0100 Subject: [PATCH 150/274] Set linters as optional, adaptation of Diego Herrera PR https://src.fedoraproject.org/rpms/opencv/pull-request/17# --- opencv.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 9c8a549..f0941e6 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,6 +1,8 @@ %undefine __cmake_in_source_build %bcond_without tests %bcond_without extras +# linters are enabled by default if BUILD_DOCS OR BUILD_EXAMPLES +%bcond_without linters %bcond_with ffmpeg %bcond_without gstreamer %bcond_with eigen2 @@ -121,8 +123,10 @@ BuildRequires: zlib-devel BuildRequires: pkgconfig BuildRequires: python3-devel BuildRequires: python3-numpy +%{?with_linters: BuildRequires: pylint BuildRequires: python3-flake8 +} BuildRequires: swig >= 1.3.24 %{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9} %if 0%{?fedora} || 0%{?rhel} > 7 @@ -332,7 +336,10 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -DPYTHON3_EXECUTABLE=%{__python3} \ -DPYTHON3_PACKAGES_PATH=%{python3_sitearch} \ -DOPENCV_GENERATE_SETUPVARS=OFF \ - -DENABLE_PYLINT=ON \ + %{!?with_linters: \ + -DENABLE_PYLINT=OFF \ + -DENABLE_FLAKE8=OFF \ + } \ -DBUILD_PROTOBUF=OFF \ -DPROTOBUF_UPDATE_FILES=ON \ %{?with_opencl: -DOPENCL_INCLUDE_DIR=%{_includedir}/CL } \ From c2e1ca1d316f71047bc4170e4caf5a74c54a979c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 8 Oct 2022 01:38:41 +0100 Subject: [PATCH 151/274] opencv support for epel9 --- opencv.spec | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index f0941e6..5e674c6 100644 --- a/opencv.spec +++ b/opencv.spec @@ -8,12 +8,16 @@ %bcond_with eigen2 %bcond_without eigen3 %bcond_without opencl +%if 0%{?rhel} >= 8 +%bcond_with openni +%else %ifarch %{ix86} 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 @@ -35,7 +39,11 @@ %else %bcond_with libmfx %endif +%if 0%{?rhel} >= 8 +%bcond_with clp +%else %bcond_without clp +%endif %ifarch %{java_arches} %bcond_without java %else @@ -69,8 +77,8 @@ URL: https://opencv.org # TO PREPARE TARBALLS FOR FEDORA # Edit opencv-clean.sh and set VERSION, save file and run opencv-clean.sh # -# Need to remove copyrighted lena.jpg images from tarball (rhbz#1295173) -# and SIFT/SURF from tarball, due to legal concerns. +# Need to remove copyrighted lena.jpg images (rhbz#1295173) +# and SIFT/SURF (module xfeatures2d) from tarball, due to legal concerns. # Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz @@ -152,6 +160,8 @@ BuildRequires: libGL-devel BuildRequires: libGLU-devel BuildRequires: hdf5-devel BuildRequires: openjpeg2-devel +BuildRequires: freetype-devel +BuildRequires: harfbuzz-devel # Module opencv_ovis disabled because of incompatible OGRE3D version < 1.10 # BuildRequires: ogre-devel %{?with_vtk:BuildRequires: vtk-devel} @@ -164,7 +174,9 @@ BuildRequires: vtk-java #ceres-solver-devel push eigen3-devel and tbb-devel %{?with_tbb: %{?with_eigen3: -BuildRequires: ceres-solver-devel +# CERES support is disabled. Ceres Solver for reconstruction API is required. +# seems that ceres-solver is only needed for SFM algorithms but SFM algorithms are disabled because needs xfeatures2d +# BuildRequires: ceres-solver-devel } } %{?with_openblas: From bae9829c7f88f645fe27f55641c1d6e67875e75f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 9 Oct 2022 16:15:43 +0100 Subject: [PATCH 152/274] Fix test and extra build, export make the diference with %ctest , also fix cmake macros changes arround 2020-07-29 --- opencv.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/opencv.spec b/opencv.spec index 5e674c6..264b47b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -388,12 +388,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %check -# Check fails since we don't support most video -# read/write capability and we don't provide a display -# ARGS=-V increases output verbosity #ifnarch ppc64 %if %{with tests} - cp %SOURCE5 . + cp %SOURCE5 %{__cmake_builddir} if [ -x /usr/libexec/Xorg ]; then Xorg=/usr/libexec/Xorg else @@ -401,7 +398,8 @@ 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 - LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/build/lib:$LD_LIBARY_PATH %ctest || : + export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/%{__cmake_builddir}/lib:$LD_LIBARY_PATH + %ctest || : %endif #endif From 80223d8933cde6edbba92753d9436c5379d50712 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sat, 12 Nov 2022 19:00:48 +0100 Subject: [PATCH 153/274] Rebuild (gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 264b47b..f0db6b7 100644 --- a/opencv.spec +++ b/opencv.spec @@ -69,7 +69,7 @@ Version: 4.6.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: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -512,6 +512,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Sat Nov 12 2022 Sandro Mani - 4.6.0-8 +- Rebuild (gdal) + * Wed Sep 28 2022 Tom Rix - 4.6.0-7 - Remove Unicap From 968dad82b9fb553030299436ec034a900e1413c6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 23 Dec 2022 18:25:20 +0100 Subject: [PATCH 154/274] Rebuilt for tesseract --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index f0db6b7..b46738b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -69,7 +69,7 @@ Version: 4.6.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: 8%{?dist} +Release: 9%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -512,6 +512,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Fri Dec 23 2022 Nicolas Chauvet - 4.6.0-9 +- Rebuilt for tesseract + * Sat Nov 12 2022 Sandro Mani - 4.6.0-8 - Rebuild (gdal) From 3533c9622ff9e7a9a60a2680768b25387a9783ec Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Fri, 23 Dec 2022 22:00:14 +0100 Subject: [PATCH 155/274] Rebuild (tesseract) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index b46738b..0102490 100644 --- a/opencv.spec +++ b/opencv.spec @@ -69,7 +69,7 @@ Version: 4.6.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: 9%{?dist} +Release: 10%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -512,6 +512,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Fri Dec 23 2022 Sandro Mani - 4.6.0-10 +- Rebuild (tesseract) + * Fri Dec 23 2022 Nicolas Chauvet - 4.6.0-9 - Rebuilt for tesseract From 7a0bd6ebe2660cc6070925cb71226be97200cfa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 14 Jan 2023 21:04:10 +0000 Subject: [PATCH 156/274] Update opencv to 4.7.0 (#2157121) --- .gitignore | 1 + opencv-clean.sh | 2 +- opencv.spec | 20 +++++++++++--------- sources | 8 ++++---- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 093975d..1ade250 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ OpenCV*.tar.* opencv*.tar.* face_landmark_model.dat.xz /b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip +/fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip diff --git a/opencv-clean.sh b/opencv-clean.sh index d62ee9b..95dc96d 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.6.0 +VERSION=4.7.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 diff --git a/opencv.spec b/opencv.spec index 0102490..e1bc1f5 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,8 +1,9 @@ %undefine __cmake_in_source_build + %bcond_without tests %bcond_without extras # linters are enabled by default if BUILD_DOCS OR BUILD_EXAMPLES -%bcond_without linters +%bcond_with linters %bcond_with ffmpeg %bcond_without gstreamer %bcond_with eigen2 @@ -63,13 +64,13 @@ %endif Name: opencv -Version: 4.6.0 +Version: 4.7.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: 10%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -86,8 +87,9 @@ Source1: %{name}_contrib-clean-%{version}.tar.gz Source2: %{name}_extra-clean-%{version}.tar.gz } Source3: face_landmark_model.dat.xz -# from https://github.com/opencv/ade/archive/v0.1.1f.zip -Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip +# 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 Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch @@ -270,7 +272,7 @@ distribution, since the library maintains binary compatibility, and tries to provide decent performance and stability. %prep -%setup -q -a1 %{?with_extras:-a2} +%autosetup -p1 -a1 %{?with_extras:-a2} %if 1 # we don't use pre-built contribs except quirc pushd 3rdparty @@ -281,9 +283,6 @@ shopt -u extglob popd &>/dev/null %endif -%patch0 -p1 -b .install_3rdparty_licenses -%patch3 -p1 -b .python_install_binary - pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv popd @@ -512,6 +511,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Fri Jan 13 2023 Sérgio Basto - 4.7.0-1 +- Update opencv to 4.7.0 (#2157121) + * Fri Dec 23 2022 Sandro Mani - 4.6.0-10 - Rebuild (tesseract) diff --git a/sources b/sources index 22c9213..867fa73 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (opencv-clean-4.6.0.tar.gz) = 73815df0df4b93b3df19d66e0957a781de25c78ee51d0f026129df9302d45b114bf3cd249ed13121c160df7b4c01b9e348fe2ba75949d3e25fe6f6168d2b0576 -SHA512 (opencv_contrib-clean-4.6.0.tar.gz) = 8f4a6569671eb161beac6c9bc52f51b3a9e1ac257478477d5238ddcac959612055ab8554a5815f5b55fe8405a34885e63c1c9995468e5641b9d47d1120ef0113 -SHA512 (opencv_extra-clean-4.6.0.tar.gz) = 2b576a2ed87e1a41fddb351bbc66fa23397aa6952866aec3d172976d261f035dc0c1f3e7c66e85e0684bb050862c368fe7fdc34804a9c6171cf1b2a96b621a33 +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 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 -SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 +SHA512 (fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip) = ce5af0bd5d7fb04022f92fed130898959aecb954cc09da2fc923c76b37ee92d2233888592a4c6bca8006ac4d3fda9c6da80f316c924a407a7a5961d9832a681c From ac7a4a346fa305a00e32415541def11324f67eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 14 Jan 2023 22:58:32 +0000 Subject: [PATCH 157/274] autosetup not handle multiple "-a" parameters --- opencv.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index e1bc1f5..f96bb46 100644 --- a/opencv.spec +++ b/opencv.spec @@ -272,7 +272,9 @@ distribution, since the library maintains binary compatibility, and tries to provide decent performance and stability. %prep -%autosetup -p1 -a1 %{?with_extras:-a2} +# autosetup doesn't work with 2 sources +# https://github.com/rpm-software-management/rpm/issues/1204 +%setup -q -a1 %{?with_extras:-a2} %if 1 # we don't use pre-built contribs except quirc pushd 3rdparty @@ -283,6 +285,9 @@ shopt -u extglob popd &>/dev/null %endif +%patch0 -p1 -b .install_3rdparty_licenses +%patch3 -p1 -b .python_install_binary + pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv popd From 763c00715c1f3b1cdf9afe1821c45fb39cf7f4e1 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sat, 14 Jan 2023 19:30:30 -0700 Subject: [PATCH 158/274] Rebuild for vtk 9.2.5 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index f96bb46..55df8cf 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ Version: 4.7.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: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -516,6 +516,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Sun Jan 15 2023 Orion Poplawski - 4.7.0-2 +- Rebuild for vtk 9.2.5 + * Fri Jan 13 2023 Sérgio Basto - 4.7.0-1 - Update opencv to 4.7.0 (#2157121) From befc8263360bb315a40f64402470ba738b746d2d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 22:47:33 +0000 Subject: [PATCH 159/274] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 55df8cf..266417e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ Version: 4.7.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: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -516,6 +516,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 4.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sun Jan 15 2023 Orion Poplawski - 4.7.0-2 - Rebuild for vtk 9.2.5 From d6447a1e41284aadf928771c3ecbaba70cff20c2 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Mon, 3 Apr 2023 13:23:16 +0200 Subject: [PATCH 160/274] Rebuild (tesseract) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 266417e..e737673 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ Version: 4.7.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: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -516,6 +516,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Mon Apr 03 2023 Sandro Mani - 4.7.0-4 +- Rebuild (tesseract) + * Thu Jan 19 2023 Fedora Release Engineering - 4.7.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 6c1185b5112e59172ae967afc75fbb125da26ccc Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 6 Apr 2023 09:53:41 +0200 Subject: [PATCH 161/274] Temporarily disable hanging tests to get a build through --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index e737673..6b99053 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,6 +1,6 @@ %undefine __cmake_in_source_build -%bcond_without tests +%bcond_with tests %bcond_without extras # linters are enabled by default if BUILD_DOCS OR BUILD_EXAMPLES %bcond_with linters From f34e95b2821666abe889ba2394b87857fb085a59 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 6 Apr 2023 12:34:18 +0200 Subject: [PATCH 162/274] Re-enable tests --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 6b99053..e737673 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,6 +1,6 @@ %undefine __cmake_in_source_build -%bcond_with tests +%bcond_without tests %bcond_without extras # linters are enabled by default if BUILD_DOCS OR BUILD_EXAMPLES %bcond_with linters From 74127b74f80ce48df5348ea5fc062ab707d29985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 14 Apr 2023 16:59:44 +0100 Subject: [PATCH 163/274] if without tests also disable 500MB of extra tests --- opencv.spec | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/opencv.spec b/opencv.spec index e737673..c0326fb 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,7 +1,11 @@ %undefine __cmake_in_source_build %bcond_without tests -%bcond_without extras +%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 @@ -70,7 +74,7 @@ Version: 4.7.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: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -83,7 +87,7 @@ 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 @@ -274,7 +278,7 @@ 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} +%setup -q -a1 %{?with_extras_tests:-a2} %if 1 # we don't use pre-built contribs except quirc pushd 3rdparty @@ -365,7 +369,7 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -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_clp: -DWITH_CLP=ON } \ @@ -516,6 +520,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Thu Apr 13 2023 Sérgio Basto - 4.7.0-5 +- if without tests also disable 500MB of extra tests + * Mon Apr 03 2023 Sandro Mani - 4.7.0-4 - Rebuild (tesseract) From 5be2c955a7738118b74dfa76a4dbee630678d5e7 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 11 May 2023 14:40:55 +0200 Subject: [PATCH 164/274] Rebuild (gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index c0326fb..9f47e98 100644 --- a/opencv.spec +++ b/opencv.spec @@ -74,7 +74,7 @@ Version: 4.7.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: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -520,6 +520,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Thu May 11 2023 Sandro Mani - 4.7.0-6 +- Rebuild (gdal) + * Thu Apr 13 2023 Sérgio Basto - 4.7.0-5 - if without tests also disable 500MB of extra tests From 9c945dfe131b3a62ffbbd540f8e95e9d91a11b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 11 May 2023 22:29:53 +0100 Subject: [PATCH 165/274] disable extra tests on builds --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 9f47e98..9cb509e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -4,7 +4,7 @@ %if %{without tests} %bcond_with extras_tests %else -%bcond_without extras_tests +%bcond_with extras_tests %endif # linters are enabled by default if BUILD_DOCS OR BUILD_EXAMPLES %bcond_with linters From 8c68605e1df9eedf8fee3fea036c687611cc5c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 11 May 2023 22:30:42 +0100 Subject: [PATCH 166/274] 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 --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 9cb509e..a883498 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,6 +1,6 @@ %undefine __cmake_in_source_build -%bcond_without tests +%bcond_with tests %if %{without tests} %bcond_with extras_tests %else From b23a2b4828393af49bebe57966f74c7049231fb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 11 May 2023 22:57:11 +0100 Subject: [PATCH 167/274] Update changelog --- opencv.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opencv.spec b/opencv.spec index a883498..cdada14 100644 --- a/opencv.spec +++ b/opencv.spec @@ -522,6 +522,11 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog * Thu May 11 2023 Sandro Mani - 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 - 4.7.0-5 - if without tests also disable 500MB of extra tests From 4a71091ffe1692d1d25b398aa7fe7b7b62c1ce11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 13 May 2023 06:26:50 +0100 Subject: [PATCH 168/274] Install python egg-info --- opencv.spec | 20 +++++------ xorg.conf | 98 ----------------------------------------------------- 2 files changed, 10 insertions(+), 108 deletions(-) delete mode 100644 xorg.conf diff --git a/opencv.spec b/opencv.spec index cdada14..60dede4 100644 --- a/opencv.spec +++ b/opencv.spec @@ -74,7 +74,7 @@ Version: 4.7.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: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -94,7 +94,6 @@ 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 -Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch3: opencv.python.patch @@ -137,6 +136,7 @@ BuildRequires: zlib-devel BuildRequires: pkgconfig BuildRequires: python3-devel BuildRequires: python3-numpy +BuildRequires: python3-setuptools %{?with_linters: BuildRequires: pylint BuildRequires: python3-flake8 @@ -382,6 +382,8 @@ install -pm 0644 %{SOURCE4} .cache/ade/ %install %cmake_install +cd %{__cmake_builddir}/python_loader/ +%py3_install rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ %if %{with java} @@ -398,15 +400,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %check #ifnarch ppc64 %if %{with tests} - cp %SOURCE5 %{__cmake_builddir} - if [ -x /usr/libexec/Xorg ]; then - Xorg=/usr/libexec/Xorg - else - Xorg=/usr/libexec/Xorg.bin - 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 + xvfb-run --server-args=5120x3200x24 & + export DISPLAY=:99 %ctest || : %endif #endif @@ -461,6 +457,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %files -n python3-opencv %{python3_sitearch}/cv2 +%{python3_sitelib}/opencv-*.egg-info %if %{with java} %files java @@ -520,6 +517,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Sat May 13 2023 Sérgio Basto - 4.7.0-7 +- Install python egg-info + * Thu May 11 2023 Sandro Mani - 4.7.0-6 - Rebuild (gdal) - Disable tests, even only tests, fail to build and generate build.log with millions of logs lines saying: diff --git a/xorg.conf b/xorg.conf deleted file mode 100644 index 8edc240..0000000 --- a/xorg.conf +++ /dev/null @@ -1,98 +0,0 @@ -# This xorg configuration file is meant to be used -# to start a dummy X11 server for graphical testing. - -Section "ServerFlags" - Option "DontVTSwitch" "true" - Option "AllowMouseOpenFail" "true" - Option "PciForceNone" "true" - Option "AutoEnableDevices" "false" - Option "AutoAddDevices" "false" -EndSection - -Section "InputDevice" - Identifier "dummy_mouse" - Option "CorePointer" "true" - Driver "void" -EndSection - -Section "InputDevice" - Identifier "dummy_keyboard" - Option "CoreKeyboard" "true" - Driver "void" -EndSection - -Section "Device" - Identifier "dummy_videocard" - Driver "dummy" - Option "ConstantDPI" "true" - #VideoRam 4096000 - #VideoRam 256000 - VideoRam 192000 -EndSection - -Section "Monitor" - Identifier "dummy_monitor" - HorizSync 5.0 - 1000.0 - VertRefresh 5.0 - 200.0 - #This can be used to get a specific DPI, but only for the default resolution: - #DisplaySize 508 317 - #NOTE: the highest modes will not work without increasing the VideoRam - # for the dummy video card. - Modeline "32768x32768" 15226.50 32768 35800 39488 46208 32768 32771 32781 32953 - Modeline "32768x16384" 7516.25 32768 35544 39192 45616 16384 16387 16397 16478 - Modeline "16384x8192" 2101.93 16384 16416 24400 24432 8192 8390 8403 8602 - Modeline "8192x4096" 424.46 8192 8224 9832 9864 4096 4195 4202 4301 - Modeline "5496x1200" 199.13 5496 5528 6280 6312 1200 1228 1233 1261 - Modeline "5280x1080" 169.96 5280 5312 5952 5984 1080 1105 1110 1135 - Modeline "5280x1200" 191.40 5280 5312 6032 6064 1200 1228 1233 1261 - Modeline "5120x3200" 199.75 5120 5152 5904 5936 3200 3277 3283 3361 - Modeline "4800x1200" 64.42 4800 4832 5072 5104 1200 1229 1231 1261 - Modeline "3840x2880" 133.43 3840 3872 4376 4408 2880 2950 2955 3025 - Modeline "3840x2560" 116.93 3840 3872 4312 4344 2560 2622 2627 2689 - Modeline "3840x2048" 91.45 3840 3872 4216 4248 2048 2097 2101 2151 - Modeline "3840x1080" 100.38 3840 3848 4216 4592 1080 1081 1084 1093 - Modeline "3600x1200" 106.06 3600 3632 3984 4368 1200 1201 1204 1214 - Modeline "3288x1080" 39.76 3288 3320 3464 3496 1080 1106 1108 1135 - Modeline "2048x2048" 49.47 2048 2080 2264 2296 2048 2097 2101 2151 - Modeline "2048x1536" 80.06 2048 2104 2312 2576 1536 1537 1540 1554 - Modeline "2560x1600" 47.12 2560 2592 2768 2800 1600 1639 1642 1681 - Modeline "2560x1440" 42.12 2560 2592 2752 2784 1440 1475 1478 1513 - Modeline "1920x1440" 69.47 1920 1960 2152 2384 1440 1441 1444 1457 - Modeline "1920x1200" 26.28 1920 1952 2048 2080 1200 1229 1231 1261 - Modeline "1920x1080" 23.53 1920 1952 2040 2072 1080 1106 1108 1135 - Modeline "1680x1050" 20.08 1680 1712 1784 1816 1050 1075 1077 1103 - Modeline "1600x1200" 22.04 1600 1632 1712 1744 1200 1229 1231 1261 - Modeline "1600x900" 33.92 1600 1632 1760 1792 900 921 924 946 - Modeline "1440x900" 30.66 1440 1472 1584 1616 900 921 924 946 - ModeLine "1366x768" 72.00 1366 1414 1446 1494 768 771 777 803 - Modeline "1280x1024" 31.50 1280 1312 1424 1456 1024 1048 1052 1076 - Modeline "1280x800" 24.15 1280 1312 1400 1432 800 819 822 841 - Modeline "1280x768" 23.11 1280 1312 1392 1424 768 786 789 807 - Modeline "1360x768" 24.49 1360 1392 1480 1512 768 786 789 807 - Modeline "1024x768" 18.71 1024 1056 1120 1152 768 786 789 807 - Modeline "768x1024" 19.50 768 800 872 904 1024 1048 1052 1076 -EndSection - -Section "Screen" - Identifier "dummy_screen" - Device "dummy_videocard" - Monitor "dummy_monitor" - DefaultDepth 24 - SubSection "Display" - Viewport 0 0 - Depth 24 - #Modes "32768x32768" "32768x16384" "16384x8192" "8192x4096" "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" - Modes "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" - #Virtual 32000 32000 - #Virtual 16384 8192 - Virtual 8192 4096 - #Virtual 5120 3200 - EndSubSection -EndSection - -Section "ServerLayout" - Identifier "dummy_layout" - Screen "dummy_screen" - InputDevice "dummy_mouse" - InputDevice "dummy_keyboard" -EndSection From 6b1e0637b24d6f537e772a8adba48d9bfe0adb94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 13 May 2023 06:27:30 +0100 Subject: [PATCH 169/274] Fix patch warning --- opencv.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 60dede4..45b120d 100644 --- a/opencv.spec +++ b/opencv.spec @@ -289,8 +289,8 @@ 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 @@ -519,6 +519,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog * Sat May 13 2023 Sérgio Basto - 4.7.0-7 - Install python egg-info +- Fix patch warning * Thu May 11 2023 Sandro Mani - 4.7.0-6 - Rebuild (gdal) From 95f94bb5f4378ec66ff79dfeff836e7898b4f36c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 13 May 2023 06:42:18 +0100 Subject: [PATCH 170/274] Obsolete python2 only < %{version} --- opencv.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 45b120d..248c769 100644 --- a/opencv.spec +++ b/opencv.spec @@ -215,7 +215,7 @@ and Computer Vision algorithms. %package core Summary: OpenCV core libraries Provides: bundled(quirc) = 1.0 -Obsoletes: python2-%{name} < %{version}-%{release} +Obsoletes: python2-%{name} < %{version} %description core This package contains the OpenCV C/C++ core libraries. @@ -520,6 +520,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope * Sat May 13 2023 Sérgio Basto - 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 - 4.7.0-6 - Rebuild (gdal) From 6b8b992f8e7fe0fad7805ae527661e4e8c551f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 13 May 2023 20:42:57 +0100 Subject: [PATCH 171/274] The %ldconfig_scriptlets macro can be removed on all Fedoras. Possibly also on EPEL 8. But it is required on EPEL 7. --- opencv.spec | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/opencv.spec b/opencv.spec index 248c769..8feaf56 100644 --- a/opencv.spec +++ b/opencv.spec @@ -74,7 +74,7 @@ Version: 4.7.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: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -408,12 +408,6 @@ 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_* @@ -517,6 +511,10 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Sat May 13 2023 Sérgio Basto - 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. + * Sat May 13 2023 Sérgio Basto - 4.7.0-7 - Install python egg-info - Fix patch warning From 753e8836e07d56ac1759681f597d0d59505b0962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 14 May 2023 15:48:53 +0100 Subject: [PATCH 172/274] Install egg-info in python3_sitearch to stay in same location as the rest of python --- opencv.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 8feaf56..a18c17e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -383,7 +383,7 @@ install -pm 0644 %{SOURCE4} .cache/ade/ %install %cmake_install cd %{__cmake_builddir}/python_loader/ -%py3_install +%py3_install -- --install-lib %{python3_sitearch} rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ %if %{with java} @@ -451,7 +451,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %files -n python3-opencv %{python3_sitearch}/cv2 -%{python3_sitelib}/opencv-*.egg-info +%{python3_sitearch}/opencv-*.egg-info %if %{with java} %files java @@ -514,6 +514,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope * Sat May 13 2023 Sérgio Basto - 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 - 4.7.0-7 - Install python egg-info From 0a1c546e4885796179f7bab8819d12e4cf656413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 15 May 2023 00:30:28 +0100 Subject: [PATCH 173/274] Reverts things that were accidentally committed and not yet completed --- opencv.spec | 11 ++++-- xorg.conf | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 xorg.conf diff --git a/opencv.spec b/opencv.spec index a18c17e..68f3259 100644 --- a/opencv.spec +++ b/opencv.spec @@ -94,6 +94,7 @@ 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 +Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch3: opencv.python.patch @@ -400,9 +401,15 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %check #ifnarch ppc64 %if %{with tests} - export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/%{__cmake_builddir}/lib:$LD_LIBARY_PATH - xvfb-run --server-args=5120x3200x24 & + cp %SOURCE5 %{__cmake_builddir} + if [ -x /usr/libexec/Xorg ]; then + Xorg=/usr/libexec/Xorg + else + Xorg=/usr/libexec/Xorg.bin + 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 diff --git a/xorg.conf b/xorg.conf new file mode 100644 index 0000000..8edc240 --- /dev/null +++ b/xorg.conf @@ -0,0 +1,98 @@ +# This xorg configuration file is meant to be used +# to start a dummy X11 server for graphical testing. + +Section "ServerFlags" + Option "DontVTSwitch" "true" + Option "AllowMouseOpenFail" "true" + Option "PciForceNone" "true" + Option "AutoEnableDevices" "false" + Option "AutoAddDevices" "false" +EndSection + +Section "InputDevice" + Identifier "dummy_mouse" + Option "CorePointer" "true" + Driver "void" +EndSection + +Section "InputDevice" + Identifier "dummy_keyboard" + Option "CoreKeyboard" "true" + Driver "void" +EndSection + +Section "Device" + Identifier "dummy_videocard" + Driver "dummy" + Option "ConstantDPI" "true" + #VideoRam 4096000 + #VideoRam 256000 + VideoRam 192000 +EndSection + +Section "Monitor" + Identifier "dummy_monitor" + HorizSync 5.0 - 1000.0 + VertRefresh 5.0 - 200.0 + #This can be used to get a specific DPI, but only for the default resolution: + #DisplaySize 508 317 + #NOTE: the highest modes will not work without increasing the VideoRam + # for the dummy video card. + Modeline "32768x32768" 15226.50 32768 35800 39488 46208 32768 32771 32781 32953 + Modeline "32768x16384" 7516.25 32768 35544 39192 45616 16384 16387 16397 16478 + Modeline "16384x8192" 2101.93 16384 16416 24400 24432 8192 8390 8403 8602 + Modeline "8192x4096" 424.46 8192 8224 9832 9864 4096 4195 4202 4301 + Modeline "5496x1200" 199.13 5496 5528 6280 6312 1200 1228 1233 1261 + Modeline "5280x1080" 169.96 5280 5312 5952 5984 1080 1105 1110 1135 + Modeline "5280x1200" 191.40 5280 5312 6032 6064 1200 1228 1233 1261 + Modeline "5120x3200" 199.75 5120 5152 5904 5936 3200 3277 3283 3361 + Modeline "4800x1200" 64.42 4800 4832 5072 5104 1200 1229 1231 1261 + Modeline "3840x2880" 133.43 3840 3872 4376 4408 2880 2950 2955 3025 + Modeline "3840x2560" 116.93 3840 3872 4312 4344 2560 2622 2627 2689 + Modeline "3840x2048" 91.45 3840 3872 4216 4248 2048 2097 2101 2151 + Modeline "3840x1080" 100.38 3840 3848 4216 4592 1080 1081 1084 1093 + Modeline "3600x1200" 106.06 3600 3632 3984 4368 1200 1201 1204 1214 + Modeline "3288x1080" 39.76 3288 3320 3464 3496 1080 1106 1108 1135 + Modeline "2048x2048" 49.47 2048 2080 2264 2296 2048 2097 2101 2151 + Modeline "2048x1536" 80.06 2048 2104 2312 2576 1536 1537 1540 1554 + Modeline "2560x1600" 47.12 2560 2592 2768 2800 1600 1639 1642 1681 + Modeline "2560x1440" 42.12 2560 2592 2752 2784 1440 1475 1478 1513 + Modeline "1920x1440" 69.47 1920 1960 2152 2384 1440 1441 1444 1457 + Modeline "1920x1200" 26.28 1920 1952 2048 2080 1200 1229 1231 1261 + Modeline "1920x1080" 23.53 1920 1952 2040 2072 1080 1106 1108 1135 + Modeline "1680x1050" 20.08 1680 1712 1784 1816 1050 1075 1077 1103 + Modeline "1600x1200" 22.04 1600 1632 1712 1744 1200 1229 1231 1261 + Modeline "1600x900" 33.92 1600 1632 1760 1792 900 921 924 946 + Modeline "1440x900" 30.66 1440 1472 1584 1616 900 921 924 946 + ModeLine "1366x768" 72.00 1366 1414 1446 1494 768 771 777 803 + Modeline "1280x1024" 31.50 1280 1312 1424 1456 1024 1048 1052 1076 + Modeline "1280x800" 24.15 1280 1312 1400 1432 800 819 822 841 + Modeline "1280x768" 23.11 1280 1312 1392 1424 768 786 789 807 + Modeline "1360x768" 24.49 1360 1392 1480 1512 768 786 789 807 + Modeline "1024x768" 18.71 1024 1056 1120 1152 768 786 789 807 + Modeline "768x1024" 19.50 768 800 872 904 1024 1048 1052 1076 +EndSection + +Section "Screen" + Identifier "dummy_screen" + Device "dummy_videocard" + Monitor "dummy_monitor" + DefaultDepth 24 + SubSection "Display" + Viewport 0 0 + Depth 24 + #Modes "32768x32768" "32768x16384" "16384x8192" "8192x4096" "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" + Modes "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" + #Virtual 32000 32000 + #Virtual 16384 8192 + Virtual 8192 4096 + #Virtual 5120 3200 + EndSubSection +EndSection + +Section "ServerLayout" + Identifier "dummy_layout" + Screen "dummy_screen" + InputDevice "dummy_mouse" + InputDevice "dummy_keyboard" +EndSection From 964c2286f1b8bbbbe03a67b8e18357b636fc8393 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 12 Jun 2023 18:21:01 +0200 Subject: [PATCH 174/274] Upstream commit to fix rhbz#2190013 --- 23112.patch | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++ opencv.spec | 8 +++++- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 23112.patch diff --git a/23112.patch b/23112.patch new file mode 100644 index 0000000..de28c46 --- /dev/null +++ b/23112.patch @@ -0,0 +1,72 @@ +From 82616eec41f6a6989a3b507822c17fc81a10e296 Mon Sep 17 00:00:00 2001 +From: zihaomu +Date: Mon, 9 Jan 2023 13:40:04 +0800 +Subject: [PATCH] fix possible segmentation fault error in winograd on x86 + +--- + .../src/layers/fast_convolution/fast_convolution.avx2.cpp | 2 +- + .../dnn/src/layers/fast_convolution/fast_convolution.cpp | 8 +++++++- + .../src/layers/fast_convolution/winograd_3x3s1_f63.cpp | 4 ++-- + 3 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/modules/dnn/src/layers/fast_convolution/fast_convolution.avx2.cpp b/modules/dnn/src/layers/fast_convolution/fast_convolution.avx2.cpp +index 0d3c1447626a..c98fbe72bda8 100644 +--- a/modules/dnn/src/layers/fast_convolution/fast_convolution.avx2.cpp ++++ b/modules/dnn/src/layers/fast_convolution/fast_convolution.avx2.cpp +@@ -119,7 +119,7 @@ void convBlock_AVX2(int np, const float* a, const float* b, float* c, int ldc, b + void _fx_winograd_accum_f32(const float* inwptr, const float* wptr, + float* outbuf, int Cg, int iblock) + { +- CV_Assert(_FX_WINO_IBLOCK == 6 && _FX_WINO_KBLOCK == 4);// && _FX_WINO_ATOM_F32 == 8); ++ CV_Assert(_FX_WINO_IBLOCK == 6 && _FX_WINO_KBLOCK == 4 && _FX_WINO_ATOM_F32 == 8); + if (iblock > 3) + { + for (int atom_id = 0; atom_id < _FX_WINO_NATOMS_F32; atom_id++, +diff --git a/modules/dnn/src/layers/fast_convolution/fast_convolution.cpp b/modules/dnn/src/layers/fast_convolution/fast_convolution.cpp +index 1cde7b324f6f..946980bebe49 100644 +--- a/modules/dnn/src/layers/fast_convolution/fast_convolution.cpp ++++ b/modules/dnn/src/layers/fast_convolution/fast_convolution.cpp +@@ -105,6 +105,12 @@ Ptr initFastConv( + conv->conv_type = _FX_CONV_TYPE_GENERIC; + #endif + ++#if CV_TRY_AVX2 ++ // Disabel Winograd when CV_TRY_AVX2 is true, but conv->useAVX2 is false. ++ if (conv->conv_type == _FX_CONV_TYPE_WINOGRAD3X3 && !conv->useAVX2) ++ conv->conv_type = _FX_CONV_TYPE_GENERIC; ++#endif ++ + Mat weightsMat = _weightsMat.getMat(); + auto wShape = shape(weightsMat); + const size_t wstep = weightsMat.step1(); +@@ -257,7 +263,7 @@ Ptr initFastConv( + // we can always read MR elements starting from any valid index + { + int k = 0, nbias = K + VEC_ALIGN; +- conv->biasBuf.reserve(nbias); ++ conv->biasBuf.resize(nbias); + float* biasBufPtr = conv->biasBuf.data(); + for(; k < K; k++) + biasBufPtr[k] = srcBias ? srcBias[k] : 0.f; +diff --git a/modules/dnn/src/layers/fast_convolution/winograd_3x3s1_f63.cpp b/modules/dnn/src/layers/fast_convolution/winograd_3x3s1_f63.cpp +index e3b80884102a..b0ccfd0cd24a 100644 +--- a/modules/dnn/src/layers/fast_convolution/winograd_3x3s1_f63.cpp ++++ b/modules/dnn/src/layers/fast_convolution/winograd_3x3s1_f63.cpp +@@ -22,7 +22,7 @@ _fx_winograd_accum_f32(const float* inwptr, const float* wptr, + float* outbuf, int Cg, int iblock) + { + #if CV_NEON && CV_NEON_AARCH64 +- CV_Assert(_FX_WINO_IBLOCK == 6 && _FX_WINO_KBLOCK == 4); ++ CV_Assert(_FX_WINO_IBLOCK == 6 && _FX_WINO_KBLOCK == 4 && _FX_WINO_ATOM_F32 == 4); + if (iblock > 3) + { + for (int atom_id = 0; atom_id < _FX_WINO_NATOMS_F32; atom_id++, +@@ -144,7 +144,7 @@ _fx_winograd_accum_f32(const float* inwptr, const float* wptr, + } + } + #elif CV_SIMD128 +- CV_Assert(_FX_WINO_IBLOCK == 3 && _FX_WINO_KBLOCK == 4); ++ CV_Assert(_FX_WINO_IBLOCK == 3 && _FX_WINO_KBLOCK == 4 && _FX_WINO_ATOM_F32 == 4); + for (int atom_id = 0; atom_id < _FX_WINO_NATOMS_F32; atom_id++, + outbuf += _FX_WINO_ATOM_F32) + { diff --git a/opencv.spec b/opencv.spec index 68f3259..b7ae026 100644 --- a/opencv.spec +++ b/opencv.spec @@ -74,7 +74,7 @@ Version: 4.7.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: 8%{?dist} +Release: 9%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -98,6 +98,8 @@ Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch3: opencv.python.patch +# Upstream commit to fix rhbz#2190013 +Patch4: https://github.com/opencv/opencv/pull/23112.patch BuildRequires: gcc-c++ BuildRequires: cmake >= 2.6.3 @@ -292,6 +294,7 @@ popd &>/dev/null %patch -P 0 -p1 -b .install_3rdparty_licenses %patch -P 3 -p1 -b .python_install_binary +%patch -P 4 -p1 -b .backport_avx2 pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv @@ -518,6 +521,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Mon Jun 12 2023 Nicolas Chauvet - 4.7.0-9 +- Upstream commit to fix rhbz#2190013 + * Sat May 13 2023 Sérgio Basto - 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. From 69d8bc93aabc534344de7a099b8f9de63768f431 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 12 Jun 2023 21:52:13 +0200 Subject: [PATCH 175/274] Rebuilt --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index b7ae026..c3509d2 100644 --- a/opencv.spec +++ b/opencv.spec @@ -74,7 +74,7 @@ Version: 4.7.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: 9%{?dist} +Release: 10%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -521,6 +521,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Mon Jun 12 2023 Nicolas Chauvet - 4.7.0-10 +- Rebuilt for libdc1394 + * Mon Jun 12 2023 Nicolas Chauvet - 4.7.0-9 - Upstream commit to fix rhbz#2190013 From 025de760b392e4763f8d80d60ced0bf82d94d006 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 3 Jul 2023 13:58:12 +0200 Subject: [PATCH 176/274] Rebuilt for Python 3.12 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index c3509d2..db89bf7 100644 --- a/opencv.spec +++ b/opencv.spec @@ -74,7 +74,7 @@ Version: 4.7.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: 10%{?dist} +Release: 11%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -521,6 +521,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Mon Jul 03 2023 Python Maint - 4.7.0-11 +- Rebuilt for Python 3.12 + * Mon Jun 12 2023 Nicolas Chauvet - 4.7.0-10 - Rebuilt for libdc1394 From 05aad33f5878aaa1cf59122579e6ca56b1afe5d4 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 7 Jul 2023 20:26:27 +0900 Subject: [PATCH 177/274] Drop openni support on i686 as it is no longer available --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index db89bf7..b0d4d3b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -16,7 +16,7 @@ %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 @@ -521,6 +521,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Fri Jul 07 2023 Mamoru TASAKA - 4.7.0-12 +- Drop openni support on i686 as it is no longer available + * Mon Jul 03 2023 Python Maint - 4.7.0-11 - Rebuilt for Python 3.12 From 305eb44cc989a2eded1b4af70a88ff854e89a12d Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 7 Jul 2023 20:27:08 +0900 Subject: [PATCH 178/274] bump release --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index b0d4d3b..e00b1a7 100644 --- a/opencv.spec +++ b/opencv.spec @@ -74,7 +74,7 @@ Version: 4.7.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 From 2076a686c087bce82b29a2632c73d38989f40532 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Fri, 14 Jul 2023 12:46:49 +0200 Subject: [PATCH 179/274] Rebuild (tesseract) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index e00b1a7..a542e40 100644 --- a/opencv.spec +++ b/opencv.spec @@ -74,7 +74,7 @@ Version: 4.7.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 @@ -521,6 +521,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Fri Jul 14 2023 Sandro Mani - 4.7.0-13 +- Rebuild (tesseract) + * Fri Jul 07 2023 Mamoru TASAKA - 4.7.0-12 - Drop openni support on i686 as it is no longer available From 7765b04b323a36ee87059eaa92e930e13e038826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=98=C3=ADdk=C3=BD?= Date: Wed, 19 Jul 2023 08:47:19 +0200 Subject: [PATCH 180/274] Migrate to SPDX license format --- opencv.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index a542e40..d51a8c7 100644 --- a/opencv.spec +++ b/opencv.spec @@ -74,10 +74,10 @@ Version: 4.7.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 +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 @@ -521,6 +521,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Wed Jul 19 2023 Josef Ridky - 4.7.0-14 +- Migrate to SPDX license format + * Fri Jul 14 2023 Sandro Mani - 4.7.0-13 - Rebuild (tesseract) From 464361d6d8e910c539c4129e04e77c3763c75b40 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 18:01:40 +0000 Subject: [PATCH 181/274] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index d51a8c7..ed557a4 100644 --- a/opencv.spec +++ b/opencv.spec @@ -74,7 +74,7 @@ Version: 4.7.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 @@ -521,6 +521,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 4.7.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jul 19 2023 Josef Ridky - 4.7.0-14 - Migrate to SPDX license format From 193d86a5beed340f24026fc1625aa7029b8f05af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 7 Aug 2023 00:03:55 +0100 Subject: [PATCH 182/274] Update opencv to 4.8.0 Use bundle flatbuffers, tried build with flatbuffers from system but doesn't build Use oneVPL instead libmfx --- 23112.patch | 72 ------------------------------------------------- opencv-clean.sh | 4 +-- opencv.spec | 40 +++++++++++++-------------- sources | 5 ++-- 4 files changed, 23 insertions(+), 98 deletions(-) delete mode 100644 23112.patch diff --git a/23112.patch b/23112.patch deleted file mode 100644 index de28c46..0000000 --- a/23112.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 82616eec41f6a6989a3b507822c17fc81a10e296 Mon Sep 17 00:00:00 2001 -From: zihaomu -Date: Mon, 9 Jan 2023 13:40:04 +0800 -Subject: [PATCH] fix possible segmentation fault error in winograd on x86 - ---- - .../src/layers/fast_convolution/fast_convolution.avx2.cpp | 2 +- - .../dnn/src/layers/fast_convolution/fast_convolution.cpp | 8 +++++++- - .../src/layers/fast_convolution/winograd_3x3s1_f63.cpp | 4 ++-- - 3 files changed, 10 insertions(+), 4 deletions(-) - -diff --git a/modules/dnn/src/layers/fast_convolution/fast_convolution.avx2.cpp b/modules/dnn/src/layers/fast_convolution/fast_convolution.avx2.cpp -index 0d3c1447626a..c98fbe72bda8 100644 ---- a/modules/dnn/src/layers/fast_convolution/fast_convolution.avx2.cpp -+++ b/modules/dnn/src/layers/fast_convolution/fast_convolution.avx2.cpp -@@ -119,7 +119,7 @@ void convBlock_AVX2(int np, const float* a, const float* b, float* c, int ldc, b - void _fx_winograd_accum_f32(const float* inwptr, const float* wptr, - float* outbuf, int Cg, int iblock) - { -- CV_Assert(_FX_WINO_IBLOCK == 6 && _FX_WINO_KBLOCK == 4);// && _FX_WINO_ATOM_F32 == 8); -+ CV_Assert(_FX_WINO_IBLOCK == 6 && _FX_WINO_KBLOCK == 4 && _FX_WINO_ATOM_F32 == 8); - if (iblock > 3) - { - for (int atom_id = 0; atom_id < _FX_WINO_NATOMS_F32; atom_id++, -diff --git a/modules/dnn/src/layers/fast_convolution/fast_convolution.cpp b/modules/dnn/src/layers/fast_convolution/fast_convolution.cpp -index 1cde7b324f6f..946980bebe49 100644 ---- a/modules/dnn/src/layers/fast_convolution/fast_convolution.cpp -+++ b/modules/dnn/src/layers/fast_convolution/fast_convolution.cpp -@@ -105,6 +105,12 @@ Ptr initFastConv( - conv->conv_type = _FX_CONV_TYPE_GENERIC; - #endif - -+#if CV_TRY_AVX2 -+ // Disabel Winograd when CV_TRY_AVX2 is true, but conv->useAVX2 is false. -+ if (conv->conv_type == _FX_CONV_TYPE_WINOGRAD3X3 && !conv->useAVX2) -+ conv->conv_type = _FX_CONV_TYPE_GENERIC; -+#endif -+ - Mat weightsMat = _weightsMat.getMat(); - auto wShape = shape(weightsMat); - const size_t wstep = weightsMat.step1(); -@@ -257,7 +263,7 @@ Ptr initFastConv( - // we can always read MR elements starting from any valid index - { - int k = 0, nbias = K + VEC_ALIGN; -- conv->biasBuf.reserve(nbias); -+ conv->biasBuf.resize(nbias); - float* biasBufPtr = conv->biasBuf.data(); - for(; k < K; k++) - biasBufPtr[k] = srcBias ? srcBias[k] : 0.f; -diff --git a/modules/dnn/src/layers/fast_convolution/winograd_3x3s1_f63.cpp b/modules/dnn/src/layers/fast_convolution/winograd_3x3s1_f63.cpp -index e3b80884102a..b0ccfd0cd24a 100644 ---- a/modules/dnn/src/layers/fast_convolution/winograd_3x3s1_f63.cpp -+++ b/modules/dnn/src/layers/fast_convolution/winograd_3x3s1_f63.cpp -@@ -22,7 +22,7 @@ _fx_winograd_accum_f32(const float* inwptr, const float* wptr, - float* outbuf, int Cg, int iblock) - { - #if CV_NEON && CV_NEON_AARCH64 -- CV_Assert(_FX_WINO_IBLOCK == 6 && _FX_WINO_KBLOCK == 4); -+ CV_Assert(_FX_WINO_IBLOCK == 6 && _FX_WINO_KBLOCK == 4 && _FX_WINO_ATOM_F32 == 4); - if (iblock > 3) - { - for (int atom_id = 0; atom_id < _FX_WINO_NATOMS_F32; atom_id++, -@@ -144,7 +144,7 @@ _fx_winograd_accum_f32(const float* inwptr, const float* wptr, - } - } - #elif CV_SIMD128 -- CV_Assert(_FX_WINO_IBLOCK == 3 && _FX_WINO_KBLOCK == 4); -+ CV_Assert(_FX_WINO_IBLOCK == 3 && _FX_WINO_KBLOCK == 4 && _FX_WINO_ATOM_F32 == 4); - for (int atom_id = 0; atom_id < _FX_WINO_NATOMS_F32; atom_id++, - outbuf += _FX_WINO_ATOM_F32) - { diff --git a/opencv-clean.sh b/opencv-clean.sh index 95dc96d..d82bdcc 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.7.0 +VERSION=4.8.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/.*\///') diff --git a/opencv.spec b/opencv.spec index ed557a4..c87543f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -4,7 +4,7 @@ %if %{without tests} %bcond_with extras_tests %else -%bcond_with extras_tests +%bcond_without extras_tests %endif # linters are enabled by default if BUILD_DOCS OR BUILD_EXAMPLES %bcond_with linters @@ -13,16 +13,12 @@ %bcond_with eigen2 %bcond_without eigen3 %bcond_without opencl -%if 0%{?rhel} >= 8 -%bcond_with openni -%else %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 @@ -68,13 +64,13 @@ %endif Name: opencv -Version: 4.7.0 +Version: 4.8.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: 15%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -98,8 +94,6 @@ Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch3: opencv.python.patch -# Upstream commit to fix rhbz#2190013 -Patch4: https://github.com/opencv/opencv/pull/23112.patch BuildRequires: gcc-c++ BuildRequires: cmake >= 2.6.3 @@ -194,7 +188,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: @@ -202,6 +196,7 @@ 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 @@ -282,19 +277,17 @@ to provide decent performance and stability. # autosetup doesn't work with 2 sources # https://github.com/rpm-software-management/rpm/issues/1204 %setup -q -a1 %{?with_extras_tests:-a2} -%if 1 + # 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 %patch -P 0 -p1 -b .install_3rdparty_licenses %patch -P 3 -p1 -b .python_install_binary -%patch -P 4 -p1 -b .backport_avx2 pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv @@ -302,7 +295,7 @@ 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 @@ -310,7 +303,7 @@ popd # 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: @@ -335,7 +328,7 @@ install -pm 0644 %{SOURCE4} .cache/ade/ %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 } \ @@ -366,7 +359,7 @@ 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 \ @@ -375,7 +368,7 @@ install -pm 0644 %{SOURCE4} .cache/ade/ -DOPENCV_GENERATE_PKGCONFIG=ON \ %{?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} \ @@ -404,7 +397,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 @@ -475,7 +468,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_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_barcode.so.{#%%{abiver},#%%{version}} %{_libdir}/libopencv_bioinspired.so.{%{abiver},%{version}} %{_libdir}/libopencv_ccalib.so.{%{abiver},%{version}} %{?with_cuda: @@ -521,6 +514,11 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Mon Aug 07 2023 Sérgio Basto - 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 + * Thu Jul 20 2023 Fedora Release Engineering - 4.7.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index 867fa73..7ec0a02 100644 --- a/sources +++ b/sources @@ -1,5 +1,4 @@ -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.8.0.tar.gz) = 5c15a86893ebd4ef8d597b198f4467dbb76767c27ed49c20eb13a439f5a9ceb6d116dff82b6eb4ed39769f4bd75c05f08d843f21c4e9dbc5d1b1c8c4d469b5b5 +SHA512 (opencv_contrib-clean-4.8.0.tar.gz) = decd6830c533014c0da7162dfaca18ef22a0cd2d10554c3f572c312cf3e76e45666ff5c6e10a4860d4bd4eaf73a1dfc8c8a4e76f49188a19d3de89019a15df3b SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip) = ce5af0bd5d7fb04022f92fed130898959aecb954cc09da2fc923c76b37ee92d2233888592a4c6bca8006ac4d3fda9c6da80f316c924a407a7a5961d9832a681c From 06c4df6d4ffc024ad8ea2bc31bd2a2a1d031a379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 8 Oct 2022 01:45:49 +0100 Subject: [PATCH 183/274] 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 --- .gitignore | 1 + opencv.spec | 12 +++++++++++- sources | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1ade250..0d40f7e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ opencv*.tar.* face_landmark_model.dat.xz /b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip /fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip +/wechat-20230712.git3487ef7.tar.gz diff --git a/opencv.spec b/opencv.spec index c87543f..64318e2 100644 --- a/opencv.spec +++ b/opencv.spec @@ -91,6 +91,10 @@ Source3: face_landmark_model.dat.xz # mv v0.1.2a.zip $(md5sum v0.1.2a.zip | cut -d' ' -f1)-v0.1.2a.zip Source4: fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.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 @@ -276,7 +280,7 @@ 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_tests:-a2} +%setup -q -a1 %{?with_extras_tests:-a2} -a6 # we don't use pre-built contribs except quirc pushd 3rdparty @@ -300,6 +304,11 @@ 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 @@ -518,6 +527,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope - 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 * Thu Jul 20 2023 Fedora Release Engineering - 4.7.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index 7ec0a02..4daac63 100644 --- a/sources +++ b/sources @@ -2,3 +2,4 @@ SHA512 (opencv-clean-4.8.0.tar.gz) = 5c15a86893ebd4ef8d597b198f4467dbb76767c27ed SHA512 (opencv_contrib-clean-4.8.0.tar.gz) = decd6830c533014c0da7162dfaca18ef22a0cd2d10554c3f572c312cf3e76e45666ff5c6e10a4860d4bd4eaf73a1dfc8c8a4e76f49188a19d3de89019a15df3b SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip) = ce5af0bd5d7fb04022f92fed130898959aecb954cc09da2fc923c76b37ee92d2233888592a4c6bca8006ac4d3fda9c6da80f316c924a407a7a5961d9832a681c +SHA512 (wechat-20230712.git3487ef7.tar.gz) = bc4f220465de41df8af0cb35312c1db155976d05f13a60e43c1798b161d8f56388e34a59108fb3e27e8c97b53acfd198256d9ae420b5f70a32ddc1ea65c3c8a6 From cdd8f4a19e8c2daf2d4eddde337f1f58d5f1f63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 7 Aug 2023 01:42:39 +0100 Subject: [PATCH 184/274] Upgrade C++ standard to C++17 for protobuf v4 (23.x etc.) --- opencv.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opencv.spec b/opencv.spec index 64318e2..a1a7e8a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -321,6 +321,9 @@ install -pm 0644 %{S:4} .cache/ade/ # disabling IPP because it is closed source library from intel %cmake \ +%if 0%{?fedora} > 38 + -DCMAKE_CXX_STANDARD=17 \ +%endif -DCV_TRACE=OFF \ -DWITH_IPP=OFF \ -DWITH_ITT=OFF \ @@ -528,6 +531,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope - 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 - 4.7.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From b2d277d847f097b6793a7ebc55338bb9d4685638 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 15 Sep 2023 12:07:27 -0400 Subject: [PATCH 185/274] Separate per-module subpackages (#1878320) --- opencv.spec | 185 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 110 insertions(+), 75 deletions(-) diff --git a/opencv.spec b/opencv.spec index a1a7e8a..e92f974 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ Version: 4.8.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: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -169,7 +169,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: @@ -218,15 +218,116 @@ and Computer Vision algorithms. Summary: OpenCV core libraries Provides: bundled(quirc) = 1.0 Obsoletes: python2-%{name} < %{version} +# any removed modules should be listed here +Obsoletes: %{name}-contrib < 4.8.0-2 %description core This package contains the OpenCV C/C++ core libraries. +%package data +Summary: OpenCV data + +%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%{_isa} = %{version}-%{release} +Requires: %{opencv_devel_requires} %description devel This package contains the OpenCV C/C++ library and header files, as well as @@ -267,16 +368,6 @@ 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 @@ -426,6 +517,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %files %doc README.md %{_bindir}/opencv_* + +%files data +%license LICENSE %dir %{_datadir}/opencv4 %{_datadir}/opencv4/haarcascades %{_datadir}/opencv4/lbpcascades @@ -435,21 +529,7 @@ 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 @@ -476,56 +556,11 @@ 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 Sep 14 2023 Yaakov Selkowitz - 4.8.0-2 +- Separate per-module subpackages (#1878320) + * Mon Aug 07 2023 Sérgio Basto - 4.8.0-1 - Update opencv to 4.8.0 - Use bundle flatbuffers, tried build with flatbuffers from system but doesn't build From ef2f6e9368705d871a098aae0e6b058064537a3e Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 29 Sep 2023 10:44:39 -0400 Subject: [PATCH 186/274] Fix upgradability issues --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index e92f974..7de0f37 100644 --- a/opencv.spec +++ b/opencv.spec @@ -207,6 +207,7 @@ 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 @@ -219,6 +220,7 @@ Summary: OpenCV core libraries Provides: bundled(quirc) = 1.0 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 @@ -227,6 +229,7 @@ This package contains the OpenCV C/C++ core libraries. %package data Summary: OpenCV data +BuildArch: noarch %description data This package contains OpenCV data. @@ -326,7 +329,7 @@ This package contains the OpenCV %{moduledesc} module runtime.\ %package devel Summary: Development files for using the OpenCV library Requires: %{name}%{_isa} = %{version}-%{release} -Requires: %{name}-data%{_isa} = %{version}-%{release} +Requires: %{name}-data = %{version}-%{release} Requires: %{opencv_devel_requires} %description devel From fb8443873603132bda5fa8869d067291f1a2dbfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 30 Sep 2023 05:14:06 +0100 Subject: [PATCH 187/274] Update opencv to 4.8.1 --- numpy.distutils_removal.patch | 11 +++++++++++ opencv-clean.sh | 2 +- opencv.spec | 9 +++++++-- sources | 4 ++-- 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 numpy.distutils_removal.patch diff --git a/numpy.distutils_removal.patch b/numpy.distutils_removal.patch new file mode 100644 index 0000000..400651d --- /dev/null +++ b/numpy.distutils_removal.patch @@ -0,0 +1,11 @@ +--- ./cmake/OpenCVDetectPython.cmake.orig 2023-09-30 01:44:54.597603701 +0100 ++++ ./cmake/OpenCVDetectPython.cmake 2023-09-30 01:53:48.924119387 +0100 +@@ -216,7 +216,7 @@ if(NOT ${found}) + message(STATUS " PYTHON3_NUMPY_INCLUDE_DIRS") + else() + # Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy +- execute_process(COMMAND "${_executable}" -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print(os.pathsep.join(numpy.distutils.misc_util.get_numpy_include_dirs()))" ++ execute_process(COMMAND "${_executable}" -c "import numpy; print(numpy.get_include())" + RESULT_VARIABLE _numpy_process + OUTPUT_VARIABLE _numpy_include_dirs + OUTPUT_STRIP_TRAILING_WHITESPACE) diff --git a/opencv-clean.sh b/opencv-clean.sh index d82bdcc..e161ddf 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.8.0 +VERSION=4.8.1 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 diff --git a/opencv.spec b/opencv.spec index 7de0f37..8587b43 100644 --- a/opencv.spec +++ b/opencv.spec @@ -64,13 +64,13 @@ %endif Name: opencv -Version: 4.8.0 +Version: 4.8.1 %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: 2%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -98,6 +98,7 @@ Source6: https://github.com/WeChatCV/opencv_3rdparty/archive/%{wechat_com Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch3: opencv.python.patch +Patch4: numpy.distutils_removal.patch BuildRequires: gcc-c++ BuildRequires: cmake >= 2.6.3 @@ -386,6 +387,7 @@ popd &>/dev/null %patch -P 0 -p1 -b .install_3rdparty_licenses %patch -P 3 -p1 -b .python_install_binary +%patch -P 4 -p1 -b .numpy.distutils_removal pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv @@ -561,6 +563,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Fri Sep 29 2023 Sérgio Basto - 4.8.1-1 +- Update opencv to 4.8.1 + * Thu Sep 14 2023 Yaakov Selkowitz - 4.8.0-2 - Separate per-module subpackages (#1878320) diff --git a/sources b/sources index 4daac63..c2c7616 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (opencv-clean-4.8.0.tar.gz) = 5c15a86893ebd4ef8d597b198f4467dbb76767c27ed49c20eb13a439f5a9ceb6d116dff82b6eb4ed39769f4bd75c05f08d843f21c4e9dbc5d1b1c8c4d469b5b5 -SHA512 (opencv_contrib-clean-4.8.0.tar.gz) = decd6830c533014c0da7162dfaca18ef22a0cd2d10554c3f572c312cf3e76e45666ff5c6e10a4860d4bd4eaf73a1dfc8c8a4e76f49188a19d3de89019a15df3b +SHA512 (opencv-clean-4.8.1.tar.gz) = d148e05cbe29a6e7b0eec8258b6f0260193ace0fec87c6b61225a36f3432a29d9c86b77018e51b547996db3227b561968e54856063ce7f2e9c47bc72aba7f0fb +SHA512 (opencv_contrib-clean-4.8.1.tar.gz) = cc5badd41b7c23e316d4984accc6373b608df591896827f9289dc511b163618036906c91f872cfa4de1fd3cc53838a6dfd5102e7c1856aa1f67b2c18323677f6 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip) = ce5af0bd5d7fb04022f92fed130898959aecb954cc09da2fc923c76b37ee92d2233888592a4c6bca8006ac4d3fda9c6da80f316c924a407a7a5961d9832a681c SHA512 (wechat-20230712.git3487ef7.tar.gz) = bc4f220465de41df8af0cb35312c1db155976d05f13a60e43c1798b161d8f56388e34a59108fb3e27e8c97b53acfd198256d9ae420b5f70a32ddc1ea65c3c8a6 From 45ae591b3492554770d28fea73a8b9b43c716d90 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sat, 7 Oct 2023 23:54:32 +0200 Subject: [PATCH 188/274] Rebuild (tesseract) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 8587b43..6fd04fa 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ Version: 4.8.1 %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: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -563,6 +563,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Sat Oct 07 2023 Sandro Mani - 4.8.1-2 +- Rebuild (tesseract) + * Fri Sep 29 2023 Sérgio Basto - 4.8.1-1 - Update opencv to 4.8.1 From 98cbcd26f408a460098eac516ca251d6b69b4925 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 16 Nov 2023 09:18:20 +0100 Subject: [PATCH 189/274] Rebuild (gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 6fd04fa..b968fc2 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ Version: 4.8.1 %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: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -563,6 +563,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Thu Nov 16 2023 Sandro Mani - 4.8.1-3 +- Rebuild (gdal) + * Sat Oct 07 2023 Sandro Mani - 4.8.1-2 - Rebuild (tesseract) From f547902cbbfa92fa51c9b40b7b69018b20e9cbeb Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 11 Jan 2024 10:58:50 -0500 Subject: [PATCH 190/274] Backport support for protobuf v22 and later from opencv 4.9.0 --- opencv-4.8.1-protobuf-v22.patch | 204 ++++++++++++++++++++++++++++++++ opencv.spec | 10 +- 2 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 opencv-4.8.1-protobuf-v22.patch diff --git a/opencv-4.8.1-protobuf-v22.patch b/opencv-4.8.1-protobuf-v22.patch new file mode 100644 index 0000000..1873ada --- /dev/null +++ b/opencv-4.8.1-protobuf-v22.patch @@ -0,0 +1,204 @@ +From c205e36bf9d74d35021c68afe3c692f0d3678f77 Mon Sep 17 00:00:00 2001 +From: Kumataro +Date: Thu, 19 Oct 2023 14:45:08 +0900 +Subject: [PATCH] Merge pull request #24372 from Kumataro:fix24369 + +Supporting protobuf v22 and later(with abseil-cpp/C++17) #24372 + +fix https://github.com/opencv/opencv/issues/24369 +related https://github.com/opencv/opencv/issues/23791 + +1. This patch supports external protobuf v22 and later, it required abseil-cpp and c++17. + Even if the built-in protobuf is upgraded to v22 or later, + the dependency on abseil-cpp and the requirement for C++17 will continue. +2. Some test for caffe required patched protobuf, so this patch disable them. + +This patch is tested by following libraries. +- Protobuf: /usr/local/lib/libprotobuf.so (4.24.4) +- abseil-cpp: YES (20230125) + +See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request + +- [x] I agree to contribute to the project under Apache 2 License. +- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV +- [x] The PR is proposed to the proper branch +- [x] There is a reference to the original bug report and related work +- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable + Patch to opencv_extra has the same branch name. +- [x] The feature is well documented and sample code can be built with the project CMake +--- + cmake/OpenCVFindProtobuf.cmake | 35 +++++++++++++++++++++++++++----- + modules/dnn/CMakeLists.txt | 6 ++++++ + modules/dnn/test/test_layers.cpp | 24 ++++++++++++++++++---- + 3 files changed, 56 insertions(+), 9 deletions(-) + +diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake +index 8835347d1d..5b1e17529f 100644 +--- a/cmake/OpenCVFindProtobuf.cmake ++++ b/cmake/OpenCVFindProtobuf.cmake +@@ -30,8 +30,14 @@ if(BUILD_PROTOBUF) + set(Protobuf_LIBRARIES "libprotobuf") + set(HAVE_PROTOBUF TRUE) + else() ++ # we still need this for command PROTOBUF_GENERATE_CPP. ++ set(protobuf_MODULE_COMPATIBLE ON) ++ + unset(Protobuf_VERSION CACHE) +- find_package(Protobuf QUIET) ++ find_package(Protobuf QUIET CONFIG) ++ if(NOT Protobuf_FOUND) ++ find_package(Protobuf QUIET) ++ endif() + + # Backwards compatibility + # Define camel case versions of input variables +@@ -67,6 +73,20 @@ else() + endif() + endif() + ++# See https://github.com/opencv/opencv/issues/24369 ++# In Protocol Buffers v22.0 and later drops C++11 support and depends abseil-cpp. ++# Details: https://protobuf.dev/news/2022-08-03/ ++# And if std::text_view is in abseil-cpp requests C++17 and later. ++ ++if(HAVE_PROTOBUF) ++ if(NOT (Protobuf_VERSION VERSION_LESS 22)) ++ if((CMAKE_CXX_STANDARD EQUAL 98) OR (CMAKE_CXX_STANDARD LESS 17)) ++ message(STATUS "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is too old to support protobuf(${Protobuf_VERSION}) and/or abseil-cpp. Use C++17 or later. Turning HAVE_PROTOBUF off") ++ set(HAVE_PROTOBUF FALSE) ++ endif() ++ endif() ++endif() ++ + if(HAVE_PROTOBUF AND PROTOBUF_UPDATE_FILES AND NOT COMMAND PROTOBUF_GENERATE_CPP) + message(FATAL_ERROR "Can't configure protobuf dependency (BUILD_PROTOBUF=${BUILD_PROTOBUF} PROTOBUF_UPDATE_FILES=${PROTOBUF_UPDATE_FILES})") + endif() +@@ -74,15 +94,20 @@ endif() + if(HAVE_PROTOBUF) + list(APPEND CUSTOM_STATUS protobuf) + if(NOT BUILD_PROTOBUF) ++ unset( __location) + if(TARGET "${Protobuf_LIBRARIES}") + get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_RELEASE) + if(NOT __location) + get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION) + endif() +- elseif(Protobuf_LIBRARY) +- set(__location "${Protobuf_LIBRARY}") +- else() +- set(__location "${Protobuf_LIBRARIES}") ++ endif() ++ ++ if(NOT __location) ++ if(Protobuf_LIBRARY) ++ set(__location "${Protobuf_LIBRARY}") ++ else() ++ set(__location "${Protobuf_LIBRARIES}") ++ endif() + endif() + endif() + list(APPEND CUSTOM_STATUS_protobuf " Protobuf:" +diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt +index 804b78ead2..9fcc460909 100644 +--- a/modules/dnn/CMakeLists.txt ++++ b/modules/dnn/CMakeLists.txt +@@ -245,6 +245,12 @@ ocv_create_module(${libs} ${dnn_runtime_libs}) + ocv_add_samples() + ocv_add_accuracy_tests(${dnn_runtime_libs}) + ++if(NOT BUILD_PROTOBUF) ++ if(TARGET opencv_test_dnn) ++ ocv_target_compile_definitions(opencv_test_dnn PRIVATE "OPENCV_DNN_EXTERNAL_PROTOBUF=1") ++ endif() ++endif() ++ + set(perf_path "${CMAKE_CURRENT_LIST_DIR}/perf") + file(GLOB_RECURSE perf_srcs "${perf_path}/*.cpp") + file(GLOB_RECURSE perf_hdrs "${perf_path}/*.hpp" "${perf_path}/*.h") +diff --git a/modules/dnn/test/test_layers.cpp b/modules/dnn/test/test_layers.cpp +index 763d94b99c..6cb6d54b3f 100644 +--- a/modules/dnn/test/test_layers.cpp ++++ b/modules/dnn/test/test_layers.cpp +@@ -756,11 +756,15 @@ TEST_F(Layer_RNN_Test, get_set_test) + + TEST_P(Test_Caffe_layers, Accum) + { ++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF ++ throw SkipTestException("Requires patched protobuf"); ++#else + if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU) + applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL, CV_TEST_TAG_DNN_SKIP_OPENCL_FP16); + + testLayerUsingCaffeModels("accum", false, false, 0.0, 0.0, 2); + testLayerUsingCaffeModels("accum_ref", false, false, 0.0, 0.0, 2); ++#endif + } + + TEST_P(Test_Caffe_layers, FlowWarp) +@@ -780,27 +784,39 @@ TEST_P(Test_Caffe_layers, ChannelNorm) + + TEST_P(Test_Caffe_layers, DataAugmentation) + { ++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF ++ throw SkipTestException("Requires patched protobuf"); ++#else + if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) + applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL_FP16); + testLayerUsingCaffeModels("data_augmentation", true, false); + testLayerUsingCaffeModels("data_augmentation_2x1", true, false); + testLayerUsingCaffeModels("data_augmentation_8x6", true, false); ++#endif + } + + TEST_P(Test_Caffe_layers, Resample) + { ++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF ++ throw SkipTestException("Requires patched protobuf"); ++#else + if (backend != DNN_BACKEND_OPENCV) + applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); + testLayerUsingCaffeModels("nearest_2inps", false, false, 0.0, 0.0, 2); + testLayerUsingCaffeModels("nearest", false, false); ++#endif + } + + TEST_P(Test_Caffe_layers, Correlation) + { ++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF ++ throw SkipTestException("Requires patched protobuf"); ++#else + if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) + applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, + CV_TEST_TAG_DNN_SKIP_OPENCL, CV_TEST_TAG_DNN_SKIP_OPENCL_FP16); + testLayerUsingCaffeModels("correlation", false, false, 0.0, 0.0, 2); ++#endif + } + + TEST_P(Test_Caffe_layers, Convolution2Inputs) +@@ -1641,12 +1657,11 @@ private: + int outWidth, outHeight, zoomFactor; + }; + +-#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF + TEST_P(Test_Caffe_layers, Interp) +-#else +-TEST_P(Test_Caffe_layers, DISABLED_Interp) // requires patched protobuf (available in OpenCV source tree only) +-#endif + { ++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF ++ throw SkipTestException("Requires patched protobuf"); ++#else + #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021030000) + if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD) + applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); // exception +@@ -1670,6 +1685,7 @@ TEST_P(Test_Caffe_layers, DISABLED_Interp) // requires patched protobuf (availa + + // Test an implemented layer. + testLayerUsingCaffeModels("layer_interp", false, false); ++#endif + } + + INSTANTIATE_TEST_CASE_P(/*nothing*/, Test_Caffe_layers, dnnBackendsAndTargets()); +-- +2.43.0 + diff --git a/opencv.spec b/opencv.spec index b968fc2..f70f8f5 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ Version: 4.8.1 %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: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -97,6 +97,10 @@ Source5: xorg.conf 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 +# Backport support for protobuf v22 and later from opencv 4.9.0 +# https://github.com/opencv/opencv/commit/6e4280ea81b59c6dca45bb9801b758377beead55 +# Rebased on 4.8.1 +Patch1: opencv-4.8.1-protobuf-v22.patch Patch3: opencv.python.patch Patch4: numpy.distutils_removal.patch @@ -386,6 +390,7 @@ shopt -u extglob popd &>/dev/null %patch -P 0 -p1 -b .install_3rdparty_licenses +%patch -P 1 -p1 -b .protobuf-v22 %patch -P 3 -p1 -b .python_install_binary %patch -P 4 -p1 -b .numpy.distutils_removal @@ -563,6 +568,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Thu Jan 11 2024 Benjamin A. Beasley - 4.8.1-4 +- Backport support for protobuf v22 and later from opencv 4.9.0 + * Thu Nov 16 2023 Sandro Mani - 4.8.1-3 - Rebuild (gdal) From 8a7b9073531eb9da676d0bb95a075cc8fb45a870 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 17 Jan 2024 23:23:24 +0000 Subject: [PATCH 191/274] Rebuilt for TBB 2021.11 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index f70f8f5..ad420bd 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ Version: 4.8.1 %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: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -568,6 +568,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Wed Jan 17 2024 Jonathan Wakely - 4.8.1-5 +- Rebuilt for TBB 2021.11 + * Thu Jan 11 2024 Benjamin A. Beasley - 4.8.1-4 - Backport support for protobuf v22 and later from opencv 4.9.0 From 53aa1a34a46c5250cb21fa240f09966051652919 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 11:10:08 +0000 Subject: [PATCH 192/274] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index ad420bd..06f7cd8 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ Version: 4.8.1 %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: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -568,6 +568,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 4.8.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jan 17 2024 Jonathan Wakely - 4.8.1-5 - Rebuilt for TBB 2021.11 From 057fbf10b86050ecb647cfa566d8b24e4c32170e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 11:14:46 +0000 Subject: [PATCH 193/274] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 06f7cd8..5190122 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ Version: 4.8.1 %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: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -568,6 +568,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 4.8.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 4.8.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 56850342e36ba66933c3c10b38a86bffc90d7781 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sun, 28 Jan 2024 11:33:36 +0100 Subject: [PATCH 194/274] Rebuild (tesseract) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 5190122..64c8325 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ Version: 4.8.1 %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: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -568,6 +568,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Sun Jan 28 2024 Sandro Mani - 4.8.1-8 +- Rebuild (tesseract) + * Thu Jan 25 2024 Fedora Release Engineering - 4.8.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From c09c027f31b98dfebacab81c30e137cace5fe48e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 20 Jan 2024 23:44:17 +0000 Subject: [PATCH 195/274] Remove unused patch --- opencv-4.1.2-includes.patch | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 opencv-4.1.2-includes.patch diff --git a/opencv-4.1.2-includes.patch b/opencv-4.1.2-includes.patch deleted file mode 100644 index e69588c..0000000 --- a/opencv-4.1.2-includes.patch +++ /dev/null @@ -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 From 5bfb0d052e8f55cf4b8e371737827c4c284ec161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 20 Jan 2024 23:46:19 +0000 Subject: [PATCH 196/274] 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 --- .gitignore | 1 + numpy.distutils_removal.patch | 11 -- opencv-4.8.1-protobuf-v22.patch | 204 -------------------------------- opencv-clean.sh | 2 +- opencv.spec | 40 ++++--- sources | 6 +- 6 files changed, 28 insertions(+), 236 deletions(-) delete mode 100644 numpy.distutils_removal.patch delete mode 100644 opencv-4.8.1-protobuf-v22.patch diff --git a/.gitignore b/.gitignore index 0d40f7e..248de94 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ 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 diff --git a/numpy.distutils_removal.patch b/numpy.distutils_removal.patch deleted file mode 100644 index 400651d..0000000 --- a/numpy.distutils_removal.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./cmake/OpenCVDetectPython.cmake.orig 2023-09-30 01:44:54.597603701 +0100 -+++ ./cmake/OpenCVDetectPython.cmake 2023-09-30 01:53:48.924119387 +0100 -@@ -216,7 +216,7 @@ if(NOT ${found}) - message(STATUS " PYTHON3_NUMPY_INCLUDE_DIRS") - else() - # Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy -- execute_process(COMMAND "${_executable}" -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print(os.pathsep.join(numpy.distutils.misc_util.get_numpy_include_dirs()))" -+ execute_process(COMMAND "${_executable}" -c "import numpy; print(numpy.get_include())" - RESULT_VARIABLE _numpy_process - OUTPUT_VARIABLE _numpy_include_dirs - OUTPUT_STRIP_TRAILING_WHITESPACE) diff --git a/opencv-4.8.1-protobuf-v22.patch b/opencv-4.8.1-protobuf-v22.patch deleted file mode 100644 index 1873ada..0000000 --- a/opencv-4.8.1-protobuf-v22.patch +++ /dev/null @@ -1,204 +0,0 @@ -From c205e36bf9d74d35021c68afe3c692f0d3678f77 Mon Sep 17 00:00:00 2001 -From: Kumataro -Date: Thu, 19 Oct 2023 14:45:08 +0900 -Subject: [PATCH] Merge pull request #24372 from Kumataro:fix24369 - -Supporting protobuf v22 and later(with abseil-cpp/C++17) #24372 - -fix https://github.com/opencv/opencv/issues/24369 -related https://github.com/opencv/opencv/issues/23791 - -1. This patch supports external protobuf v22 and later, it required abseil-cpp and c++17. - Even if the built-in protobuf is upgraded to v22 or later, - the dependency on abseil-cpp and the requirement for C++17 will continue. -2. Some test for caffe required patched protobuf, so this patch disable them. - -This patch is tested by following libraries. -- Protobuf: /usr/local/lib/libprotobuf.so (4.24.4) -- abseil-cpp: YES (20230125) - -See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - -- [x] I agree to contribute to the project under Apache 2 License. -- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV -- [x] The PR is proposed to the proper branch -- [x] There is a reference to the original bug report and related work -- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable - Patch to opencv_extra has the same branch name. -- [x] The feature is well documented and sample code can be built with the project CMake ---- - cmake/OpenCVFindProtobuf.cmake | 35 +++++++++++++++++++++++++++----- - modules/dnn/CMakeLists.txt | 6 ++++++ - modules/dnn/test/test_layers.cpp | 24 ++++++++++++++++++---- - 3 files changed, 56 insertions(+), 9 deletions(-) - -diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake -index 8835347d1d..5b1e17529f 100644 ---- a/cmake/OpenCVFindProtobuf.cmake -+++ b/cmake/OpenCVFindProtobuf.cmake -@@ -30,8 +30,14 @@ if(BUILD_PROTOBUF) - set(Protobuf_LIBRARIES "libprotobuf") - set(HAVE_PROTOBUF TRUE) - else() -+ # we still need this for command PROTOBUF_GENERATE_CPP. -+ set(protobuf_MODULE_COMPATIBLE ON) -+ - unset(Protobuf_VERSION CACHE) -- find_package(Protobuf QUIET) -+ find_package(Protobuf QUIET CONFIG) -+ if(NOT Protobuf_FOUND) -+ find_package(Protobuf QUIET) -+ endif() - - # Backwards compatibility - # Define camel case versions of input variables -@@ -67,6 +73,20 @@ else() - endif() - endif() - -+# See https://github.com/opencv/opencv/issues/24369 -+# In Protocol Buffers v22.0 and later drops C++11 support and depends abseil-cpp. -+# Details: https://protobuf.dev/news/2022-08-03/ -+# And if std::text_view is in abseil-cpp requests C++17 and later. -+ -+if(HAVE_PROTOBUF) -+ if(NOT (Protobuf_VERSION VERSION_LESS 22)) -+ if((CMAKE_CXX_STANDARD EQUAL 98) OR (CMAKE_CXX_STANDARD LESS 17)) -+ message(STATUS "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is too old to support protobuf(${Protobuf_VERSION}) and/or abseil-cpp. Use C++17 or later. Turning HAVE_PROTOBUF off") -+ set(HAVE_PROTOBUF FALSE) -+ endif() -+ endif() -+endif() -+ - if(HAVE_PROTOBUF AND PROTOBUF_UPDATE_FILES AND NOT COMMAND PROTOBUF_GENERATE_CPP) - message(FATAL_ERROR "Can't configure protobuf dependency (BUILD_PROTOBUF=${BUILD_PROTOBUF} PROTOBUF_UPDATE_FILES=${PROTOBUF_UPDATE_FILES})") - endif() -@@ -74,15 +94,20 @@ endif() - if(HAVE_PROTOBUF) - list(APPEND CUSTOM_STATUS protobuf) - if(NOT BUILD_PROTOBUF) -+ unset( __location) - if(TARGET "${Protobuf_LIBRARIES}") - get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_RELEASE) - if(NOT __location) - get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION) - endif() -- elseif(Protobuf_LIBRARY) -- set(__location "${Protobuf_LIBRARY}") -- else() -- set(__location "${Protobuf_LIBRARIES}") -+ endif() -+ -+ if(NOT __location) -+ if(Protobuf_LIBRARY) -+ set(__location "${Protobuf_LIBRARY}") -+ else() -+ set(__location "${Protobuf_LIBRARIES}") -+ endif() - endif() - endif() - list(APPEND CUSTOM_STATUS_protobuf " Protobuf:" -diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt -index 804b78ead2..9fcc460909 100644 ---- a/modules/dnn/CMakeLists.txt -+++ b/modules/dnn/CMakeLists.txt -@@ -245,6 +245,12 @@ ocv_create_module(${libs} ${dnn_runtime_libs}) - ocv_add_samples() - ocv_add_accuracy_tests(${dnn_runtime_libs}) - -+if(NOT BUILD_PROTOBUF) -+ if(TARGET opencv_test_dnn) -+ ocv_target_compile_definitions(opencv_test_dnn PRIVATE "OPENCV_DNN_EXTERNAL_PROTOBUF=1") -+ endif() -+endif() -+ - set(perf_path "${CMAKE_CURRENT_LIST_DIR}/perf") - file(GLOB_RECURSE perf_srcs "${perf_path}/*.cpp") - file(GLOB_RECURSE perf_hdrs "${perf_path}/*.hpp" "${perf_path}/*.h") -diff --git a/modules/dnn/test/test_layers.cpp b/modules/dnn/test/test_layers.cpp -index 763d94b99c..6cb6d54b3f 100644 ---- a/modules/dnn/test/test_layers.cpp -+++ b/modules/dnn/test/test_layers.cpp -@@ -756,11 +756,15 @@ TEST_F(Layer_RNN_Test, get_set_test) - - TEST_P(Test_Caffe_layers, Accum) - { -+#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF -+ throw SkipTestException("Requires patched protobuf"); -+#else - if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU) - applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL, CV_TEST_TAG_DNN_SKIP_OPENCL_FP16); - - testLayerUsingCaffeModels("accum", false, false, 0.0, 0.0, 2); - testLayerUsingCaffeModels("accum_ref", false, false, 0.0, 0.0, 2); -+#endif - } - - TEST_P(Test_Caffe_layers, FlowWarp) -@@ -780,27 +784,39 @@ TEST_P(Test_Caffe_layers, ChannelNorm) - - TEST_P(Test_Caffe_layers, DataAugmentation) - { -+#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF -+ throw SkipTestException("Requires patched protobuf"); -+#else - if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) - applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL_FP16); - testLayerUsingCaffeModels("data_augmentation", true, false); - testLayerUsingCaffeModels("data_augmentation_2x1", true, false); - testLayerUsingCaffeModels("data_augmentation_8x6", true, false); -+#endif - } - - TEST_P(Test_Caffe_layers, Resample) - { -+#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF -+ throw SkipTestException("Requires patched protobuf"); -+#else - if (backend != DNN_BACKEND_OPENCV) - applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); - testLayerUsingCaffeModels("nearest_2inps", false, false, 0.0, 0.0, 2); - testLayerUsingCaffeModels("nearest", false, false); -+#endif - } - - TEST_P(Test_Caffe_layers, Correlation) - { -+#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF -+ throw SkipTestException("Requires patched protobuf"); -+#else - if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) - applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, - CV_TEST_TAG_DNN_SKIP_OPENCL, CV_TEST_TAG_DNN_SKIP_OPENCL_FP16); - testLayerUsingCaffeModels("correlation", false, false, 0.0, 0.0, 2); -+#endif - } - - TEST_P(Test_Caffe_layers, Convolution2Inputs) -@@ -1641,12 +1657,11 @@ private: - int outWidth, outHeight, zoomFactor; - }; - --#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF - TEST_P(Test_Caffe_layers, Interp) --#else --TEST_P(Test_Caffe_layers, DISABLED_Interp) // requires patched protobuf (available in OpenCV source tree only) --#endif - { -+#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF -+ throw SkipTestException("Requires patched protobuf"); -+#else - #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021030000) - if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD) - applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); // exception -@@ -1670,6 +1685,7 @@ TEST_P(Test_Caffe_layers, DISABLED_Interp) // requires patched protobuf (availa - - // Test an implemented layer. - testLayerUsingCaffeModels("layer_interp", false, false); -+#endif - } - - INSTANTIATE_TEST_CASE_P(/*nothing*/, Test_Caffe_layers, dnnBackendsAndTargets()); --- -2.43.0 - diff --git a/opencv-clean.sh b/opencv-clean.sh index e161ddf..df36b0c 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.8.1 +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 diff --git a/opencv.spec b/opencv.spec index 64c8325..cc1fea3 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,6 +1,7 @@ %undefine __cmake_in_source_build %bcond_with tests +%bcond_with compat_openvc_pc %if %{without tests} %bcond_with extras_tests %else @@ -8,7 +9,7 @@ %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 @@ -21,7 +22,7 @@ %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 @@ -64,13 +65,13 @@ %endif Name: opencv -Version: 4.8.1 +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: 8%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -87,9 +88,8 @@ Source1: %{name}_contrib-clean-%{version}.tar.gz 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}) @@ -97,12 +97,7 @@ Source5: xorg.conf 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 -# Backport support for protobuf v22 and later from opencv 4.9.0 -# https://github.com/opencv/opencv/commit/6e4280ea81b59c6dca45bb9801b758377beead55 -# Rebased on 4.8.1 -Patch1: opencv-4.8.1-protobuf-v22.patch Patch3: opencv.python.patch -Patch4: numpy.distutils_removal.patch BuildRequires: gcc-c++ BuildRequires: cmake >= 2.6.3 @@ -148,7 +143,13 @@ 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 @@ -390,9 +391,7 @@ shopt -u extglob popd &>/dev/null %patch -P 0 -p1 -b .install_3rdparty_licenses -%patch -P 1 -p1 -b .protobuf-v22 %patch -P 3 -p1 -b .python_install_binary -%patch -P 4 -p1 -b .numpy.distutils_removal pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv @@ -502,7 +501,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 } @@ -545,7 +544,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %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 @@ -568,6 +567,13 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Sun Jan 28 2024 Sérgio Basto - 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 - 4.8.1-8 - Rebuild (tesseract) diff --git a/sources b/sources index c2c7616..3cdcd78 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (opencv-clean-4.8.1.tar.gz) = d148e05cbe29a6e7b0eec8258b6f0260193ace0fec87c6b61225a36f3432a29d9c86b77018e51b547996db3227b561968e54856063ce7f2e9c47bc72aba7f0fb -SHA512 (opencv_contrib-clean-4.8.1.tar.gz) = cc5badd41b7c23e316d4984accc6373b608df591896827f9289dc511b163618036906c91f872cfa4de1fd3cc53838a6dfd5102e7c1856aa1f67b2c18323677f6 +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 From 0aedf9d8361a6b6a27d9e369d0252518bd0167ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 21 Jan 2024 00:26:25 +0000 Subject: [PATCH 197/274] rhbz#2058802 is fixed, reverting commit d9eb86c --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index cc1fea3..29ba800 100644 --- a/opencv.spec +++ b/opencv.spec @@ -37,7 +37,6 @@ %ifarch x86_64 %bcond_without libmfx -%bcond_without va %else %bcond_with libmfx %endif @@ -52,6 +51,7 @@ %bcond_with java %endif +%bcond_without va %bcond_without vulkan %define _lto_cflags %{nil} From 7cdfc99aae8f0c5a45545ede84de8cedbb410ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 21 Jan 2024 16:48:42 +0000 Subject: [PATCH 198/274] Disable openexr on epel 9 --- opencv.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 29ba800..88e703c 100644 --- a/opencv.spec +++ b/opencv.spec @@ -51,6 +51,12 @@ %bcond_with java %endif +%if 0%{?fedora} +%bcond_without openexr +%else +%bcond_with openexr +%endif + %bcond_without va %bcond_without vulkan @@ -125,10 +131,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 @@ -434,7 +444,8 @@ install -pm 0644 %{S:4} .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} From 8b83a73771528034331c4c39a4190a6a279d767d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 5 Feb 2024 23:22:55 +0000 Subject: [PATCH 199/274] pkgconfig(opencv) instead pkgconfig(opencv4) still is use by packages revert drop compat symlink to opencv.pc --- opencv.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 88e703c..37d14cb 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,7 +1,7 @@ %undefine __cmake_in_source_build %bcond_with tests -%bcond_with compat_openvc_pc +%bcond_without compat_openvc_pc %if %{without tests} %bcond_with extras_tests %else @@ -77,7 +77,7 @@ Version: 4.9.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: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -578,6 +578,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Mon Feb 05 2024 Sérgio Basto - 4.9.0-2 +- Revert drop compat symlink to opencv.pc + * Sun Jan 28 2024 Sérgio Basto - 4.9.0-1 - Update opencv to 4.9.0 (#2256160) - Enable ffmpeg and xine (now they are available on Fedora) From de40c5d7080cda910fa738035625c43b0b733966 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 23 Feb 2024 20:11:46 -0700 Subject: [PATCH 200/274] Rebuild (coin-or-Clp) - Use uppercase connectives in SPDX expression --- opencv.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 37d14cb..5d6774f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,10 +77,10 @@ Version: 4.9.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: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. -License: BSD-3-Clause and Apache-2.0 and ISC +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 @@ -578,6 +578,10 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Fri Feb 23 2024 Jerry James - 4.9.0-3 +- Rebuild (coin-or-Clp) +- Use uppercase connectives in SPDX expression + * Mon Feb 05 2024 Sérgio Basto - 4.9.0-2 - Revert drop compat symlink to opencv.pc From b645eac1f17dd2c587e0ccc4a9cac1aef5d70c30 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 24 Feb 2024 16:38:02 -0700 Subject: [PATCH 201/274] Reduce debuginfo level on i386 to avoid memory exhaustion --- opencv.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 5d6774f..36c537c 100644 --- a/opencv.spec +++ b/opencv.spec @@ -430,6 +430,12 @@ install -pm 0644 %{S:4} .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 \ @@ -499,7 +505,6 @@ install -pm 0644 %{S:4} .cache/ade/ %cmake_build - %install %cmake_install cd %{__cmake_builddir}/python_loader/ @@ -581,6 +586,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope * Fri Feb 23 2024 Jerry James - 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 - 4.9.0-2 - Revert drop compat symlink to opencv.pc From 2a70c4efc0b49a11375d51f3051b831af1ff8c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=98=C3=ADdk=C3=BD?= Date: Tue, 23 Apr 2024 18:05:09 +0200 Subject: [PATCH 202/274] Rebuild for openexr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Josef Řídký --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 36c537c..921802c 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.9.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: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -583,6 +583,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Tue Apr 23 2024 Josef Ridky - 4.9.0-4 +- Rebuild for openexr + * Fri Feb 23 2024 Jerry James - 4.9.0-3 - Rebuild (coin-or-Clp) - Use uppercase connectives in SPDX expression From f847cf88b627dfde299cfbc325bba20921978c2f Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 14 May 2024 15:34:02 +0200 Subject: [PATCH 203/274] Rebuild (gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 921802c..87647e9 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.9.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: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -583,6 +583,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Tue May 14 2024 Sandro Mani - 4.9.0-5 +- Rebuild (gdal) + * Tue Apr 23 2024 Josef Ridky - 4.9.0-4 - Rebuild for openexr From 2d768a9399aaa415627ba8919ae4f82c3fb98ee1 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Sun, 9 Jun 2024 12:52:58 +0200 Subject: [PATCH 204/274] Rebuilt for Python 3.13 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 87647e9..3f0870a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.9.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: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -583,6 +583,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Sun Jun 09 2024 Python Maint - 4.9.0-6 +- Rebuilt for Python 3.13 + * Tue May 14 2024 Sandro Mani - 4.9.0-5 - Rebuild (gdal) From 1aa91ebd24e8e16bf8d48ab6c3cc3063409e0310 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 13 Jun 2024 22:39:54 +0200 Subject: [PATCH 205/274] Rebuild for tesseract-5.4.1 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 3f0870a..3ed7d98 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.9.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: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -583,6 +583,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Thu Jun 13 2024 Sandro Mani - 4.9.0-7 +- Rebuild for tesseract-5.4.1 + * Sun Jun 09 2024 Python Maint - 4.9.0-6 - Rebuilt for Python 3.13 From 78539926814d114371c750afc397a38beda93336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 6 Jun 2024 16:43:58 +0100 Subject: [PATCH 206/274] Fix changelog --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 3ed7d98..6e2e3f9 100644 --- a/opencv.spec +++ b/opencv.spec @@ -601,7 +601,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope - Reduce debuginfo level on i386 to avoid memory exhaustion * Mon Feb 05 2024 Sérgio Basto - 4.9.0-2 -- Revert drop compat symlink to opencv.pc +- Revert "drop compat symlink to opencv.pc" * Sun Jan 28 2024 Sérgio Basto - 4.9.0-1 - Update opencv to 4.9.0 (#2256160) From 1d07ea89c27bfd61c32f814562be28266ab685f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 6 Jun 2024 16:45:37 +0100 Subject: [PATCH 207/274] Revert "Reduce debuginfo level on i386 to avoid memory exhaustion" This reverts commit b645eac1f17dd2c587e0ccc4a9cac1aef5d70c30. --- opencv.spec | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/opencv.spec b/opencv.spec index 6e2e3f9..aa9ae3f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -430,12 +430,6 @@ install -pm 0644 %{S:4} .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 \ @@ -505,6 +499,7 @@ export CXXFLAGS='%{build_cxxflags} -g1' %cmake_build + %install %cmake_install cd %{__cmake_builddir}/python_loader/ @@ -598,7 +593,6 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope * Fri Feb 23 2024 Jerry James - 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 - 4.9.0-2 - Revert "drop compat symlink to opencv.pc" From 25d00479246399cd6e036012e88eeebe63b09e78 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 20:49:40 +0000 Subject: [PATCH 208/274] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index aa9ae3f..7dd9083 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.9.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: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -578,6 +578,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 4.9.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jun 13 2024 Sandro Mani - 4.9.0-7 - Rebuild for tesseract-5.4.1 From d2149476c25aabda9bdc04cd3b72468b35ac0ef9 Mon Sep 17 00:00:00 2001 From: Laura Barcziova Date: Thu, 6 Jun 2024 14:04:05 +0200 Subject: [PATCH 209/274] Configure Packit for release automation See details in https://packit.dev/docs/fedora-releases-guide/dist-git-onboarding --- .packit.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .packit.yaml diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..53d233b --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,17 @@ +# See the documentation for more information: +# https://packit.dev/docs/configuration/ + +upstream_project_url: https://github.com/opencv/opencv + +# run opencv-clean.sh +# the sed currently hacks the script so that the version is correctly set and the sources upload is handled by Packit +actions: + pre-sync: + - bash -c "cd ${PACKIT_DOWNSTREAM_REPO}; sed '3d;$d' ./opencv-clean.sh | VERSION=${PACKIT_PROJECT_VERSION} bash" + +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + - fedora-rawhide + From f24d288f01d1754b64ec1d498f639dfd7c426c9a Mon Sep 17 00:00:00 2001 From: Packit Date: Thu, 6 Jun 2024 12:22:25 +0000 Subject: [PATCH 210/274] Update to 4.10.0 upstream release - Resolves: rhbz#2290312 Upstream tag: 4.10.0 Upstream commit: 71d3237a Commit authored by Packit automation (https://packit.dev/) --- README.packit | 3 +++ opencv.spec | 9 +++++++-- sources | 7 ++++--- 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 README.packit diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..d2b528d --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 0.97.1.post1.dev6+gc8c0314a. diff --git a/opencv.spec b/opencv.spec index 7dd9083..a96ff66 100644 --- a/opencv.spec +++ b/opencv.spec @@ -71,13 +71,13 @@ %endif Name: opencv -Version: 4.9.0 +Version: 4.10.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: 8%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -326,6 +326,7 @@ This package contains the OpenCV %{moduledesc} module runtime.\ %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 signal -d %{quote:Signal processing algorithms} %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} @@ -578,6 +579,10 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Thu Jul 25 2024 Packit - 4.10.0-1 +- Update to version 4.10.0 +- Resolves: rhbz#2290312 + * Thu Jul 18 2024 Fedora Release Engineering - 4.9.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index 3cdcd78..bd0466e 100644 --- a/sources +++ b/sources @@ -1,5 +1,6 @@ -SHA512 (opencv-clean-4.9.0.tar.gz) = 534d9c8bf9759008fd409f6c2c298d33aaf56a080229dccfaec98a789e4c309fc7872d85289f5c0a685f044f6c477f7c890a6788c35bc2f0aa795ec4f33b0ef6 -SHA512 (opencv_contrib-clean-4.9.0.tar.gz) = 595cb9bb5f1a57be883d7ccf448221bfad2c055a930a12f9658489d4a850be5b3f9e3ecd3949f45a183ccc4b8a62620af5d148039b4139c07d408fc3c789f076 +SHA512 (opencv-clean-4.10.0.tar.gz) = 0fc8c4f870bcc67bd70bb1d438afe62a4e0874a9e6af364fd0cf08648c6110469fb7d433d561b12f3cae88bcc7b74d2680ffb0364a028a90918fb1d9542f544a +SHA512 (wechat-20230712.git3487ef7.tar.gz) = bc4f220465de41df8af0cb35312c1db155976d05f13a60e43c1798b161d8f56388e34a59108fb3e27e8c97b53acfd198256d9ae420b5f70a32ddc1ea65c3c8a6 +SHA512 (opencv_contrib-clean-4.10.0.tar.gz) = 382a08b4c4be6ad2f2c0f682a169c119e6be4d04b57973fd85daf16cf0cd78dc55a64729c7efbd39b41711ef3dd354e7f323c384c5a5d39d8c1d9f42c9eedbe5 +SHA512 (opencv_extra-clean-4.10.0.tar.gz) = 8c61246ae773e50bb3080f732aaac8a1fb762e81a0f8abdf0987377a92d97ecfcbe99c3a1058ed313008c039b269e65646463f82b347e3a546f32dd4c8fed903 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (dbb095a8bf3008e91edbbf45d8d34885-v0.1.2d.zip) = f6f87be8932c0c0ca40bec20b750ab3df27dac44f4507211c29c60f42160e3f2f2133b52c18245eff5241f216a3f5526d299937470b69b125e8eca369c8f6939 -SHA512 (wechat-20230712.git3487ef7.tar.gz) = bc4f220465de41df8af0cb35312c1db155976d05f13a60e43c1798b161d8f56388e34a59108fb3e27e8c97b53acfd198256d9ae420b5f70a32ddc1ea65c3c8a6 From 852bab1df9f457c6c907ec8e914831053037b374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 25 Jul 2024 23:45:49 +0100 Subject: [PATCH 211/274] Rebuild for opencv 4.10.0 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index a96ff66..b8c867e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.10.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: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -579,6 +579,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Thu Jul 25 2024 Sérgio Basto - 4.10.0-2 +- Rebuild for opencv 4.10.0 + * Thu Jul 25 2024 Packit - 4.10.0-1 - Update to version 4.10.0 - Resolves: rhbz#2290312 From a579e5a20d3694ce2db2de047bbc65a6ffea8b02 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 23 Sep 2024 16:58:05 +0200 Subject: [PATCH 212/274] Rebuild for ffmpeg 7 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index b8c867e..f787969 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.10.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: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -579,6 +579,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Mon Sep 23 2024 Fabio Valentini - 4.10.0-3 +- Rebuild for ffmpeg 7 + * Thu Jul 25 2024 Sérgio Basto - 4.10.0-2 - Rebuild for opencv 4.10.0 From 9ef0ab81a907941206fb9381585334ce77f40ac9 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Wed, 25 Sep 2024 17:49:06 -0500 Subject: [PATCH 213/274] Rebuild for tesseract-5.4.1-3 (soversion change from 5.4.1 to just 5.4) Signed-off-by: Michel Lind --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index f787969..fc864da 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.10.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: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -579,6 +579,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Wed Sep 25 2024 Michel Lind - 4.10.0-4 +- Rebuild for tesseract-5.4.1-3 (soversion change from 5.4.1 to just 5.4) + * Mon Sep 23 2024 Fabio Valentini - 4.10.0-3 - Rebuild for ffmpeg 7 From 6a5043ef18fd5b6fe52f935edd11e5d93fe8a905 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 25 Oct 2024 17:29:19 -0600 Subject: [PATCH 214/274] Rebuild for hdf5 1.14.5 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index fc864da..af4023d 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.10.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: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -579,6 +579,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Fri Oct 25 2024 Orion Poplawski - 4.10.0-5 +- Rebuild for hdf5 1.14.5 + * Wed Sep 25 2024 Michel Lind - 4.10.0-4 - Rebuild for tesseract-5.4.1-3 (soversion change from 5.4.1 to just 5.4) From a3c44bd8be67aece4bea6d66d214bb722aabb4cf Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sat, 9 Nov 2024 08:48:16 +0100 Subject: [PATCH 215/274] Rebuild (gdal) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index af4023d..8e4d4c0 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.10.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: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -579,6 +579,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Sat Nov 09 2024 Sandro Mani - 4.10.0-6 +- Rebuild (gdal) + * Fri Oct 25 2024 Orion Poplawski - 4.10.0-5 - Rebuild for hdf5 1.14.5 From 8f568893e69ef4eb026a5c078233dd4f83f08e02 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sat, 9 Nov 2024 10:59:22 +0100 Subject: [PATCH 216/274] BR: oneVPL-devel -> libvpl-devel --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 8e4d4c0..8785eec 100644 --- a/opencv.spec +++ b/opencv.spec @@ -208,7 +208,7 @@ BuildRequires: blas-devel BuildRequires: lapack-devel } %{?with_gdcm:BuildRequires: gdcm-devel} -%{?with_libmfx:BuildRequires: oneVPL-devel} +%{?with_libmfx:BuildRequires: libvpl-devel} %{?with_clp:BuildRequires: coin-or-Clp-devel} %{?with_va:BuildRequires: libva-devel} %{?with_java: From b6c11e05aa085893a46074ea70f75b649d16ac02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 9 Nov 2024 18:29:17 +0000 Subject: [PATCH 217/274] Avoid src.rpm have more 500 Megas with extra (tests) that we don't use --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 8785eec..154c70f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -91,7 +91,7 @@ URL: https://opencv.org Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz %{?with_extras_tests: -Source2: %{name}_extra-clean-%{version}.tar.gz +#Source2: %{name}_extra-clean-%{version}.tar.gz } Source3: face_landmark_model.dat.xz # SRC=v0.1.2d.zip ; wget https://github.com/opencv/ade/archive/$SRC; mv $SRC $(md5sum $SRC | cut -d' ' -f1)-$SRC From 3de81f0356404ab5a2abe11bc0cbff70d428e2a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 9 Nov 2024 18:33:51 +0000 Subject: [PATCH 218/274] Adjust bconds for epel10 initial build --- opencv.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/opencv.spec b/opencv.spec index 154c70f..b649708 100644 --- a/opencv.spec +++ b/opencv.spec @@ -9,7 +9,11 @@ %endif # linters are enabled by default if BUILD_DOCS OR BUILD_EXAMPLES %bcond_with linters +%if 0%{?rhel} >= 10 +%bcond_with ffmpeg +%else %bcond_without ffmpeg +%endif %bcond_without gstreamer %bcond_with eigen2 %bcond_without eigen3 @@ -22,7 +26,11 @@ %endif %bcond_without tbb %bcond_with cuda +%if 0%{?rhel} >= 10 +%bcond_with xine +%else %bcond_without xine +%endif # 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 From 2c623cae488fefe13b667223653889a89302438c Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 12 Nov 2024 09:18:26 +0100 Subject: [PATCH 219/274] Rebuild (tesseract) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index b649708..634361b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -85,7 +85,7 @@ Version: 4.10.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: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -587,6 +587,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Tue Nov 12 2024 Sandro Mani - 4.10.0-7 +- Rebuild (tesseract) + * Sat Nov 09 2024 Sandro Mani - 4.10.0-6 - Rebuild (gdal) From 630c79d7df3edba96dbb72d0a9abd59fdf04faa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Tue, 12 Nov 2024 13:36:54 +0000 Subject: [PATCH 220/274] epel10 now have ffmpeg and xine --- opencv.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/opencv.spec b/opencv.spec index 634361b..1309be3 100644 --- a/opencv.spec +++ b/opencv.spec @@ -9,11 +9,7 @@ %endif # linters are enabled by default if BUILD_DOCS OR BUILD_EXAMPLES %bcond_with linters -%if 0%{?rhel} >= 10 -%bcond_with ffmpeg -%else %bcond_without ffmpeg -%endif %bcond_without gstreamer %bcond_with eigen2 %bcond_without eigen3 @@ -26,11 +22,7 @@ %endif %bcond_without tbb %bcond_with cuda -%if 0%{?rhel} >= 10 -%bcond_with xine -%else %bcond_without xine -%endif # 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 From 0b8a44ecd00c96e4817b302b26489f4d236eb847 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 22 Dec 2024 18:08:16 -0700 Subject: [PATCH 221/274] Rebuild with numpy 2.x (rhbz#2333781) --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 1309be3..04b27e7 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.10.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: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -579,6 +579,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Mon Dec 23 2024 Orion Poplawski - 4.10.0-8 +- Rebuild with numpy 2.x (rhbz#2333781) + * Tue Nov 12 2024 Sandro Mani - 4.10.0-7 - Rebuild (tesseract) From cdde9111a945c99823664d8e05506157109d669a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 9 Jan 2025 00:09:14 +0000 Subject: [PATCH 222/274] Try to fix packit automation --- .packit.yaml | 5 +---- opencv-clean.sh | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index 53d233b..77d916c 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -1,17 +1,14 @@ # See the documentation for more information: # https://packit.dev/docs/configuration/ -upstream_project_url: https://github.com/opencv/opencv - # run opencv-clean.sh # the sed currently hacks the script so that the version is correctly set and the sources upload is handled by Packit actions: pre-sync: - - bash -c "cd ${PACKIT_DOWNSTREAM_REPO}; sed '3d;$d' ./opencv-clean.sh | VERSION=${PACKIT_PROJECT_VERSION} bash" + - bash -c "cd ${PACKIT_DOWNSTREAM_REPO}; ./opencv-clean.sh ${PACKIT_PROJECT_VERSION}" jobs: - job: pull_from_upstream trigger: release dist_git_branches: - fedora-rawhide - diff --git a/opencv-clean.sh b/opencv-clean.sh index df36b0c..a8ebfca 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.9.0 +VERSION=$1 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 From 6b02736ca19889594944ed627d0259bd89ae120d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 9 Jan 2025 00:42:18 +0000 Subject: [PATCH 223/274] [packit] use action create-archive instead pre-sync --- .packit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.packit.yaml b/.packit.yaml index 77d916c..9f78981 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -4,7 +4,7 @@ # run opencv-clean.sh # the sed currently hacks the script so that the version is correctly set and the sources upload is handled by Packit actions: - pre-sync: + create-archive: - bash -c "cd ${PACKIT_DOWNSTREAM_REPO}; ./opencv-clean.sh ${PACKIT_PROJECT_VERSION}" jobs: From 30cfb1b6551f62c29acf041dcbe0d73d90ae40fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 9 Jan 2025 01:01:38 +0000 Subject: [PATCH 224/274] [packit] try to use prepare-files instead --- .packit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.packit.yaml b/.packit.yaml index 9f78981..90b736b 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -4,7 +4,7 @@ # run opencv-clean.sh # the sed currently hacks the script so that the version is correctly set and the sources upload is handled by Packit actions: - create-archive: + prepare-files: - bash -c "cd ${PACKIT_DOWNSTREAM_REPO}; ./opencv-clean.sh ${PACKIT_PROJECT_VERSION}" jobs: From 7ac87dc3ab8432bc587213f76d9397593619716a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 9 Jan 2025 01:38:11 +0000 Subject: [PATCH 225/274] [packit] back to create-archive and in last step print the files generated --- .packit.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.packit.yaml b/.packit.yaml index 90b736b..1c85005 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -4,8 +4,9 @@ # run opencv-clean.sh # the sed currently hacks the script so that the version is correctly set and the sources upload is handled by Packit actions: - prepare-files: + create-archive: - bash -c "cd ${PACKIT_DOWNSTREAM_REPO}; ./opencv-clean.sh ${PACKIT_PROJECT_VERSION}" + - bash -c "ls -1 ./opencv*clean-${PACKIT_PROJECT_VERSION}.tar.gz" jobs: - job: pull_from_upstream From 08442e3b732d8268977545e5d5b88f8ab745f0eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 9 Jan 2025 13:45:50 +0000 Subject: [PATCH 226/274] Rollback and use files_to_sync as packit team suggested --- .packit.yaml | 10 +++++++--- opencv-clean.sh | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index 1c85005..85e1cb2 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -4,9 +4,13 @@ # run opencv-clean.sh # the sed currently hacks the script so that the version is correctly set and the sources upload is handled by Packit actions: - create-archive: - - bash -c "cd ${PACKIT_DOWNSTREAM_REPO}; ./opencv-clean.sh ${PACKIT_PROJECT_VERSION}" - - bash -c "ls -1 ./opencv*clean-${PACKIT_PROJECT_VERSION}.tar.gz" + pre-sync: + - bash -c "${PACKIT_DOWNSTREAM_REPO}/opencv-clean.sh ${PACKIT_PROJECT_VERSION}" + +files_to_sync: + - src: + - "opencv*clean-*.tar.gz" + dest: . jobs: - job: pull_from_upstream diff --git a/opencv-clean.sh b/opencv-clean.sh index a8ebfca..4c44f46 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -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 | sed 's/.*: //;s/.*\///') +#echo fedpkg new-sources $(spectool -l --sources opencv.spec | sed 's/.*: //;s/.*\///') From 687d8483386a8710640f335cae53121a960ecd6d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 21:38:40 +0000 Subject: [PATCH 227/274] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 04b27e7..5a69999 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,7 @@ Version: 4.10.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: 8%{?dist} +Release: 9%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -579,6 +579,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 4.10.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Mon Dec 23 2024 Orion Poplawski - 4.10.0-8 - Rebuild with numpy 2.x (rhbz#2333781) From 392683e0c64c19b94346d165f883e1bdcdf44f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 17 Jan 2025 13:15:30 +0000 Subject: [PATCH 228/274] Add upstream patch to fix build on PPC64LE with GCC 15 --- 26786.patch | 35 +++++++++++++++++++++++++++++++++++ opencv.spec | 3 +++ 2 files changed, 38 insertions(+) create mode 100644 26786.patch diff --git a/26786.patch b/26786.patch new file mode 100644 index 0000000..3ae3d3e --- /dev/null +++ b/26786.patch @@ -0,0 +1,35 @@ +From 63ef786a3a0afcd44bf842f967656052d52dde09 Mon Sep 17 00:00:00 2001 +From: Maksim Shabunin +Date: Thu, 16 Jan 2025 23:48:29 +0300 +Subject: [PATCH] core: fixed VSX build with GCC 15 + +--- + modules/core/include/opencv2/core/vsx_utils.hpp | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/modules/core/include/opencv2/core/vsx_utils.hpp b/modules/core/include/opencv2/core/vsx_utils.hpp +index 79a1074d59ff..4d5a694bae8e 100644 +--- a/modules/core/include/opencv2/core/vsx_utils.hpp ++++ b/modules/core/include/opencv2/core/vsx_utils.hpp +@@ -257,8 +257,8 @@ VSX_IMPL_1VRG(vec_udword2, vec_udword2, vpopcntd, vec_popcntu) + VSX_IMPL_1VRG(vec_udword2, vec_dword2, vpopcntd, vec_popcntu) + + // converts between single and double-precision +-VSX_REDIRECT_1RG(vec_float4, vec_double2, vec_cvfo, __builtin_vsx_xvcvdpsp) +-VSX_REDIRECT_1RG(vec_double2, vec_float4, vec_cvfo, __builtin_vsx_xvcvspdp) ++VSX_REDIRECT_1RG(vec_float4, vec_double2, vec_cvfo, vec_floate) ++VSX_REDIRECT_1RG(vec_double2, vec_float4, vec_cvfo, vec_doubleo) + + // converts word and doubleword to double-precision + #undef vec_ctd +@@ -399,10 +399,6 @@ VSX_REDIRECT_1RG(vec_ushort8, vec_ushort8, vec_popcntu, vec_popcnt) + VSX_REDIRECT_1RG(vec_uint4, vec_uint4, vec_popcntu, vec_popcnt) + VSX_REDIRECT_1RG(vec_udword2, vec_udword2, vec_popcntu, vec_popcnt) + +-// converts between single and double precision +-VSX_REDIRECT_1RG(vec_float4, vec_double2, vec_cvfo, __builtin_vsx_xvcvdpsp) +-VSX_REDIRECT_1RG(vec_double2, vec_float4, vec_cvfo, __builtin_vsx_xvcvspdp) +- + // converts word and doubleword to double-precision + #ifdef vec_ctd + # undef vec_ctd diff --git a/opencv.spec b/opencv.spec index 5a69999..294588f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -104,6 +104,7 @@ Source6: https://github.com/WeChatCV/opencv_3rdparty/archive/%{wechat_com Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch3: opencv.python.patch +Patch5: https://github.com/opencv/opencv/pull/26786.patch BuildRequires: gcc-c++ BuildRequires: cmake >= 2.6.3 @@ -403,6 +404,7 @@ popd &>/dev/null %patch -P 0 -p1 -b .install_3rdparty_licenses %patch -P 3 -p1 -b .python_install_binary +%patch -P 5 -p1 -b .GCC15 pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv @@ -581,6 +583,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog * Fri Jan 17 2025 Fedora Release Engineering - 4.10.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild +- Add upstream patch to fix build on PPC64LE with GCC 15 * Mon Dec 23 2024 Orion Poplawski - 4.10.0-8 - Rebuild with numpy 2.x (rhbz#2333781) From 234dd7bc9fc984599049f2e69fd1b842248b9f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 3 Feb 2025 00:39:43 +0000 Subject: [PATCH 229/274] Rename condition va to libva because is not easy search by va only --- opencv.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index 294588f..30e52fb 100644 --- a/opencv.spec +++ b/opencv.spec @@ -57,7 +57,7 @@ %bcond_with openexr %endif -%bcond_without va +%bcond_without libva %bcond_without vulkan %define _lto_cflags %{nil} @@ -211,7 +211,7 @@ BuildRequires: lapack-devel %{?with_gdcm:BuildRequires: gdcm-devel} %{?with_libmfx:BuildRequires: libvpl-devel} %{?with_clp:BuildRequires: coin-or-Clp-devel} -%{?with_va:BuildRequires: libva-devel} +%{?with_libva:BuildRequires: libva-devel} %{?with_java: BuildRequires: ant BuildRequires: java-devel @@ -496,7 +496,7 @@ install -pm 0644 %{S:4} .cache/ade/ %{?with_gdcm: -DWITH_GDCM=ON } \ %{?with_libmfx: -DWITH_MFX=ON -DWITH_GAPI_ONEVPL=ON} \ %{?with_clp: -DWITH_CLP=ON } \ - %{?with_va: -DWITH_VA=ON } \ + %{?with_libva: -DWITH_VA=ON } \ %{!?with_vtk: -DWITH_VTK=OFF} \ %{?with_vulkan: -DWITH_VULKAN=ON -DVULKAN_INCLUDE_DIRS=%{_includedir}/vulkan } From 74ecc5eff27e0265438ab8677dc9e8630feccf8e Mon Sep 17 00:00:00 2001 From: Packit Date: Thu, 9 Jan 2025 15:07:16 +0000 Subject: [PATCH 230/274] Update to 4.11.0 upstream release - Resolves: rhbz#2336422 --- .gitignore | 1 + README.packit | 2 +- opencv.spec | 10 +++++++--- sources | 7 +++---- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 248de94..737beee 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ face_landmark_model.dat.xz /fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip /wechat-20230712.git3487ef7.tar.gz /dbb095a8bf3008e91edbbf45d8d34885-v0.1.2d.zip +/962ce79e0b95591f226431f7b5f152cd-v0.1.2e.zip diff --git a/README.packit b/README.packit index d2b528d..8c905b9 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.97.1.post1.dev6+gc8c0314a. +The file was generated using packit 0.106.0.post1.dev8+g521f1e1d. diff --git a/opencv.spec b/opencv.spec index 30e52fb..b750630 100644 --- a/opencv.spec +++ b/opencv.spec @@ -71,13 +71,13 @@ %endif Name: opencv -Version: 4.10.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: 9%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -95,7 +95,7 @@ Source1: %{name}_contrib-clean-%{version}.tar.gz } Source3: face_landmark_model.dat.xz # 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 +Source4: 962ce79e0b95591f226431f7b5f152cd-v0.1.2e.zip Source5: xorg.conf %global wechat_commit 3487ef7cde71d93c6a01bb0b84aa0f22c6128f6b %global wechat_shortcommit %(c=%{wechat_commit}; echo ${c:0:7}) @@ -581,6 +581,10 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Mon Feb 03 2025 Sérgio Basto 4.11.0-1 +- Update to version 4.11.0 +- Resolves: rhbz#2336422 + * Fri Jan 17 2025 Fedora Release Engineering - 4.10.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - Add upstream patch to fix build on PPC64LE with GCC 15 diff --git a/sources b/sources index bd0466e..d27f031 100644 --- a/sources +++ b/sources @@ -1,6 +1,5 @@ -SHA512 (opencv-clean-4.10.0.tar.gz) = 0fc8c4f870bcc67bd70bb1d438afe62a4e0874a9e6af364fd0cf08648c6110469fb7d433d561b12f3cae88bcc7b74d2680ffb0364a028a90918fb1d9542f544a +SHA512 (opencv-clean-4.11.0.tar.gz) = 276f83a3cc3c7cecb626e3867655415198c204b1e8199b1aff2f8ee2d7995f53e9e1f44589d1ae77fb494b6ab064a1e1c5127f998137a562514767e62e4c6497 SHA512 (wechat-20230712.git3487ef7.tar.gz) = bc4f220465de41df8af0cb35312c1db155976d05f13a60e43c1798b161d8f56388e34a59108fb3e27e8c97b53acfd198256d9ae420b5f70a32ddc1ea65c3c8a6 -SHA512 (opencv_contrib-clean-4.10.0.tar.gz) = 382a08b4c4be6ad2f2c0f682a169c119e6be4d04b57973fd85daf16cf0cd78dc55a64729c7efbd39b41711ef3dd354e7f323c384c5a5d39d8c1d9f42c9eedbe5 -SHA512 (opencv_extra-clean-4.10.0.tar.gz) = 8c61246ae773e50bb3080f732aaac8a1fb762e81a0f8abdf0987377a92d97ecfcbe99c3a1058ed313008c039b269e65646463f82b347e3a546f32dd4c8fed903 +SHA512 (opencv_contrib-clean-4.11.0.tar.gz) = 1e10e8b9a5fd9069c0851d7838716196349fcf4f0db7eafd4a86bd536f4224d88f97bd740ecaa317daa3b5784d3273fb31ac90bb8c64448086eac85a9faaad5d SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 -SHA512 (dbb095a8bf3008e91edbbf45d8d34885-v0.1.2d.zip) = f6f87be8932c0c0ca40bec20b750ab3df27dac44f4507211c29c60f42160e3f2f2133b52c18245eff5241f216a3f5526d299937470b69b125e8eca369c8f6939 +SHA512 (962ce79e0b95591f226431f7b5f152cd-v0.1.2e.zip) = 87c65716498ca2e4f64fb9a1f78f7e5c48fffff5fc6735027edfb7d7ccc0d9f5b01c85f4b956ddc7e1c35c69ee2513d48a7da91764c2fd01d073ee5a1fc90c6f From 3219158b47483cdbd1fdd82aff03380f67fc882b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 10 Jan 2025 18:12:14 +0000 Subject: [PATCH 231/274] Add upstream patch to fix build on PPC64LE https://github.com/opencv/opencv/pull/26750 core: fixed VSX intrinsics implementation --- 26750.patch | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ opencv.spec | 3 +++ 2 files changed, 57 insertions(+) create mode 100644 26750.patch diff --git a/26750.patch b/26750.patch new file mode 100644 index 0000000..4a2fdc0 --- /dev/null +++ b/26750.patch @@ -0,0 +1,54 @@ +From 97f3f390661f2fd1168336820b89eb4383ce8528 Mon Sep 17 00:00:00 2001 +From: Maksim Shabunin +Date: Fri, 10 Jan 2025 18:34:11 +0300 +Subject: [PATCH] core: fixed VSX intrinsics implementation + +--- + modules/core/include/opencv2/core/hal/intrin_vsx.hpp | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp +index 2157e1e87063..0a0915a22fc4 100644 +--- a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp ++++ b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp +@@ -262,7 +262,7 @@ OPENCV_HAL_IMPL_VSX_EXTRACT_N(v_float64x2, double) + inline _Tpvec v_setzero_##suffix() { return _Tpvec(vec_splats((_Tp)0)); } \ + inline _Tpvec v_setall_##suffix(_Tp v) { return _Tpvec(vec_splats((_Tp)v));} \ + template <> inline _Tpvec v_setzero_() { return v_setzero_##suffix(); } \ +-template <> inline _Tpvec v_setall_(_Tp v) { return v_setall_##suffix(_Tp v); } \ ++template <> inline _Tpvec v_setall_(_Tp v) { return v_setall_##suffix(v); } \ + template inline _Tpvec v_reinterpret_as_##suffix(const _Tpvec0 &a) \ + { return _Tpvec((cast)a.val); } + +@@ -650,11 +650,11 @@ OPENCV_HAL_IMPL_VSX_SELECT(v_float64x2, vec_bdword2_c) + #define OPENCV_HAL_IMPL_VSX_INT_CMP_OP(_Tpvec) \ + inline _Tpvec v_eq(const _Tpvec& a, const _Tpvec& b) \ + { return _Tpvec(vec_cmpeq(a.val, b.val)); } \ +-inline _Tpvec V_ne(const _Tpvec& a, const _Tpvec& b) \ ++inline _Tpvec v_ne(const _Tpvec& a, const _Tpvec& b) \ + { return _Tpvec(vec_cmpne(a.val, b.val)); } \ + inline _Tpvec v_lt(const _Tpvec& a, const _Tpvec& b) \ + { return _Tpvec(vec_cmplt(a.val, b.val)); } \ +-inline _Tpvec V_gt(const _Tpvec& a, const _Tpvec& b) \ ++inline _Tpvec v_gt(const _Tpvec& a, const _Tpvec& b) \ + { return _Tpvec(vec_cmpgt(a.val, b.val)); } \ + inline _Tpvec v_le(const _Tpvec& a, const _Tpvec& b) \ + { return _Tpvec(vec_cmple(a.val, b.val)); } \ +@@ -1507,7 +1507,7 @@ inline v_float64x2 v_dotprod_expand(const v_int32x4& a, const v_int32x4& b, cons + inline v_int32x4 v_dotprod_fast(const v_int16x8& a, const v_int16x8& b) + { return v_dotprod(a, b); } + inline v_int32x4 v_dotprod_fast(const v_int16x8& a, const v_int16x8& b, const v_int32x4& c) +-{ return v_int32x4(vec_msum(a.val, b.val, vec_int4_z)) + c; } ++{ return v_add(v_int32x4(vec_msum(a.val, b.val, vec_int4_z)), c); } + // 32 >> 64 + inline v_int64x2 v_dotprod_fast(const v_int32x4& a, const v_int32x4& b) + { return v_dotprod(a, b); } +@@ -1518,7 +1518,7 @@ inline v_int64x2 v_dotprod_fast(const v_int32x4& a, const v_int32x4& b, const v_ + inline v_uint32x4 v_dotprod_expand_fast(const v_uint8x16& a, const v_uint8x16& b) + { return v_dotprod_expand(a, b); } + inline v_uint32x4 v_dotprod_expand_fast(const v_uint8x16& a, const v_uint8x16& b, const v_uint32x4& c) +-{ return v_uint32x4(vec_msum(a.val, b.val, vec_uint4_z)) + c; } ++{ return v_add(v_uint32x4(vec_msum(a.val, b.val, vec_uint4_z)), c); } + + inline v_int32x4 v_dotprod_expand_fast(const v_int8x16& a, const v_int8x16& b) + { diff --git a/opencv.spec b/opencv.spec index b750630..02af591 100644 --- a/opencv.spec +++ b/opencv.spec @@ -104,6 +104,7 @@ 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 BuildRequires: gcc-c++ @@ -404,6 +405,7 @@ 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 pushd %{name}_contrib-%{version} @@ -584,6 +586,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope * Mon Feb 03 2025 Sérgio Basto 4.11.0-1 - Update to version 4.11.0 - Resolves: rhbz#2336422 +- Add upstream patch to fix build on PPC64LE * Fri Jan 17 2025 Fedora Release Engineering - 4.10.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 9a00dd90726a9ad006af7f1941b7f20de2ddd6be Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 18 Feb 2025 12:16:02 -0800 Subject: [PATCH 232/274] Backport all post-4.11.0 PNG fixes, including big-endian fix This backports all changes to the PNG reading code since 4.11.0, mainly to get the fix for #2345306, PNG read fails on big-endian. It's difficult to backport just that fix to 4.11.0 as it's built on all the earlier changes, and the earlier changes look like useful fixes too in any case. See upstream https://github.com/opencv/opencv/issues/26913 and https://github.com/opencv/opencv/pull/26915 . Resolves: rhbz#2345306 Signed-off-by: Adam Williamson --- ...-request-26739-from-vrabaud-png_leak.patch | 155 +++++ 0002-Fix-remaining-bugs-in-PNG-reader.patch | 37 + ...-request-26782-from-vrabaud-png_leak.patch | 654 ++++++++++++++++++ 0004-Move-the-checks-to-read_chunk.patch | 121 ++++ ...rovement-for-better-code-readibility.patch | 170 +++++ ...equest-26835-from-sturkmen72-patch-4.patch | 133 ++++ 0007-fix-for-large-tEXt-chunk.patch | 39 ++ ...-request-26854-from-vrabaud-png_leak.patch | 90 +++ ...st-26872-from-sturkmen72-ImageEncode.patch | 367 ++++++++++ ...uest-26915-from-mshabunin-fix-png-be.patch | 54 ++ opencv.spec | 31 +- 11 files changed, 1850 insertions(+), 1 deletion(-) create mode 100644 0001-Merge-pull-request-26739-from-vrabaud-png_leak.patch create mode 100644 0002-Fix-remaining-bugs-in-PNG-reader.patch create mode 100644 0003-Merge-pull-request-26782-from-vrabaud-png_leak.patch create mode 100644 0004-Move-the-checks-to-read_chunk.patch create mode 100644 0005-minor-improvement-for-better-code-readibility.patch create mode 100644 0006-Merge-pull-request-26835-from-sturkmen72-patch-4.patch create mode 100644 0007-fix-for-large-tEXt-chunk.patch create mode 100644 0008-Merge-pull-request-26854-from-vrabaud-png_leak.patch create mode 100644 0009-Merge-pull-request-26872-from-sturkmen72-ImageEncode.patch create mode 100644 0010-Merge-pull-request-26915-from-mshabunin-fix-png-be.patch diff --git a/0001-Merge-pull-request-26739-from-vrabaud-png_leak.patch b/0001-Merge-pull-request-26739-from-vrabaud-png_leak.patch new file mode 100644 index 0000000..a24eff9 --- /dev/null +++ b/0001-Merge-pull-request-26739-from-vrabaud-png_leak.patch @@ -0,0 +1,155 @@ +From c399203e9861bf3ff5b976cd597b9820eee5d93a Mon Sep 17 00:00:00 2001 +From: Vincent Rabaud +Date: Fri, 10 Jan 2025 09:33:43 +0100 +Subject: [PATCH 01/10] Merge pull request #26739 from vrabaud:png_leak + +Add more boundary checks. #26739 + +Also fix a bug in read_chunk where we could end up with png_get_uint_32(len) + 12 < 4 + +### Pull Request Readiness Checklist + +See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request + +- [x] I agree to contribute to the project under Apache 2 License. +- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV +- [x] The PR is proposed to the proper branch +- [ ] There is a reference to the original bug report and related work +- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable + Patch to opencv_extra has the same branch name. +- [ ] The feature is well documented and sample code can be built with the project CMake +--- + modules/imgcodecs/src/grfmt_png.cpp | 54 +++++++++++++++++------------ + modules/imgcodecs/src/grfmt_png.hpp | 2 +- + 2 files changed, 33 insertions(+), 23 deletions(-) + +diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp +index 6b4cea405c..744f244a20 100644 +--- a/modules/imgcodecs/src/grfmt_png.cpp ++++ b/modules/imgcodecs/src/grfmt_png.cpp +@@ -255,11 +255,14 @@ bool PngDecoder::readHeader() + png_init_io(png_ptr, m_f); + } + +- if (read_from_io(&sig, 8, 1) != 1) ++ // Read PNG header: 137 80 78 71 13 10 26 10 ++ if (!read_from_io(&sig, 8)) + return false; + + id = read_chunk(m_chunkIHDR); +- if (!(id == id_IHDR && m_chunkIHDR.p.size() == 25)) ++ // 8=HDR+size, 13=size of IHDR chunk, 4=CRC ++ // http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.IHDR ++ if (!(id == id_IHDR && m_chunkIHDR.p.size() == 8 + 13 + 4)) + { + return false; + } +@@ -283,23 +286,25 @@ bool PngDecoder::readHeader() + break; + } + +- if (id == id_acTL && chunk.p.size() == 20) ++ if (id == id_acTL) + { ++ // 8=HDR+size, 8=size of acTL chunk, 4=CRC ++ // https://wiki.mozilla.org/APNG_Specification#%60acTL%60:_The_Animation_Control_Chunk ++ if (chunk.p.size() != 8 + 8 + 4) ++ return false; + m_animation.loop_count = png_get_uint_32(&chunk.p[12]); + +- if (chunk.p[8] > 0) +- { +- chunk.p[8] = 0; +- chunk.p[9] = 0; +- m_frame_count = png_get_uint_32(&chunk.p[8]); +- m_frame_count++; +- } +- else +- m_frame_count = png_get_uint_32(&chunk.p[8]); ++ m_frame_count = png_get_uint_32(&chunk.p[8]); ++ if (m_frame_count == 0) ++ return false; + } + + if (id == id_fcTL) + { ++ // 8=HDR+size, 26=size of fcTL chunk, 4=CRC ++ // https://wiki.mozilla.org/APNG_Specification#%60fcTL%60:_The_Frame_Control_Chunk ++ if (chunk.p.size() != 8 + 26 + 4) ++ return false; + m_is_fcTL_loaded = true; + w0 = png_get_uint_32(&chunk.p[12]); + h0 = png_get_uint_32(&chunk.p[16]); +@@ -313,6 +318,11 @@ bool PngDecoder::readHeader() + + if (id == id_bKGD) + { ++ // 8=HDR+size, ??=size of bKGD chunk, 4=CRC ++ // The spec is actually more complex: http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.bKGD ++ // TODO: we only check that 4 bytes can be read from &chunk.p[8]. Fix. ++ if (chunk.p.size() < 8 + 4) ++ return false; + int bgcolor = png_get_uint_32(&chunk.p[8]); + m_animation.bgcolor[3] = (bgcolor >> 24) & 0xFF; + m_animation.bgcolor[2] = (bgcolor >> 16) & 0xFF; +@@ -669,34 +679,34 @@ void PngDecoder::compose_frame(std::vector& rows_dst, const std::vect + }); + } + +-size_t PngDecoder::read_from_io(void* _Buffer, size_t _ElementSize, size_t _ElementCount) ++bool PngDecoder::read_from_io(void* buffer, size_t num_bytes) + { + if (m_f) +- return fread(_Buffer, _ElementSize, _ElementCount, m_f); ++ return fread(buffer, 1, num_bytes, m_f) == num_bytes; + +- if (m_buf_pos + _ElementSize > m_buf.cols * m_buf.rows * m_buf.elemSize()) { ++ if (m_buf_pos + num_bytes > m_buf.cols * m_buf.rows * m_buf.elemSize()) { + CV_LOG_WARNING(NULL, "PNG input buffer is incomplete"); +- return 0; ++ return false; + } + +- memcpy( _Buffer, m_buf.ptr() + m_buf_pos, _ElementSize ); +- m_buf_pos += _ElementSize; +- return 1; ++ memcpy( buffer, m_buf.ptr() + m_buf_pos, num_bytes ); ++ m_buf_pos += num_bytes; ++ return true; + } + + uint32_t PngDecoder::read_chunk(Chunk& chunk) + { + unsigned char len[4]; +- if (read_from_io(&len, 4, 1) == 1) ++ if (read_from_io(&len, 4)) + { +- const size_t size = png_get_uint_32(len) + 12; ++ const size_t size = static_cast(png_get_uint_32(len)) + 12; + if (size > PNG_USER_CHUNK_MALLOC_MAX) + { + CV_LOG_WARNING(NULL, "chunk data is too large"); + } + chunk.p.resize(size); + memcpy(chunk.p.data(), len, 4); +- if (read_from_io(&chunk.p[4], chunk.p.size() - 4, 1) == 1) ++ if (read_from_io(&chunk.p[4], chunk.p.size() - 4)) + return *(uint32_t*)(&chunk.p[4]); + } + return 0; +diff --git a/modules/imgcodecs/src/grfmt_png.hpp b/modules/imgcodecs/src/grfmt_png.hpp +index a950b9e941..dec2cd0b61 100644 +--- a/modules/imgcodecs/src/grfmt_png.hpp ++++ b/modules/imgcodecs/src/grfmt_png.hpp +@@ -137,7 +137,7 @@ protected: + bool processing_start(void* frame_ptr, const Mat& img); + bool processing_finish(); + void compose_frame(std::vector& rows_dst, const std::vector& rows_src, unsigned char bop, uint32_t x, uint32_t y, uint32_t w, uint32_t h, Mat& img); +- size_t read_from_io(void* _Buffer, size_t _ElementSize, size_t _ElementCount); ++ bool read_from_io(void* buffer, size_t num_bytes); + uint32_t read_chunk(Chunk& chunk); + + struct PngPtrs { +-- +2.48.1 + diff --git a/0002-Fix-remaining-bugs-in-PNG-reader.patch b/0002-Fix-remaining-bugs-in-PNG-reader.patch new file mode 100644 index 0000000..f4804e6 --- /dev/null +++ b/0002-Fix-remaining-bugs-in-PNG-reader.patch @@ -0,0 +1,37 @@ +From b7b84ec6364809306776b48206ad36266274c297 Mon Sep 17 00:00:00 2001 +From: Vincent Rabaud +Date: Fri, 10 Jan 2025 14:57:39 +0100 +Subject: [PATCH 02/10] Fix remaining bugs in PNG reader + +- free chunk before a potential longjmp +- do not try to allocate when the chunk is > PNG_USER_CHUNK_MALLOC_MAX +--- + modules/imgcodecs/src/grfmt_png.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp +index 744f244a20..1ecc01f17f 100644 +--- a/modules/imgcodecs/src/grfmt_png.cpp ++++ b/modules/imgcodecs/src/grfmt_png.cpp +@@ -339,6 +339,10 @@ bool PngDecoder::readHeader() + png_bytep trans; + png_color_16p trans_values; + ++ // Free chunk in case png_read_info uses longjmp. ++ chunk.p.clear(); ++ chunk.p.shrink_to_fit(); ++ + png_read_info( png_ptr, info_ptr ); + png_get_IHDR(png_ptr, info_ptr, &wdth, &hght, + &bit_depth, &color_type, 0, 0, 0); +@@ -703,6 +707,7 @@ uint32_t PngDecoder::read_chunk(Chunk& chunk) + if (size > PNG_USER_CHUNK_MALLOC_MAX) + { + CV_LOG_WARNING(NULL, "chunk data is too large"); ++ return 0; + } + chunk.p.resize(size); + memcpy(chunk.p.data(), len, 4); +-- +2.48.1 + diff --git a/0003-Merge-pull-request-26782-from-vrabaud-png_leak.patch b/0003-Merge-pull-request-26782-from-vrabaud-png_leak.patch new file mode 100644 index 0000000..9d11730 --- /dev/null +++ b/0003-Merge-pull-request-26782-from-vrabaud-png_leak.patch @@ -0,0 +1,654 @@ +From c29de7cc4b89c80f7ee910f318dfc1bc462d576c Mon Sep 17 00:00:00 2001 +From: Vincent Rabaud +Date: Wed, 22 Jan 2025 12:47:28 +0100 +Subject: [PATCH 03/10] Merge pull request #26782 from vrabaud:png_leak + +Fix potential READ memory access #26782 + +This fixes https://oss-fuzz.com/testcase-detail/4923671881252864 and https://oss-fuzz.com/testcase-detail/5048650127966208 + +### Pull Request Readiness Checklist + +See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request + +- [x] I agree to contribute to the project under Apache 2 License. +- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV +- [x] The PR is proposed to the proper branch +- [x] There is a reference to the original bug report and related work +- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable + Patch to opencv_extra has the same branch name. +- [ ] The feature is well documented and sample code can be built with the project CMake +--- + modules/imgcodecs/src/grfmt_png.cpp | 394 ++++++++++++++-------------- + modules/imgcodecs/src/grfmt_png.hpp | 53 +--- + 2 files changed, 206 insertions(+), 241 deletions(-) + +diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp +index 1ecc01f17f..105288c5e5 100644 +--- a/modules/imgcodecs/src/grfmt_png.cpp ++++ b/modules/imgcodecs/src/grfmt_png.cpp +@@ -198,6 +198,7 @@ PngDecoder::PngDecoder() + + PngDecoder::~PngDecoder() + { ++ ClearPngPtr(); + if( m_f ) + { + fclose( m_f ); +@@ -205,6 +206,26 @@ PngDecoder::~PngDecoder() + } + } + ++bool PngDecoder::InitPngPtr() { ++ ClearPngPtr(); ++ ++ m_png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0); ++ if (!m_png_ptr) ++ return false; ++ ++ m_info_ptr = png_create_info_struct(m_png_ptr); ++ m_end_info = png_create_info_struct(m_png_ptr); ++ return (m_info_ptr && m_end_info); ++} ++ ++void PngDecoder::ClearPngPtr() { ++ if (m_png_ptr) ++ png_destroy_read_struct(&m_png_ptr, &m_info_ptr, &m_end_info); ++ m_png_ptr = nullptr; ++ m_info_ptr = nullptr; ++ m_end_info = nullptr; ++} ++ + ImageDecoder PngDecoder::newDecoder() const + { + return makePtr(); +@@ -227,167 +248,164 @@ void PngDecoder::readDataFromBuf( void* _png_ptr, unsigned char* dst, size_t si + + bool PngDecoder::readHeader() + { +- volatile bool result = false; ++ // Declare dynamic variables before a potential longjmp. ++ Chunk chunk; ++ ++ if (!InitPngPtr()) ++ return false; ++ ++ if (setjmp(png_jmpbuf(m_png_ptr))) ++ return false; + +- PngPtrs png_ptrs; +- png_structp png_ptr = png_ptrs.getPng(); +- png_infop info_ptr = png_ptrs.getInfo(); +- png_infop end_info = png_ptrs.getEndInfo(); ++ m_buf_pos = 0; ++ unsigned char sig[8]; ++ uint32_t id = 0; + +- if( png_ptr && info_ptr && end_info ) ++ if( !m_buf.empty() ) ++ png_set_read_fn(m_png_ptr, this, (png_rw_ptr)readDataFromBuf ); ++ else + { +- m_buf_pos = 0; +- if( setjmp( png_jmpbuf( png_ptr ) ) == 0 ) ++ m_f = fopen(m_filename.c_str(), "rb"); ++ if (!m_f) + { +- unsigned char sig[8]; +- uint32_t id = 0; +- Chunk chunk; ++ return false; ++ } ++ png_init_io(m_png_ptr, m_f); ++ } + +- if( !m_buf.empty() ) +- png_set_read_fn(png_ptr, this, (png_rw_ptr)readDataFromBuf ); +- else +- { +- m_f = fopen(m_filename.c_str(), "rb"); +- if (!m_f) +- { +- return false; +- } +- png_init_io(png_ptr, m_f); +- } ++ // Read PNG header: 137 80 78 71 13 10 26 10 ++ if (!read_from_io(&sig, 8)) ++ return false; + +- // Read PNG header: 137 80 78 71 13 10 26 10 +- if (!read_from_io(&sig, 8)) +- return false; ++ id = read_chunk(m_chunkIHDR); ++ // 8=HDR+size, 13=size of IHDR chunk, 4=CRC ++ // http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.IHDR ++ if (!(id == id_IHDR && m_chunkIHDR.p.size() == 8 + 13 + 4)) ++ { ++ return false; ++ } + +- id = read_chunk(m_chunkIHDR); +- // 8=HDR+size, 13=size of IHDR chunk, 4=CRC +- // http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.IHDR +- if (!(id == id_IHDR && m_chunkIHDR.p.size() == 8 + 13 + 4)) +- { +- return false; +- } ++ m_is_fcTL_loaded = false; ++ while (true) ++ { ++ id = read_chunk(chunk); + +- while (true) +- { +- m_is_fcTL_loaded = false; +- id = read_chunk(chunk); ++ if (!id || (m_f && feof(m_f)) || (!m_buf.empty() && m_buf_pos > m_buf.total())) ++ { ++ return false; ++ } + +- if (!id || (m_f && feof(m_f)) || (!m_buf.empty() && m_buf_pos > m_buf.total())) +- { +- return false; +- } ++ if (id == id_IDAT) ++ { ++ if (m_f) ++ fseek(m_f, 0, SEEK_SET); ++ else ++ m_buf_pos = 0; ++ break; ++ } + +- if (id == id_IDAT) +- { +- if (m_f) +- fseek(m_f, 0, SEEK_SET); +- else +- m_buf_pos = 0; +- break; +- } ++ if (id == id_acTL) ++ { ++ // 8=HDR+size, 8=size of acTL chunk, 4=CRC ++ // https://wiki.mozilla.org/APNG_Specification#%60acTL%60:_The_Animation_Control_Chunk ++ if (chunk.p.size() != 8 + 8 + 4) ++ return false; ++ m_animation.loop_count = png_get_uint_32(&chunk.p[12]); + +- if (id == id_acTL) +- { +- // 8=HDR+size, 8=size of acTL chunk, 4=CRC +- // https://wiki.mozilla.org/APNG_Specification#%60acTL%60:_The_Animation_Control_Chunk +- if (chunk.p.size() != 8 + 8 + 4) +- return false; +- m_animation.loop_count = png_get_uint_32(&chunk.p[12]); +- +- m_frame_count = png_get_uint_32(&chunk.p[8]); +- if (m_frame_count == 0) +- return false; +- } ++ m_frame_count = png_get_uint_32(&chunk.p[8]); ++ if (m_frame_count == 0) ++ return false; ++ } + +- if (id == id_fcTL) +- { +- // 8=HDR+size, 26=size of fcTL chunk, 4=CRC +- // https://wiki.mozilla.org/APNG_Specification#%60fcTL%60:_The_Frame_Control_Chunk +- if (chunk.p.size() != 8 + 26 + 4) +- return false; +- m_is_fcTL_loaded = true; +- w0 = png_get_uint_32(&chunk.p[12]); +- h0 = png_get_uint_32(&chunk.p[16]); +- x0 = png_get_uint_32(&chunk.p[20]); +- y0 = png_get_uint_32(&chunk.p[24]); +- delay_num = png_get_uint_16(&chunk.p[28]); +- delay_den = png_get_uint_16(&chunk.p[30]); +- dop = chunk.p[32]; +- bop = chunk.p[33]; +- } ++ if (id == id_fcTL) ++ { ++ // 8=HDR+size, 26=size of fcTL chunk, 4=CRC ++ // https://wiki.mozilla.org/APNG_Specification#%60fcTL%60:_The_Frame_Control_Chunk ++ if (chunk.p.size() != 8 + 26 + 4) ++ return false; ++ m_is_fcTL_loaded = true; ++ w0 = png_get_uint_32(&chunk.p[12]); ++ h0 = png_get_uint_32(&chunk.p[16]); ++ x0 = png_get_uint_32(&chunk.p[20]); ++ y0 = png_get_uint_32(&chunk.p[24]); ++ delay_num = png_get_uint_16(&chunk.p[28]); ++ delay_den = png_get_uint_16(&chunk.p[30]); ++ dop = chunk.p[32]; ++ bop = chunk.p[33]; ++ } + +- if (id == id_bKGD) +- { +- // 8=HDR+size, ??=size of bKGD chunk, 4=CRC +- // The spec is actually more complex: http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.bKGD +- // TODO: we only check that 4 bytes can be read from &chunk.p[8]. Fix. +- if (chunk.p.size() < 8 + 4) +- return false; +- int bgcolor = png_get_uint_32(&chunk.p[8]); +- m_animation.bgcolor[3] = (bgcolor >> 24) & 0xFF; +- m_animation.bgcolor[2] = (bgcolor >> 16) & 0xFF; +- m_animation.bgcolor[1] = (bgcolor >> 8) & 0xFF; +- m_animation.bgcolor[0] = bgcolor & 0xFF; +- } ++ if (id == id_bKGD) ++ { ++ // 8=HDR+size, ??=size of bKGD chunk, 4=CRC ++ // The spec is actually more complex: http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.bKGD ++ // TODO: we only check that 4 bytes can be read from &chunk.p[8]. Fix. ++ if (chunk.p.size() < 8 + 4) ++ return false; ++ int bgcolor = png_get_uint_32(&chunk.p[8]); ++ m_animation.bgcolor[3] = (bgcolor >> 24) & 0xFF; ++ m_animation.bgcolor[2] = (bgcolor >> 16) & 0xFF; ++ m_animation.bgcolor[1] = (bgcolor >> 8) & 0xFF; ++ m_animation.bgcolor[0] = bgcolor & 0xFF; ++ } + +- if (id == id_PLTE || id == id_tRNS) +- m_chunksInfo.push_back(chunk); +- } ++ if (id == id_PLTE || id == id_tRNS) ++ m_chunksInfo.push_back(chunk); ++ } + +- png_uint_32 wdth, hght; +- int bit_depth, color_type, num_trans=0; +- png_bytep trans; +- png_color_16p trans_values; ++ png_uint_32 wdth, hght; ++ int bit_depth, color_type, num_trans=0; ++ png_bytep trans; ++ png_color_16p trans_values; + +- // Free chunk in case png_read_info uses longjmp. +- chunk.p.clear(); +- chunk.p.shrink_to_fit(); ++ // Free chunk in case png_read_info uses longjmp. ++ chunk.p.clear(); ++ chunk.p.shrink_to_fit(); + +- png_read_info( png_ptr, info_ptr ); +- png_get_IHDR(png_ptr, info_ptr, &wdth, &hght, +- &bit_depth, &color_type, 0, 0, 0); ++ png_read_info( m_png_ptr, m_info_ptr ); ++ png_get_IHDR(m_png_ptr, m_info_ptr, &wdth, &hght, ++ &bit_depth, &color_type, 0, 0, 0); + +- m_width = (int)wdth; +- m_height = (int)hght; +- m_color_type = color_type; +- m_bit_depth = bit_depth; ++ m_width = (int)wdth; ++ m_height = (int)hght; ++ m_color_type = color_type; ++ m_bit_depth = bit_depth; + +- if (bit_depth <= 8 || bit_depth == 16) +- { +- switch (color_type) +- { +- case PNG_COLOR_TYPE_RGB: +- case PNG_COLOR_TYPE_PALETTE: +- png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &trans_values); +- if (num_trans > 0) +- m_type = CV_8UC4; +- else +- m_type = CV_8UC3; +- break; +- case PNG_COLOR_TYPE_GRAY_ALPHA: +- case PNG_COLOR_TYPE_RGB_ALPHA: +- m_type = CV_8UC4; +- break; +- default: +- m_type = CV_8UC1; +- } +- if (bit_depth == 16) +- m_type = CV_MAKETYPE(CV_16U, CV_MAT_CN(m_type)); +- result = true; +- } +- } +- } ++ if (m_is_fcTL_loaded && (int(x0 + w0) > m_width || int(y0 + h0) > m_height || dop > 2 || bop > 1)) ++ return false; + +- if(result) ++ if (bit_depth <= 8 || bit_depth == 16) + { +- m_png_ptrs = std::move(png_ptrs); ++ switch (color_type) ++ { ++ case PNG_COLOR_TYPE_RGB: ++ case PNG_COLOR_TYPE_PALETTE: ++ png_get_tRNS(m_png_ptr, m_info_ptr, &trans, &num_trans, &trans_values); ++ if (num_trans > 0) ++ m_type = CV_8UC4; ++ else ++ m_type = CV_8UC3; ++ break; ++ case PNG_COLOR_TYPE_GRAY_ALPHA: ++ case PNG_COLOR_TYPE_RGB_ALPHA: ++ m_type = CV_8UC4; ++ break; ++ default: ++ m_type = CV_8UC1; ++ } ++ if (bit_depth == 16) ++ m_type = CV_MAKETYPE(CV_16U, CV_MAT_CN(m_type)); + } + +- return result; ++ return true; + } + + bool PngDecoder::readData( Mat& img ) + { ++ // Declare dynamic variables before a potential longjmp. ++ AutoBuffer _buffer(m_height); ++ unsigned char** buffer = _buffer.data(); ++ Chunk chunk; ++ + if (m_frame_count > 1) + { + Mat mat_cur = Mat::zeros(img.rows, img.cols, m_type); +@@ -412,13 +430,14 @@ bool PngDecoder::readData( Mat& img ) + + frameCur.setMat(mat_cur); + +- processing_start((void*)&frameRaw, mat_cur); +- png_structp png_ptr = m_png_ptrs.getPng(); +- png_infop info_ptr = m_png_ptrs.getInfo(); ++ if (!processing_start((void*)&frameRaw, mat_cur)) ++ return false; ++ ++ if(setjmp(png_jmpbuf(m_png_ptr))) ++ return false; + + while (true) + { +- Chunk chunk; + id = read_chunk(chunk); + if (!id) + return false; +@@ -482,14 +501,14 @@ bool PngDecoder::readData( Mat& img ) + else if (id == id_IDAT) + { + m_is_IDAT_loaded = true; +- png_process_data(png_ptr, info_ptr, chunk.p.data(), chunk.p.size()); ++ png_process_data(m_png_ptr, m_info_ptr, chunk.p.data(), chunk.p.size()); + } + else if (id == id_fdAT && m_is_fcTL_loaded) + { + m_is_IDAT_loaded = true; + png_save_uint_32(&chunk.p[4], static_cast(chunk.p.size() - 16)); + memcpy(&chunk.p[8], "IDAT", 4); +- png_process_data(png_ptr, info_ptr, &chunk.p[4], chunk.p.size() - 4); ++ png_process_data(m_png_ptr, m_info_ptr, &chunk.p[4], chunk.p.size() - 4); + } + else if (id == id_IEND) + { +@@ -513,30 +532,24 @@ bool PngDecoder::readData( Mat& img ) + return true; + } + else +- png_process_data(png_ptr, info_ptr, chunk.p.data(), chunk.p.size()); ++ png_process_data(m_png_ptr, m_info_ptr, chunk.p.data(), chunk.p.size()); + } + return false; + } + + volatile bool result = false; +- AutoBuffer _buffer(m_height); +- unsigned char** buffer = _buffer.data(); + bool color = img.channels() > 1; + +- png_structp png_ptr = m_png_ptrs.getPng(); +- png_infop info_ptr = m_png_ptrs.getInfo(); +- png_infop end_info = m_png_ptrs.getEndInfo(); +- +- if( png_ptr && info_ptr && end_info && m_width && m_height ) ++ if( m_png_ptr && m_info_ptr && m_end_info && m_width && m_height ) + { +- if( setjmp( png_jmpbuf ( png_ptr ) ) == 0 ) ++ if( setjmp( png_jmpbuf ( m_png_ptr ) ) == 0 ) + { + int y; + + if( img.depth() == CV_8U && m_bit_depth == 16 ) +- png_set_strip_16( png_ptr ); ++ png_set_strip_16( m_png_ptr ); + else if( !isBigEndian() ) +- png_set_swap( png_ptr ); ++ png_set_swap( m_png_ptr ); + + if(img.channels() < 4) + { +@@ -548,46 +561,46 @@ bool PngDecoder::readData( Mat& img ) + * indicate that it is a good idea to always ask for + * stripping alpha.. 18.11.2004 Axel Walthelm + */ +- png_set_strip_alpha( png_ptr ); ++ png_set_strip_alpha( m_png_ptr ); + } else +- png_set_tRNS_to_alpha( png_ptr ); ++ png_set_tRNS_to_alpha( m_png_ptr ); + + if( m_color_type == PNG_COLOR_TYPE_PALETTE ) +- png_set_palette_to_rgb( png_ptr ); ++ png_set_palette_to_rgb( m_png_ptr ); + + if( (m_color_type & PNG_COLOR_MASK_COLOR) == 0 && m_bit_depth < 8 ) + #if (PNG_LIBPNG_VER_MAJOR*10000 + PNG_LIBPNG_VER_MINOR*100 + PNG_LIBPNG_VER_RELEASE >= 10209) || \ + (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR == 0 && PNG_LIBPNG_VER_RELEASE >= 18) +- png_set_expand_gray_1_2_4_to_8( png_ptr ); ++ png_set_expand_gray_1_2_4_to_8( m_png_ptr ); + #else + png_set_gray_1_2_4_to_8( png_ptr ); + #endif + + if( (m_color_type & PNG_COLOR_MASK_COLOR) && color && !m_use_rgb) +- png_set_bgr( png_ptr ); // convert RGB to BGR ++ png_set_bgr( m_png_ptr ); // convert RGB to BGR + else if( color ) +- png_set_gray_to_rgb( png_ptr ); // Gray->RGB ++ png_set_gray_to_rgb( m_png_ptr ); // Gray->RGB + else +- png_set_rgb_to_gray( png_ptr, 1, 0.299, 0.587 ); // RGB->Gray ++ png_set_rgb_to_gray( m_png_ptr, 1, 0.299, 0.587 ); // RGB->Gray + +- png_set_interlace_handling( png_ptr ); +- png_read_update_info( png_ptr, info_ptr ); ++ png_set_interlace_handling( m_png_ptr ); ++ png_read_update_info( m_png_ptr, m_info_ptr ); + + for( y = 0; y < m_height; y++ ) + buffer[y] = img.data + y*img.step; + +- png_read_image( png_ptr, buffer ); +- png_read_end( png_ptr, end_info ); ++ png_read_image( m_png_ptr, buffer ); ++ png_read_end( m_png_ptr, m_end_info ); + + #ifdef PNG_eXIf_SUPPORTED + png_uint_32 num_exif = 0; + png_bytep exif = 0; + + // Exif info could be in info_ptr (intro_info) or end_info per specification +- if( png_get_valid(png_ptr, info_ptr, PNG_INFO_eXIf) ) +- png_get_eXIf_1(png_ptr, info_ptr, &num_exif, &exif); +- else if( png_get_valid(png_ptr, end_info, PNG_INFO_eXIf) ) +- png_get_eXIf_1(png_ptr, end_info, &num_exif, &exif); ++ if( png_get_valid(m_png_ptr, m_info_ptr, PNG_INFO_eXIf) ) ++ png_get_eXIf_1(m_png_ptr, m_info_ptr, &num_exif, &exif); ++ else if( png_get_valid(m_png_ptr, m_end_info, PNG_INFO_eXIf) ) ++ png_get_eXIf_1(m_png_ptr, m_end_info, &num_exif, &exif); + + if( exif && num_exif > 0 ) + { +@@ -719,42 +732,34 @@ uint32_t PngDecoder::read_chunk(Chunk& chunk) + + bool PngDecoder::processing_start(void* frame_ptr, const Mat& img) + { +- static uint8_t header[8] = { 137, 80, 78, 71, 13, 10, 26, 10 }; +- +- PngPtrs png_ptrs; +- png_structp png_ptr = png_ptrs.getPng(); +- png_infop info_ptr = png_ptrs.getInfo(); +- +- if (!png_ptr || !info_ptr) { ++ if (!InitPngPtr()) + return false; +- } + +- if (setjmp(png_jmpbuf(png_ptr))) +- { ++ if (setjmp(png_jmpbuf(m_png_ptr))) + return false; +- } + +- m_png_ptrs = std::move(png_ptrs); +- png_set_crc_action(png_ptr, PNG_CRC_QUIET_USE, PNG_CRC_QUIET_USE); +- png_set_progressive_read_fn(png_ptr, frame_ptr, (png_progressive_info_ptr)info_fn, row_fn, NULL); ++ static uint8_t header[8] = { 137, 80, 78, 71, 13, 10, 26, 10 }; ++ ++ png_set_crc_action(m_png_ptr, PNG_CRC_QUIET_USE, PNG_CRC_QUIET_USE); ++ png_set_progressive_read_fn(m_png_ptr, frame_ptr, (png_progressive_info_ptr)info_fn, row_fn, NULL); + + if (img.channels() < 4) +- png_set_strip_alpha(png_ptr); ++ png_set_strip_alpha(m_png_ptr); + else +- png_set_tRNS_to_alpha(png_ptr); ++ png_set_tRNS_to_alpha(m_png_ptr); + +- png_process_data(png_ptr, info_ptr, header, 8); +- png_process_data(png_ptr, info_ptr, m_chunkIHDR.p.data(), m_chunkIHDR.p.size()); ++ png_process_data(m_png_ptr, m_info_ptr, header, 8); ++ png_process_data(m_png_ptr, m_info_ptr, m_chunkIHDR.p.data(), m_chunkIHDR.p.size()); + + if ((m_color_type & PNG_COLOR_MASK_COLOR) && img.channels() > 1 && !m_use_rgb) +- png_set_bgr(png_ptr); // convert RGB to BGR ++ png_set_bgr(m_png_ptr); // convert RGB to BGR + else if (img.channels() > 1) +- png_set_gray_to_rgb(png_ptr); // Gray->RGB ++ png_set_gray_to_rgb(m_png_ptr); // Gray->RGB + else +- png_set_rgb_to_gray(png_ptr, 1, 0.299, 0.587); // RGB->Gray ++ png_set_rgb_to_gray(m_png_ptr, 1, 0.299, 0.587); // RGB->Gray + + for (size_t i = 0; i < m_chunksInfo.size(); i++) +- png_process_data(png_ptr, info_ptr, m_chunksInfo[i].p.data(), m_chunksInfo[i].p.size()); ++ png_process_data(m_png_ptr, m_info_ptr, m_chunksInfo[i].p.data(), m_chunksInfo[i].p.size()); + + return true; + } +@@ -763,22 +768,17 @@ bool PngDecoder::processing_finish() + { + static uint8_t footer[12] = { 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130 }; + +- png_structp png_ptr = m_png_ptrs.getPng(); +- png_infop info_ptr = m_png_ptrs.getInfo(); +- +- if (!png_ptr) { +- m_png_ptrs.clear(); ++ if (!m_png_ptr) { + return false; + } + +- if (setjmp(png_jmpbuf(png_ptr))) ++ if (setjmp(png_jmpbuf(m_png_ptr))) + { +- m_png_ptrs.clear(); + return false; + } + +- png_process_data(png_ptr, info_ptr, footer, 12); +- m_png_ptrs.clear(); ++ png_process_data(m_png_ptr, m_info_ptr, footer, 12); ++ ClearPngPtr(); + + return true; + } +diff --git a/modules/imgcodecs/src/grfmt_png.hpp b/modules/imgcodecs/src/grfmt_png.hpp +index dec2cd0b61..5dfc86efcc 100644 +--- a/modules/imgcodecs/src/grfmt_png.hpp ++++ b/modules/imgcodecs/src/grfmt_png.hpp +@@ -130,56 +130,21 @@ public: + + ImageDecoder newDecoder() const CV_OVERRIDE; + +-protected: ++private: + static void readDataFromBuf(void* png_ptr, uchar* dst, size_t size); + static void info_fn(png_structp png_ptr, png_infop info_ptr); + static void row_fn(png_structp png_ptr, png_bytep new_row, png_uint_32 row_num, int pass); +- bool processing_start(void* frame_ptr, const Mat& img); +- bool processing_finish(); ++ CV_NODISCARD_STD bool processing_start(void* frame_ptr, const Mat& img); ++ CV_NODISCARD_STD bool processing_finish(); + void compose_frame(std::vector& rows_dst, const std::vector& rows_src, unsigned char bop, uint32_t x, uint32_t y, uint32_t w, uint32_t h, Mat& img); +- bool read_from_io(void* buffer, size_t num_bytes); ++ CV_NODISCARD_STD bool read_from_io(void* buffer, size_t num_bytes); + uint32_t read_chunk(Chunk& chunk); ++ CV_NODISCARD_STD bool InitPngPtr(); ++ void ClearPngPtr(); + +- struct PngPtrs { +- public: +- PngPtrs() { +- png_ptr = png_create_read_struct( PNG_LIBPNG_VER_STRING, 0, 0, 0 ); +- if (png_ptr) { +- info_ptr = png_create_info_struct( png_ptr ); +- end_info = png_create_info_struct( png_ptr ); +- } else { +- info_ptr = end_info = nullptr; +- } +- } +- ~PngPtrs() { +- clear(); +- } +- PngPtrs& operator=(PngPtrs&& other) { +- clear(); +- png_ptr = other.png_ptr; +- info_ptr = other.info_ptr; +- end_info = other.end_info; +- other.png_ptr = nullptr; +- other.info_ptr = other.end_info = nullptr; +- return *this; +- } +- void clear() { +- if (png_ptr) { +- png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); +- png_ptr = nullptr; +- info_ptr = end_info = nullptr; +- } +- } +- png_structp getPng() const { return png_ptr; } +- png_infop getInfo() const { return info_ptr; } +- png_infop getEndInfo() const { return end_info; } +- private: +- png_structp png_ptr; // pointer to decompression structure +- png_infop info_ptr; // pointer to image information structure +- png_infop end_info; // pointer to one more image information structure +- }; +- +- PngPtrs m_png_ptrs; ++ png_structp m_png_ptr = nullptr; // pointer to decompression structure ++ png_infop m_info_ptr = nullptr; // pointer to image information structure ++ png_infop m_end_info = nullptr; // pointer to one more image information structure + int m_bit_depth; + FILE* m_f; + int m_color_type; +-- +2.48.1 + diff --git a/0004-Move-the-checks-to-read_chunk.patch b/0004-Move-the-checks-to-read_chunk.patch new file mode 100644 index 0000000..5137872 --- /dev/null +++ b/0004-Move-the-checks-to-read_chunk.patch @@ -0,0 +1,121 @@ +From eba1a8955f9d7f8aa8c6b3ddee4565ee4185136c Mon Sep 17 00:00:00 2001 +From: Vincent Rabaud +Date: Thu, 23 Jan 2025 16:30:38 +0100 +Subject: [PATCH 04/10] Move the checks to read_chunk. + +Only user chunks need to be compared to PNG_USER_CHUNK_MALLOC_MAX +--- + modules/imgcodecs/src/grfmt_png.cpp | 60 +++++++++++++++++------------ + 1 file changed, 36 insertions(+), 24 deletions(-) + +diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp +index 105288c5e5..64ef56c8c5 100644 +--- a/modules/imgcodecs/src/grfmt_png.cpp ++++ b/modules/imgcodecs/src/grfmt_png.cpp +@@ -278,12 +278,8 @@ bool PngDecoder::readHeader() + return false; + + id = read_chunk(m_chunkIHDR); +- // 8=HDR+size, 13=size of IHDR chunk, 4=CRC +- // http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.IHDR +- if (!(id == id_IHDR && m_chunkIHDR.p.size() == 8 + 13 + 4)) +- { ++ if (id != id_IHDR) + return false; +- } + + m_is_fcTL_loaded = false; + while (true) +@@ -306,10 +302,7 @@ bool PngDecoder::readHeader() + + if (id == id_acTL) + { +- // 8=HDR+size, 8=size of acTL chunk, 4=CRC + // https://wiki.mozilla.org/APNG_Specification#%60acTL%60:_The_Animation_Control_Chunk +- if (chunk.p.size() != 8 + 8 + 4) +- return false; + m_animation.loop_count = png_get_uint_32(&chunk.p[12]); + + m_frame_count = png_get_uint_32(&chunk.p[8]); +@@ -319,10 +312,7 @@ bool PngDecoder::readHeader() + + if (id == id_fcTL) + { +- // 8=HDR+size, 26=size of fcTL chunk, 4=CRC + // https://wiki.mozilla.org/APNG_Specification#%60fcTL%60:_The_Frame_Control_Chunk +- if (chunk.p.size() != 8 + 26 + 4) +- return false; + m_is_fcTL_loaded = true; + w0 = png_get_uint_32(&chunk.p[12]); + h0 = png_get_uint_32(&chunk.p[16]); +@@ -336,11 +326,7 @@ bool PngDecoder::readHeader() + + if (id == id_bKGD) + { +- // 8=HDR+size, ??=size of bKGD chunk, 4=CRC + // The spec is actually more complex: http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.bKGD +- // TODO: we only check that 4 bytes can be read from &chunk.p[8]. Fix. +- if (chunk.p.size() < 8 + 4) +- return false; + int bgcolor = png_get_uint_32(&chunk.p[8]); + m_animation.bgcolor[3] = (bgcolor >> 24) & 0xFF; + m_animation.bgcolor[2] = (bgcolor >> 16) & 0xFF; +@@ -713,20 +699,46 @@ bool PngDecoder::read_from_io(void* buffer, size_t num_bytes) + + uint32_t PngDecoder::read_chunk(Chunk& chunk) + { +- unsigned char len[4]; +- if (read_from_io(&len, 4)) +- { +- const size_t size = static_cast(png_get_uint_32(len)) + 12; ++ unsigned char size_id[8]; ++ if (!read_from_io(&size_id, 8)) ++ return 0; ++ const size_t size = static_cast(png_get_uint_32(size_id)) + 12; ++ ++ const uint32_t id = *(uint32_t*)(&size_id[4]); ++ if (id == id_IHDR) { ++ // 8=HDR+size, 13=size of IHDR chunk, 4=CRC ++ // http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.IHDR ++ if (size != 8 + 13 + 4) ++ return 0; ++ } else if (id == id_acTL) { ++ // 8=HDR+size, 8=size of acTL chunk, 4=CRC ++ // https://wiki.mozilla.org/APNG_Specification#%60acTL%60:_The_Animation_Control_Chunk ++ if (size != 8 + 8 + 4) ++ return 0; ++ } else if (id == id_fcTL) { ++ // 8=HDR+size, 26=size of fcTL chunk, 4=CRC ++ // https://wiki.mozilla.org/APNG_Specification#%60fcTL%60:_The_Frame_Control_Chunk ++ if (size != 8 + 26 + 4) ++ return 0; ++ } else if (id == id_bKGD) { ++ // 8=HDR+size, ??=size of bKGD chunk, 4=CRC ++ // The spec is actually more complex: ++ // http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.bKGD ++ // TODO: we only check that 4 bytes can be read from &chunk.p[8]. Fix. ++ if (size < 8 + 4) ++ return 0; ++ } else if (id != id_fdAT && id != id_IDAT && id != id_IEND && id != id_PLTE && id != id_tRNS) { + if (size > PNG_USER_CHUNK_MALLOC_MAX) + { +- CV_LOG_WARNING(NULL, "chunk data is too large"); ++ CV_LOG_WARNING(NULL, "user chunk data is too large"); + return 0; + } +- chunk.p.resize(size); +- memcpy(chunk.p.data(), len, 4); +- if (read_from_io(&chunk.p[4], chunk.p.size() - 4)) +- return *(uint32_t*)(&chunk.p[4]); + } ++ ++ chunk.p.resize(size); ++ memcpy(chunk.p.data(), size_id, 8); ++ if (read_from_io(&chunk.p[8], chunk.p.size() - 8)) ++ return id; + return 0; + } + +-- +2.48.1 + diff --git a/0005-minor-improvement-for-better-code-readibility.patch b/0005-minor-improvement-for-better-code-readibility.patch new file mode 100644 index 0000000..c677c33 --- /dev/null +++ b/0005-minor-improvement-for-better-code-readibility.patch @@ -0,0 +1,170 @@ +From 49c3a5eca58276daca4207c38a1579080aade23e Mon Sep 17 00:00:00 2001 +From: Suleyman TURKMEN +Date: Fri, 24 Jan 2025 15:31:53 +0300 +Subject: [PATCH 05/10] minor improvement for better code readibility + +--- + modules/imgcodecs/src/grfmt_png.cpp | 41 ++++++++++++++++++----------- + modules/imgcodecs/src/grfmt_png.hpp | 27 +++++++++++++++++-- + 2 files changed, 50 insertions(+), 18 deletions(-) + +diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp +index 64ef56c8c5..08e37ec0c3 100644 +--- a/modules/imgcodecs/src/grfmt_png.cpp ++++ b/modules/imgcodecs/src/grfmt_png.cpp +@@ -274,7 +274,7 @@ bool PngDecoder::readHeader() + } + + // Read PNG header: 137 80 78 71 13 10 26 10 +- if (!read_from_io(&sig, 8)) ++ if (!readFromStreamOrBuffer(&sig, 8)) + return false; + + id = read_chunk(m_chunkIHDR); +@@ -682,7 +682,7 @@ void PngDecoder::compose_frame(std::vector& rows_dst, const std::vect + }); + } + +-bool PngDecoder::read_from_io(void* buffer, size_t num_bytes) ++bool PngDecoder::readFromStreamOrBuffer(void* buffer, size_t num_bytes) + { + if (m_f) + return fread(buffer, 1, num_bytes, m_f) == num_bytes; +@@ -700,7 +700,7 @@ bool PngDecoder::read_from_io(void* buffer, size_t num_bytes) + uint32_t PngDecoder::read_chunk(Chunk& chunk) + { + unsigned char size_id[8]; +- if (!read_from_io(&size_id, 8)) ++ if (!readFromStreamOrBuffer(&size_id, 8)) + return 0; + const size_t size = static_cast(png_get_uint_32(size_id)) + 12; + +@@ -737,7 +737,7 @@ uint32_t PngDecoder::read_chunk(Chunk& chunk) + + chunk.p.resize(size); + memcpy(chunk.p.data(), size_id, 8); +- if (read_from_io(&chunk.p[8], chunk.p.size() - 8)) ++ if (readFromStreamOrBuffer(&chunk.p[8], chunk.p.size() - 8)) + return id; + return 0; + } +@@ -960,15 +960,24 @@ bool PngEncoder::write( const Mat& img, const std::vector& params ) + return result; + } + +-size_t PngEncoder::write_to_io(void const* _Buffer, size_t _ElementSize, size_t _ElementCount, FILE * _Stream) ++size_t PngEncoder::writeToStreamOrBuffer(void const* buffer, size_t num_bytes, FILE* stream) + { +- if (_Stream) +- return fwrite(_Buffer, _ElementSize, _ElementCount, _Stream); ++ if (!buffer || !num_bytes) ++ return 0; // Handle null buffer or empty writes ++ ++ if (stream) ++ { ++ size_t written = fwrite(buffer, 1, num_bytes, stream); ++ return written; // fwrite handles the write count ++ } + + size_t cursz = m_buf->size(); +- m_buf->resize(cursz + _ElementCount); +- memcpy( &(*m_buf)[cursz], _Buffer, _ElementCount ); +- return _ElementCount; ++ if (cursz + num_bytes > m_buf->max_size()) ++ throw std::runtime_error("Buffer size exceeds maximum capacity"); ++ ++ m_buf->resize(cursz + num_bytes); ++ memcpy(&(*m_buf)[cursz], buffer, num_bytes); ++ return num_bytes; + } + + void PngEncoder::writeChunk(FILE* f, const char* name, unsigned char* data, uint32_t length) +@@ -977,26 +986,26 @@ void PngEncoder::writeChunk(FILE* f, const char* name, unsigned char* data, uint + uint32_t crc = crc32(0, Z_NULL, 0); + + png_save_uint_32(buf, length); +- write_to_io(buf, 1, 4, f); +- write_to_io(name, 1, 4, f); ++ writeToStreamOrBuffer(buf, 4, f); ++ writeToStreamOrBuffer(name, 4, f); + crc = crc32(crc, (const Bytef*)name, 4); + + if (memcmp(name, "fdAT", 4) == 0) + { + png_save_uint_32(buf, next_seq_num++); +- write_to_io(buf, 1, 4, f); ++ writeToStreamOrBuffer(buf, 4, f); + crc = crc32(crc, buf, 4); + length -= 4; + } + + if (data != NULL && length > 0) + { +- write_to_io(data, 1, length, f); ++ writeToStreamOrBuffer(data, length, f); + crc = crc32(crc, data, length); + } + + png_save_uint_32(buf, crc); +- write_to_io(buf, 1, 4, f); ++ writeToStreamOrBuffer(buf, 4, f); + } + + void PngEncoder::writeIDATs(FILE* f, int frame, unsigned char* data, uint32_t length, uint32_t idat_size) +@@ -1521,7 +1530,7 @@ bool PngEncoder::writeanimation(const Animation& animation, const std::vector& rows_dst, const std::vector& rows_src, unsigned char bop, uint32_t x, uint32_t y, uint32_t w, uint32_t h, Mat& img); +- CV_NODISCARD_STD bool read_from_io(void* buffer, size_t num_bytes); ++ /** ++ * @brief Reads data from an I/O source into the provided buffer. ++ * @param buffer Pointer to the buffer where the data will be stored. ++ * @param num_bytes Number of bytes to read into the buffer. ++ * @return true if the operation is successful, false otherwise. ++ */ ++ CV_NODISCARD_STD bool readFromStreamOrBuffer(void* buffer, size_t num_bytes); + uint32_t read_chunk(Chunk& chunk); + CV_NODISCARD_STD bool InitPngPtr(); + void ClearPngPtr(); +@@ -185,7 +191,24 @@ public: + protected: + static void writeDataToBuf(void* png_ptr, unsigned char* src, size_t size); + static void flushBuf(void* png_ptr); +- size_t write_to_io(void const* _Buffer, size_t _ElementSize, size_t _ElementCount, FILE* _Stream); ++ /** ++ * @brief Writes data to an output destination, either a file stream or an in-memory buffer. ++ * ++ * This function handles two output scenarios: ++ * 1. If a file stream is provided, the data is written to the stream using `fwrite`. ++ * 2. If `stream` is null, the data is written to an in-memory buffer (`m_buf`), which is resized as needed. ++ * ++ * @param buffer Pointer to the data to be written. ++ * @param num_bytes The number of bytes to be written. ++ * @param stream Pointer to the file stream for writing. If null, the data is written to the in-memory buffer. ++ * @return The number of bytes successfully written. ++ * - For file-based writes, this is the number of bytes written to the stream. ++ * - For buffer-based writes, this is the total number of bytes added to the buffer. ++ * ++ * @throws std::runtime_error If the in-memory buffer (`m_buf`) exceeds its maximum capacity. ++ * @note If `num_bytes` is 0 or `buffer` is null, the function returns 0. ++ */ ++ size_t writeToStreamOrBuffer(void const* buffer, size_t num_bytes, FILE* stream); + + private: + void writeChunk(FILE* f, const char* name, unsigned char* data, uint32_t length); +-- +2.48.1 + diff --git a/0006-Merge-pull-request-26835-from-sturkmen72-patch-4.patch b/0006-Merge-pull-request-26835-from-sturkmen72-patch-4.patch new file mode 100644 index 0000000..ba5c46f --- /dev/null +++ b/0006-Merge-pull-request-26835-from-sturkmen72-patch-4.patch @@ -0,0 +1,133 @@ +From 8131e27e824740afa447a129e72a2f6a3876cbc9 Mon Sep 17 00:00:00 2001 +From: Suleyman TURKMEN +Date: Sat, 25 Jan 2025 09:31:00 +0300 +Subject: [PATCH 06/10] Merge pull request #26835 from sturkmen72:patch-4 + +Corrections on bKGD chunk writing and reading in PNG #26835 + +### Pull Request Readiness Checklist + +See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request + +- [x] I agree to contribute to the project under Apache 2 License. +- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV +- [x] The PR is proposed to the proper branch +- [ ] There is a reference to the original bug report and related work +- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable + Patch to opencv_extra has the same branch name. +- [ ] The feature is well documented and sample code can be built with the project CMake +--- + modules/imgcodecs/src/grfmt_png.cpp | 26 ++++++++--------- + modules/imgcodecs/test/test_animation.cpp | 35 ++++++++++++++++++++++- + 2 files changed, 46 insertions(+), 15 deletions(-) + +diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp +index 08e37ec0c3..4ec3280607 100644 +--- a/modules/imgcodecs/src/grfmt_png.cpp ++++ b/modules/imgcodecs/src/grfmt_png.cpp +@@ -327,11 +327,10 @@ bool PngDecoder::readHeader() + if (id == id_bKGD) + { + // The spec is actually more complex: http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.bKGD +- int bgcolor = png_get_uint_32(&chunk.p[8]); +- m_animation.bgcolor[3] = (bgcolor >> 24) & 0xFF; +- m_animation.bgcolor[2] = (bgcolor >> 16) & 0xFF; +- m_animation.bgcolor[1] = (bgcolor >> 8) & 0xFF; +- m_animation.bgcolor[0] = bgcolor & 0xFF; ++ m_animation.bgcolor[0] = png_get_uint_16(&chunk.p[8]); ++ m_animation.bgcolor[1] = png_get_uint_16(&chunk.p[10]); ++ m_animation.bgcolor[2] = png_get_uint_16(&chunk.p[12]); ++ m_animation.bgcolor[3] = 0; + } + + if (id == id_PLTE || id == id_tRNS) +@@ -721,11 +720,10 @@ uint32_t PngDecoder::read_chunk(Chunk& chunk) + if (size != 8 + 26 + 4) + return 0; + } else if (id == id_bKGD) { +- // 8=HDR+size, ??=size of bKGD chunk, 4=CRC ++ // 8=HDR+size, (1, 2 or 6)=size of bKGD chunk, 4=CRC + // The spec is actually more complex: + // http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.bKGD +- // TODO: we only check that 4 bytes can be read from &chunk.p[8]. Fix. +- if (size < 8 + 4) ++ if (size != 8 + 1 + 4 && size != 8 + 2 + 4 && size != 8 + 6 + 4) + return 0; + } else if (id != id_fdAT && id != id_IDAT && id != id_IEND && id != id_PLTE && id != id_tRNS) { + if (size > PNG_USER_CHUNK_MALLOC_MAX) +@@ -1542,13 +1540,13 @@ bool PngEncoder::writeanimation(const Animation& animation, const std::vector 0) + writeChunk(m_f, "PLTE", (unsigned char*)(&palette), palsize * 3); + +- if ((animation.bgcolor != Scalar()) && (animation.frames.size() > 1)) ++ if ((animation.bgcolor != Scalar()) && coltype) + { +- uint64_t bgvalue = (static_cast(animation.bgcolor[0]) & 0xFF) << 24 | +- (static_cast(animation.bgcolor[1]) & 0xFF) << 16 | +- (static_cast(animation.bgcolor[2]) & 0xFF) << 8 | +- (static_cast(animation.bgcolor[3]) & 0xFF); +- writeChunk(m_f, "bKGD", (unsigned char*)(&bgvalue), 6); //the bKGD chunk must precede the first IDAT chunk, and must follow the PLTE chunk. ++ unsigned char bgvalue[6] = {}; ++ bgvalue[1] = animation.bgcolor[0]; ++ bgvalue[3] = animation.bgcolor[1]; ++ bgvalue[5] = animation.bgcolor[2]; ++ writeChunk(m_f, "bKGD", bgvalue, 6); //the bKGD chunk must precede the first IDAT chunk, and must follow the PLTE chunk. + } + + if (trnssize > 0) +diff --git a/modules/imgcodecs/test/test_animation.cpp b/modules/imgcodecs/test/test_animation.cpp +index e8c42cbcc0..df0a00a8b1 100644 +--- a/modules/imgcodecs/test/test_animation.cpp ++++ b/modules/imgcodecs/test/test_animation.cpp +@@ -425,6 +425,39 @@ TEST(Imgcodecs_APNG, imwriteanimation_rgb) + EXPECT_EQ(0, remove(output.c_str())); + } + ++TEST(Imgcodecs_APNG, imwriteanimation_gray) ++{ ++ Animation s_animation, l_animation; ++ EXPECT_TRUE(fillFrames(s_animation, false)); ++ ++ for (size_t i = 0; i < s_animation.frames.size(); i++) ++ { ++ cvtColor(s_animation.frames[i], s_animation.frames[i], COLOR_BGR2GRAY); ++ } ++ ++ s_animation.bgcolor = Scalar(50, 100, 150); ++ string output = cv::tempfile(".png"); ++ // Write the animation to a .png file and verify success. ++ EXPECT_TRUE(imwriteanimation(output, s_animation)); ++ ++ // Read the animation back and compare with the original. ++ EXPECT_TRUE(imreadanimation(output, l_animation)); ++ ++ EXPECT_EQ(Scalar(), l_animation.bgcolor); ++ size_t expected_frame_count = s_animation.frames.size() - 2; ++ ++ // Verify that the number of frames matches the expected count. ++ EXPECT_EQ(expected_frame_count, imcount(output)); ++ EXPECT_EQ(expected_frame_count, l_animation.frames.size()); ++ ++ EXPECT_EQ(0, remove(output.c_str())); ++ ++ for (size_t i = 0; i < l_animation.frames.size(); i++) ++ { ++ EXPECT_EQ(0, cvtest::norm(s_animation.frames[i], l_animation.frames[i], NORM_INF)); ++ } ++} ++ + TEST(Imgcodecs_APNG, imwritemulti_rgba) + { + Animation s_animation; +@@ -492,7 +525,7 @@ TEST(Imgcodecs_APNG, imwriteanimation_bgcolor) + { + Animation s_animation, l_animation; + EXPECT_TRUE(fillFrames(s_animation, true, 2)); +- s_animation.bgcolor = Scalar(50, 100, 150, 128); // different values for test purpose. ++ s_animation.bgcolor = Scalar(50, 100, 150); // will be written in bKGD chunk as RGB. + + // Create a temporary output filename for saving the animation. + string output = cv::tempfile(".png"); +-- +2.48.1 + diff --git a/0007-fix-for-large-tEXt-chunk.patch b/0007-fix-for-large-tEXt-chunk.patch new file mode 100644 index 0000000..20193cb --- /dev/null +++ b/0007-fix-for-large-tEXt-chunk.patch @@ -0,0 +1,39 @@ +From d6c4ac2e5e9cb7ea607ecb8e70884a3c5a06654c Mon Sep 17 00:00:00 2001 +From: Suleyman TURKMEN +Date: Tue, 28 Jan 2025 01:06:41 +0300 +Subject: [PATCH 07/10] fix for large tEXt chunk + +--- + modules/imgcodecs/src/grfmt_png.cpp | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp +index 4ec3280607..909a9017b2 100644 +--- a/modules/imgcodecs/src/grfmt_png.cpp ++++ b/modules/imgcodecs/src/grfmt_png.cpp +@@ -126,9 +126,10 @@ const uint32_t id_acTL = 0x4C546361; // Animation control chunk + const uint32_t id_fcTL = 0x4C546366; // Frame control chunk + const uint32_t id_IDAT = 0x54414449; // first frame and/or default image + const uint32_t id_fdAT = 0x54416466; // Frame data chunk +-const uint32_t id_PLTE = 0x45544C50; +-const uint32_t id_bKGD = 0x44474B62; +-const uint32_t id_tRNS = 0x534E5274; ++const uint32_t id_PLTE = 0x45544C50; // The PLTE chunk contains a color palette for indexed-color images ++const uint32_t id_bKGD = 0x44474B62; // The bKGD chunk specifies a default background color for the image ++const uint32_t id_tRNS = 0x534E5274; // The tRNS chunk provides transparency information ++const uint32_t id_tEXt = 0x74584574; // The tEXt chunk stores metadata as text in key-value pairs + const uint32_t id_IEND = 0x444E4549; // end/footer chunk + + APNGFrame::APNGFrame() +@@ -725,7 +726,7 @@ uint32_t PngDecoder::read_chunk(Chunk& chunk) + // http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.bKGD + if (size != 8 + 1 + 4 && size != 8 + 2 + 4 && size != 8 + 6 + 4) + return 0; +- } else if (id != id_fdAT && id != id_IDAT && id != id_IEND && id != id_PLTE && id != id_tRNS) { ++ } else if (id != id_fdAT && id != id_IDAT && id != id_IEND && id != id_PLTE && id != id_tEXt && id != id_tRNS) { + if (size > PNG_USER_CHUNK_MALLOC_MAX) + { + CV_LOG_WARNING(NULL, "user chunk data is too large"); +-- +2.48.1 + diff --git a/0008-Merge-pull-request-26854-from-vrabaud-png_leak.patch b/0008-Merge-pull-request-26854-from-vrabaud-png_leak.patch new file mode 100644 index 0000000..f673d2f --- /dev/null +++ b/0008-Merge-pull-request-26854-from-vrabaud-png_leak.patch @@ -0,0 +1,90 @@ +From 0d99c4283620671be3009ec00eb260e5a759cc39 Mon Sep 17 00:00:00 2001 +From: Vincent Rabaud +Date: Fri, 31 Jan 2025 09:00:23 +0100 +Subject: [PATCH 08/10] Merge pull request #26854 from vrabaud:png_leak + +Fix oss-fuzz bugs 391934081 and 392318892 #26854 + +- fix a potential overflow in x0+w0 +- use the proper function to deal with background color to deal with all cases of the spec +- use BGR layout for APNG background color + +### Pull Request Readiness Checklist + +See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request + +- [x] I agree to contribute to the project under Apache 2 License. +- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV +- [x] The PR is proposed to the proper branch +- [x] There is a reference to the original bug report and related work +- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable + Patch to opencv_extra has the same branch name. +- [ ] The feature is well documented and sample code can be built with the project CMake +--- + .../imgcodecs/include/opencv2/imgcodecs.hpp | 2 +- + modules/imgcodecs/src/grfmt_png.cpp | 19 +++++++------------ + 2 files changed, 8 insertions(+), 13 deletions(-) + +diff --git a/modules/imgcodecs/include/opencv2/imgcodecs.hpp b/modules/imgcodecs/include/opencv2/imgcodecs.hpp +index cd648c2c6e..c802033e6b 100644 +--- a/modules/imgcodecs/include/opencv2/imgcodecs.hpp ++++ b/modules/imgcodecs/include/opencv2/imgcodecs.hpp +@@ -263,7 +263,7 @@ struct CV_EXPORTS_W_SIMPLE Animation + - If a negative value or a value beyond the maximum of `0xffff` (65535) is provided, it is reset to `0` + (infinite looping) to maintain valid bounds. + +- @param bgColor A `Scalar` object representing the background color in BGRA format: ++ @param bgColor A `Scalar` object representing the background color in BGR format: + - Defaults to `Scalar()`, indicating an empty color (usually transparent if supported). + - This background color provides a solid fill behind frames that have transparency, ensuring a consistent display appearance. + */ +diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp +index 909a9017b2..f7a19c2bf5 100644 +--- a/modules/imgcodecs/src/grfmt_png.cpp ++++ b/modules/imgcodecs/src/grfmt_png.cpp +@@ -325,15 +325,6 @@ bool PngDecoder::readHeader() + bop = chunk.p[33]; + } + +- if (id == id_bKGD) +- { +- // The spec is actually more complex: http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.bKGD +- m_animation.bgcolor[0] = png_get_uint_16(&chunk.p[8]); +- m_animation.bgcolor[1] = png_get_uint_16(&chunk.p[10]); +- m_animation.bgcolor[2] = png_get_uint_16(&chunk.p[12]); +- m_animation.bgcolor[3] = 0; +- } +- + if (id == id_PLTE || id == id_tRNS) + m_chunksInfo.push_back(chunk); + } +@@ -356,9 +347,13 @@ bool PngDecoder::readHeader() + m_color_type = color_type; + m_bit_depth = bit_depth; + +- if (m_is_fcTL_loaded && (int(x0 + w0) > m_width || int(y0 + h0) > m_height || dop > 2 || bop > 1)) ++ if (m_is_fcTL_loaded && ((long long int)x0 + w0 > m_width || (long long int)y0 + h0 > m_height || dop > 2 || bop > 1)) + return false; + ++ png_color_16p background_color; ++ if (png_get_bKGD(m_png_ptr, m_info_ptr, &background_color)) ++ m_animation.bgcolor = Scalar(background_color->blue, background_color->green, background_color->red); ++ + if (bit_depth <= 8 || bit_depth == 16) + { + switch (color_type) +@@ -1544,9 +1539,9 @@ bool PngEncoder::writeanimation(const Animation& animation, const std::vector +Date: Tue, 4 Feb 2025 12:21:55 +0300 +Subject: [PATCH 09/10] Merge pull request #26872 from + sturkmen72:ImageEncoders_revisions + +Performance tests for image encoders and decoders and code cleanup #26872 + +### Pull Request Readiness Checklist + +See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request + +- [x] I agree to contribute to the project under Apache 2 License. +- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV +- [x] The PR is proposed to the proper branch +- [ ] There is a reference to the original bug report and related work +- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable + Patch to opencv_extra has the same branch name. +- [ ] The feature is well documented and sample code can be built with the project CMake +--- + modules/highgui/src/window_w32.cpp | 10 +- + modules/imgcodecs/perf/perf_decode_encode.cpp | 131 ++++++++++++++++++ + modules/imgcodecs/src/grfmt_avif.cpp | 5 - + modules/imgcodecs/src/grfmt_avif.hpp | 1 - + modules/imgcodecs/src/grfmt_base.cpp | 8 +- + modules/imgcodecs/src/grfmt_base.hpp | 5 +- + modules/imgcodecs/src/grfmt_gif.cpp | 10 +- + modules/imgcodecs/src/grfmt_gif.hpp | 3 - + modules/imgcodecs/src/grfmt_png.cpp | 6 +- + modules/imgcodecs/src/loadsave.cpp | 2 +- + 10 files changed, 155 insertions(+), 26 deletions(-) + create mode 100644 modules/imgcodecs/perf/perf_decode_encode.cpp + +diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp +index 2543c81c6a..8e041c9609 100644 +--- a/modules/highgui/src/window_w32.cpp ++++ b/modules/highgui/src/window_w32.cpp +@@ -2170,9 +2170,15 @@ static void showSaveDialog(CvWindow& window) + #ifdef HAVE_WEBP + "WebP files (*.webp)\0*.webp\0" + #endif +- "Portable image format (*.pbm;*.pgm;*.ppm;*.pxm;*.pnm)\0*.pbm;*.pgm;*.ppm;*.pxm;*.pnm\0" ++ "Portable image format (*.pbm;*.pgm;*.ppm;*.pnm;*.pam)\0*.pbm;*.pgm;*.ppm;*.pnm;*.pam\0" + #ifdef HAVE_OPENEXR + "OpenEXR Image files (*.exr)\0*.exr\0" ++#endif ++#ifdef HAVE_AVIF ++ "AVIF files (*.avif)\0*.avif\0" ++#endif ++#ifdef HAVE_IMGCODEC_GIF ++ "Graphics Interchange Format 89a(*.gif)\0*.gif\0" + #endif + "Radiance HDR (*.hdr;*.pic)\0*.hdr;*.pic\0" + "Sun raster files (*.sr;*.ras)\0*.sr;*.ras\0" +@@ -2194,7 +2200,7 @@ static void showSaveDialog(CvWindow& window) + } + #else + CV_UNUSED(window); +- CV_LOG_WARNING("Save dialog requires enabled 'imgcodecs' module."); ++ CV_LOG_WARNING(NULL, "Save dialog requires enabled 'imgcodecs' module."); + return; + #endif + } +diff --git a/modules/imgcodecs/perf/perf_decode_encode.cpp b/modules/imgcodecs/perf/perf_decode_encode.cpp +new file mode 100644 +index 0000000000..ce693cb878 +--- /dev/null ++++ b/modules/imgcodecs/perf/perf_decode_encode.cpp +@@ -0,0 +1,131 @@ ++// This file is part of OpenCV project. ++// It is subject to the license terms in the LICENSE file found in the top-level directory ++// of this distribution and at http://opencv.org/license.html ++ ++#include "perf_precomp.hpp" ++ ++namespace opencv_test ++{ ++ ++#ifdef HAVE_PNG ++ ++using namespace perf; ++ ++typedef perf::TestBaseWithParam Decode; ++typedef perf::TestBaseWithParam Encode; ++ ++const string exts[] = { ++#ifdef HAVE_AVIF ++ ".avif", ++#endif ++ ".bmp", ++#ifdef HAVE_IMGCODEC_GIF ++ ".gif", ++#endif ++#if (defined(HAVE_JASPER) && defined(OPENCV_IMGCODECS_ENABLE_JASPER_TESTS)) \ ++ || defined(HAVE_OPENJPEG) ++ ".jp2", ++#endif ++#ifdef HAVE_JPEG ++ ".jpg", ++#endif ++#ifdef HAVE_JPEGXL ++ ".jxl", ++#endif ++ ".png", ++#ifdef HAVE_IMGCODEC_PXM ++ ".ppm", ++#endif ++#ifdef HAVE_IMGCODEC_SUNRASTER ++ ".ras", ++#endif ++#ifdef HAVE_TIFF ++ ".tiff", ++#endif ++#ifdef HAVE_WEBP ++ ".webp", ++#endif ++}; ++ ++const string exts_multi[] = { ++#ifdef HAVE_AVIF ++ ".avif", ++#endif ++#ifdef HAVE_IMGCODEC_GIF ++ ".gif", ++#endif ++ ".png", ++#ifdef HAVE_TIFF ++ ".tiff", ++#endif ++#ifdef HAVE_WEBP ++ ".webp", ++#endif ++}; ++ ++PERF_TEST_P(Decode, bgr, testing::ValuesIn(exts)) ++{ ++ String filename = getDataPath("perf/1920x1080.png"); ++ ++ Mat src = imread(filename); ++ EXPECT_FALSE(src.empty()) << "Cannot open test image perf/1920x1080.png"; ++ vector buf; ++ EXPECT_TRUE(imencode(GetParam(), src, buf)); ++ ++ TEST_CYCLE() imdecode(buf, IMREAD_UNCHANGED); ++ ++ SANITY_CHECK_NOTHING(); ++} ++ ++PERF_TEST_P(Decode, rgb, testing::ValuesIn(exts)) ++{ ++ String filename = getDataPath("perf/1920x1080.png"); ++ ++ Mat src = imread(filename); ++ EXPECT_FALSE(src.empty()) << "Cannot open test image perf/1920x1080.png"; ++ vector buf; ++ EXPECT_TRUE(imencode(GetParam(), src, buf)); ++ ++ TEST_CYCLE() imdecode(buf, IMREAD_COLOR_RGB); ++ ++ SANITY_CHECK_NOTHING(); ++} ++ ++PERF_TEST_P(Encode, bgr, testing::ValuesIn(exts)) ++{ ++ String filename = getDataPath("perf/1920x1080.png"); ++ ++ Mat src = imread(filename); ++ EXPECT_FALSE(src.empty()) << "Cannot open test image perf/1920x1080.png"; ++ vector buf; ++ ++ TEST_CYCLE() imencode(GetParam(), src, buf); ++ ++ std::cout << "Encoded buffer size: " << buf.size() ++ << " bytes, Compression ratio: " << std::fixed << std::setprecision(2) ++ << (static_cast(buf.size()) / (src.total() * src.channels())) * 100.0 << "%" << std::endl; ++ ++ SANITY_CHECK_NOTHING(); ++} ++ ++PERF_TEST_P(Encode, multi, testing::ValuesIn(exts_multi)) ++{ ++ String filename = getDataPath("perf/1920x1080.png"); ++ vector vec; ++ EXPECT_TRUE(imreadmulti(filename, vec)); ++ vec.push_back(vec.back().clone()); ++ circle(vec.back(), Point(100, 100), 45, Scalar(0, 0, 255, 0), 2, LINE_AA); ++ vector buf; ++ EXPECT_TRUE(imwrite("test" + GetParam(), vec)); ++ ++ TEST_CYCLE() imencode(GetParam(), vec, buf); ++ ++ std::cout << "Encoded buffer size: " << buf.size() ++ << " bytes, Compression ratio: " << std::fixed << std::setprecision(2) ++ << (static_cast(buf.size()) / (vec[0].total() * vec[0].channels())) * 100.0 << "%" << std::endl; ++ ++ SANITY_CHECK_NOTHING(); ++} ++#endif // HAVE_PNG ++ ++} // namespace +diff --git a/modules/imgcodecs/src/grfmt_avif.cpp b/modules/imgcodecs/src/grfmt_avif.cpp +index d3fb500604..c35eb50306 100644 +--- a/modules/imgcodecs/src/grfmt_avif.cpp ++++ b/modules/imgcodecs/src/grfmt_avif.cpp +@@ -298,11 +298,6 @@ bool AvifEncoder::isFormatSupported(int depth) const { + return (depth == CV_8U || depth == CV_16U); + } + +-bool AvifEncoder::write(const Mat &img, const std::vector ¶ms) { +- std::vector img_vec(1, img); +- return writemulti(img_vec, params); +-} +- + bool AvifEncoder::writeanimation(const Animation& animation, + const std::vector ¶ms) { + int bit_depth = 8; +diff --git a/modules/imgcodecs/src/grfmt_avif.hpp b/modules/imgcodecs/src/grfmt_avif.hpp +index 87b765619e..9f097aaf55 100644 +--- a/modules/imgcodecs/src/grfmt_avif.hpp ++++ b/modules/imgcodecs/src/grfmt_avif.hpp +@@ -41,7 +41,6 @@ class AvifEncoder CV_FINAL : public BaseImageEncoder { + ~AvifEncoder() CV_OVERRIDE; + + bool isFormatSupported(int depth) const CV_OVERRIDE; +- bool write(const Mat& img, const std::vector& params) CV_OVERRIDE; + bool writeanimation(const Animation& animation, const std::vector& params) CV_OVERRIDE; + + ImageEncoder newEncoder() const CV_OVERRIDE; +diff --git a/modules/imgcodecs/src/grfmt_base.cpp b/modules/imgcodecs/src/grfmt_base.cpp +index 1e09882780..dc3d07ab78 100644 +--- a/modules/imgcodecs/src/grfmt_base.cpp ++++ b/modules/imgcodecs/src/grfmt_base.cpp +@@ -140,6 +140,11 @@ bool BaseImageEncoder::setDestination( std::vector& buf ) + return true; + } + ++bool BaseImageEncoder::write(const Mat &img, const std::vector ¶ms) { ++ std::vector img_vec(1, img); ++ return writemulti(img_vec, params); ++} ++ + bool BaseImageEncoder::writemulti(const std::vector& img_vec, const std::vector& params) + { + if(img_vec.size() > 1) +@@ -157,6 +162,7 @@ bool BaseImageEncoder::writemulti(const std::vector& img_vec, const std::ve + + bool BaseImageEncoder::writeanimation(const Animation&, const std::vector& ) + { ++ CV_LOG_WARNING(NULL, "No Animation encoder for specified file extension"); + return false; + } + +@@ -165,7 +171,7 @@ ImageEncoder BaseImageEncoder::newEncoder() const + return ImageEncoder(); + } + +-void BaseImageEncoder::throwOnEror() const ++void BaseImageEncoder::throwOnError() const + { + if(!m_last_error.empty()) + { +diff --git a/modules/imgcodecs/src/grfmt_base.hpp b/modules/imgcodecs/src/grfmt_base.hpp +index a90bd8a3de..ae5622528c 100644 +--- a/modules/imgcodecs/src/grfmt_base.hpp ++++ b/modules/imgcodecs/src/grfmt_base.hpp +@@ -202,12 +202,11 @@ public: + + /** + * @brief Encode and write the image data. +- * This is a pure virtual function that must be implemented by derived classes. + * @param img The Mat object containing the image data to be encoded. + * @param params A vector of parameters controlling the encoding process (e.g., compression level). + * @return true if the image was successfully written, false otherwise. + */ +- virtual bool write(const Mat& img, const std::vector& params) = 0; ++ virtual bool write(const Mat& img, const std::vector& params); + + /** + * @brief Encode and write multiple images (e.g., for animated formats). +@@ -236,7 +235,7 @@ public: + * @brief Throw an exception based on the last error encountered during encoding. + * This method can be used to propagate error conditions back to the caller. + */ +- virtual void throwOnEror() const; ++ virtual void throwOnError() const; + + protected: + String m_description; ///< Description of the encoder (e.g., format name, capabilities). +diff --git a/modules/imgcodecs/src/grfmt_gif.cpp b/modules/imgcodecs/src/grfmt_gif.cpp +index 5a65ae04b1..b0533b644f 100644 +--- a/modules/imgcodecs/src/grfmt_gif.cpp ++++ b/modules/imgcodecs/src/grfmt_gif.cpp +@@ -488,19 +488,11 @@ GifEncoder::~GifEncoder() { + close(); + } + +-bool GifEncoder::isFormatSupported(int depth) const { +- return depth == CV_8U; +-} +- +-bool GifEncoder::write(const Mat &img, const std::vector ¶ms) { +- std::vector img_vec(1, img); +- return writemulti(img_vec, params); +-} +- + bool GifEncoder::writeanimation(const Animation& animation, const std::vector& params) { + if (animation.frames.empty()) { + return false; + } ++ CV_CheckDepthEQ(animation.frames[0].depth(), CV_8U, "GIF encoder supports only 8-bit unsigned images"); + + if (m_buf) { + if (!strm.open(*m_buf)) { +diff --git a/modules/imgcodecs/src/grfmt_gif.hpp b/modules/imgcodecs/src/grfmt_gif.hpp +index 8f520745ba..8552718d00 100644 +--- a/modules/imgcodecs/src/grfmt_gif.hpp ++++ b/modules/imgcodecs/src/grfmt_gif.hpp +@@ -83,9 +83,6 @@ public: + GifEncoder(); + ~GifEncoder() CV_OVERRIDE; + +- bool isFormatSupported(int depth) const CV_OVERRIDE; +- +- bool write(const Mat& img, const std::vector& params) CV_OVERRIDE; + bool writeanimation(const Animation& animation, const std::vector& params) CV_OVERRIDE; + + ImageEncoder newEncoder() const CV_OVERRIDE; +diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp +index f7a19c2bf5..825122304a 100644 +--- a/modules/imgcodecs/src/grfmt_png.cpp ++++ b/modules/imgcodecs/src/grfmt_png.cpp +@@ -1412,6 +1412,9 @@ void PngEncoder::deflateRectFin(unsigned char* zbuf, uint32_t* zsize, int bpp, i + + bool PngEncoder::writeanimation(const Animation& animation, const std::vector& params) + { ++ int frame_type = animation.frames[0].type(); ++ int frame_depth = animation.frames[0].depth(); ++ CV_CheckType(frame_type, frame_depth == CV_8U || frame_depth == CV_16U, "APNG decoder supports only 8 or 16 bit unsigned images"); + int compression_level = 6; + int compression_strategy = IMWRITE_PNG_STRATEGY_RLE; // Default strategy + bool isBilevel = false; +@@ -1435,7 +1438,8 @@ bool PngEncoder::writeanimation(const Animation& animation, const std::vectorwritemulti(write_vec, params); + +- encoder->throwOnEror(); ++ encoder->throwOnError(); + CV_Assert( code ); + } + catch (const cv::Exception& e) +-- +2.48.1 + diff --git a/0010-Merge-pull-request-26915-from-mshabunin-fix-png-be.patch b/0010-Merge-pull-request-26915-from-mshabunin-fix-png-be.patch new file mode 100644 index 0000000..17f4955 --- /dev/null +++ b/0010-Merge-pull-request-26915-from-mshabunin-fix-png-be.patch @@ -0,0 +1,54 @@ +From ab0a4167057dadcfc497f0d4d653b5eec7fd586a Mon Sep 17 00:00:00 2001 +From: Maksim Shabunin +Date: Thu, 13 Feb 2025 16:58:15 +0300 +Subject: [PATCH 10/10] Merge pull request #26915 from mshabunin:fix-png-be + +Resolves #26913 +Related(?): #25715 #26832 +--- + modules/imgcodecs/src/grfmt_png.cpp | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp +index 825122304a..84df975471 100644 +--- a/modules/imgcodecs/src/grfmt_png.cpp ++++ b/modules/imgcodecs/src/grfmt_png.cpp +@@ -121,16 +121,16 @@ + namespace cv + { + +-const uint32_t id_IHDR = 0x52444849; // PNG header +-const uint32_t id_acTL = 0x4C546361; // Animation control chunk +-const uint32_t id_fcTL = 0x4C546366; // Frame control chunk +-const uint32_t id_IDAT = 0x54414449; // first frame and/or default image +-const uint32_t id_fdAT = 0x54416466; // Frame data chunk +-const uint32_t id_PLTE = 0x45544C50; // The PLTE chunk contains a color palette for indexed-color images +-const uint32_t id_bKGD = 0x44474B62; // The bKGD chunk specifies a default background color for the image +-const uint32_t id_tRNS = 0x534E5274; // The tRNS chunk provides transparency information +-const uint32_t id_tEXt = 0x74584574; // The tEXt chunk stores metadata as text in key-value pairs +-const uint32_t id_IEND = 0x444E4549; // end/footer chunk ++const uint32_t id_IHDR = 0x49484452; // PNG header ++const uint32_t id_acTL = 0x6163544C; // Animation control chunk ++const uint32_t id_fcTL = 0x6663544C; // Frame control chunk ++const uint32_t id_IDAT = 0x49444154; // first frame and/or default image ++const uint32_t id_fdAT = 0x66644154; // Frame data chunk ++const uint32_t id_PLTE = 0x504C5445; // The PLTE chunk contains a color palette for indexed-color images ++const uint32_t id_bKGD = 0x624B4744; // The bKGD chunk specifies a default background color for the image ++const uint32_t id_tRNS = 0x74524E53; // The tRNS chunk provides transparency information ++const uint32_t id_tEXt = 0x74455874; // The tEXt chunk stores metadata as text in key-value pairs ++const uint32_t id_IEND = 0x49454E44; // end/footer chunk + + APNGFrame::APNGFrame() + { +@@ -699,7 +699,7 @@ uint32_t PngDecoder::read_chunk(Chunk& chunk) + return 0; + const size_t size = static_cast(png_get_uint_32(size_id)) + 12; + +- const uint32_t id = *(uint32_t*)(&size_id[4]); ++ const uint32_t id = png_get_uint_32(size_id + 4); + if (id == id_IHDR) { + // 8=HDR+size, 13=size of IHDR chunk, 4=CRC + // http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.IHDR +-- +2.48.1 + diff --git a/opencv.spec b/opencv.spec index 02af591..9beb5c2 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,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: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -106,6 +106,21 @@ 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 + BuildRequires: gcc-c++ BuildRequires: cmake >= 2.6.3 @@ -407,6 +422,16 @@ popd &>/dev/null %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 pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv @@ -583,6 +608,10 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Tue Feb 18 2025 Adam Williamson - 4.11.0-2 +- Backport all post-4.11.0 PNG fixes, including big-endian fix +- Resolves: rhbz#2345306 + * Mon Feb 03 2025 Sérgio Basto 4.11.0-1 - Update to version 4.11.0 - Resolves: rhbz#2336422 From 12c310ffa4ce3a52bb13c7c41293c193dc2ca017 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 11 Mar 2025 08:30:52 -0400 Subject: [PATCH 233/274] Use Qt6 in highgui and cvv Qt5 is deprecated, and kstars (the only package which uses both opencv-highgui and Qt) is now using Qt6 in F42+. Other dependents of highgui are not using Qt directly otherwise, and cvv has no dependents. --- opencv.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 9beb5c2..2089acf 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,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: 2%{?dist} +Release: 3%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -195,7 +195,8 @@ BuildRequires: python3-beautifulsoup4 #for doc/doxygen/bib2xhtml.pl #BuildRequires: perl-open BuildRequires: gflags-devel -BuildRequires: qt5-qtbase-devel +BuildRequires: qt6-qtbase-devel +BuildRequires: qt6-qt5compat-devel BuildRequires: libGL-devel BuildRequires: libGLU-devel BuildRequires: hdf5-devel @@ -608,6 +609,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Tue Mar 11 2025 Yaakov Selkowitz - 4.11.0-3 +- Use Qt6 in highgui and cvv + * Tue Feb 18 2025 Adam Williamson - 4.11.0-2 - Backport all post-4.11.0 PNG fixes, including big-endian fix - Resolves: rhbz#2345306 From a3627e6bbbf6990706dea20657fb2e9bd4b3f522 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 4 Jun 2025 08:17:42 +0200 Subject: [PATCH 234/274] Rebuilt for Python 3.14 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 2089acf..ee1020e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,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: 3%{?dist} +Release: 4%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -609,6 +609,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Wed Jun 04 2025 Python Maint - 4.11.0-4 +- Rebuilt for Python 3.14 + * Tue Mar 11 2025 Yaakov Selkowitz - 4.11.0-3 - Use Qt6 in highgui and cvv From f516d8688f59567ad013446528b3b9774bad834e Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 8 Jul 2025 16:13:13 -0700 Subject: [PATCH 235/274] Add patch from Atri Bhattacharya to fix build with Qt 6.9 --- opencv.spec | 8 +++++++- qt69.patch | 11 +++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 qt69.patch diff --git a/opencv.spec b/opencv.spec index ee1020e..e42cce6 100644 --- a/opencv.spec +++ b/opencv.spec @@ -120,6 +120,9 @@ 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 BuildRequires: gcc-c++ @@ -434,6 +437,8 @@ popd &>/dev/null %patch -P 14 -p1 -b .png9 %patch -P 15 -p1 -b .png10 +%patch -P 99 -p1 -b .qt69 + pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv popd @@ -609,8 +614,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog -* Wed Jun 04 2025 Python Maint - 4.11.0-4 +* Tue Jul 08 2025 Adam Williamson - 4.11.0-4 - Rebuilt for Python 3.14 +- Add patch from Atri Bhattacharya to fix build with Qt 6.9 * Tue Mar 11 2025 Yaakov Selkowitz - 4.11.0-3 - Use Qt6 in highgui and cvv diff --git a/qt69.patch b/qt69.patch new file mode 100644 index 0000000..fa59991 --- /dev/null +++ b/qt69.patch @@ -0,0 +1,11 @@ +--- opencv-4.11.0/modules/highgui/CMakeLists.txt 2025-01-08 04:47:46.000000000 -0800 ++++ opencv-4.11.0/modules/highgui/CMakeLists.txt.new 2025-07-08 15:54:10.138078285 -0700 +@@ -125,7 +125,7 @@ + endif() + + foreach(dt_dep ${qt_deps}) +- add_definitions(${Qt${QT_VERSION_MAJOR}${dt_dep}_DEFINITIONS}) ++ link_libraries(${Qt${QT_VERSION_MAJOR}${dt_dep}}) + include_directories(${Qt${QT_VERSION_MAJOR}${dt_dep}_INCLUDE_DIRS}) + list(APPEND HIGHGUI_LIBRARIES ${Qt${QT_VERSION_MAJOR}${dt_dep}_LIBRARIES}) + endforeach() From 6086565bcb7fc40033946716106fd380cdea6817 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 8 Jul 2025 16:15:05 -0700 Subject: [PATCH 236/274] Correct qt patch application (d'oh) --- opencv.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index e42cce6..bd2aa10 100644 --- a/opencv.spec +++ b/opencv.spec @@ -436,8 +436,7 @@ popd &>/dev/null %patch -P 13 -p1 -b .png8 %patch -P 14 -p1 -b .png9 %patch -P 15 -p1 -b .png10 - -%patch -P 99 -p1 -b .qt69 +%patch -P 16 -p1 -b .qt69 pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv From 0e27e77c73e50c86fab46e3130c44acf06f3758d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 23:34:35 +0000 Subject: [PATCH 237/274] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index bd2aa10..3516ff5 100644 --- a/opencv.spec +++ b/opencv.spec @@ -77,7 +77,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: 4%{?dist} +Release: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -613,6 +613,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 4.11.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Tue Jul 08 2025 Adam Williamson - 4.11.0-4 - Rebuilt for Python 3.14 - Add patch from Atri Bhattacharya to fix build with Qt 6.9 From 56d06cb4b76d80657539d93751eb459caccb3b06 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 26 Jun 2025 12:44:25 +0200 Subject: [PATCH 238/274] Drop undefine cmake in source build --- opencv.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 3516ff5..0e79842 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,5 +1,3 @@ -%undefine __cmake_in_source_build - %bcond_with tests %bcond_without compat_openvc_pc %if %{without tests} From 974e024962945a8be7504cc50d33d9255c2b38f9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 26 Jun 2025 12:45:08 +0200 Subject: [PATCH 239/274] Add missing BR libavif --- opencv.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/opencv.spec b/opencv.spec index 0e79842..7a783b9 100644 --- a/opencv.spec +++ b/opencv.spec @@ -144,6 +144,7 @@ BuildRequires: libdc1394-devel %endif %endif BuildRequires: jasper-devel +BuildRequires: pkgconfig(libavif) BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libtiff-devel From 709fa3cec9a484f8485855a9960da8485c6b5e02 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 29 Jul 2025 10:27:41 +0200 Subject: [PATCH 240/274] Update changelog --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 7a783b9..3a5c6d4 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: 5%{?dist} +Release: 6%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -612,6 +612,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Tue Jul 29 2025 Nicolas Chauvet - 4.11.0-6 +- Add missing BR libavif + * Thu Jul 24 2025 Fedora Release Engineering - 4.11.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 1477217e3d13cd7d61aff4eb356d4fbc16240da2 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 31 Jul 2025 23:41:40 -0700 Subject: [PATCH 241/274] Rebuild for new gdal --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 3a5c6d4..0751013 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: 6%{?dist} +Release: 7%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -612,6 +612,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Thu Jul 31 2025 Adam Williamson - 4.11.0-7 +- Rebuild for new gdal + * Tue Jul 29 2025 Nicolas Chauvet - 4.11.0-6 - Add missing BR libavif From fbe317b035ad11ceec05b6101261f81f92afdb74 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 13:03:59 +0200 Subject: [PATCH 242/274] Rebuilt for Python 3.14.0rc2 bytecode --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 0751013..b8bcf5f 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: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -612,6 +612,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Fri Aug 15 2025 Python Maint - 4.11.0-8 +- Rebuilt for Python 3.14.0rc2 bytecode + * Thu Jul 31 2025 Adam Williamson - 4.11.0-7 - Rebuild for new gdal From 06d07a9e3b5d90b586166827cdf4aab5051be773 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 20 Aug 2025 13:47:37 -0600 Subject: [PATCH 243/274] Rebuild for tbb 2022.2.0 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index b8bcf5f..b727399 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: 8%{?dist} +Release: 9%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -612,6 +612,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Wed Aug 20 2025 Jerry James - 4.11.0-9 +- Rebuild for tbb 2022.2.0 + * Fri Aug 15 2025 Python Maint - 4.11.0-8 - Rebuilt for Python 3.14.0rc2 bytecode From 7a756537a3004b981f75c486e2a34c74e09587e7 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 24 Aug 2025 08:02:13 -0600 Subject: [PATCH 244/274] Rebuild for VTK 9.5 --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index b727399..698c5e8 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: 9%{?dist} +Release: 10%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause AND Apache-2.0 AND ISC @@ -612,6 +612,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Sun Aug 24 2025 Orion Poplawski - 4.11.0-10 +- Rebuild for VTK 9.5 + * Wed Aug 20 2025 Jerry James - 4.11.0-9 - Rebuild for tbb 2022.2.0 From 896754e4114b4fed45a251863f9f60654091027d Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:34:33 +0200 Subject: [PATCH 245/274] Rebuilt for Python 3.14.0rc3 bytecode --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 698c5e8..c4d1dab 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: 10%{?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 @@ -612,6 +612,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Fri Sep 19 2025 Python Maint - 4.11.0-11 +- Rebuilt for Python 3.14.0rc3 bytecode + * Sun Aug 24 2025 Orion Poplawski - 4.11.0-10 - Rebuild for VTK 9.5 From ec4ea19d197ac89ac540475600cab608bd9ea309 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 30 Sep 2025 20:40:45 +0200 Subject: [PATCH 246/274] 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 247/274] 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 248/274] 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 249/274] 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 250/274] 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 251/274] 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 252/274] 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 253/274] 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 254/274] 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 255/274] 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 256/274] 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 257/274] 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 258/274] 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 259/274] 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 260/274] 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 261/274] 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 262/274] 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 263/274] 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 264/274] 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 265/274] 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 266/274] 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 267/274] 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 268/274] 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 269/274] 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 270/274] 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 271/274] 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 272/274] 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 273/274] 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 274/274] 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