blob: 46f058f2ea839d885f33b07154ce2f438519c5f4 [file] [log] [blame]
Brad Bishope42b3e32020-01-15 22:08:42 -05001SUMMARY = "Linux libcamera framework"
2SECTION = "libs"
3
Andrew Geissler9aee5002022-03-30 16:27:02 +00004LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
Brad Bishope42b3e32020-01-15 22:08:42 -05005
6LIC_FILES_CHKSUM = "\
Andrew Geisslerc87764f2020-06-27 00:16:32 -05007 file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \
8 file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \
Brad Bishope42b3e32020-01-15 22:08:42 -05009"
10
11SRC_URI = " \
Andrew Geissler595f6302022-01-24 19:11:47 +000012 git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \
Andrew Geisslerc5535c92023-01-27 16:10:19 -060013 file://0001-file_sink.cpp-Avoid-dangling-reference.patch \
Brad Bishope42b3e32020-01-15 22:08:42 -050014"
15
Patrick Williams2390b1b2022-11-03 13:47:49 -050016SRCREV = "a83aed77df1258e469c0eb42d9cb4f1938db53f2"
Brad Bishope42b3e32020-01-15 22:08:42 -050017
Patrick Williams2390b1b2022-11-03 13:47:49 -050018PE = "1"
Brad Bishope42b3e32020-01-15 22:08:42 -050019
20S = "${WORKDIR}/git"
21
Patrick Williams2194f502022-10-16 14:26:09 -050022DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml"
Brad Bishope42b3e32020-01-15 22:08:42 -050023DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
24
Andrew Geisslerd688a012020-09-18 13:36:00 -050025PACKAGES =+ "${PN}-gst"
26
27PACKAGECONFIG ??= ""
28PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
29
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000030EXTRA_OEMESON = " \
31 -Dpipelines=uvcvideo,simple,vimc \
32 -Dipas=vimc \
33 -Dv4l2=true \
34 -Dcam=enabled \
35 -Dlc-compliance=disabled \
36 -Dtest=false \
37 -Ddocumentation=disabled \
38"
39
Patrick Williams213cb262021-08-07 19:21:33 -050040RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
Brad Bishope42b3e32020-01-15 22:08:42 -050041
42inherit meson pkgconfig python3native
43
Patrick Williams213cb262021-08-07 19:21:33 -050044do_configure:prepend() {
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070045 sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py
46}
47
Patrick Williams213cb262021-08-07 19:21:33 -050048do_install:append() {
Patrick Williams2390b1b2022-11-03 13:47:49 -050049 chrpath -d ${D}${libdir}/libcamera.so
50 chrpath -d ${D}${libdir}/v4l2-compat.so
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050051}
52
53addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata
54do_recalculate_ipa_signatures_package() {
55 local modules
56 for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
57 module="${module%.sign}"
58 if [ -f "${module}" ] ; then
59 modules="${modules} ${module}"
60 fi
61 done
62
63 ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
64}
65
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000066FILES:${PN} += " ${libdir}/v4l2-compat.so"
Patrick Williams2390b1b2022-11-03 13:47:49 -050067FILES:${PN}-gst = "${libdir}/gstreamer-1.0"
Andrew Geissler517393d2023-01-13 08:55:19 -060068
69# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to
70# both 32 and 64 bit file APIs.
71GLIBC_64BIT_TIME_FLAGS = ""
72