opencv: update to 4.6.0

Remove some upstream patches:
* 0003-issue-4107.patch
30ff9c6775
* 0017-fix-highgui-qt-opengl-linking.patch
82818e7324
* 0103-sfm-module-linking.patch
f1200c5fbf
This commit is contained in:
Biswapriyo Nath
2022-08-19 21:33:48 +05:30
parent 4a7357c705
commit 2e034d1c8e
4 changed files with 12 additions and 60 deletions

View File

@@ -1,24 +0,0 @@
From 602a3d497b934f28eb55ea15151bac9a747584dd Mon Sep 17 00:00:00 2001
From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
Date: Wed, 21 Apr 2021 13:22:57 -0400
Subject: [PATCH 3/8] issue-4107
---
cmake/OpenCVCompilerOptions.cmake | 1 -
1 file changed, 1 deletion(-)
diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake
index 40a058d..bd93e99 100644
--- a/cmake/OpenCVCompilerOptions.cmake
+++ b/cmake/OpenCVCompilerOptions.cmake
@@ -120,7 +120,6 @@ if(CV_GCC OR CV_CLANG)
add_extra_compiler_option(-Wall)
endif()
add_extra_compiler_option(-Werror=return-type)
- add_extra_compiler_option(-Werror=non-virtual-dtor)
add_extra_compiler_option(-Werror=address)
add_extra_compiler_option(-Werror=sequence-point)
add_extra_compiler_option(-Wformat)
--
2.31.1

View File

@@ -1,11 +0,0 @@
--- a/modules/highgui/CMakeLists.txt
+++ b/modules/highgui/CMakeLists.txt
@@ -271,7 +271,7 @@
add_apple_compiler_options(${the_module})
endif()
-if(OPENCV_HIGHGUI_BUILTIN_BACKEND STREQUAL "WIN32UI" AND HAVE_OPENGL AND OPENGL_LIBRARIES)
+if((OPENCV_HIGHGUI_BUILTIN_BACKEND STREQUAL "WIN32UI" OR HAVE_QT_OPENGL) AND HAVE_OPENGL AND OPENGL_LIBRARIES)
ocv_target_link_libraries(${the_module} PRIVATE "${OPENGL_LIBRARIES}")
endif()

View File

@@ -1,10 +0,0 @@
--- opencv_contrib-4.5.3/modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt.orig
+++ opencv_contrib-4.5.3/modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt
@@ -12,6 +12,6 @@ TARGET_LINK_LIBRARIES(correspondence LINK_PRIVATE ${GLOG_LIBRARIES} multiview)
IF(TARGET Eigen3::Eigen)
TARGET_LINK_LIBRARIES(correspondence LINK_PUBLIC Eigen3::Eigen)
ENDIF()
-
+TARGET_LINK_LIBRARIES(correspondence LINK_PRIVATE opencv_imgcodecs)
LIBMV_INSTALL_LIB(correspondence)

View File

@@ -3,8 +3,8 @@
_realname=opencv
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=4.5.5
pkgrel=6
pkgver=4.6.0
pkgrel=1
pkgdesc="Open Source Computer Vision Library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
@@ -51,9 +51,10 @@ optdepends=("${MINGW_PACKAGE_PREFIX}-python-numpy: Python 3.x interface"
)
source=("${_realname}-${pkgver}.tar.gz"::https://github.com/opencv/opencv/archive/${pkgver}.tar.gz
"${_realname}_contrib-${pkgver}.tar.gz"::https://github.com/opencv/opencv_contrib/archive/${pkgver}.tar.gz
https://github.com/opencv/opencv_contrib/commit/57db17eca22d72ebe8ddc1f26e6adc2c421a9611.patch
https://github.com/opencv/opencv_contrib/commit/e182fc8675a167044b129a3bdf3c4ad2d3399f68.patch
'0001-mingw-w64-cmake.patch'
'0002-solve_deg3-underflow.patch'
'0003-issue-4107.patch'
'0004-generate-proper-pkg-config-file.patch'
'0008-mingw-w64-cmake-lib-path.patch'
'0010-find-libpng-header.patch'
@@ -61,18 +62,17 @@ source=("${_realname}-${pkgver}.tar.gz"::https://github.com/opencv/opencv/archiv
'0014-python-install-path.patch'
'0015-windres-cant-handle-spaces-in-defines.patch'
'0016-use-pkgconfig-and-link-pthread.patch'
'0017-fix-highgui-qt-opengl-linking.patch'
'0018-aarch64-fp16-mingw.patch'
'0101-somehow-uint-not-detected.patch'
'0102-mingw-w64-have-sincos.patch'
'0103-sfm-module-linking.patch'
'0104-rgbd-module-missing-include.patch'
'0105-wechat-iconv-dependency.patch')
sha256sums=('a1cfdcf6619387ca9e232687504da996aaa9f7b5689986b8331ec02cb61d28ad'
'a97c2eaecf7a23c6dbd119a609c6d7fae903e5f9ff5f1fe678933e01c67a6c11'
sha256sums=('1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277'
'1777d5fd2b59029cf537e5fd6f8aa68d707075822f90bde683fcde086f85f7a7'
'd64b7d35a2cb630237d21b40561a7afb04da754e11b84806c22f9c2725a36f07'
'06b158abc07004b336dfd73fef33fb7433911cffdfef7e2014652e9105131e92'
'8a4053bcecb4c4781a4d87c74eb1cd3f03ad9288deaa22424f71a5e5cdc518c3'
'400f17bde074677566660b1baab52842c1a3d7024129a2d75af6015f6b55ba4f'
'480e45906b54c5b6079f437de50ebf2152a83860327613048b53d038526b8ad2'
'fcb3a4a469b09475dc2dad0c49bcaade8b80aa155eeaf0645398a77cd8c940cc'
'7398e66f80be37382bd427b5eb3a1201a23113c14e71435a44df8779ea1b8a34'
'd6ad5a0865eefe662ca4c7aceb6aa7b1fd5fcd27e1e65ca839d442f054095e69'
@@ -80,11 +80,9 @@ sha256sums=('a1cfdcf6619387ca9e232687504da996aaa9f7b5689986b8331ec02cb61d28ad'
'0c310a580d6700601d4b4f824b849c0f0d64d3953e249f04c6a91f15aa8bee0a'
'11522ffedb22980ba8d09ff715a25327fe14806e55588bffa761e39e1d035ea5'
'4b0b9ee5f93e3c26397badf6b296a674b8f115129520a845d9f50d77d2c086d7'
'f02b92aef58fcad8233a5041dfde7dacefa55efeb8266f58d1f6ba6ffc5301fc'
'cedb7593a377eb9e40c72762e79b2af56415ec410309ae8ff698557fe3f953f5'
'7d2ff25f97c84b59793502786dd64e25c8ca991b0523ffea56b45ce031e80c3f'
'2001804c5245af1894a308d6521f9cd044fb6dbd713b6e2e45106399a409c14d'
'0422317096007b72ab4928b48762da4252addf3e4f8066ba94e29344f5975ab8'
'c6c92cf39dfe45b8fb41d80ac0de3cd304e8b695420b307fd4320a105d8fe9f4'
'3cf6a17b234ddf4f20e042acce329823e970aa06873d63652fa132c46ee56739')
@@ -112,7 +110,6 @@ prepare() {
apply_patch_with_msg \
0001-mingw-w64-cmake.patch \
0002-solve_deg3-underflow.patch \
0003-issue-4107.patch \
0004-generate-proper-pkg-config-file.patch \
0008-mingw-w64-cmake-lib-path.patch \
0010-find-libpng-header.patch \
@@ -120,16 +117,16 @@ prepare() {
0014-python-install-path.patch \
0015-windres-cant-handle-spaces-in-defines.patch \
0016-use-pkgconfig-and-link-pthread.patch \
0017-fix-highgui-qt-opengl-linking.patch \
0018-aarch64-fp16-mingw.patch
cd "${srcdir}/${_realname}_contrib-${pkgver}"
apply_patch_with_msg \
0101-somehow-uint-not-detected.patch \
0102-mingw-w64-have-sincos.patch \
0103-sfm-module-linking.patch \
0104-rgbd-module-missing-include.patch \
0105-wechat-iconv-dependency.patch
0105-wechat-iconv-dependency.patch \
57db17eca22d72ebe8ddc1f26e6adc2c421a9611.patch \
e182fc8675a167044b129a3bdf3c4ad2d3399f68.patch
}
build() {
@@ -196,7 +193,7 @@ build() {
-DOPENCV_FORCE_VTK=ON \
-DPYTHON_DEFAULT_EXECUTABLE=${MINGW_PREFIX}/bin/python \
-DPYTHON3_EXECUTABLE=${MINGW_PREFIX}/bin/python \
-DPYTHON3_PACKAGES_PATH=$(cygpath -u $(${MINGW_PREFIX}/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")) \
-DPYTHON3_PACKAGES_PATH=$(cygpath -u $(${MINGW_PREFIX}/bin/python -c "import sysconfig; print(sysconfig.get_path('purelib'))")) \
-DPROTOBUF_UPDATE_FILES=ON \
-DENABLE_PRECOMPILED_HEADERS=OFF \
${extra_config[@]} \