summaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb')
-rw-r--r--meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb84
1 files changed, 84 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb
new file mode 100644
index 0000000000..88fe9cf39c
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb
@@ -0,0 +1,84 @@
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;tag=v${PV} \
13"
14
15SRCREV = "096c50ca881f72d858aca19757a5e73b4775a7cc"
16
17PE = "1"
18
19DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml"
20DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
21
22PACKAGES =+ "${PN}-gst ${PN}-pycamera"
23
24PACKAGECONFIG ??= ""
25PACKAGECONFIG[dng] = ",,tiff"
26PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
27PACKAGECONFIG[pycamera] = "-Dpycamera=enabled,-Dpycamera=disabled,python3 python3-pybind11"
28PACKAGECONFIG[raspberrypi] = ",,libpisp"
29
30# Raspberry Pi requires the meta-raspberrypi layer
31# These values are coming from the project's meson.build file,
32# which lists the supported values by arch.
33ARM_PIPELINES = "${@bb.utils.contains('PACKAGECONFIG', 'raspberrypi', 'rpi/pisp,rpi/vc4,', '', d)}"
34ARM_PIPELINES .= "imx8-isi,mali-c55,simple,uvcvideo"
35
36LIBCAMERA_PIPELINES ??= "auto"
37LIBCAMERA_PIPELINES:arm ??= "${ARM_PIPELINES}"
38LIBCAMERA_PIPELINES:aarch64 ??= "${ARM_PIPELINES}"
39
40EXTRA_OEMESON = " \
41 -Dpipelines=${LIBCAMERA_PIPELINES} \
42 -Dv4l2=true \
43 -Dcam=enabled \
44 -Dlc-compliance=disabled \
45 -Dtest=false \
46 -Ddocumentation=disabled \
47"
48
49RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
50
51inherit meson pkgconfig python3native
52
53do_configure:prepend() {
54 sed -i -e 's|py_compile=True,||' ${S}/utils/codegen/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py
55}
56
57do_install:append() {
58 chrpath -d ${D}${libdir}/libcamera.so
59 chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so
60}
61
62do_package:append() {
63 bb.build.exec_func("do_package_recalculate_ipa_signatures", d)
64}
65
66do_package_recalculate_ipa_signatures() {
67 local modules
68 for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
69 module="${module%.sign}"
70 if [ -f "${module}" ] ; then
71 modules="${modules} ${module}"
72 fi
73 done
74
75 ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
76}
77
78FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so"
79FILES:${PN}-gst = "${libdir}/gstreamer-1.0"
80FILES:${PN}-pycamera = "${PYTHON_SITEPACKAGES_DIR}/libcamera"
81
82# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to
83# both 32 and 64 bit file APIs.
84GLIBC_64BIT_TIME_FLAGS = ""