Show a patch.

GET /api/1.1/patches/1119/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1119,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/1119/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1119/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20190427021631.15252-1-laurent.pinchart@ideasonboard.com>",
    "date": "2019-04-27T02:16:31",
    "name": "[libcamera-devel] libcamera: Make libudev optional",
    "commit_ref": "df587aa10005475a1a9300001e7045b1ba357b9e",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2c2d74a3742ca7ee4b3693fd9585c157fa1a439f",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/1119/mbox/",
    "series": [
        {
            "id": 276,
            "url": "https://patchwork.libcamera.org/api/1.1/series/276/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=276",
            "date": "2019-04-27T02:16:31",
            "name": "[libcamera-devel] libcamera: Make libudev optional",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/276/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1119/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1119/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EFF0760005\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 27 Apr 2019 04:16:45 +0200 (CEST)",
            "from pendragon.station (net-37-182-44-227.cust.vodafonedsl.it\n\t[37.182.44.227])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 697255F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 27 Apr 2019 04:16:45 +0200 (CEST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1556331405;\n\tbh=GGamlslNU2rsRO3iK1PAY37NNzSliIfxYeRZkHG3pqA=;\n\th=From:To:Subject:Date:From;\n\tb=vCr+Zg0pfRQilVESHx5bAcMatQtpq3dqKMCxTrBhtAqDFm/WyGSz6uqem38hkm01D\n\tmXW1ZnP76DDlzsMvAmIzOXITw6CRUJdBBzhhIBaDc4V6yxN+m3UjmXjfrf91Tu7TP/\n\tMI/INfmjrgOoPhfGvHA2QSG2Z9VWRNt5d2nm/ubc=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat, 27 Apr 2019 05:16:31 +0300",
        "Message-Id": "<20190427021631.15252-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] libcamera: Make libudev optional",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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>",
        "X-List-Received-Date": "Sat, 27 Apr 2019 02:16:46 -0000"
    },
    "content": "libcamera depends on libudev for device enumeration. It is however\nuseful to allow building documentation without requiring the dependency\nto be installed. Make the libudev dependency optional and compile the\nudev-based device enumerator out when libudev is not present.\n\nNote that will libcamera will compile without libudev, it will not be\nable to enumerate devices. A sysfs-based device enumerator is planned as\na fallback but not implemented yet.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n Documentation/Doxyfile.in                     |   4 +-\n meson.build                                   |   3 +-\n src/libcamera/camera_manager.cpp              |   2 +-\n src/libcamera/device_enumerator.cpp           | 157 +----------------\n src/libcamera/device_enumerator_udev.cpp      | 163 ++++++++++++++++++\n src/libcamera/include/device_enumerator.h     |  24 ---\n .../include/device_enumerator_udev.h          |  42 +++++\n src/libcamera/meson.build                     |  10 +-\n 8 files changed, 223 insertions(+), 182 deletions(-)\n create mode 100644 src/libcamera/device_enumerator_udev.cpp\n create mode 100644 src/libcamera/include/device_enumerator_udev.h",
    "diff": "diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\nindex 3e2b7fd9da0e..950ad4fef40e 100644\n--- a/Documentation/Doxyfile.in\n+++ b/Documentation/Doxyfile.in\n@@ -833,7 +833,9 @@ RECURSIVE              = YES\n # Note that relative paths are relative to the directory from which doxygen is\n # run.\n \n-EXCLUDE                = ../src/libcamera/pipeline/\n+EXCLUDE                = ../src/libcamera/device_enumerator_udev.cpp \\\n+\t\t\t ../src/libcamera/include/device_enumerator_udev.h \\\n+\t\t\t ../src/libcamera/pipeline/\n \n # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n # directories that are symbolic links (a Unix file system feature) are excluded\ndiff --git a/meson.build b/meson.build\nindex 3434dd7c1b66..d272ff33b100 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -19,7 +19,6 @@ config_h = configuration_data()\n if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix: '#define _GNU_SOURCE')\n     config_h.set('HAVE_SECURE_GETENV', 1)\n endif\n-configure_file(output: 'config.h', configuration: config_h)\n \n common_arguments = [\n     '-Wno-unused-parameter',\n@@ -49,6 +48,8 @@ if get_option('tests')\n   subdir('test')\n endif\n \n+configure_file(output: 'config.h', configuration: config_h)\n+\n pkg_mod = import('pkgconfig')\n pkg_mod.generate(libraries : libcamera,\n                  version : '1.0',\ndiff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\nindex 40a39bd2a6d9..cf881ce2e641 100644\n--- a/src/libcamera/camera_manager.cpp\n+++ b/src/libcamera/camera_manager.cpp\n@@ -80,7 +80,7 @@ int CameraManager::start()\n \t\treturn -EBUSY;\n \n \tenumerator_ = DeviceEnumerator::create();\n-\tif (enumerator_->enumerate())\n+\tif (!enumerator_ || enumerator_->enumerate())\n \t\treturn -ENODEV;\n \n \t/*\ndiff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp\nindex 49467546bab8..f6878b3d58b3 100644\n--- a/src/libcamera/device_enumerator.cpp\n+++ b/src/libcamera/device_enumerator.cpp\n@@ -6,14 +6,9 @@\n  */\n \n #include \"device_enumerator.h\"\n+#include \"device_enumerator_udev.h\"\n \n-#include <fcntl.h>\n-#include <libudev.h>\n #include <string.h>\n-#include <sys/ioctl.h>\n-#include <unistd.h>\n-\n-#include <libcamera/event_notifier.h>\n \n #include \"log.h\"\n #include \"media_device.h\"\n@@ -148,13 +143,11 @@ std::unique_ptr<DeviceEnumerator> DeviceEnumerator::create()\n {\n \tstd::unique_ptr<DeviceEnumerator> enumerator;\n \n-\t/**\n-\t * \\todo Add compile time checks to only try udev enumerator if libudev\n-\t * is available.\n-\t */\n+#ifdef HAVE_LIBUDEV\n \tenumerator = utils::make_unique<DeviceEnumeratorUdev>();\n \tif (!enumerator->init())\n \t\treturn enumerator;\n+#endif\n \n \t/*\n \t * Either udev is not available or udev initialization failed. Fall back\n@@ -327,148 +320,4 @@ std::shared_ptr<MediaDevice> DeviceEnumerator::search(const DeviceMatch &dm)\n  * fails\n  */\n \n-/**\n- * \\class DeviceEnumeratorUdev\n- * \\brief Device enumerator based on libudev\n- */\n-\n-DeviceEnumeratorUdev::DeviceEnumeratorUdev()\n-\t: udev_(nullptr)\n-{\n-}\n-\n-DeviceEnumeratorUdev::~DeviceEnumeratorUdev()\n-{\n-\tdelete notifier_;\n-\n-\tif (monitor_)\n-\t\tudev_monitor_unref(monitor_);\n-\tif (udev_)\n-\t\tudev_unref(udev_);\n-}\n-\n-int DeviceEnumeratorUdev::init()\n-{\n-\tint ret;\n-\n-\tif (udev_)\n-\t\treturn -EBUSY;\n-\n-\tudev_ = udev_new();\n-\tif (!udev_)\n-\t\treturn -ENODEV;\n-\n-\tmonitor_ = udev_monitor_new_from_netlink(udev_, \"udev\");\n-\tif (!monitor_)\n-\t\treturn -ENODEV;\n-\n-\tret = udev_monitor_filter_add_match_subsystem_devtype(monitor_, \"media\",\n-\t\t\t\t\t\t\t      nullptr);\n-\tif (ret < 0)\n-\t\treturn ret;\n-\n-\treturn 0;\n-}\n-\n-int DeviceEnumeratorUdev::enumerate()\n-{\n-\tstruct udev_enumerate *udev_enum = nullptr;\n-\tstruct udev_list_entry *ents, *ent;\n-\tint ret;\n-\n-\tudev_enum = udev_enumerate_new(udev_);\n-\tif (!udev_enum)\n-\t\treturn -ENOMEM;\n-\n-\tret = udev_enumerate_add_match_subsystem(udev_enum, \"media\");\n-\tif (ret < 0)\n-\t\tgoto done;\n-\n-\tret = udev_enumerate_scan_devices(udev_enum);\n-\tif (ret < 0)\n-\t\tgoto done;\n-\n-\tents = udev_enumerate_get_list_entry(udev_enum);\n-\tif (!ents)\n-\t\tgoto done;\n-\n-\tudev_list_entry_foreach(ent, ents) {\n-\t\tstruct udev_device *dev;\n-\t\tconst char *devnode;\n-\t\tconst char *syspath = udev_list_entry_get_name(ent);\n-\n-\t\tdev = udev_device_new_from_syspath(udev_, syspath);\n-\t\tif (!dev) {\n-\t\t\tLOG(DeviceEnumerator, Warning)\n-\t\t\t\t<< \"Failed to get device for '\"\n-\t\t\t\t<< syspath << \"', skipping\";\n-\t\t\tcontinue;\n-\t\t}\n-\n-\t\tdevnode = udev_device_get_devnode(dev);\n-\t\tif (!devnode) {\n-\t\t\tudev_device_unref(dev);\n-\t\t\tret = -ENODEV;\n-\t\t\tgoto done;\n-\t\t}\n-\n-\t\taddDevice(devnode);\n-\n-\t\tudev_device_unref(dev);\n-\t}\n-done:\n-\tudev_enumerate_unref(udev_enum);\n-\tif (ret < 0)\n-\t\treturn ret;\n-\n-\tret = udev_monitor_enable_receiving(monitor_);\n-\tif (ret < 0)\n-\t\treturn ret;\n-\n-\tint fd = udev_monitor_get_fd(monitor_);\n-\tnotifier_ = new EventNotifier(fd, EventNotifier::Read);\n-\tnotifier_->activated.connect(this, &DeviceEnumeratorUdev::udevNotify);\n-\n-\treturn 0;\n-}\n-\n-std::string DeviceEnumeratorUdev::lookupDeviceNode(int major, int minor)\n-{\n-\tstruct udev_device *device;\n-\tconst char *name;\n-\tdev_t devnum;\n-\tstd::string deviceNode = std::string();\n-\n-\tdevnum = makedev(major, minor);\n-\tdevice = udev_device_new_from_devnum(udev_, 'c', devnum);\n-\tif (!device)\n-\t\treturn std::string();\n-\n-\tname = udev_device_get_devnode(device);\n-\tif (name)\n-\t\tdeviceNode = name;\n-\n-\tudev_device_unref(device);\n-\n-\treturn deviceNode;\n-}\n-\n-void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier)\n-{\n-\tstruct udev_device *dev = udev_monitor_receive_device(monitor_);\n-\tstd::string action(udev_device_get_action(dev));\n-\tstd::string deviceNode(udev_device_get_devnode(dev));\n-\n-\tLOG(DeviceEnumerator, Debug)\n-\t\t<< action << \" device \" << udev_device_get_devnode(dev);\n-\n-\tif (action == \"add\") {\n-\t\taddDevice(deviceNode);\n-\t} else if (action == \"remove\") {\n-\t\tremoveDevice(deviceNode);\n-\t}\n-\n-\tudev_device_unref(dev);\n-}\n-\n } /* namespace libcamera */\ndiff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\nnew file mode 100644\nindex 000000000000..cb2d21b90506\n--- /dev/null\n+++ b/src/libcamera/device_enumerator_udev.cpp\n@@ -0,0 +1,163 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2018-2019, Google Inc.\n+ *\n+ * device_enumerator_udev.cpp - udev-based device enumerator\n+ */\n+\n+#include \"device_enumerator_udev.h\"\n+\n+#include <fcntl.h>\n+#include <libudev.h>\n+#include <string.h>\n+#include <sys/ioctl.h>\n+#include <unistd.h>\n+\n+#include <libcamera/event_notifier.h>\n+\n+#include \"log.h\"\n+\n+namespace libcamera {\n+\n+LOG_DECLARE_CATEGORY(DeviceEnumerator)\n+\n+DeviceEnumeratorUdev::DeviceEnumeratorUdev()\n+\t: udev_(nullptr)\n+{\n+}\n+\n+DeviceEnumeratorUdev::~DeviceEnumeratorUdev()\n+{\n+\tdelete notifier_;\n+\n+\tif (monitor_)\n+\t\tudev_monitor_unref(monitor_);\n+\tif (udev_)\n+\t\tudev_unref(udev_);\n+}\n+\n+int DeviceEnumeratorUdev::init()\n+{\n+\tint ret;\n+\n+\tif (udev_)\n+\t\treturn -EBUSY;\n+\n+\tudev_ = udev_new();\n+\tif (!udev_)\n+\t\treturn -ENODEV;\n+\n+\tmonitor_ = udev_monitor_new_from_netlink(udev_, \"udev\");\n+\tif (!monitor_)\n+\t\treturn -ENODEV;\n+\n+\tret = udev_monitor_filter_add_match_subsystem_devtype(monitor_, \"media\",\n+\t\t\t\t\t\t\t      nullptr);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\treturn 0;\n+}\n+\n+int DeviceEnumeratorUdev::enumerate()\n+{\n+\tstruct udev_enumerate *udev_enum = nullptr;\n+\tstruct udev_list_entry *ents, *ent;\n+\tint ret;\n+\n+\tudev_enum = udev_enumerate_new(udev_);\n+\tif (!udev_enum)\n+\t\treturn -ENOMEM;\n+\n+\tret = udev_enumerate_add_match_subsystem(udev_enum, \"media\");\n+\tif (ret < 0)\n+\t\tgoto done;\n+\n+\tret = udev_enumerate_scan_devices(udev_enum);\n+\tif (ret < 0)\n+\t\tgoto done;\n+\n+\tents = udev_enumerate_get_list_entry(udev_enum);\n+\tif (!ents)\n+\t\tgoto done;\n+\n+\tudev_list_entry_foreach(ent, ents) {\n+\t\tstruct udev_device *dev;\n+\t\tconst char *devnode;\n+\t\tconst char *syspath = udev_list_entry_get_name(ent);\n+\n+\t\tdev = udev_device_new_from_syspath(udev_, syspath);\n+\t\tif (!dev) {\n+\t\t\tLOG(DeviceEnumerator, Warning)\n+\t\t\t\t<< \"Failed to get device for '\"\n+\t\t\t\t<< syspath << \"', skipping\";\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tdevnode = udev_device_get_devnode(dev);\n+\t\tif (!devnode) {\n+\t\t\tudev_device_unref(dev);\n+\t\t\tret = -ENODEV;\n+\t\t\tgoto done;\n+\t\t}\n+\n+\t\taddDevice(devnode);\n+\n+\t\tudev_device_unref(dev);\n+\t}\n+done:\n+\tudev_enumerate_unref(udev_enum);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tret = udev_monitor_enable_receiving(monitor_);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tint fd = udev_monitor_get_fd(monitor_);\n+\tnotifier_ = new EventNotifier(fd, EventNotifier::Read);\n+\tnotifier_->activated.connect(this, &DeviceEnumeratorUdev::udevNotify);\n+\n+\treturn 0;\n+}\n+\n+std::string DeviceEnumeratorUdev::lookupDeviceNode(int major, int minor)\n+{\n+\tstruct udev_device *device;\n+\tconst char *name;\n+\tdev_t devnum;\n+\tstd::string deviceNode = std::string();\n+\n+\tdevnum = makedev(major, minor);\n+\tdevice = udev_device_new_from_devnum(udev_, 'c', devnum);\n+\tif (!device)\n+\t\treturn std::string();\n+\n+\tname = udev_device_get_devnode(device);\n+\tif (name)\n+\t\tdeviceNode = name;\n+\n+\tudev_device_unref(device);\n+\n+\treturn deviceNode;\n+}\n+\n+void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier)\n+{\n+\tstruct udev_device *dev = udev_monitor_receive_device(monitor_);\n+\tstd::string action(udev_device_get_action(dev));\n+\tstd::string deviceNode(udev_device_get_devnode(dev));\n+\n+\tLOG(DeviceEnumerator, Debug)\n+\t\t<< action << \" device \" << udev_device_get_devnode(dev);\n+\n+\tif (action == \"add\") {\n+\t\taddDevice(deviceNode);\n+\t} else if (action == \"remove\") {\n+\t\tremoveDevice(deviceNode);\n+\t}\n+\n+\tudev_device_unref(dev);\n+}\n+\n+} /* namespace libcamera */\ndiff --git a/src/libcamera/include/device_enumerator.h b/src/libcamera/include/device_enumerator.h\nindex 2801861864b8..02aec3bc50c6 100644\n--- a/src/libcamera/include/device_enumerator.h\n+++ b/src/libcamera/include/device_enumerator.h\n@@ -7,19 +7,14 @@\n #ifndef __LIBCAMERA_DEVICE_ENUMERATOR_H__\n #define __LIBCAMERA_DEVICE_ENUMERATOR_H__\n \n-#include <map>\n #include <memory>\n #include <string>\n #include <vector>\n \n #include <linux/media.h>\n \n-struct udev;\n-struct udev_monitor;\n-\n namespace libcamera {\n \n-class EventNotifier;\n class MediaDevice;\n \n class DeviceMatch\n@@ -58,25 +53,6 @@ private:\n \tvirtual std::string lookupDeviceNode(int major, int minor) = 0;\n };\n \n-class DeviceEnumeratorUdev: public DeviceEnumerator\n-{\n-public:\n-\tDeviceEnumeratorUdev();\n-\t~DeviceEnumeratorUdev();\n-\n-\tint init() final;\n-\tint enumerate() final;\n-\n-private:\n-\tstruct udev *udev_;\n-\tstruct udev_monitor *monitor_;\n-\tEventNotifier *notifier_;\n-\n-\tstd::string lookupDeviceNode(int major, int minor) final;\n-\n-\tvoid udevNotify(EventNotifier *notifier);\n-};\n-\n } /* namespace libcamera */\n \n #endif\t/* __LIBCAMERA_DEVICE_ENUMERATOR_H__ */\ndiff --git a/src/libcamera/include/device_enumerator_udev.h b/src/libcamera/include/device_enumerator_udev.h\nnew file mode 100644\nindex 000000000000..80f9372bca36\n--- /dev/null\n+++ b/src/libcamera/include/device_enumerator_udev.h\n@@ -0,0 +1,42 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2018-2019, Google Inc.\n+ *\n+ * device_enumerator_udev.h - udev-based device enumerator\n+ */\n+#ifndef __LIBCAMERA_DEVICE_ENUMERATOR_UDEV_H__\n+#define __LIBCAMERA_DEVICE_ENUMERATOR_UDEV_H__\n+\n+#include <string>\n+\n+#include \"device_enumerator.h\"\n+\n+struct udev;\n+struct udev_monitor;\n+\n+namespace libcamera {\n+\n+class EventNotifier;\n+\n+class DeviceEnumeratorUdev : public DeviceEnumerator\n+{\n+public:\n+\tDeviceEnumeratorUdev();\n+\t~DeviceEnumeratorUdev();\n+\n+\tint init() final;\n+\tint enumerate() final;\n+\n+private:\n+\tstruct udev *udev_;\n+\tstruct udev_monitor *monitor_;\n+\tEventNotifier *notifier_;\n+\n+\tstd::string lookupDeviceNode(int major, int minor) final;\n+\n+\tvoid udevNotify(EventNotifier *notifier);\n+};\n+\n+} /* namespace libcamera */\n+\n+#endif\t/* __LIBCAMERA_DEVICE_ENUMERATOR_UDEV_H__ */\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex cf4edec05755..2b678237b64f 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -26,6 +26,7 @@ libcamera_sources = files([\n libcamera_headers = files([\n     'include/camera_sensor.h',\n     'include/device_enumerator.h',\n+    'include/device_enumerator_udev.h',\n     'include/event_dispatcher_poll.h',\n     'include/formats.h',\n     'include/log.h',\n@@ -46,7 +47,14 @@ includes = [\n \n subdir('pipeline')\n \n-libudev = dependency('libudev')\n+libudev = dependency('libudev', required: false)\n+\n+if libudev.found()\n+    config_h.set('HAVE_LIBUDEV', 1)\n+    libcamera_sources += files([\n+        'device_enumerator_udev.cpp',\n+    ])\n+endif\n \n libcamera = shared_library('camera',\n                            libcamera_sources,\n",
    "prefixes": [
        "libcamera-devel"
    ]
}