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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 850DB158042 for ; Tue, 5 Nov 2024 02:03:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 218A4E07E1; Tue, 5 Nov 2024 02:03:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 04C38E07E1 for ; Tue, 5 Nov 2024 02:03:25 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0C8EB342FEF for ; Tue, 5 Nov 2024 02:03:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 42C4C1CBF for ; Tue, 5 Nov 2024 02:03:22 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1730772155.8a750e536aaf075b59661f151574326d80c13a01.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/, media-libs/opencv/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/opencv/files/opencv-4.10.0-26234.patch media-libs/opencv/opencv-4.10.0.ebuild X-VCS-Directories: media-libs/opencv/files/ media-libs/opencv/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8a750e536aaf075b59661f151574326d80c13a01 X-VCS-Branch: master Date: Tue, 5 Nov 2024 02:03:22 +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: 9589fc99-b887-4a0e-a0c9-51cd18af1240 X-Archives-Hash: d9586d2855552237ec6e442f0662ac2a commit: 8a750e536aaf075b59661f151574326d80c13a01 Author: Paul Zander gmail com> AuthorDate: Mon Nov 4 13:56:11 2024 +0000 Commit: Sam James gentoo org> CommitDate: Tue Nov 5 02:02:35 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a750e53 media-libs/opencv: fix broken include paths #927081 `ocv_check_modules` discarded all INCLUDE_DIRECTORIES that containted `/usr/include`. Closes: https://bugs.gentoo.org/927081 Signed-off-by: Paul Zander gmail.com> Signed-off-by: Sam James gentoo.org> media-libs/opencv/files/opencv-4.10.0-26234.patch | 73 +++++++++++++++++++++++ media-libs/opencv/opencv-4.10.0.ebuild | 1 + 2 files changed, 74 insertions(+) diff --git a/media-libs/opencv/files/opencv-4.10.0-26234.patch b/media-libs/opencv/files/opencv-4.10.0-26234.patch new file mode 100644 index 000000000000..fb155302af28 --- /dev/null +++ b/media-libs/opencv/files/opencv-4.10.0-26234.patch @@ -0,0 +1,73 @@ +https://github.com/opencv/opencv/pull/26234 +From 6a4be763b2db5f26684204ddc7d06c02325c3917 Mon Sep 17 00:00:00 2001 +From: Zach Lowry +Date: Tue, 1 Oct 2024 14:16:54 -0500 +Subject: [PATCH 1/2] move the gcc6 compatibility check to occur on a + per-directory basis, rather than exclude all include paths when the list of + paths contains /usr/include + +--- + cmake/OpenCVUtils.cmake | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake +index 94f87d9a1200..bb20a22f0606 100644 +--- a/cmake/OpenCVUtils.cmake ++++ b/cmake/OpenCVUtils.cmake +@@ -353,23 +353,23 @@ function(ocv_target_include_directories target) + #ocv_debug_message("ocv_target_include_directories(${target} ${ARGN})") + _ocv_fix_target(target) + set(__params "") +- if(CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND +- ";${ARGN};" MATCHES "/usr/include;") +- return() # workaround for GCC 6.x bug +- endif() +- set(__params "") + set(__system_params "") + set(__var_name __params) + foreach(dir ${ARGN}) + if("${dir}" STREQUAL "SYSTEM") + set(__var_name __system_params) + else() +- get_filename_component(__abs_dir "${dir}" ABSOLUTE) +- ocv_is_opencv_directory(__is_opencv_dir "${dir}") +- if(__is_opencv_dir) +- list(APPEND ${__var_name} "${__abs_dir}") ++ if(CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND ++ "${dir}" MATCHES "/usr/include$") ++ # workaround for GCC 6.x bug + else() +- list(APPEND ${__var_name} "${dir}") ++ get_filename_component(__abs_dir "${dir}" ABSOLUTE) ++ ocv_is_opencv_directory(__is_opencv_dir "${dir}") ++ if(__is_opencv_dir) ++ list(APPEND ${__var_name} "${__abs_dir}") ++ else() ++ list(APPEND ${__var_name} "${dir}") ++ endif() + endif() + endif() + endforeach() + +From fc01b270ee657e7afc2657b7a9e15766aa36faf0 Mon Sep 17 00:00:00 2001 +From: Zach Lowry +Date: Wed, 2 Oct 2024 13:28:57 -0500 +Subject: [PATCH 2/2] use `dir MATCHES ...` without variable unpacking + +--- + cmake/OpenCVUtils.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake +index bb20a22f0606..5886f4f3cb33 100644 +--- a/cmake/OpenCVUtils.cmake ++++ b/cmake/OpenCVUtils.cmake +@@ -360,7 +360,7 @@ function(ocv_target_include_directories target) + set(__var_name __system_params) + else() + if(CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND +- "${dir}" MATCHES "/usr/include$") ++ dir MATCHES "/usr/include$") + # workaround for GCC 6.x bug + else() + get_filename_component(__abs_dir "${dir}" ABSOLUTE) diff --git a/media-libs/opencv/opencv-4.10.0.ebuild b/media-libs/opencv/opencv-4.10.0.ebuild index 27c7ce81d7cb..070727815ba8 100644 --- a/media-libs/opencv/opencv-4.10.0.ebuild +++ b/media-libs/opencv/opencv-4.10.0.ebuild @@ -310,6 +310,7 @@ PATCHES=( "${FILESDIR}/${PN}-4.10.0-dnn-explicitly-include-abseil-cpp.patch" "${FILESDIR}/${PN}-4.10.0-cudnn-9.patch" # 25841 "${FILESDIR}/${PN}-4.10.0-cuda-fp16.patch" # 25880 + "${FILESDIR}/${PN}-4.10.0-26234.patch" # 26234 "${FILESDIR}/${PN}-4.10.0-tbb-detection.patch" # TODO applied in src_prepare