Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 1 | SUMMARY = "Linux libcamera framework" |
| 2 | SECTION = "libs" |
| 3 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 5 | |
| 6 | LIC_FILES_CHKSUM = "\ |
Andrew Geissler | c87764f | 2020-06-27 00:16:32 -0500 | [diff] [blame] | 7 | file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \ |
| 8 | file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 9 | " |
| 10 | |
| 11 | SRC_URI = " \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 12 | git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 13 | " |
| 14 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 15 | SRCREV = "acf8d028edda0a59b10e15962c2606137a4940af" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 16 | |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 17 | PV = "202105+git${SRCPV}" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 18 | |
| 19 | S = "${WORKDIR}/git" |
| 20 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 21 | DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls boost chrpath-native libevent" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 22 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" |
| 23 | |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 24 | PACKAGES =+ "${PN}-gst" |
| 25 | |
| 26 | PACKAGECONFIG ??= "" |
| 27 | PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" |
| 28 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 29 | EXTRA_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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 39 | RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 40 | |
| 41 | inherit meson pkgconfig python3native |
| 42 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 43 | do_configure:prepend() { |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 44 | sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py |
| 45 | } |
| 46 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 47 | do_install:append() { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 48 | chrpath -d ${D}${libdir}/libcamera.so.0.0.0 |
| 49 | chrpath -d ${D}${libdir}/libcamera-base.so.0.0.0 |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata |
| 53 | do_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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 66 | FILES:${PN}-dev += " ${libdir}/libcamera.so" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 67 | FILES:${PN} += " ${libdir}/libcamera.so.0" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 68 | FILES:${PN} += " ${libdir}/libcamera.so.0.0.0" |
| 69 | FILES:${PN}-dev += " ${libdir}/libcamera-base.so" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 70 | FILES:${PN} += " ${libdir}/libcamera-base.so.0" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 71 | FILES:${PN} += " ${libdir}/libcamera-base.so.0.0.0" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 72 | FILES:${PN} += " ${libdir}/v4l2-compat.so" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 73 | FILES:${PN}-gst = "${libdir}/gstreamer-1.0/libgstlibcamera.so" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 74 | FILES:${PN} += " ${bindir}/cam" |