diff options
Diffstat (limited to 'meta-multimedia/recipes-multimedia/libcamera')
| -rw-r--r-- | meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-libcamera-Do-not-assume-libc-with-clang.patch | 68 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.0.bb (renamed from meta-multimedia/recipes-multimedia/libcamera/libcamera_0.6.0.bb) | 11 |
2 files changed, 7 insertions, 72 deletions
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-libcamera-Do-not-assume-libc-with-clang.patch b/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-libcamera-Do-not-assume-libc-with-clang.patch deleted file mode 100644 index 25d88cfff4..0000000000 --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-libcamera-Do-not-assume-libc-with-clang.patch +++ /dev/null | |||
| @@ -1,68 +0,0 @@ | |||
| 1 | From 0c68347365ec4c0bd3f84e1d2f9f51eb3c2405c8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 24 Oct 2025 11:10:59 -0700 | ||
| 4 | Subject: [PATCH] libcamera: Do not assume libc++ with clang | ||
| 5 | |||
| 6 | Clang on linux can be defaulting to use libstdc++, it | ||
| 7 | should be using default platform C++ runtime library which the | ||
| 8 | toolchain should be configured to do the right thing | ||
| 9 | |||
| 10 | Add logic in meson file to detect C++ runtime used by toolchain | ||
| 11 | and defile -stdlib= parameter accordingly | ||
| 12 | |||
| 13 | Upstream-Status: Submitted [https://lists.libcamera.org/pipermail/libcamera-devel/2025-October/054151.html] | ||
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 15 | --- | ||
| 16 | meson.build | 32 +++++++++++++++++++++----------- | ||
| 17 | 1 file changed, 21 insertions(+), 11 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/meson.build b/meson.build | ||
| 20 | index fa6487f6..89294936 100644 | ||
| 21 | --- a/meson.build | ||
| 22 | +++ b/meson.build | ||
| 23 | @@ -118,7 +118,24 @@ cpp_arguments = [ | ||
| 24 | '-Wnon-virtual-dtor', | ||
| 25 | ] | ||
| 26 | |||
| 27 | -cxx_stdlib = 'libstdc++' | ||
| 28 | +# Try to detect libc++ | ||
| 29 | +libcxx_ver = cxx.get_define('_LIBCPP_VERSION', | ||
| 30 | + prefix: '#include <vector>\n') | ||
| 31 | + | ||
| 32 | +# Try to detect libstdc++ | ||
| 33 | +glibcxx_ver = cxx.get_define('__GLIBCXX__', | ||
| 34 | + prefix: '#include <vector>\n') | ||
| 35 | + | ||
| 36 | +stdlib_msg = 'unknown' | ||
| 37 | + | ||
| 38 | +if libcxx_ver != '' | ||
| 39 | + cxx_stdlib = 'libc++' | ||
| 40 | +elif glibcxx_ver != '' | ||
| 41 | + # __GLIBCXX__ is usually a yyyymmdd date code | ||
| 42 | + cxx_stdlib = 'libstdc++' | ||
| 43 | +endif | ||
| 44 | + | ||
| 45 | +message('Detected C++ standard library: ' + cxx_stdlib) | ||
| 46 | |||
| 47 | if cc.get_id() == 'clang' | ||
| 48 | if cc.version().version_compare('<9') | ||
| 49 | @@ -138,16 +155,9 @@ if cc.get_id() == 'clang' | ||
| 50 | ] | ||
| 51 | endif | ||
| 52 | endif | ||
| 53 | - | ||
| 54 | - # Use libc++ by default if available instead of libstdc++ when compiling | ||
| 55 | - # with clang. | ||
| 56 | - if cc.find_library('c++', required : false).found() | ||
| 57 | - cpp_arguments += [ | ||
| 58 | - '-stdlib=libc++', | ||
| 59 | - ] | ||
| 60 | - cxx_stdlib = 'libc++' | ||
| 61 | - endif | ||
| 62 | - | ||
| 63 | + cpp_arguments += [ | ||
| 64 | + '-stdlib=' + cxx_stdlib, | ||
| 65 | + ] | ||
| 66 | cpp_arguments += [ | ||
| 67 | '-Wextra-semi', | ||
| 68 | '-Wthread-safety', | ||
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.6.0.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.0.bb index 64e8973d53..f83372df43 100644 --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.6.0.bb +++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.0.bb | |||
| @@ -11,10 +11,9 @@ LIC_FILES_CHKSUM = "\ | |||
| 11 | 11 | ||
| 12 | SRC_URI = " \ | 12 | SRC_URI = " \ |
| 13 | git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v${PV} \ | 13 | git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v${PV} \ |
| 14 | file://0001-libcamera-Do-not-assume-libc-with-clang.patch \ | ||
| 15 | " | 14 | " |
| 16 | 15 | ||
| 17 | SRCREV = "3c17d1fbb2bd93f221afee788ebf0d7394032e4d" | 16 | SRCREV = "b7854fd07d42168f099b5ce30d1702e0e0875bf5" |
| 18 | 17 | ||
| 19 | PE = "1" | 18 | PE = "1" |
| 20 | 19 | ||
| @@ -23,10 +22,13 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native' | |||
| 23 | 22 | ||
| 24 | PACKAGES =+ "${PN}-compliance ${PN}-gst ${PN}-pycamera" | 23 | PACKAGES =+ "${PN}-compliance ${PN}-gst ${PN}-pycamera" |
| 25 | 24 | ||
| 26 | PACKAGECONFIG ??= "" | 25 | PACKAGECONFIG ??= " \ |
| 26 | ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)} \ | ||
| 27 | " | ||
| 27 | PACKAGECONFIG[dng] = ",,tiff" | 28 | PACKAGECONFIG[dng] = ",,tiff" |
| 28 | PACKAGECONFIG[compliance] = "-Dlc-compliance=enabled,-Dlc-compliance=disabled,gtest" | 29 | PACKAGECONFIG[compliance] = "-Dlc-compliance=enabled,-Dlc-compliance=disabled,gtest" |
| 29 | PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" | 30 | PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" |
| 31 | PACKAGECONFIG[opengl] = ",,virtual/libgl virtual/egl" | ||
| 30 | PACKAGECONFIG[python] = "-Dpycamera=enabled,-Dpycamera=disabled,python3-pybind11" | 32 | PACKAGECONFIG[python] = "-Dpycamera=enabled,-Dpycamera=disabled,python3-pybind11" |
| 31 | PACKAGECONFIG[raspberrypi] = ",,libpisp" | 33 | PACKAGECONFIG[raspberrypi] = ",,libpisp" |
| 32 | PACKAGECONFIG[vimc] = ",," | 34 | PACKAGECONFIG[vimc] = ",," |
| @@ -46,10 +48,11 @@ LIBCAMERA_PIPELINES:aarch64 ??= "${ARM_PIPELINES}" | |||
| 46 | 48 | ||
| 47 | EXTRA_OEMESON = " \ | 49 | EXTRA_OEMESON = " \ |
| 48 | -Dpipelines=${LIBCAMERA_PIPELINES} \ | 50 | -Dpipelines=${LIBCAMERA_PIPELINES} \ |
| 49 | -Dv4l2=true \ | 51 | -Dv4l2=enabled \ |
| 50 | -Dcam=enabled \ | 52 | -Dcam=enabled \ |
| 51 | -Dtest=false \ | 53 | -Dtest=false \ |
| 52 | -Ddocumentation=disabled \ | 54 | -Ddocumentation=disabled \ |
| 55 | -Drpi-awb-nn=disabled \ | ||
| 53 | " | 56 | " |
| 54 | 57 | ||
| 55 | RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" | 58 | RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" |
