blob: 30dab1d928de639aa4f005220b4573cc7cccfe74 [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 \
Brad Bishope42b3e32020-01-15 22:08:42 -050013"
14
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070015SRCREV = "193ca8c353a42334f65ddfc988a105a47bca3547"
Brad Bishope42b3e32020-01-15 22:08:42 -050016
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070017PV = "202105+git${SRCPV}"
Brad Bishope42b3e32020-01-15 22:08:42 -050018
19S = "${WORKDIR}/git"
20
Andrew Geissler97771a32021-03-05 15:23:11 -060021DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls boost chrpath-native"
Brad Bishope42b3e32020-01-15 22:08:42 -050022DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
23
Andrew Geisslerd688a012020-09-18 13:36:00 -050024PACKAGES =+ "${PN}-gst"
25
26PACKAGECONFIG ??= ""
27PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
28
Brad Bishope42b3e32020-01-15 22:08:42 -050029RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
30
31inherit meson pkgconfig python3native
32
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070033do_configure_prepend() {
34 sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py
35}
36
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050037do_install_append() {
38 chrpath -d ${D}${libdir}/libcamera.so
39}
40
41addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata
42do_recalculate_ipa_signatures_package() {
43 local modules
44 for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
45 module="${module%.sign}"
46 if [ -f "${module}" ] ; then
47 modules="${modules} ${module}"
48 fi
49 done
50
51 ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
52}
53
Brad Bishope42b3e32020-01-15 22:08:42 -050054FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig"
55FILES_${PN} += " ${libdir}/libcamera.so"
Andrew Geisslerd688a012020-09-18 13:36:00 -050056FILES_${PN}-gst = "${libdir}/gstreamer-1.0/libgstlibcamera.so"