{"id":22371,"url":"https://patchwork.libcamera.org/api/1.1/patches/22371/?format=json","web_url":"https://patchwork.libcamera.org/patch/22371/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20241216175213.1106544-1-pobrn@protonmail.com>","date":"2024-12-16T17:52:15","name":"[v2] meson: Convert `v4l2` into a feature option","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"c7d8398b13030a34a499d6a9c632081ce68b310a","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/1.1/people/133/?format=json","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/22371/mbox/","series":[{"id":4898,"url":"https://patchwork.libcamera.org/api/1.1/series/4898/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4898","date":"2024-12-16T17:52:15","name":"[v2] meson: Convert `v4l2` into a feature option","version":2,"mbox":"https://patchwork.libcamera.org/series/4898/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/22371/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/22371/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7E734C32DA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 16 Dec 2024 17:52:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C9A2667F95;\n\tMon, 16 Dec 2024 18:52:20 +0100 (CET)","from mail-10628.protonmail.ch (mail-10628.protonmail.ch\n\t[79.135.106.28])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C4FDF67F7F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Dec 2024 18:52:19 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"u5dJfcUx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1734371539; x=1734630739;\n\tbh=nIq4rM7LX1pQGHOP9Y4Sdne2em5iottX928VNH2jx6c=;\n\th=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:\n\tSubject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector:\n\tList-Unsubscribe:List-Unsubscribe-Post;\n\tb=u5dJfcUxKr2gCXNGnbdhXFLAwhfC5LDjptEPYsJ99pmeHZShSFq+XeM9xK9xPbfI/\n\tgOi6aKujYmmvllnoA7+w9O8DLvJXZndyGsmNiYuiTQLqXLVPZQcuMeEp8RQZZam6jv\n\tuoa6q4ioSkHsQZaW/+lDcbBGLiWMezrweW7NnKAWApQWYhRpu3a0zkNfN+snvIFzzY\n\tQMzwA58iwLLIvTN3Pj6UZfHVbxwIKq7M8TlD9kCin2Jkp6wJQ9PQ9MWiT7P43WYv9r\n\tYC4HbCigQ5Hd4k/RtK+LGdRpbD3j/qNtLRyHlIZXUnDB+xEt5VcMlfomHf9Qs+L+sD\n\ttVmdKJfBtF0Zg==","Date":"Mon, 16 Dec 2024 17:52:15 +0000","To":"libcamera-devel@lists.libcamera.org","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"[PATCH v2] meson: Convert `v4l2` into a feature option","Message-ID":"<20241216175213.1106544-1-pobrn@protonmail.com>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"6512e9ac070c46d1d1d107d3508630a457c18698","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The v4l2 compatibility layer does not have external dependencies,\nthe usual benefits of a feature option do not apply. The main\nmotivation behind this change is making use of the `auto_features`\nmeson option that can change all feature options set to \"auto\"\nby default to the desired value.\n\nThis can be useful for two reasons: (1) using auto_features=disabled\nand then building up the list of features that are desired in the\nparticular build; (2) using auto_features=enabled to achieve\n(usually) more testing and compilation coverage.\n\nSigned-off-by: Barnabás Pőcze <pobrn@protonmail.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n meson_options.txt    | 7 ++++---\n src/v4l2/meson.build | 7 +++----\n 2 files changed, 7 insertions(+), 7 deletions(-)","diff":"diff --git a/meson_options.txt b/meson_options.txt\nindex c91cd241a..1f70da0f5 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -84,6 +84,7 @@ option('udev',\n        description : 'Enable udev support for hotplug')\n \n option('v4l2',\n-        type : 'boolean',\n-        value : false,\n-        description : 'Compile the V4L2 compatibility layer')\n+        type : 'feature',\n+        value : 'auto',\n+        description : 'Compile the V4L2 compatibility layer',\n+        deprecated : {'true': 'enabled', 'false': 'disabled'})\ndiff --git a/src/v4l2/meson.build b/src/v4l2/meson.build\nindex 58f53bf3d..2c0404147 100644\n--- a/src/v4l2/meson.build\n+++ b/src/v4l2/meson.build\n@@ -1,12 +1,11 @@\n # SPDX-License-Identifier: CC0-1.0\n \n-if not get_option('v4l2')\n-    v4l2_enabled = false\n+v4l2_enabled = get_option('v4l2').allowed()\n+\n+if not v4l2_enabled\n     subdir_done()\n endif\n \n-v4l2_enabled = true\n-\n v4l2_compat_sources = files([\n     'v4l2_camera.cpp',\n     'v4l2_camera_file.cpp',\n","prefixes":["v2"]}