[PATCH] libcamera: meson: Fix libyuv detection
Kieran Bingham
kieran.bingham at ideasonboard.com
Tue Jan 14 22:26:38 CET 2025
Quoting Kieran Bingham (2025-01-14 21:19:35)
> From: Dylan Aïssi <daissi at debian.org>
>
> We already fall back to a subproject to support the libyuv package when
> it can not be discovered through the usual dependency() mechanism.
>
> Unfortunately libyuv may be packaged without any corresponding
> pkg-config support as can be seen at [0], so further extend the
> dependency search by using an explicit cc.find_library() call.
>
> [0] https://packages.debian.org/bookworm/amd64/libyuv-dev/filelist
>
> Signed-off-by: Dylan Aïssi <dylan.aissi at collabora.com>
Dylan, I've taken this tag from
https://salsa.debian.org/multimedia-team/libcamera/-/commit/685482827a0e6fe5dfe19778e633ab95b703cef4
However it doesn't match the author of that patch so it will fail our
CI.
Can you confirm who should be the author+signoff for this please?
If daissi at debian.org is correct, just replying with the correct SoB will
let patchwork pick up the tag.
--
Kieran
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
> src/meson.build | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/src/meson.build b/src/meson.build
> index 76198e9535db..0a9cdff8e7dc 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -27,10 +27,15 @@ else
> ipa_sign_module = false
> endif
>
> -# libyuv, used by the Android adaptation layer and the virtual pipeline handler.
> -# Fallback to a subproject if libyuv isn't found, as it's typically not provided
> -# by distributions.
> +# libyuv, used by the Android adaptation layer and the virtual pipeline
> +# handler. Fallback to a subproject if libyuv isn't found, as it's typically
> +# not provided by distributions. Where libyuv is provided by a distribution, it
> +# may not always supply a pkg-config implementation, requiring cc.find_library()
> +# to search for it.
> libyuv_dep = dependency('libyuv', required : false)
> +if not libyuv_dep.found()
> + libyuv_dep = cc.find_library('yuv', required: false)
> +endif
>
> if (pipelines.contains('virtual') or get_option('android').allowed()) and \
> not libyuv_dep.found()
> --
> 2.47.1
>
More information about the libcamera-devel
mailing list