diff options
Diffstat (limited to 'meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb')
| -rw-r--r-- | meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb new file mode 100644 index 0000000000..88fe9cf39c --- /dev/null +++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | SUMMARY = "Linux libcamera framework" | ||
| 2 | SECTION = "libs" | ||
| 3 | |||
| 4 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" | ||
| 5 | |||
| 6 | LIC_FILES_CHKSUM = "\ | ||
| 7 | file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \ | ||
| 8 | file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ | ||
| 9 | " | ||
| 10 | |||
| 11 | SRC_URI = " \ | ||
| 12 | git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v${PV} \ | ||
| 13 | " | ||
| 14 | |||
| 15 | SRCREV = "096c50ca881f72d858aca19757a5e73b4775a7cc" | ||
| 16 | |||
| 17 | PE = "1" | ||
| 18 | |||
| 19 | DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml" | ||
| 20 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" | ||
| 21 | |||
| 22 | PACKAGES =+ "${PN}-gst ${PN}-pycamera" | ||
| 23 | |||
| 24 | PACKAGECONFIG ??= "" | ||
| 25 | PACKAGECONFIG[dng] = ",,tiff" | ||
| 26 | PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" | ||
| 27 | PACKAGECONFIG[pycamera] = "-Dpycamera=enabled,-Dpycamera=disabled,python3 python3-pybind11" | ||
| 28 | PACKAGECONFIG[raspberrypi] = ",,libpisp" | ||
| 29 | |||
| 30 | # Raspberry Pi requires the meta-raspberrypi layer | ||
| 31 | # These values are coming from the project's meson.build file, | ||
| 32 | # which lists the supported values by arch. | ||
| 33 | ARM_PIPELINES = "${@bb.utils.contains('PACKAGECONFIG', 'raspberrypi', 'rpi/pisp,rpi/vc4,', '', d)}" | ||
| 34 | ARM_PIPELINES .= "imx8-isi,mali-c55,simple,uvcvideo" | ||
| 35 | |||
| 36 | LIBCAMERA_PIPELINES ??= "auto" | ||
| 37 | LIBCAMERA_PIPELINES:arm ??= "${ARM_PIPELINES}" | ||
| 38 | LIBCAMERA_PIPELINES:aarch64 ??= "${ARM_PIPELINES}" | ||
| 39 | |||
| 40 | EXTRA_OEMESON = " \ | ||
| 41 | -Dpipelines=${LIBCAMERA_PIPELINES} \ | ||
| 42 | -Dv4l2=true \ | ||
| 43 | -Dcam=enabled \ | ||
| 44 | -Dlc-compliance=disabled \ | ||
| 45 | -Dtest=false \ | ||
| 46 | -Ddocumentation=disabled \ | ||
| 47 | " | ||
| 48 | |||
| 49 | RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" | ||
| 50 | |||
| 51 | inherit meson pkgconfig python3native | ||
| 52 | |||
| 53 | do_configure:prepend() { | ||
| 54 | sed -i -e 's|py_compile=True,||' ${S}/utils/codegen/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py | ||
| 55 | } | ||
| 56 | |||
| 57 | do_install:append() { | ||
| 58 | chrpath -d ${D}${libdir}/libcamera.so | ||
| 59 | chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so | ||
| 60 | } | ||
| 61 | |||
| 62 | do_package:append() { | ||
| 63 | bb.build.exec_func("do_package_recalculate_ipa_signatures", d) | ||
| 64 | } | ||
| 65 | |||
| 66 | do_package_recalculate_ipa_signatures() { | ||
| 67 | local modules | ||
| 68 | for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do | ||
| 69 | module="${module%.sign}" | ||
| 70 | if [ -f "${module}" ] ; then | ||
| 71 | modules="${modules} ${module}" | ||
| 72 | fi | ||
| 73 | done | ||
| 74 | |||
| 75 | ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}" | ||
| 76 | } | ||
| 77 | |||
| 78 | FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so" | ||
| 79 | FILES:${PN}-gst = "${libdir}/gstreamer-1.0" | ||
| 80 | FILES:${PN}-pycamera = "${PYTHON_SITEPACKAGES_DIR}/libcamera" | ||
| 81 | |||
| 82 | # libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to | ||
| 83 | # both 32 and 64 bit file APIs. | ||
| 84 | GLIBC_64BIT_TIME_FLAGS = "" | ||
