From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 99F4A15807A for ; Tue, 8 Oct 2024 07:09:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA2E0E29C3; Tue, 8 Oct 2024 07:09:55 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A2DD9E29C3 for ; Tue, 8 Oct 2024 07:09:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B34F13430C7 for ; Tue, 8 Oct 2024 07:09:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 50DB716EF for ; Tue, 8 Oct 2024 07:09:53 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1728371378.cbbac430ba2f55f362bd6b432d80e07d0e9deebc.flow@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/opencv/files/opencv-4.8.0-arm64-fp16.patch media-libs/opencv/files/opencv-4.8.0-fix-cuda-12.2.0.patch media-libs/opencv/files/opencv-4.8.1-ade-0.1.2a.tar.gz.patch media-libs/opencv/files/opencv-4.8.1-drop-python2-detection.patch media-libs/opencv/files/opencv-4.8.1-eliminate-lto-compiler-warnings.patch media-libs/opencv/files/opencv-4.8.1-libpng16.patch media-libs/opencv/files/opencv-4.8.1-opencv_test.patch media-libs/opencv/files/opencv-4.8.1-protobuf-22.patch media-libs/opencv/files/opencv-4.8.1-python3_12-support.patch X-VCS-Directories: media-libs/opencv/files/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: cbbac430ba2f55f362bd6b432d80e07d0e9deebc X-VCS-Branch: master Date: Tue, 8 Oct 2024 07:09:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 932c63d6-c8a5-410c-81f1-3be81875877b X-Archives-Hash: 64f63e8c105e57602d4d2f6d635c8f45 commit: cbbac430ba2f55f362bd6b432d80e07d0e9deebc Author: Volkmar W. Pogatzki pogatzki net> AuthorDate: Fri Oct 4 21:26:23 2024 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Tue Oct 8 07:09:38 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbbac430 media-libs/opencv: remove unused patches Signed-off-by: Volkmar W. Pogatzki pogatzki.net> Signed-off-by: Florian Schmaus gentoo.org> .../opencv/files/opencv-4.8.0-arm64-fp16.patch | 272 --------------------- .../files/opencv-4.8.0-fix-cuda-12.2.0.patch | 40 --- .../files/opencv-4.8.1-ade-0.1.2a.tar.gz.patch | 18 -- .../opencv-4.8.1-drop-python2-detection.patch | 23 -- ...ncv-4.8.1-eliminate-lto-compiler-warnings.patch | 36 --- .../opencv/files/opencv-4.8.1-libpng16.patch | 58 ----- .../opencv/files/opencv-4.8.1-opencv_test.patch | 18 -- .../opencv/files/opencv-4.8.1-protobuf-22.patch | 190 -------------- .../files/opencv-4.8.1-python3_12-support.patch | 25 -- 9 files changed, 680 deletions(-) diff --git a/media-libs/opencv/files/opencv-4.8.0-arm64-fp16.patch b/media-libs/opencv/files/opencv-4.8.0-arm64-fp16.patch deleted file mode 100644 index 6bf04daf58ae..000000000000 --- a/media-libs/opencv/files/opencv-4.8.0-arm64-fp16.patch +++ /dev/null @@ -1,272 +0,0 @@ -https://github.com/opencv/opencv/pull/24203 - -From 689fa6f372975d58e9f50fd17a0abd105b1815f1 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Mon, 28 Aug 2023 04:20:58 +0100 -Subject: [PATCH] Fix compilation on arm64 with FP16 when disabled - -If building with -mcpu=native or any other setting which implies the current -CPU has FP16 but with intrinsics disabled, we mistakenly try to use it even -though convolution.hpp conditionally defines it correctly based on whether -we should *use it*. convolution.cpp on the other hand was mismatched and -trying to use it if the CPU supported it, even if not enabled in the build -system. - -Make the guards match. - -Bug: https://bugs.gentoo.org/913031 -Signed-off-by: Sam James ---- a/modules/dnn/src/layers/cpu_kernels/convolution.cpp -+++ b/modules/dnn/src/layers/cpu_kernels/convolution.cpp -@@ -118,7 +118,7 @@ Ptr initFastConv( - const size_t wstep = weightsMat.step1(); - - conv->useFP16 = false; --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - // TODO: add FP16 support for Winograd. - if (_useFP16 && (conv->conv_type == CONV_TYPE_GENERIC || conv->conv_type == CONV_TYPE_DEPTHWISE_REMAIN)) - conv->useFP16 = true; -@@ -137,7 +137,7 @@ Ptr initFastConv( - int padded_ksize = ((ksize + VEC_ALIGN-1) / VEC_ALIGN) * VEC_ALIGN; - int nweights = C * padded_ksize; - --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (conv->useFP16) - { - conv->weightsBuf_FP16.resize(nweights + VEC_ALIGN); -@@ -190,7 +190,7 @@ Ptr initFastConv( - #endif - const int CONV_WINO_NATOMS_F32 = CONV_WINO_AREA / CONV_WINO_ATOM_F32; // for AVX2, it is 8, otherwise, it's 16. - --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - // FP 16 - const int CONV_WINO_ATOM_F16 = CONV_WINO_ATOM_F32 * 2; - const int CONV_WINO_NATOMS_F16 = CONV_WINO_AREA / CONV_WINO_ATOM_F16; -@@ -208,7 +208,7 @@ Ptr initFastConv( - size_t nweights = ngroups*Kg_nblocks*Cg*CONV_WINO_KBLOCK*CONV_WINO_AREA; - - float* wptrWino = nullptr; --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - float16_t* wptrWino_FP16 = nullptr; - if (conv->useFP16) - { -@@ -264,7 +264,7 @@ Ptr initFastConv( - } - - // repack the data. --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (conv->useFP16) - { - float16_t* wptr = wptrWino_FP16 + (g*Kg_nblocks + ki) * Cg *CONV_WINO_KBLOCK*CONV_WINO_AREA + -@@ -308,7 +308,7 @@ Ptr initFastConv( - - float* weightsBufPtr = nullptr; - --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - int numStripsMR_FP16 = (Kg + CONV_MR_FP16 - 1) / CONV_MR_FP16; - int Kg_aligned_FP16 = numStripsMR_FP16 * CONV_MR_FP16; - size_t nweights_FP16 = ngroups * Kg_aligned_FP16 * DkHkWkCg; -@@ -331,7 +331,7 @@ Ptr initFastConv( - } - - // Pack the weight. --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (conv->useFP16) - { - parallel_for_(Range(0, ngroups * numStripsMR_FP16), [&](const Range& r0){ -@@ -415,7 +415,7 @@ static inline void packData8(char*& inpbuf, float*& inptrIn, int& in_w, int& x0, - char * inpbufC = inpbuf + s0 * esz; - float* inptrInC = (float* )inptrIn; - --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - float16_t* inpbufC_FP16 = (float16_t *)inpbufC; - if (esz == sizeof(float16_t)) - { -@@ -521,7 +521,7 @@ static inline void packData2(char *& inpbuf, float*& inptrIn, int& in_w, int& x0 - char* inpbufC = inpbuf + s0 * esz; - float* inptrInC = inptrIn; - --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - float16_t* inpbufC_FP16 = (float16_t *)inpbufC; - if (esz == sizeof(float16_t)) - { -@@ -553,7 +553,7 @@ static inline void packData2(char *& inpbuf, float*& inptrIn, int& in_w, int& x0 - in_w += stride_w; - } - --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - // Fast convert float 32 to float16 - static inline void _cvt32f16f( const float* src, float16_t* dst, int len) - { -@@ -623,7 +623,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - { - // Make special branch where memcpy() is called with a constant buffer size. - // Compilers will likely unroll this loop properly. --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - for (int c = 0; c < Cg; c++, inptr += inp_planesize, inpbuf += CONV_NR_esz) -@@ -636,7 +636,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - } - else - { --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - for (int c = 0; c < Cg; c++, inptr += inp_planesize, inpbuf += CONV_NR_esz) -@@ -700,7 +700,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - int w0 = std::max(0, (-in_w + dilation_w-1)/dilation_w); - int w1 = std::min(Wk, (Wi - in_w + dilation_w-1)/dilation_w); - const float* inptrInC = inptrIn; --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - float16_t* inpbufC = (float16_t *)inpbuf + s0; -@@ -761,7 +761,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - int w1 = std::min(Wk, (Wi - in_w + dilation_w-1)/dilation_w); - - const float* inptrInC = inptrIn; --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - float16_t* inpbufC = (float16_t *)inpbuf + s0; -@@ -834,7 +834,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - int w0 = std::max(0, (-in_w + dilation_w-1)/dilation_w); - int w1 = std::min(Wk, (Wi - in_w + dilation_w-1)/dilation_w); - const float* inptrInC = inptrIn; --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - float16_t* inpbufC = (float16_t* )inpbuf + s0; -@@ -887,7 +887,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - for (; i < CONV_NR;) - { - float* inpbuf_ki = (float* )inpbuf + k * CONV_NR * Cg + i; --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - float16_t * inpbuf_ki_FP16 = (float16_t *)inpbuf + k * CONV_NR * Cg + i; - #endif - -@@ -903,7 +903,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - { - if (stride_w == 1) - { --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize) -@@ -934,7 +934,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - } - else if (stride_w == 2) - { --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize) -@@ -967,7 +967,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - } - else - { --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize) -@@ -1006,7 +1006,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - { - if (stride_w == 1) - { --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize) -@@ -1029,7 +1029,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - } - else - { --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize) -@@ -1057,7 +1057,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - } - else - { --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize) -@@ -1073,7 +1073,7 @@ static inline void packInputData(char* inpbuf_task, float* inp, const int* ofsta - } - else - { --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR) -@@ -1260,7 +1260,7 @@ void runFastConv(InputArray _input, OutputArray _output, const Ptr& co - int CONV_MR = CONV_MR_FP32; - int esz = sizeof(float ); - --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - // works at FP 16. -@@ -1433,7 +1433,7 @@ void runFastConv(InputArray _input, OutputArray _output, const Ptr& co - } - - char *weights = nullptr; --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - CV_Assert(!conv->weightsBuf_FP16.empty()); -@@ -1474,7 +1474,7 @@ void runFastConv(InputArray _input, OutputArray _output, const Ptr& co - #if CV_NEON && CV_NEON_AARCH64 - if (conv->useNEON) - { --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - opt_NEON::convBlockMR1_FP16(DkHkWkCg, weights, inptr, cptr, biasVal, fusedAdd, minval, maxval, ifMinMaxAct, outLen, CONV_NR); -@@ -1537,7 +1537,7 @@ void runFastConv(InputArray _input, OutputArray _output, const Ptr& co - #if CV_NEON - if (conv->useNEON) - { --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - opt_NEON::convBlock_FP16(c1 - c0, wptr, inptr, (char *)cptr_f16, ldc, c0 == 0, outLen, CONV_MR, CONV_NR); -@@ -1567,7 +1567,7 @@ void runFastConv(InputArray _input, OutputArray _output, const Ptr& co - float biasval = biasptr[k]; - int j = 0; - --#ifdef CONV_ARM_FP16 -+#if defined(CONV_ARM_FP16) && CV_FP16 - if (useFP16) - { - float32x4_t vbias = vdupq_n_f32(biasval); diff --git a/media-libs/opencv/files/opencv-4.8.0-fix-cuda-12.2.0.patch b/media-libs/opencv/files/opencv-4.8.0-fix-cuda-12.2.0.patch deleted file mode 100644 index fd7d12af2644..000000000000 --- a/media-libs/opencv/files/opencv-4.8.0-fix-cuda-12.2.0.patch +++ /dev/null @@ -1,40 +0,0 @@ -https://github.com/opencv/opencv/pull/24104 -https://github.com/opencv/opencv/commit/5466fd2606ca6df57bbe43f064d2ae73fe4329eb -https://bugs.gentoo.org/915775 - -From ab8cb6f8a9034da2a289b84685c6d959266029be Mon Sep 17 00:00:00 2001 -From: cudawarped <12133430+cudawarped@users.noreply.github.com> -Date: Tue, 1 Aug 2023 13:02:42 +0300 -Subject: [PATCH] cuda: fix for compatibility with CUDA Toolkit >= 12.2.0 - ---- - modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp | 2 +- - modules/dnn/src/cuda4dnn/primitives/region.hpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp b/modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp -index f067dddaa701..91ff33f81718 100644 ---- a/modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp -+++ b/modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp -@@ -111,7 +111,7 @@ namespace cv { namespace dnn { namespace cuda4dnn { - * or there might be several weights - * or we don't have to scale - */ -- if (weight != 1.0) -+ if (weight != static_cast(1.0f)) - { - kernels::scale1_with_bias1(stream, output, input, weight, 1.0); - } -diff --git a/modules/dnn/src/cuda4dnn/primitives/region.hpp b/modules/dnn/src/cuda4dnn/primitives/region.hpp -index d22d44214e7b..3af05155feea 100644 ---- a/modules/dnn/src/cuda4dnn/primitives/region.hpp -+++ b/modules/dnn/src/cuda4dnn/primitives/region.hpp -@@ -121,7 +121,7 @@ namespace cv { namespace dnn { namespace cuda4dnn { - new_coords - ); - -- if (nms_iou_threshold > 0) { -+ if (nms_iou_threshold > static_cast(0.0f)) { - auto output_mat = output_wrapper->getMutableHostMat(); - CV_Assert(output_mat.type() == CV_32F); - for (int i = 0; i < input.get_axis_size(0); i++) { diff --git a/media-libs/opencv/files/opencv-4.8.1-ade-0.1.2a.tar.gz.patch b/media-libs/opencv/files/opencv-4.8.1-ade-0.1.2a.tar.gz.patch deleted file mode 100644 index 056553695ee2..000000000000 --- a/media-libs/opencv/files/opencv-4.8.1-ade-0.1.2a.tar.gz.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Paul Zander - -Use tar.gz instead of zip to make CI happy. - -diff --git a/modules/gapi/cmake/DownloadADE.cmake b/modules/gapi/cmake/DownloadADE.cmake -index e22c4f1..fb0c10a 100644 ---- a/modules/gapi/cmake/DownloadADE.cmake -+++ b/modules/gapi/cmake/DownloadADE.cmake -@@ -1,7 +1,7 @@ - set(ade_src_dir "${OpenCV_BINARY_DIR}/3rdparty/ade") --set(ade_filename "v0.1.2a.zip") -+set(ade_filename "v0.1.2a.tar.gz") - set(ade_subdir "ade-0.1.2a") --set(ade_md5 "fa4b3e25167319cb0fa9432ef8281945") -+set(ade_md5 "89fd5f32c2796d3fecf62273c4aa7c4d") - ocv_download(FILENAME ${ade_filename} - HASH ${ade_md5} - URL diff --git a/media-libs/opencv/files/opencv-4.8.1-drop-python2-detection.patch b/media-libs/opencv/files/opencv-4.8.1-drop-python2-detection.patch deleted file mode 100644 index 5a3a89f665b4..000000000000 --- a/media-libs/opencv/files/opencv-4.8.1-drop-python2-detection.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Paul Zander - -Python2 is long gone. So don't try finding it. - -diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake -index 599b2eb..345e3ef 100644 ---- a/cmake/OpenCVDetectPython.cmake -+++ b/cmake/OpenCVDetectPython.cmake -@@ -268,14 +268,6 @@ if(OPENCV_PYTHON_SKIP_DETECTION) - return() - endif() - --find_python("" "${MIN_VER_PYTHON2}" PYTHON2_LIBRARY PYTHON2_INCLUDE_DIR -- PYTHON2INTERP_FOUND PYTHON2_EXECUTABLE PYTHON2_VERSION_STRING -- PYTHON2_VERSION_MAJOR PYTHON2_VERSION_MINOR PYTHON2LIBS_FOUND -- PYTHON2LIBS_VERSION_STRING PYTHON2_LIBRARIES PYTHON2_LIBRARY -- PYTHON2_DEBUG_LIBRARIES PYTHON2_LIBRARY_DEBUG PYTHON2_INCLUDE_PATH -- PYTHON2_INCLUDE_DIR PYTHON2_INCLUDE_DIR2 PYTHON2_PACKAGES_PATH -- PYTHON2_NUMPY_INCLUDE_DIRS PYTHON2_NUMPY_VERSION) -- - option(OPENCV_PYTHON3_VERSION "Python3 version" "") - find_python("${OPENCV_PYTHON3_VERSION}" "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYTHON3_INCLUDE_DIR - PYTHON3INTERP_FOUND PYTHON3_EXECUTABLE PYTHON3_VERSION_STRING diff --git a/media-libs/opencv/files/opencv-4.8.1-eliminate-lto-compiler-warnings.patch b/media-libs/opencv/files/opencv-4.8.1-eliminate-lto-compiler-warnings.patch deleted file mode 100644 index 7d6a5456a63f..000000000000 --- a/media-libs/opencv/files/opencv-4.8.1-eliminate-lto-compiler-warnings.patch +++ /dev/null @@ -1,36 +0,0 @@ -https://github.com/opencv/opencv/pull/23991 - -From 4ee0f212cc19f7e77483d34d4cf8378945e3da31 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=E4=B8=8D=E9=B1=BC=E5=84=BF?= - <36976072+buyuer@users.noreply.github.com> -Date: Fri, 14 Jul 2023 08:45:14 +0000 -Subject: [PATCH] Eliminating compilation warnings when using lto in gcc12 and - later versions -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -use -flto=auto when use gcc12 or later - -Signed-off-by: 不鱼儿 <36976072+buyuer@users.noreply.github.com> ---- - cmake/OpenCVCompilerOptions.cmake | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake -index d4600943fb0d..8bd86681303e 100644 ---- a/cmake/OpenCVCompilerOptions.cmake -+++ b/cmake/OpenCVCompilerOptions.cmake -@@ -261,7 +261,11 @@ if(CV_GCC OR CV_CLANG) - endif() - - if(ENABLE_LTO) -- add_extra_compiler_option(-flto) -+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12) -+ add_extra_compiler_option(-flto=auto) -+ else() -+ add_extra_compiler_option(-flto) -+ endif() - endif() - if(ENABLE_THIN_LTO) - add_extra_compiler_option(-flto=thin) diff --git a/media-libs/opencv/files/opencv-4.8.1-libpng16.patch b/media-libs/opencv/files/opencv-4.8.1-libpng16.patch deleted file mode 100644 index a5b2aedb063a..000000000000 --- a/media-libs/opencv/files/opencv-4.8.1-libpng16.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Paul Zander - -Gentoo installs libpng as libpng16, so adjust the detection. - -diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake -index 46b5108..0ff88ea 100644 ---- a/cmake/OpenCVFindLibsGrfmt.cmake -+++ b/cmake/OpenCVFindLibsGrfmt.cmake -@@ -245,9 +245,9 @@ if(NOT HAVE_SPNG AND WITH_PNG) - include(FindPNG) - if(PNG_FOUND) - include(CheckIncludeFile) -- check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H) -- if(HAVE_LIBPNG_PNG_H) -- ocv_parse_header("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" PNG_VERSION_LINES PNG_LIBPNG_VER_MAJOR PNG_LIBPNG_VER_MINOR PNG_LIBPNG_VER_RELEASE) -+ check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng16/png.h" HAVE_LIBPNG16_PNG_H) -+ if(HAVE_LIBPNG16_PNG_H) -+ ocv_parse_header("${PNG_PNG_INCLUDE_DIR}/libpng16/png.h" PNG_VERSION_LINES PNG_LIBPNG_VER_MAJOR PNG_LIBPNG_VER_MINOR PNG_LIBPNG_VER_RELEASE) - else() - ocv_parse_header("${PNG_PNG_INCLUDE_DIR}/png.h" PNG_VERSION_LINES PNG_LIBPNG_VER_MAJOR PNG_LIBPNG_VER_MINOR PNG_LIBPNG_VER_RELEASE) - endif() -@@ -255,7 +255,7 @@ if(NOT HAVE_SPNG AND WITH_PNG) - endif() - - if(NOT PNG_FOUND) -- ocv_clear_vars(PNG_LIBRARY PNG_LIBRARIES PNG_INCLUDE_DIR PNG_PNG_INCLUDE_DIR HAVE_LIBPNG_PNG_H PNG_DEFINITIONS) -+ ocv_clear_vars(PNG_LIBRARY PNG_LIBRARIES PNG_INCLUDE_DIR PNG_PNG_INCLUDE_DIR HAVE_LIBPNG16_PNG_H PNG_DEFINITIONS) - - set(PNG_LIBRARY libpng CACHE INTERNAL "") - set(PNG_LIBRARIES ${PNG_LIBRARY}) -diff --git a/cmake/templates/cvconfig.h.in b/cmake/templates/cvconfig.h.in -index d6c7875..005e9b3 100644 ---- a/cmake/templates/cvconfig.h.in -+++ b/cmake/templates/cvconfig.h.in -@@ -79,7 +79,7 @@ - #cmakedefine HAVE_JPEG - - /* libpng/png.h needs to be included */ --#cmakedefine HAVE_LIBPNG_PNG_H -+#cmakedefine HAVE_LIBPNG16_PNG_H - - /* GDCM DICOM codec */ - #cmakedefine HAVE_GDCM -diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp -index 388a3fc..4dde181 100644 ---- a/modules/imgcodecs/src/grfmt_png.cpp -+++ b/modules/imgcodecs/src/grfmt_png.cpp -@@ -58,8 +58,8 @@ - # define _FILE_OFFSET_BITS 0 - #endif - --#ifdef HAVE_LIBPNG_PNG_H --#include -+#ifdef HAVE_LIBPNG16_PNG_H -+#include - #else - #include - #endif diff --git a/media-libs/opencv/files/opencv-4.8.1-opencv_test.patch b/media-libs/opencv/files/opencv-4.8.1-opencv_test.patch deleted file mode 100644 index 2bdc2d830570..000000000000 --- a/media-libs/opencv/files/opencv-4.8.1-opencv_test.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Paul Zander - -We don't package quirc, so the misplaced #ifdef breaks compilation. - -diff --git a/modules/objdetect/test/test_qrcode.cpp b/modules/objdetect/test/test_qrcode.cpp -index 5e6ec6f..6dc14cc 100644 ---- a/modules/objdetect/test/test_qrcode.cpp -+++ b/modules/objdetect/test/test_qrcode.cpp -@@ -374,8 +374,8 @@ TEST_P(Objdetect_QRCode_Multi, regression) - qrcode = QRCodeDetectorAruco(); - } - std::vector corners; --#ifdef HAVE_QUIRC - std::vector decoded_info; -+#ifdef HAVE_QUIRC - std::vector straight_barcode; - EXPECT_TRUE(qrcode.detectAndDecodeMulti(src, decoded_info, corners, straight_barcode)); - ASSERT_FALSE(corners.empty()); diff --git a/media-libs/opencv/files/opencv-4.8.1-protobuf-22.patch b/media-libs/opencv/files/opencv-4.8.1-protobuf-22.patch deleted file mode 100644 index 1e8a369777a5..000000000000 --- a/media-libs/opencv/files/opencv-4.8.1-protobuf-22.patch +++ /dev/null @@ -1,190 +0,0 @@ -From 6f3dde396f6eed53afcd5cc882402e18ff7c1ca8 Mon Sep 17 00:00:00 2001 -From: Kumataro -Date: Sat, 7 Oct 2023 10:11:25 +0900 -Subject: [PATCH] 3rdparty: supporting protobuf v22 and later - -subsumes: - -- dnn: disable some tests for external protobuf -- use GREATER instead of GREATER_EQUAL and remove new blank line at EOF -- fix for BUILD_TESTS=OFF -- Use Config mode in CMake. - -(cleaning up review noise) - ---- - 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 8835347..5b1e175 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 804b78e..9fcc460 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 763d94b..6cb6d54 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/media-libs/opencv/files/opencv-4.8.1-python3_12-support.patch b/media-libs/opencv/files/opencv-4.8.1-python3_12-support.patch deleted file mode 100644 index 7eae8a180ce6..000000000000 --- a/media-libs/opencv/files/opencv-4.8.1-python3_12-support.patch +++ /dev/null @@ -1,25 +0,0 @@ -https://github.com/opencv/opencv/pull/23991 - -From 00ca8f455e6a5588d905e3a0b268f18ee3fda5dd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= -Date: Sun, 1 Oct 2023 16:12:25 +0100 -Subject: [PATCH] `numpy.distutils` is removed in numpy 1.26 on Python 3.12. - -so we don't use numpy.distutils to get includes dirs of python-numpy ---- - cmake/OpenCVDetectPython.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake -index 88a434185622..d4098ce8e60d 100644 ---- a/cmake/OpenCVDetectPython.cmake -+++ b/cmake/OpenCVDetectPython.cmake -@@ -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)