diff options
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.bb | 78 |
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 @@ | |||
1 | SUMMARY = "Linux libcamera framework" | ||
2 | SECTION = "libs" | ||
3 | |||
4 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" | ||
5 | |||
6 | LIC_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 | |||
11 | SRC_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 | |||
17 | SRCREV = "35ed4b91291d9f3d08e4b51acfb51163e65df8f8" | ||
18 | |||
19 | PE = "1" | ||
20 | |||
21 | |||
22 | DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml" | ||
23 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" | ||
24 | |||
25 | PACKAGES =+ "${PN}-gst ${PN}-pycamera" | ||
26 | |||
27 | PACKAGECONFIG ??= "" | ||
28 | PACKAGECONFIG[dng] = ",,tiff" | ||
29 | PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" | ||
30 | PACKAGECONFIG[pycamera] = "-Dpycamera=enabled,-Dpycamera=disabled,python3 python3-pybind11" | ||
31 | |||
32 | LIBCAMERA_PIPELINES ??= "auto" | ||
33 | |||
34 | EXTRA_OEMESON = " \ | ||
35 | -Dpipelines=${LIBCAMERA_PIPELINES} \ | ||
36 | -Dv4l2=true \ | ||
37 | -Dcam=enabled \ | ||
38 | -Dlc-compliance=disabled \ | ||
39 | -Dtest=false \ | ||
40 | -Ddocumentation=disabled \ | ||
41 | " | ||
42 | |||
43 | RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" | ||
44 | |||
45 | inherit meson pkgconfig python3native | ||
46 | |||
47 | do_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 | |||
51 | do_install:append() { | ||
52 | chrpath -d ${D}${libdir}/libcamera.so | ||
53 | chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so | ||
54 | } | ||
55 | |||
56 | do_package:append() { | ||
57 | bb.build.exec_func("do_package_recalculate_ipa_signatures", d) | ||
58 | } | ||
59 | |||
60 | do_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 | |||
72 | FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so" | ||
73 | FILES:${PN}-gst = "${libdir}/gstreamer-1.0" | ||
74 | FILES:${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. | ||
78 | GLIBC_64BIT_TIME_FLAGS = "" | ||