diff options
| -rw-r--r-- | meta-multimedia/recipes-multimedia/libcamera/files/0001-meson-import-python3-to-use-also-from-sysroot.patch | 61 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/libcamera/libcamera.bb | 31 |
2 files changed, 92 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/libcamera/files/0001-meson-import-python3-to-use-also-from-sysroot.patch b/meta-multimedia/recipes-multimedia/libcamera/files/0001-meson-import-python3-to-use-also-from-sysroot.patch new file mode 100644 index 0000000000..fc56a68528 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/libcamera/files/0001-meson-import-python3-to-use-also-from-sysroot.patch | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | From ea47e53911213d71e997eb34848ae72735bacc82 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: madhavank27 <madhavan.krishnan@linaro.org> | ||
| 3 | Date: Thu, 9 Jan 2020 07:42:18 +0100 | ||
| 4 | Subject: [PATCH] meson: import python3 to use also from sysroot | ||
| 5 | |||
| 6 | importing python module can provide the exact path | ||
| 7 | which can be used in desktop build as well as from | ||
| 8 | any build system | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | Signed-off-by: madhavank27 <madhavan.krishnan@linaro.org> | ||
| 12 | --- | ||
| 13 | include/libcamera/meson.build | 4 +++- | ||
| 14 | src/libcamera/meson.build | 4 +++- | ||
| 15 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build | ||
| 18 | index 99abf06..83525e2 100644 | ||
| 19 | --- a/include/libcamera/meson.build | ||
| 20 | +++ b/include/libcamera/meson.build | ||
| 21 | @@ -21,13 +21,15 @@ include_dir = join_paths(libcamera_include_dir, 'libcamera') | ||
| 22 | install_headers(libcamera_api, | ||
| 23 | subdir : include_dir) | ||
| 24 | |||
| 25 | +python_mod = import('python3').find_python() | ||
| 26 | + | ||
| 27 | gen_controls = files('../../src/libcamera/gen-controls.py') | ||
| 28 | |||
| 29 | control_ids_h = custom_target('control_ids_h', | ||
| 30 | input : files('../../src/libcamera/control_ids.yaml', 'control_ids.h.in'), | ||
| 31 | output : 'control_ids.h', | ||
| 32 | depend_files : gen_controls, | ||
| 33 | - command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@'], | ||
| 34 | + command : [python_mod, gen_controls, '-o', '@OUTPUT@', '@INPUT@'], | ||
| 35 | install : true, | ||
| 36 | install_dir : join_paths('include', include_dir)) | ||
| 37 | |||
| 38 | diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build | ||
| 39 | index c4f965b..243935b 100644 | ||
| 40 | --- a/src/libcamera/meson.build | ||
| 41 | +++ b/src/libcamera/meson.build | ||
| 42 | @@ -65,13 +65,15 @@ if libudev.found() | ||
| 43 | ]) | ||
| 44 | endif | ||
| 45 | |||
| 46 | +python_mod = import('python3').find_python() | ||
| 47 | + | ||
| 48 | gen_controls = files('gen-controls.py') | ||
| 49 | |||
| 50 | control_ids_cpp = custom_target('control_ids_cpp', | ||
| 51 | input : files('control_ids.yaml', 'control_ids.cpp.in'), | ||
| 52 | output : 'control_ids.cpp', | ||
| 53 | depend_files : gen_controls, | ||
| 54 | - command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@']) | ||
| 55 | + command : [python_mod, gen_controls, '-o', '@OUTPUT@', '@INPUT@']) | ||
| 56 | |||
| 57 | libcamera_sources += control_ids_cpp | ||
| 58 | libcamera_sources += control_ids_h | ||
| 59 | -- | ||
| 60 | 2.7.4 | ||
| 61 | |||
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb new file mode 100644 index 0000000000..b95bf6d09d --- /dev/null +++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | SUMMARY = "Linux libcamera framework" | ||
| 2 | SECTION = "libs" | ||
| 3 | |||
| 4 | LICENSE = "GPL-2.0 & LGPL-2.1" | ||
| 5 | |||
| 6 | LIC_FILES_CHKSUM = "\ | ||
| 7 | file://licenses/gnu-gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 8 | file://licenses/gnu-lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \ | ||
| 9 | " | ||
| 10 | |||
| 11 | SRC_URI = " \ | ||
| 12 | git://linuxtv.org/libcamera.git;protocol=git \ | ||
| 13 | file://0001-meson-import-python3-to-use-also-from-sysroot.patch \ | ||
| 14 | " | ||
| 15 | |||
| 16 | SRCREV = "53eab996809e826bc914e4c34c78fe74d86f8dc4" | ||
| 17 | |||
| 18 | PV = "201910+git${SRCPV}" | ||
| 19 | |||
| 20 | S = "${WORKDIR}/git" | ||
| 21 | |||
| 22 | DEPENDS = "python3-pyyaml-native udev" | ||
| 23 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" | ||
| 24 | |||
| 25 | RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" | ||
| 26 | |||
| 27 | inherit meson pkgconfig python3native | ||
| 28 | |||
| 29 | FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig" | ||
| 30 | FILES_${PN} += " ${libdir}/libcamera.so" | ||
| 31 | |||
