Skip to contentSkip to conversation

package/freeswitch: add optional support for OpenCV4

PATCH In review Bernd Kuhls 2 participants 4 messages Jun 21, 2025 – Jun 22, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/freeswitch: add optional support for OpenCV4

---
 package/freeswitch/Config.in     | 3 +++
 package/freeswitch/freeswitch.mk | 5 +++++
 2 files changed, 8 insertions(+)
package/freeswitch/Config.in +3 -0
index 80d18e064d..4d700e549f 100644
@@ -14,6 +14,9 @@ config BR2_PACKAGE_FREESWITCH
 	select BR2_PACKAGE_OPENCV3_LIB_HIGHGUI if BR2_PACKAGE_OPENCV3
 	select BR2_PACKAGE_OPENCV3_LIB_IMGPROC if BR2_PACKAGE_OPENCV3
 	select BR2_PACKAGE_OPENCV3_LIB_OBJDETECT if BR2_PACKAGE_OPENCV3
+	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
package/freeswitch/freeswitch.mk +5 -0
index 1b4b5eed0e..3e9586e26b 100644
@@ -283,6 +283,11 @@ FREESWITCH_DEPENDENCIES += opencv3
 FREESWITCH_ENABLED_MODULES += applications/mod_cv
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV4),y)
+FREESWITCH_DEPENDENCIES += opencv4
+FREESWITCH_ENABLED_MODULES += applications/mod_cv
+endif
+
 ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
 FREESWITCH_CONF_ENV += \
 	ac_cv_path_PG_CONFIG=$(STAGING_DIR)/usr/bin/pg_config
Signature · 6 lines
2.39.5

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/ffmpeg: add optional support for OpenCV4

---
 package/ffmpeg/ffmpeg.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/ffmpeg/ffmpeg.mk +4 -0
index 79820d0077..c98817d09d 100644
@@ -294,6 +294,10 @@ endif
 ifeq ($(BR2_PACKAGE_OPENCV3_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV3_WITH_FFMPEG),yx)
 FFMPEG_CONF_OPTS += --enable-libopencv
 FFMPEG_DEPENDENCIES += opencv3
+else ifeq ($(BR2_PACKAGE_OPENCV4_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV4_WITH_FFMPEG),yx)
+FFMPEG_CONF_OPTS += --enable-libopencv \
+	--extra-cflags=-I$(STAGING_DIR)/usr/include/opencv4
+FFMPEG_DEPENDENCIES += opencv4
 else
 FFMPEG_CONF_OPTS += --disable-libopencv
 endif
Signature · 6 lines
2.39.5

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Bernd Kuhls

Hi Bernd,

Quoted 11 lines · Bernd Kuhls
---
 package/freeswitch/Config.in     | 3 +++
 package/freeswitch/freeswitch.mk | 5 +++++
 2 files changed, 8 insertions(+)
package/freeswitch/Config.in +0 -0
index 80d18e064d..4d700e549f 100644

package/freeswitch/Config.in config BR2_PACKAGE_FREESWITCH · line 19

Quoted 6 lines
package/freeswitch/Config.in +3 -0
@@ -14,6 +14,9 @@ config BR2_PACKAGE_FREESWITCH
 	select BR2_PACKAGE_OPENCV3_LIB_HIGHGUI if BR2_PACKAGE_OPENCV3
 	select BR2_PACKAGE_OPENCV3_LIB_IMGPROC if BR2_PACKAGE_OPENCV3
 	select BR2_PACKAGE_OPENCV3_LIB_OBJDETECT if BR2_PACKAGE_OPENCV3
+	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

This patch introduces Kconfig warnings:

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 [=n] && BR2_TOOLCHAIN_GCC_AT_LEAST_8 [=y]
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]

BR2_PACKAGE_OPENCV4_LIB_OBJDETECT has dependencies that should have been propagated. See:
https://gitlab.com/buildroot.org/buildroot/-/blob/2025.05/package/opencv4/Config.in#L158

Could you have a look please?

Best regards,

Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot