diff mbox series

[1/1] package/libcamera-apps: bump to version 1.5.0

Message ID 20240723171435.1231918-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/libcamera-apps: bump to version 1.5.0 | expand

Commit Message

Fabrice Fontaine July 23, 2024, 5:14 p.m. UTC
- Use official tarball
- Switch to meson-package
- libcamera-apps unconditionally uses linux/dma-heap.h since version
  1.3.0 and
  https://github.com/raspberrypi/rpicam-apps/commit/11338687635cc5564c348c2f60c8c58c5779151d
  which is only available since kernel >= 5.5 and
  https://github.com/torvalds/linux/commit/a69b0e855d3fd278ff6f09a23e1edf929538e304
- This bump will fix the following build failure raised since bump of
  libcamera to version 0.3.0 in commit
  82efc2faa923e8881748738963be1fbe3cb2bb45:

/workdir/instance-1/output-1/build/libcamera-apps-1.2.1/core/libcamera_app.cpp: In member function 'void LibcameraApp::ConfigureViewfinder()':
/workdir/instance-1/output-1/build/libcamera-apps-1.2.1/core/libcamera_app.cpp:327:25: error: 'class libcamera::CameraConfiguration' has no member named 'transform'
  327 |         configuration_->transform = options_->transform;
      |                         ^~~~~~~~~

It shall be noted that upstream changed its name from libcamera-apps to
rpicam-apps perhaps the package shall also be renamed on buildroot side

Fixes: 82efc2faa923e8881748738963be1fbe3cb2bb45
 - http://autobuild.buildroot.org/results/18bb6d9c88c1a813a350658b251293744e161916

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libcamera-apps/Config.in           |  9 ++++--
 package/libcamera-apps/libcamera-apps.hash |  2 +-
 package/libcamera-apps/libcamera-apps.mk   | 32 ++++++++++------------
 3 files changed, 21 insertions(+), 22 deletions(-)

Comments

Marcus Folkesson July 29, 2024, 7:07 a.m. UTC | #1
Hi Fabrice,

On Tue, Jul 23, 2024 at 07:14:35PM +0200, Fabrice Fontaine wrote:
> - Use official tarball
> - Switch to meson-package
> - libcamera-apps unconditionally uses linux/dma-heap.h since version
>   1.3.0 and
>   https://github.com/raspberrypi/rpicam-apps/commit/11338687635cc5564c348c2f60c8c58c5779151d
>   which is only available since kernel >= 5.5 and
>   https://github.com/torvalds/linux/commit/a69b0e855d3fd278ff6f09a23e1edf929538e304
> - This bump will fix the following build failure raised since bump of
>   libcamera to version 0.3.0 in commit
>   82efc2faa923e8881748738963be1fbe3cb2bb45:
> 
> /workdir/instance-1/output-1/build/libcamera-apps-1.2.1/core/libcamera_app.cpp: In member function 'void LibcameraApp::ConfigureViewfinder()':
> /workdir/instance-1/output-1/build/libcamera-apps-1.2.1/core/libcamera_app.cpp:327:25: error: 'class libcamera::CameraConfiguration' has no member named 'transform'
>   327 |         configuration_->transform = options_->transform;
>       |                         ^~~~~~~~~
> 
> It shall be noted that upstream changed its name from libcamera-apps to
> rpicam-apps perhaps the package shall also be renamed on buildroot side
> 
> Fixes: 82efc2faa923e8881748738963be1fbe3cb2bb45
>  - http://autobuild.buildroot.org/results/18bb6d9c88c1a813a350658b251293744e161916
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---

Unfortunately, I've currently no setup to test it, but the patch is LGTM.

Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com>
diff mbox series

Patch

diff --git a/package/libcamera-apps/Config.in b/package/libcamera-apps/Config.in
index 711fd6de05..f169d8c52e 100644
--- a/package/libcamera-apps/Config.in
+++ b/package/libcamera-apps/Config.in
@@ -6,6 +6,7 @@  config BR2_PACKAGE_LIBCAMERA_APPS
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # libcamera
 	depends on !BR2_STATIC_LIBS # gnutls/libcamera
 	depends on BR2_USE_WCHAR # gnutls/libcamera/boost
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
 	select BR2_PACKAGE_JPEG
@@ -24,7 +25,9 @@  config BR2_PACKAGE_LIBCAMERA_APPS
 
 	  https://github.com/raspberrypi/libcamera-apps
 
-comment "libcamera-apps needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 8"
+comment "libcamera-apps needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 8, headers >= 5.5"
 	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_TOOLCHAIN_GCC_AT_LEAST_8 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_8 || BR2_STATIC_LIBS || \
+		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5
diff --git a/package/libcamera-apps/libcamera-apps.hash b/package/libcamera-apps/libcamera-apps.hash
index 1437a0e8fa..00b499d247 100644
--- a/package/libcamera-apps/libcamera-apps.hash
+++ b/package/libcamera-apps/libcamera-apps.hash
@@ -1,3 +1,3 @@ 
 # Locally computed
-sha256  e6b74a0ba10a962f1930199d7dd828c8d9ee370dfe1fdfd8ae2638df744f1344  libcamera-apps-1.2.1.tar.gz
+sha256  576bcd585f1c8d8bc80e37fa3c8a172e9d1c8406490438cf6d0fbc7ba4996ec1  rpicam-apps-1.5.0.tar.xz
 sha256  36dfed86bdef661a0a14ec1a1cc84c771d5a06b6f9b92e9ebb610ba711bd528a  license.txt
diff --git a/package/libcamera-apps/libcamera-apps.mk b/package/libcamera-apps/libcamera-apps.mk
index 2a217f095f..17983bb8ca 100644
--- a/package/libcamera-apps/libcamera-apps.mk
+++ b/package/libcamera-apps/libcamera-apps.mk
@@ -4,8 +4,9 @@ 
 #
 ################################################################################
 
-LIBCAMERA_APPS_VERSION = 1.2.1
-LIBCAMERA_APPS_SITE = $(call github,raspberrypi,libcamera-apps,v$(LIBCAMERA_APPS_VERSION))
+LIBCAMERA_APPS_VERSION = 1.5.0
+LIBCAMERA_APPS_SOURCE = rpicam-apps-$(LIBCAMERA_APPS_VERSION).tar.xz
+LIBCAMERA_APPS_SITE = https://github.com/raspberrypi/rpicam-apps/releases/download/v$(LIBCAMERA_APPS_VERSION)
 LIBCAMERA_APPS_LICENSE = BSD-2-Clause
 LIBCAMERA_APPS_LICENSE_FILES = license.txt
 LIBCAMERA_APPS_DEPENDENCIES = \
@@ -18,42 +19,37 @@  LIBCAMERA_APPS_DEPENDENCIES = \
 	tiff
 
 LIBCAMERA_APPS_CONF_OPTS = \
-	-DENABLE_COMPILE_FLAGS_FOR_TARGET=disabled \
-	-DENABLE_OPENCV=0 \
-	-DENABLE_TFLITE=0
+	-Denable_opencv=disabled \
+	-Denable_tflite=disabled
 
 ifeq ($(BR2_PACKAGE_LIBDRM),y)
 LIBCAMERA_APPS_DEPENDENCIES += libdrm
-LIBCAMERA_APPS_CONF_OPTS += -DENABLE_DRM=1
+LIBCAMERA_APPS_CONF_OPTS += -Denable_drm=enabled
 else
-LIBCAMERA_APPS_CONF_OPTS += -DENABLE_DRM=0
+LIBCAMERA_APPS_CONF_OPTS += -Denable_drm=disabled
 endif
 
 ifeq ($(BR2_PACKAGE_FFMPEG)$(BR2_PACKAGE_LIBDRM),yy)
 LIBCAMERA_APPS_DEPENDENCIES += ffmpeg libdrm
-LIBCAMERA_APPS_CONF_OPTS += -DENABLE_LIBAV=1
+LIBCAMERA_APPS_CONF_OPTS += -Denable_libav=enabled
 else
-LIBCAMERA_APPS_CONF_OPTS += -DENABLE_LIBAV=0
+LIBCAMERA_APPS_CONF_OPTS += -Denable_libav=disabled
 endif
 
 ifeq ($(BR2_PACKAGE_XORG7),y)
 LIBCAMERA_APPS_DEPENDENCIES += \
 	$(if $(BR2_PACKAGE_LIBEPOXY),libepoxy) \
 	$(if $(BR2_PACKAGE_XLIB_LIBX11),xlib_libX11)
-LIBCAMERA_APPS_CONF_OPTS += -DENABLE_X11=1
+LIBCAMERA_APPS_CONF_OPTS += -Denable_egl=enabled
 else
-LIBCAMERA_APPS_CONF_OPTS += -DENABLE_X11=0
+LIBCAMERA_APPS_CONF_OPTS += -Denable_egl=disabled
 endif
 
 ifeq ($(BR2_PACKAGE_QT5),y)
 LIBCAMERA_APPS_DEPENDENCIES += qt5base
-LIBCAMERA_APPS_CONF_OPTS += -DENABLE_QT=1
+LIBCAMERA_APPS_CONF_OPTS += -Denable_qt=enabled
 else
-LIBCAMERA_APPS_CONF_OPTS += -DENABLE_QT=0
+LIBCAMERA_APPS_CONF_OPTS += -Denable_qt=disabled
 endif
 
-ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-LIBCAMERA_APPS_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
-endif
-
-$(eval $(cmake-package))
+$(eval $(meson-package))