[libcamera-devel] [PATCH] package metadata
Christian Rauch
Rauch.Christian at gmx.de
Sat Aug 13 00:40:36 CEST 2022
Hi Laurent,
Am 12.08.22 um 00:34 schrieb Laurent Pinchart:
> Hi Christian,
>
> Thank you for the patch.
>
> On Thu, Aug 11, 2022 at 09:52:30PM +0200, Christian Rauch via libcamera-devel wrote:
>> This metadata file provides information, amongst others, about the version,
>> licence, maintainers and build dependencies. This file is used by build
>> systems (catkin, colcon) to manage a dependency graph and resolve those
>> dependencies automatically.
>>
>> The file structure is defined at: https://www.ros.org/reps/rep-0149.html
>>
>> Signed-off-by: Christian Rauch <Rauch.Christian at gmx.de>
>> ---
>> package.xml | 32 ++++++++++++++++++++++++++++++++
>> 1 file changed, 32 insertions(+)
>> create mode 100644 package.xml
>>
>> diff --git a/package.xml b/package.xml
>> new file mode 100644
>> index 00000000..8b06f507
>> --- /dev/null
>> +++ b/package.xml
>> @@ -0,0 +1,32 @@
>> +<?xml version="1.0"?>
>> +<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
>> +<package format="3">
>> + <name>libcamera</name>
>> +
>> + <version>0.0.0</version>
>> +
>> + <description>An open source camera stack and framework for Linux, Android, and ChromeOS</description>
>> +
>> + <maintainer email="libcamera-devel at lists.libcamera.org">libcamera project</maintainer>
>> +
>> + <license>LGPL-2.1</license>
>> +
>> + <url>https://libcamera.org</url>
>> +
>> + <buildtool_depend>python3-meson-pip</buildtool_depend>
>> + <buildtool_depend>ninja-build</buildtool_depend>
>> +
>> + <build_depend>python3-yaml</build_depend>
>> + <build_depend>python3-ply</build_depend>
>> + <build_depend>python3-jinja2</build_depend>
>> +
>> + <depend>libgnutls28-dev</depend>
>> + <depend>openssl</depend>
>
> openssl is a build dependency. Since a few days ago, it can also
> optionally be a runtime dependency to replace gnutls.
>
>> + <depend>boost</depend>
>
> We don't depend on boost anymore.
>
>> + <depend>libudev-dev</depend>
>> + <depend>libunwind-dev</depend>
>
> These two dependencies are optional. I'm curious, how are optional
> dependencies supposed to be handled ? package.xml seems specific to ROS,
> does it need to pick a set of options that will be enabled in the
> context of ROS, and then list the corresponding dependencies here ? If
> so, how would libcamera be built on ROS, how are the meson configuration
> option set ?
There is no way to define or handle optional dependencies. The
"package.xml" does not interact with the options for the build system.
While this kind of metadata definition originates from ROS, it can be
used in conjunction with colcon and rosdep to build plain CMake or meson
packages without any dependencies on ROS packages. "colcon" is a kind of
meta build system to build large sets of packages with cross source
dependencies, and "rosdep" is a tool to install binary dependencies via
distribution packages.
Running "colcon build" will run with the default configuration. You can
pass meson specific options via "--meson-args". However, there is no way
to let the "package.xml" and "rosdep" know which of those dependencies
are optional and depending on some build options. I am not sure if there
is a way to specify package-specific build options inside the package.
However, since libcamera defines most features as auto, you could simply
add those optional dependencies to the metadata and let libcamera
activate that feature automatically.
>
>> +
>> + <export>
>> + <build_type>meson</build_type>
>> + </export>
>> +</package>
>
More information about the libcamera-devel
mailing list