blob: cbcc33aa4cb537c2ceb6cdc31f3f58bc39fb0acf [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
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050011SRC_URI = "git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master"
Brad Bishope42b3e32020-01-15 22:08:42 -050012
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050013SRCREV = "6cf637eb253a68edebe59505bea55435fafb00cd"
Brad Bishope42b3e32020-01-15 22:08:42 -050014
Patrick Williams2390b1b2022-11-03 13:47:49 -050015PE = "1"
Brad Bishope42b3e32020-01-15 22:08:42 -050016
17S = "${WORKDIR}/git"
18
Patrick Williams2194f502022-10-16 14:26:09 -050019DEPENDS = "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 -050020DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
21
Andrew Geisslerd688a012020-09-18 13:36:00 -050022PACKAGES =+ "${PN}-gst"
23
24PACKAGECONFIG ??= ""
25PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
26
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000027EXTRA_OEMESON = " \
28 -Dpipelines=uvcvideo,simple,vimc \
29 -Dipas=vimc \
30 -Dv4l2=true \
31 -Dcam=enabled \
32 -Dlc-compliance=disabled \
33 -Dtest=false \
34 -Ddocumentation=disabled \
35"
36
Patrick Williams213cb262021-08-07 19:21:33 -050037RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
Brad Bishope42b3e32020-01-15 22:08:42 -050038
39inherit meson pkgconfig python3native
40
Patrick Williams213cb262021-08-07 19:21:33 -050041do_configure:prepend() {
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070042 sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py
43}
44
Patrick Williams213cb262021-08-07 19:21:33 -050045do_install:append() {
Patrick Williams2390b1b2022-11-03 13:47:49 -050046 chrpath -d ${D}${libdir}/libcamera.so
47 chrpath -d ${D}${libdir}/v4l2-compat.so
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050048}
49
50addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata
51do_recalculate_ipa_signatures_package() {
52 local modules
53 for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
54 module="${module%.sign}"
55 if [ -f "${module}" ] ; then
56 modules="${modules} ${module}"
57 fi
58 done
59
60 ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
61}
62
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000063FILES:${PN} += " ${libdir}/v4l2-compat.so"
Patrick Williams2390b1b2022-11-03 13:47:49 -050064FILES:${PN}-gst = "${libdir}/gstreamer-1.0"
Andrew Geissler517393d2023-01-13 08:55:19 -060065
66# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to
67# both 32 and 64 bit file APIs.
68GLIBC_64BIT_TIME_FLAGS = ""
69