commit:     900c50dd186dc8c716fc882f7345b45e9b088976
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Mon Nov  4 18:51:16 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  5 02:02:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=900c50dd

media-libs/opencv: rework plugin lists

Explicitly specify `videoio` plugins.

Disable plugins for `highgui`, as this would otherwise autodetect gtk2.
`opengl` support would require `x11-libs/gtkglext` which is obsolete, reflect
that in `REQUIRED_USE`.

Bug: https://bugs.gentoo.org/698950
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/opencv/opencv-4.10.0.ebuild | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/media-libs/opencv/opencv-4.10.0.ebuild 
b/media-libs/opencv/opencv-4.10.0.ebuild
index e0fb1354215a..23dda8d411b1 100644
--- a/media-libs/opencv/opencv-4.10.0.ebuild
+++ b/media-libs/opencv/opencv-4.10.0.ebuild
@@ -167,7 +167,7 @@ REQUIRED_USE="
        contribsfm? ( contrib eigen gflags glog )
        contribxfeatures2d? ( contrib )
        java? ( python )
-       opengl? ( ?? ( gtk3 qt6 ) )
+       opengl? ( qt6 )
        python? ( ${PYTHON_REQUIRED_USE} )
        tesseract? ( contrib )
        ?? ( gtk3 qt6 )
@@ -709,10 +709,23 @@ multilib_src_configure() {
 
                # -DBUILD_opencv_world="yes"
 
+               -DOPENCV_PLUGIN_VERSION=".$(ver_rs 1-2 '' "$(ver_cut 1-2)")"
+               -DOPENCV_PLUGIN_ARCH=".${ARCH}"
+
                -DDNN_PLUGIN_LIST="all"
-               -DHIGHGUI_PLUGIN_LIST="all"
-               -DVIDEOIO_PLUGIN_LIST="all"
+               -DHIGHGUI_ENABLE_PLUGINS="no"
+       )
 
+       local VIDEOIO_PLUGIN_LIST=()
+       if use ffmpeg; then
+               VIDEOIO_PLUGIN_LIST+=("ffmpeg")
+       fi
+       if use gstreamer; then
+               VIDEOIO_PLUGIN_LIST+=("gstreamer")
+       fi
+
+       mycmakeargs+=(
+               -DVIDEOIO_PLUGIN_LIST="$(IFS=';'; echo 
"${VIDEOIO_PLUGIN_LIST[*]}")"
        )
 
        if use qt6; then

Reply via email to