blob: 82028ecb3753ba8ae862371aa6508d628b53241c [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 = " \
Andrew Geissler595f6302022-01-24 19:11:47 +000012 git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \
Brad Bishope42b3e32020-01-15 22:08:42 -050013"
14
Andrew Geissler595f6302022-01-24 19:11:47 +000015SRCREV = "acf8d028edda0a59b10e15962c2606137a4940af"
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
Patrick Williams213cb262021-08-07 19:21:33 -050029RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
Brad Bishope42b3e32020-01-15 22:08:42 -050030
31inherit meson pkgconfig python3native
32
Patrick Williams213cb262021-08-07 19:21:33 -050033do_configure:prepend() {
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070034 sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py
35}
36
Patrick Williams213cb262021-08-07 19:21:33 -050037do_install:append() {
Andrew Geissler595f6302022-01-24 19:11:47 +000038 chrpath -d ${D}${libdir}/libcamera.so.0.0.0
39 chrpath -d ${D}${libdir}/libcamera-base.so.0.0.0
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050040}
41
42addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata
43do_recalculate_ipa_signatures_package() {
44 local modules
45 for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
46 module="${module%.sign}"
47 if [ -f "${module}" ] ; then
48 modules="${modules} ${module}"
49 fi
50 done
51
52 ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
53}
54
Patrick Williams213cb262021-08-07 19:21:33 -050055FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig"
Andrew Geissler595f6302022-01-24 19:11:47 +000056FILES:${PN}-dev += " ${libdir}/libcamera.so"
57FILES:${PN}-dev += " ${libdir}/libcamera.so.0"
58FILES:${PN} += " ${libdir}/libcamera.so.0.0.0"
59FILES:${PN}-dev += " ${libdir}/libcamera-base.so"
60FILES:${PN}-dev += " ${libdir}/libcamera-base.so.0"
61FILES:${PN} += " ${libdir}/libcamera-base.so.0.0.0"
Patrick Williams213cb262021-08-07 19:21:33 -050062FILES:${PN}-gst = "${libdir}/gstreamer-1.0/libgstlibcamera.so"