From 8ea6912c9607dab0a30c9bbf518dfc80df68a10c Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 29 Sep 2019 14:24:09 +0300 Subject: libcamera: controls: Auto-generate control_ids.h and control_ids.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bring back auto-generation of control ids. In this version, both the header and the source files are generated from a single YAML file that stores all control definitions. This allows centralising controls in a single file, while the previous version required keeping both declarations (in a header) and documentation (in a the source) in sync manually. Using YAML as a format to store control definitions is a trade-off between ease of use (there are many YAML parsers available) and simplicity (XML was considered, but would have lead to more complex processing). A new build time dependency is added on python3-yaml, which should be available as a package in all distributions and build environments. The YAML format is likely to change over time as we improve documentation of controls, the first version simply copies the information currently available. Future improvements should also include a YAML schema to validate the YAML source file. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- package/gentoo/media-libs/libcamera/libcamera-9999.ebuild | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'package') diff --git a/package/gentoo/media-libs/libcamera/libcamera-9999.ebuild b/package/gentoo/media-libs/libcamera/libcamera-9999.ebuild index fed2b409..fc241b1f 100644 --- a/package/gentoo/media-libs/libcamera/libcamera-9999.ebuild +++ b/package/gentoo/media-libs/libcamera/libcamera-9999.ebuild @@ -2,7 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=6 -inherit git-r3 meson +PYTHON_COMPAT=( python3_{5,6,7} ) + +inherit git-r3 meson python-any-r1 DESCRIPTION="Camera support library for Linux" HOMEPAGE="http://libcamera.org" @@ -15,7 +17,10 @@ KEYWORDS="*" IUSE="udev" RDEPEND="udev? ( virtual/libudev )" -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + $(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]') +" src_configure() { local emesonargs=( -- cgit v1.2.1