blob: 0b9f3f7a5d68d84189a6003882d8b1551a6b80ef [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 \
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 Geissler7e0e3c02022-02-25 20:34:39 +000021DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls boost chrpath-native libevent"
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
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000029EXTRA_OEMESON = " \
30 -Dpipelines=uvcvideo,simple,vimc \
31 -Dipas=vimc \
32 -Dv4l2=true \
33 -Dcam=enabled \
34 -Dlc-compliance=disabled \
35 -Dtest=false \
36 -Ddocumentation=disabled \
37"
38
Patrick Williams213cb262021-08-07 19:21:33 -050039RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
Brad Bishope42b3e32020-01-15 22:08:42 -050040
41inherit meson pkgconfig python3native
42
Patrick Williams213cb262021-08-07 19:21:33 -050043do_configure:prepend() {
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070044 sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py
45}
46
Patrick Williams213cb262021-08-07 19:21:33 -050047do_install:append() {
Andrew Geissler595f6302022-01-24 19:11:47 +000048 chrpath -d ${D}${libdir}/libcamera.so.0.0.0
49 chrpath -d ${D}${libdir}/libcamera-base.so.0.0.0
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050050}
51
52addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata
53do_recalculate_ipa_signatures_package() {
54 local modules
55 for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
56 module="${module%.sign}"
57 if [ -f "${module}" ] ; then
58 modules="${modules} ${module}"
59 fi
60 done
61
62 ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
63}
64
Patrick Williams213cb262021-08-07 19:21:33 -050065FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig"
Andrew Geissler595f6302022-01-24 19:11:47 +000066FILES:${PN}-dev += " ${libdir}/libcamera.so"
Andrew Geisslerd5838332022-05-27 11:33:10 -050067FILES:${PN} += " ${libdir}/libcamera.so.0"
Andrew Geissler595f6302022-01-24 19:11:47 +000068FILES:${PN} += " ${libdir}/libcamera.so.0.0.0"
69FILES:${PN}-dev += " ${libdir}/libcamera-base.so"
Andrew Geisslerd5838332022-05-27 11:33:10 -050070FILES:${PN} += " ${libdir}/libcamera-base.so.0"
Andrew Geissler595f6302022-01-24 19:11:47 +000071FILES:${PN} += " ${libdir}/libcamera-base.so.0.0.0"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000072FILES:${PN} += " ${libdir}/v4l2-compat.so"
Patrick Williams213cb262021-08-07 19:21:33 -050073FILES:${PN}-gst = "${libdir}/gstreamer-1.0/libgstlibcamera.so"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000074FILES:${PN} += " ${bindir}/cam"