From 0d676d1cac806a61fa7777be6410e0e3ab0b2ad4 Mon Sep 17 00:00:00 2001 From: Andy Hu Date: Thu, 2 Nov 2023 16:50:10 +0800 Subject: [PATCH] package/libcamera: sync with v0.0.5 libcamera in upstream libcamera fix issue: package/libcamera/Config.in:7:error: recursive dependency detected! Signed-off-by: Andy Hu --- package/libcamera/Config.in | 6 +----- package/libcamera/libcamera.mk | 39 ++++++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 7 deletions(-) mode change 100644 => 100755 package/libcamera/Config.in diff --git a/package/libcamera/Config.in b/package/libcamera/Config.in old mode 100644 new mode 100755 index a0cadcdd..4cbd2a60 --- a/package/libcamera/Config.in +++ b/package/libcamera/Config.in @@ -12,12 +12,8 @@ menuconfig BR2_PACKAGE_LIBCAMERA depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17 depends on !BR2_STATIC_LIBS # gnutls depends on BR2_USE_WCHAR # gnutls - depends on BR2_PACKAGE_LIBEVENT # libevent - depends on BR2_PACKAGE_PYTHON3 - select BR2_PACKAGE_PYTHON_JINJA2 - select BR2_PACKAGE_PYTHON_PLY - select BR2_PACKAGE_PYTHON_PYYAML select BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_LIBYAML select BR2_PACKAGE_LIBCAMERA_PIPELINE_UVCVIDEO if !BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE help libcamera provides a software stack to support diff --git a/package/libcamera/libcamera.mk b/package/libcamera/libcamera.mk index aefcd1d4..59c510bf 100755 --- a/package/libcamera/libcamera.mk +++ b/package/libcamera/libcamera.mk @@ -14,6 +14,7 @@ LIBCAMERA_DEPENDENCIES = \ host-python3-pyyaml \ host-python-jinja2 \ host-python-ply \ + libyaml \ gnutls LIBCAMERA_CONF_OPTS = \ -Dandroid=disabled \ @@ -86,6 +87,13 @@ else LIBCAMERA_CONF_OPTS += -Dqcam=disabled endif +ifeq ($(BR2_PACKAGE_LIBEVENT),y) +LIBCAMERA_CONF_OPTS += -Dcam=enabled +LIBCAMERA_DEPENDENCIES += libevent +else +LIBCAMERA_CONF_OPTS += -Dcam=disabled +endif + ifeq ($(BR2_PACKAGE_TIFF),y) LIBCAMERA_DEPENDENCIES += tiff endif @@ -94,14 +102,41 @@ ifeq ($(BR2_PACKAGE_HAS_UDEV),y) LIBCAMERA_DEPENDENCIES += udev endif -ifeq ($(BR2_PACKAGE_LIBEVENT),y) -LIBCAMERA_DEPENDENCIES += libevent +ifeq ($(BR2_PACKAGE_LTTNG_LIBUST),y) +LIBCAMERA_CONF_OPTS += -Dtracing=enabled +LIBCAMERA_DEPENDENCIES += lttng-libust +else +LIBCAMERA_CONF_OPTS += -Dtracing=disabled +endif + +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) +LIBCAMERA_DEPENDENCIES += libexecinfo +LIBCAMERA_LDFLAGS = $(TARGET_LDFLAGS) -lexecinfo endif ifeq ($(BR2_PACKAGE_LIBCAMERA_PIPELINE_STARFIVE),y) LIBCAMERA_DEPENDENCIES += yaml-cpp endif +# Open-Source IPA shlibs need to be signed in order to be runnable within the +# same process, otherwise they are deemed Closed-Source and run in another +# process and communicate over IPC. +# Buildroot sanitizes RPATH in a post build process. meson gets rid of rpath +# while installing so we don't need to do it manually here. +# Buildroot may strip symbols, so we need to do the same before signing +# otherwise the signature won't match the shlib on the rootfs. Since meson +# install target is signing the shlibs, we need to strip them before. +LIBCAMERA_STRIP_FIND_CMD = \ + find $(@D)/build/src/ipa \ + $(if $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES)), \ + -not \( $(call findfileclauses,$(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) ) \ + -type f -name 'ipa_*.so' -print0 + +define LIBCAMERA_BUILD_STRIP_IPA_SO + $(LIBCAMERA_STRIP_FIND_CMD) | xargs --no-run-if-empty -0 $(STRIPCMD) +endef + +# LIBCAMERA_POST_BUILD_HOOKS += LIBCAMERA_BUILD_STRIP_IPA_SO ## replace with the starfive full feature ipa library which is closed source when post build define LIBCAMERA_BUILD_REPLACE_STARFIVE_IPA