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 86B5C158042 for ; Tue, 5 Nov 2024 02:03:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AB4A7E0815; Tue, 5 Nov 2024 02:03:26 +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 8EA33E07F6 for ; Tue, 5 Nov 2024 02:03:26 +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 94764342FEC for ; Tue, 5 Nov 2024 02:03:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DDEF31F42 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: <1730772161.6dd281f3ad2f7fc6f9f6e31d7f1606036121b502.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/opencv/opencv-4.10.0.ebuild X-VCS-Directories: media-libs/opencv/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6dd281f3ad2f7fc6f9f6e31d7f1606036121b502 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: 85de9154-79cd-4ec3-84cb-8514b8a196b1 X-Archives-Hash: be39b2773764413f247fd7ceff2c9892 commit: 6dd281f3ad2f7fc6f9f6e31d7f1606036121b502 Author: Paul Zander gmail com> AuthorDate: Mon Oct 21 11:30:36 2024 +0000 Commit: Sam James gentoo org> CommitDate: Tue Nov 5 02:02:41 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6dd281f3 media-libs/opencv: refactor testprograms configuration Signed-off-by: Paul Zander gmail.com> Signed-off-by: Sam James gentoo.org> media-libs/opencv/opencv-4.10.0.ebuild | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/media-libs/opencv/opencv-4.10.0.ebuild b/media-libs/opencv/opencv-4.10.0.ebuild index 43b9b4b762a8..780257a82d35 100644 --- a/media-libs/opencv/opencv-4.10.0.ebuild +++ b/media-libs/opencv/opencv-4.10.0.ebuild @@ -170,6 +170,7 @@ REQUIRED_USE=" python? ( ${PYTHON_REQUIRED_USE} ) tesseract? ( contrib ) ?? ( gtk3 qt6 ) + testprograms? ( test ) test? ( || ( ffmpeg gstreamer ) jpeg png tiff features2d ) " @@ -524,6 +525,12 @@ src_prepare() { ANT_OPTS+=" -Dant.build.javac.source=$(java-pkg_get-source)" ANT_OPTS+=" -Dant.build.javac.target=$(java-pkg_get-target)" fi + + if multilib_native_use testprograms; then + sed \ + -e 's:share/OpenCV/testdata:@OPENCV_TEST_DATA_INSTALL_PATH@:g' \ + -i "${S}/cmake/templates/opencv_run_all_tests_unix.sh.in" || die + fi } multilib_src_configure() { @@ -616,7 +623,7 @@ multilib_src_configure() { -DBUILD_opencv_apps="$(usex opencvapps)" -DBUILD_DOCS="$(usex doc)" # Doesn't install anyways. -DBUILD_EXAMPLES="$(multilib_native_usex examples)" - -DBUILD_TESTS="$(multilib_native_usex test)" + -DBUILD_TESTS="$(multilib_native_usex test "yes" "$(multilib_native_usex testprograms)")" -DBUILD_PERF_TESTS="no" # -DBUILD_WITH_STATIC_CRT="no" @@ -675,9 +682,6 @@ multilib_src_configure() { # things we want to be hard enabled not worth useflag # =================================================== -DOPENCV_DOC_INSTALL_PATH="share/doc/${PF}" - # NOTE do this so testprograms do not fail TODO adjust path in code - -DOPENCV_TEST_DATA_INSTALL_PATH="share/${PN}$(ver_cut 1)/testdata" - -DOPENCV_TEST_INSTALL_PATH="libexec/${PN}/bin/test" -DOPENCV_SAMPLES_BIN_INSTALL_PATH="libexec/${PN}/bin/samples" -DBUILD_IPP_IW="no" @@ -875,6 +879,13 @@ multilib_src_configure() { fi fi + if multilib_native_use testprograms; then + # NOTE do this so testprograms do not fail + mycmakeargs+=( + -DOPENCV_TEST_INSTALL_PATH="libexec/${PN}/bin/test" + ) + fi + if multilib_is_native_abi && use python; then python_configure() { # Set all python variables to load the correct Gentoo paths @@ -916,6 +927,9 @@ multilib_src_compile() { } multilib_src_test() { + # NOTE we don't run the tests + use testprograms && return + CMAKE_SKIP_TESTS=( 'Test_ONNX_layers.LSTM_cell_forward/0' 'Test_ONNX_layers.LSTM_cell_bidirectional/0'