blob: b05df321025d7bea6b201964063d3ae71809ebf8 [file] [log] [blame]
Brad Bishope42b3e32020-01-15 22:08:42 -05001SUMMARY = "Linux libcamera framework"
2SECTION = "libs"
3
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -05004LICENSE = "GPL-2.0+ & LGPL-2.1+"
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 = " \
12 git://linuxtv.org/libcamera.git;protocol=git \
Andrew Geissler97771a32021-03-05 15:23:11 -060013 file://0001-uvcvideo-Use-auto-variable-to-avoid-range-loop-warni.patch \
Brad Bishope42b3e32020-01-15 22:08:42 -050014"
15
Andrew Geissler97771a32021-03-05 15:23:11 -060016SRCREV = "f490a87fd339fc7443f5d8467ba56a35c750a5f7"
Brad Bishope42b3e32020-01-15 22:08:42 -050017
Andrew Geissler97771a32021-03-05 15:23:11 -060018PV = "202102+git${SRCPV}"
Brad Bishope42b3e32020-01-15 22:08:42 -050019
20S = "${WORKDIR}/git"
21
Andrew Geissler97771a32021-03-05 15:23:11 -060022DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls boost chrpath-native"
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
Brad Bishope42b3e32020-01-15 22:08:42 -050030RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
31
32inherit meson pkgconfig python3native
33
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050034do_install_append() {
35 chrpath -d ${D}${libdir}/libcamera.so
36}
37
38addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata
39do_recalculate_ipa_signatures_package() {
40 local modules
41 for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
42 module="${module%.sign}"
43 if [ -f "${module}" ] ; then
44 modules="${modules} ${module}"
45 fi
46 done
47
48 ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
49}
50
Brad Bishope42b3e32020-01-15 22:08:42 -050051FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig"
52FILES_${PN} += " ${libdir}/libcamera.so"
Andrew Geisslerd688a012020-09-18 13:36:00 -050053FILES_${PN}-gst = "${libdir}/gstreamer-1.0/libgstlibcamera.so"