summaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb')
-rw-r--r--meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb78
1 files changed, 78 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb
new file mode 100644
index 0000000000..c7fe631a43
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb
@@ -0,0 +1,78 @@
1SUMMARY = "Linux libcamera framework"
2SECTION = "libs"
3
4LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
5
6LIC_FILES_CHKSUM = "\
7 file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \
8 file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \
9"
10
11SRC_URI = " \
12 git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \
13 file://0001-media_device-Add-bool-return-type-to-unlock.patch \
14 file://0002-libcamera-Add-missing-stdint.h-include-to-dma_buf_al.patch \
15"
16
17SRCREV = "35ed4b91291d9f3d08e4b51acfb51163e65df8f8"
18
19PE = "1"
20
21
22DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml"
23DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
24
25PACKAGES =+ "${PN}-gst ${PN}-pycamera"
26
27PACKAGECONFIG ??= ""
28PACKAGECONFIG[dng] = ",,tiff"
29PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
30PACKAGECONFIG[pycamera] = "-Dpycamera=enabled,-Dpycamera=disabled,python3 python3-pybind11"
31
32LIBCAMERA_PIPELINES ??= "auto"
33
34EXTRA_OEMESON = " \
35 -Dpipelines=${LIBCAMERA_PIPELINES} \
36 -Dv4l2=true \
37 -Dcam=enabled \
38 -Dlc-compliance=disabled \
39 -Dtest=false \
40 -Ddocumentation=disabled \
41"
42
43RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
44
45inherit meson pkgconfig python3native
46
47do_configure:prepend() {
48 sed -i -e 's|py_compile=True,||' ${S}/utils/codegen/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py
49}
50
51do_install:append() {
52 chrpath -d ${D}${libdir}/libcamera.so
53 chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so
54}
55
56do_package:append() {
57 bb.build.exec_func("do_package_recalculate_ipa_signatures", d)
58}
59
60do_package_recalculate_ipa_signatures() {
61 local modules
62 for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
63 module="${module%.sign}"
64 if [ -f "${module}" ] ; then
65 modules="${modules} ${module}"
66 fi
67 done
68
69 ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
70}
71
72FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so"
73FILES:${PN}-gst = "${libdir}/gstreamer-1.0"
74FILES:${PN}-pycamera = "${PYTHON_SITEPACKAGES_DIR}/libcamera"
75
76# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to
77# both 32 and 64 bit file APIs.
78GLIBC_64BIT_TIME_FLAGS = ""