Update to snapshot bb84fc6

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2022-06-23 12:04:59 +02:00
parent 3f28fcfa2a
commit f38159e3da
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69
5 changed files with 76 additions and 76 deletions

View File

@ -1,72 +0,0 @@
From 94f734cb11cb0e35c1201f44e8fbfa1892859dfb Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Wed, 2 Feb 2022 14:56:23 +0100
Subject: [PATCH] lc-compliance: Only download a gtest subproject as a fallback
Currently, a subproject is used to fetch gtest dependency unconditionally
for any Linux distribution besides ChromeOS. But it leads to a regression
in distros whose builders are not allowed to download files during build.
This change was introduced by commit 0d50a04cc918 ("lc-compliance: Build
with gtest in subprojects") and the rationale is that some distros, such
as Debian ship libgtest-dev as a static library. And this could be built
with a different toolchain than the one used to build libcamera itself.
But this seems to be a corner case, usually users will either build both
libcamera and all its dependencies using the same toolchain or build it
using both the libgtest library and toolchain as provided by the distro.
If someone doesn't want for meson to pick up the non-compatible static
library provided by the distro, then instead should make sure that their
build root does not have the package providing this installed.
Let's simplify the logic to find the dependency and just use the built-in
support in dependency() function to fallback to a subproject if not found.
This covers to common case of attempting to use the gtest provided by the
system or pulling from source if not found or is not preferred.
Fixes: commit 0d50a04cc918 ("lc-compliance: Build with gtest in subprojects")
Reported-by: Eric Curtin <ecurtin@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
src/lc-compliance/meson.build | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/src/lc-compliance/meson.build b/src/lc-compliance/meson.build
index 130ddbb55916..8b57474be2b2 100644
--- a/src/lc-compliance/meson.build
+++ b/src/lc-compliance/meson.build
@@ -1,25 +1,14 @@
# SPDX-License-Identifier: CC0-1.0
libevent = dependency('libevent_pthreads', required : get_option('lc-compliance'))
+libgtest = dependency('gtest', required : get_option('lc-compliance'),
+ fallback : ['gtest', 'gtest_dep'])
-if not libevent.found()
+if not (libevent.found() and libgtest.found())
lc_compliance_enabled = false
subdir_done()
endif
-if get_option('android_platform') == 'cros'
- libgtest = dependency('gtest', required : get_option('lc-compliance'))
-
- if not libgtest.found()
- lc_compliance_enabled = false
- subdir_done()
- endif
-
-else
- libgtest_sp = subproject('gtest')
- libgtest = libgtest_sp.get_variable('gtest_dep')
-endif
-
lc_compliance_enabled = true
lc_compliance_sources = files([
--
2.34.1

View File

@ -0,0 +1,36 @@
From 9bc21e4d22191dbd0757f4044c1e73844d4835c6 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Thu, 23 Jun 2022 13:59:27 +0200
Subject: [PATCH 1/2] meson: options: Disable pycamera by default
The libcamera Python bindings is still experimental and it relies on some
features in pybind11 that are not yet upstreamed, so a special branch has
to be downloaded as a subproject.
This conflicts with the build process used by most Linux distributions,
since there is expected that all the dependencies will be fulfilled by
-devel packages present in the build root.
To allow libcamera to be built by distros, let's disable the pycamera by
default. This can still be enabled with `meson build -Dpycamera=enabled`.
Suggested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
meson_options.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson_options.txt b/meson_options.txt
index ca00c78e8134..7a9aecfc60f5 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -61,5 +61,5 @@ option('v4l2',
option('pycamera',
type : 'feature',
- value : 'auto',
+ value : 'disabled',
description : 'Enable libcamera Python bindings (experimental)')
--
2.36.1

View File

@ -0,0 +1,30 @@
From f1982fdbcab7ae76c643d295ed3f3a06e208fd4a Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Thu, 23 Jun 2022 14:21:11 +0200
Subject: [PATCH 2/2] py: Honour the pycamera meson option
The libcamera Python bindings are attempted to be built unconditionally,
even when there is a meson feature option to disable it. Make the meson
build file in the sub-dir to exit earlier if pycamera has been disabled.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
src/py/libcamera/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build
index eb8845388692..5efae1baec8c 100644
--- a/src/py/libcamera/meson.build
+++ b/src/py/libcamera/meson.build
@@ -2,7 +2,7 @@
py3_dep = dependency('python3', required : get_option('pycamera'))
-if not py3_dep.found()
+if get_option('pycamera').disabled() or not py3_dep.found()
pycamera_enabled = false
subdir_done()
endif
--
2.36.1

View File

@ -1,4 +1,4 @@
%global commit 7ea52d2b586144fdc033a3ffc1c4a4bbb99b5440
%global commit bb84fc6a74fec9b51b6dc21507e65092c6fdbbac
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20220126
@ -19,8 +19,10 @@ Source0: %{name}-%{shortcommit}.tar.xz
Source1: qcam.desktop
Source2: qcam.metainfo.xml
# https://lists.libcamera.org/pipermail/libcamera-devel/2022-February/028920.html
Patch0001: 0001-lc-compliance-Only-download-a-gtest-subproject-as-a-.patch
# https://patchwork.libcamera.org/patch/16332/
Patch0001: 0001-meson-options-Disable-pycamera-by-default.patch
# https://patchwork.libcamera.org/patch/16333/
Patch0002: 0002-py-Honour-the-pycamera-meson-option.patch
BuildRequires: doxygen
BuildRequires: gcc-c++
@ -39,6 +41,7 @@ BuildRequires: gnutls-devel
BuildRequires: libatomic
BuildRequires: libevent-devel
BuildRequires: libtiff-devel
BuildRequires: libyaml-devel
BuildRequires: lttng-ust-devel
BuildRequires: systemd-devel
BuildRequires: pkgconfig(Qt5Core)
@ -168,6 +171,9 @@ rm -rf ${RPM_BUILD_ROOT}/%{_docdir}/%{name}-*/html/.doctrees
%{_bindir}/lc-compliance
%changelog
* Thu Jun 23 2022 Javier Martinez Canillas <javierm@redhat.com> - 0.0.0~git.20220623.bb84fc6-1
- Update to snapshot bb84fc6
* Wed Feb 02 2022 Javier Martinez Canillas <javierm@redhat.com> - 0.0.0~git.20220128.7ea52d2-3
- Re-enable lc-compliance build

View File

@ -1 +1 @@
SHA512 (libcamera-7ea52d2.tar.xz) = 9f667bf534a1a4cb2f6fe812808cb81c0c5097815889170910bb80e58c26d9ce4a80b871f7ba94d938e67b3791982ea52bd3bcf8772ac727b49e6290343f1330
SHA512 (libcamera-bb84fc6.tar.xz) = 4ce9180dcfd50b7eb72c4085142149f9244fad3a7ec4841ef5ea96dbdb1fbe76ec84559cf816ed5800360bebb1874a063bc4df1ac6858a21ae629c857aea039b