Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 1 | SUMMARY = "Linux libcamera framework" |
| 2 | SECTION = "libs" |
| 3 | |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 4 | LICENSE = "GPL-2.0+ & LGPL-2.1+" |
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 | 97771a3 | 2021-03-05 15:23:11 -0600 | [diff] [blame] | 21 | DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls boost chrpath-native" |
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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 29 | RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 30 | |
| 31 | inherit meson pkgconfig python3native |
| 32 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 33 | do_configure:prepend() { |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 34 | sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py |
| 35 | } |
| 36 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 37 | do_install:append() { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 38 | chrpath -d ${D}${libdir}/libcamera.so.0.0.0 |
| 39 | chrpath -d ${D}${libdir}/libcamera-base.so.0.0.0 |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata |
| 43 | do_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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 56 | FILES:${PN}-dev += " ${libdir}/libcamera.so" |
| 57 | FILES:${PN}-dev += " ${libdir}/libcamera.so.0" |
| 58 | FILES:${PN} += " ${libdir}/libcamera.so.0.0.0" |
| 59 | FILES:${PN}-dev += " ${libdir}/libcamera-base.so" |
| 60 | FILES:${PN}-dev += " ${libdir}/libcamera-base.so.0" |
| 61 | FILES:${PN} += " ${libdir}/libcamera-base.so.0.0.0" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 62 | FILES:${PN}-gst = "${libdir}/gstreamer-1.0/libgstlibcamera.so" |