From 91054de77789f65415bdafa023a2f4ff3edb56eb Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Tue, 4 Jun 2024 01:33:48 +0300 Subject: libcamera: update to 0.3.0 Upgrade libcamera to version 0.3.0, gaining support for SoftISP. Patch 0001-ipu3-Use-posix-basename.patch is dropped, it is applied upstream. Signed-off-by: Dmitry Baryshkov Signed-off-by: Khem Raj --- .../libcamera/0001-ipu3-Use-posix-basename.patch | 71 -------------------- .../libcamera/libcamera_0.2.0.bb | 78 ---------------------- .../libcamera/libcamera_0.3.0.bb | 77 +++++++++++++++++++++ 3 files changed, 77 insertions(+), 149 deletions(-) delete mode 100644 meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-ipu3-Use-posix-basename.patch delete mode 100644 meta-multimedia/recipes-multimedia/libcamera/libcamera_0.2.0.bb create mode 100644 meta-multimedia/recipes-multimedia/libcamera/libcamera_0.3.0.bb (limited to 'meta-multimedia') diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-ipu3-Use-posix-basename.patch b/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-ipu3-Use-posix-basename.patch deleted file mode 100644 index 9e4adf3d8d..0000000000 --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-ipu3-Use-posix-basename.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 35d2acc61b1b27c0810a80cd21de65f29dc79df7 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 24 Mar 2024 11:27:21 -0700 -Subject: [PATCH] ipu3: Use posix basename - -musl does not implement GNU basename extention and with latest musl -the prototype from string.h is also removed [1] which now results in -compile errors e.g. - -../git/utils/ipu3/ipu3-pack.c:21:47: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] - -These utilities are using this function in usage() which is used just -before program exit. Always use the basename APIs from libgen.h which is -posix implementation - -[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 - -Upstream-Status: Submitted [https://lists.libcamera.org/pipermail/libcamera-devel/2024-March/041180.html] -Signed-off-by: Khem Raj ---- - utils/ipu3/ipu3-pack.c | 4 ++-- - utils/ipu3/ipu3-unpack.c | 3 ++- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/utils/ipu3/ipu3-pack.c b/utils/ipu3/ipu3-pack.c -index decbfc6c..23d2db8b 100644 ---- a/utils/ipu3/ipu3-pack.c -+++ b/utils/ipu3/ipu3-pack.c -@@ -8,6 +8,7 @@ - - #include - #include -+#include - #include - #include - #include -@@ -15,9 +16,8 @@ - #include - #include - --static void usage(const char *argv0) -+static void usage(char *argv0) - { -- - printf("Usage: %s input-file output-file\n", basename(argv0)); - printf("Convert unpacked RAW10 Bayer data to the IPU3 packed Bayer formats\n"); - printf("If the output-file '-', output data will be written to standard output\n"); -diff --git a/utils/ipu3/ipu3-unpack.c b/utils/ipu3/ipu3-unpack.c -index 9d2c1200..1505a970 100644 ---- a/utils/ipu3/ipu3-unpack.c -+++ b/utils/ipu3/ipu3-unpack.c -@@ -8,6 +8,7 @@ - - #include - #include -+#include - #include - #include - #include -@@ -15,7 +16,7 @@ - #include - #include - --static void usage(const char *argv0) -+static void usage(char *argv0) - { - printf("Usage: %s input-file output-file\n", basename(argv0)); - printf("Unpack the IPU3 raw Bayer format to 16-bit Bayer\n"); --- -2.44.0 - diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.2.0.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.2.0.bb deleted file mode 100644 index 45d6be31ec..0000000000 --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.2.0.bb +++ /dev/null @@ -1,78 +0,0 @@ -SUMMARY = "Linux libcamera framework" -SECTION = "libs" - -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" - -LIC_FILES_CHKSUM = "\ - file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \ - file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ -" - -SRC_URI = " \ - git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ - file://0001-media_device-Add-bool-return-type-to-unlock.patch \ - file://0002-options-Replace-use-of-VLAs-in-C.patch \ - file://0001-rpi-Use-alloca-instead-of-variable-length-arrays.patch \ - file://0001-ipu3-Use-posix-basename.patch \ -" - -SRCREV = "89227a428a82e724548399d35c98ea89566f9045" - -PE = "1" - -S = "${WORKDIR}/git" - -DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml" -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" - -PACKAGES =+ "${PN}-gst" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" - -LIBCAMERA_PIPELINES ??= "auto" - -EXTRA_OEMESON = " \ - -Dpipelines=${LIBCAMERA_PIPELINES} \ - -Dv4l2=true \ - -Dcam=enabled \ - -Dlc-compliance=disabled \ - -Dtest=false \ - -Ddocumentation=disabled \ -" - -RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" - -inherit meson pkgconfig python3native - -do_configure:prepend() { - sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py -} - -do_install:append() { - chrpath -d ${D}${libdir}/libcamera.so - chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so -} - -do_package:append() { - bb.build.exec_func("do_package_recalculate_ipa_signatures", d) -} - -do_package_recalculate_ipa_signatures() { - local modules - for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do - module="${module%.sign}" - if [ -f "${module}" ] ; then - modules="${modules} ${module}" - fi - done - - ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}" -} - -FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so" -FILES:${PN}-gst = "${libdir}/gstreamer-1.0" - -# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to -# both 32 and 64 bit file APIs. -GLIBC_64BIT_TIME_FLAGS = "" diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.3.0.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.3.0.bb new file mode 100644 index 0000000000..93f29c1612 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.3.0.bb @@ -0,0 +1,77 @@ +SUMMARY = "Linux libcamera framework" +SECTION = "libs" + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" + +LIC_FILES_CHKSUM = "\ + file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \ + file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ +" + +SRC_URI = " \ + git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ + file://0001-media_device-Add-bool-return-type-to-unlock.patch \ + file://0002-options-Replace-use-of-VLAs-in-C.patch \ + file://0001-rpi-Use-alloca-instead-of-variable-length-arrays.patch \ +" + +SRCREV = "aee16c06913422a0ac84ee3217f87a9795e3c2d9" + +PE = "1" + +S = "${WORKDIR}/git" + +DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" + +PACKAGES =+ "${PN}-gst" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" + +LIBCAMERA_PIPELINES ??= "auto" + +EXTRA_OEMESON = " \ + -Dpipelines=${LIBCAMERA_PIPELINES} \ + -Dv4l2=true \ + -Dcam=enabled \ + -Dlc-compliance=disabled \ + -Dtest=false \ + -Ddocumentation=disabled \ +" + +RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" + +inherit meson pkgconfig python3native + +do_configure:prepend() { + sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py +} + +do_install:append() { + chrpath -d ${D}${libdir}/libcamera.so + chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so +} + +do_package:append() { + bb.build.exec_func("do_package_recalculate_ipa_signatures", d) +} + +do_package_recalculate_ipa_signatures() { + local modules + for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do + module="${module%.sign}" + if [ -f "${module}" ] ; then + modules="${modules} ${module}" + fi + done + + ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}" +} + +FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so" +FILES:${PN}-gst = "${libdir}/gstreamer-1.0" + +# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to +# both 32 and 64 bit file APIs. +GLIBC_64BIT_TIME_FLAGS = "" -- cgit v1.2.3-54-g00ecf