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 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 11 | SRC_URI = "git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 12 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 13 | SRCREV = "6cf637eb253a68edebe59505bea55435fafb00cd" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 14 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 15 | PE = "1" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 16 | |
| 17 | S = "${WORKDIR}/git" |
| 18 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 19 | DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 20 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" |
| 21 | |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 22 | PACKAGES =+ "${PN}-gst" |
| 23 | |
| 24 | PACKAGECONFIG ??= "" |
| 25 | PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" |
| 26 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 27 | EXTRA_OEMESON = " \ |
| 28 | -Dpipelines=uvcvideo,simple,vimc \ |
| 29 | -Dipas=vimc \ |
| 30 | -Dv4l2=true \ |
| 31 | -Dcam=enabled \ |
| 32 | -Dlc-compliance=disabled \ |
| 33 | -Dtest=false \ |
| 34 | -Ddocumentation=disabled \ |
| 35 | " |
| 36 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 37 | RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 38 | |
| 39 | inherit meson pkgconfig python3native |
| 40 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 41 | do_configure:prepend() { |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 42 | sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py |
| 43 | } |
| 44 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 45 | do_install:append() { |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 46 | chrpath -d ${D}${libdir}/libcamera.so |
| 47 | chrpath -d ${D}${libdir}/v4l2-compat.so |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata |
| 51 | do_recalculate_ipa_signatures_package() { |
| 52 | local modules |
| 53 | for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do |
| 54 | module="${module%.sign}" |
| 55 | if [ -f "${module}" ] ; then |
| 56 | modules="${modules} ${module}" |
| 57 | fi |
| 58 | done |
| 59 | |
| 60 | ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}" |
| 61 | } |
| 62 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 63 | FILES:${PN} += " ${libdir}/v4l2-compat.so" |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 64 | FILES:${PN}-gst = "${libdir}/gstreamer-1.0" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 65 | |
| 66 | # libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to |
| 67 | # both 32 and 64 bit file APIs. |
| 68 | GLIBC_64BIT_TIME_FLAGS = "" |
| 69 | |