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