From f0977e4b818aed8ea2bc3e94c031e98bcd1991a9 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 3 Jan 2026 23:43:18 +0100 Subject: [PATCH] package/freeswitch: fixup dependency on OpenCV4 The recent changes in freeswitch following the removal of OpenCV 3.x in commit a6db6af9ffa7134b1f132dfd07dd53e7138e86b6 ("package/freeswitch: remove optional dependency to opencv3") caused some invalid dependencies. Indeed, the new logic selects BR2_PACKAGE_OPENCV4_LIB_OBJDETECT as soon as BR2_PACKAGE_OPENCV4 is enabled, without worrying about the dependencies of BR2_PACKAGE_OPENCV4_LIB_OBJDETECT. This causes the following Kconfig warning: WARNING: unmet direct dependencies detected for BR2_PACKAGE_OPENCV4_LIB_OBJDETECT Depends on [n]: BR2_PACKAGE_OPENCV4 [=y] && !BR2_TOOLCHAIN_USES_UCLIBC [=n] && BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS [=y] && BR2_TOOLCHAIN_GCC_AT_LEAST_8 [=n] Selected by [y]: - BR2_PACKAGE_FREESWITCH [=y] && BR2_INSTALL_LIBSTDCPP [=y] && !BR2_STATIC_LIBS [=n] && BR2_TOOLCHAIN_HAS_THREADS [=y] && BR2_USE_MMU [=y] && BR2_USE_WCHAR [=y] && BR2_PACKAGE_OPENCV4 [=y] Since freeswitch as no visible sub-options to select extra features and we wanted to keep it this way, we introduce a hidden sub-option that informs freeswitch.mk whether OpenCV 4 support is usable. It makes it easier to express the dependencies that are needed for this OpenCV 4 to be usable. Fixes: a6db6af9ffa7134b1f132dfd07dd53e7138e86b6 ("package/freeswitch: remove optional dependency to opencv3") Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain --- package/freeswitch/Config.in | 18 +++++++++++++----- package/freeswitch/freeswitch.mk | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/package/freeswitch/Config.in b/package/freeswitch/Config.in index f636024f32..3633a29903 100644 --- a/package/freeswitch/Config.in +++ b/package/freeswitch/Config.in @@ -9,11 +9,6 @@ config BR2_PACKAGE_FREESWITCH select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC select BR2_PACKAGE_JPEG - # src/mod/applications/mod_cv/mod_cv.cpp includes - # highgui.h, imgproc.hpp & objdetect.hpp - select BR2_PACKAGE_OPENCV4_LIB_HIGHGUI if BR2_PACKAGE_OPENCV4 - select BR2_PACKAGE_OPENCV4_LIB_IMGPROC if BR2_PACKAGE_OPENCV4 - select BR2_PACKAGE_OPENCV4_LIB_OBJDETECT if BR2_PACKAGE_OPENCV4 select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_PCRE select BR2_PACKAGE_SOFIA_SIP @@ -33,6 +28,19 @@ config BR2_PACKAGE_FREESWITCH https://www.freeswitch.org +config BR2_PACKAGE_FREESWITCH_OPENCV4 + bool + default y + depends on BR2_PACKAGE_OPENCV4 + depends on !BR2_TOOLCHAIN_USES_UCLIBC # objdetect + depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # objdetect + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # objdetect + # src/mod/applications/mod_cv/mod_cv.cpp includes + # highgui.h, imgproc.hpp & objdetect.hpp + select BR2_PACKAGE_OPENCV4_LIB_HIGHGUI + select BR2_PACKAGE_OPENCV4_LIB_IMGPROC + select BR2_PACKAGE_OPENCV4_LIB_OBJDETECT + comment "freeswitch needs a toolchain w/ C++, dynamic library, threads, wchar" depends on BR2_USE_MMU depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS \ diff --git a/package/freeswitch/freeswitch.mk b/package/freeswitch/freeswitch.mk index 81a25b3fe2..7e5dc3d872 100644 --- a/package/freeswitch/freeswitch.mk +++ b/package/freeswitch/freeswitch.mk @@ -278,7 +278,7 @@ FREESWITCH_DEPENDENCIES += libsoundtouch FREESWITCH_ENABLED_MODULES += applications/mod_soundtouch endif -ifeq ($(BR2_PACKAGE_OPENCV4),y) +ifeq ($(BR2_PACKAGE_FREESWITCH_OPENCV4),y) FREESWITCH_DEPENDENCIES += opencv4 FREESWITCH_ENABLED_MODULES += applications/mod_cv endif