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