mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-23 08:48:24 +00:00
zbar: Fix test build with musl
test/meson.build assumed libc provides argp whenever argp.h exists, but on musl the header comes from argp-standalone, pulled into the sysroot via v4l-utils, and test_decode/test_video failed to link argp_parse. Backport the upstream fix that also checks for argp_parse and falls back to the bundled non_argp.c. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
2 files changed
+34
-1
No files matched your search
+31
@@ -0,0 +1,31 @@
|
|||||||
|
From 77ad19ae9bc3d0fa0f2208be99e562fb96a6e392 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
||||||
|
Date: Wed, 14 Oct 2026 09:21:42 +0200
|
||||||
|
Subject: [PATCH] test/meson.build: better detect if libc has argp
|
||||||
|
|
||||||
|
On some cases, the build system is not properly detecting if
|
||||||
|
argp is there or not, because on non-Linux systems, they may
|
||||||
|
require the location of the libraries containing it.
|
||||||
|
|
||||||
|
As we have our own simplified version of argp here, and currently
|
||||||
|
we use it only on tests, if the library is not there, simply fall
|
||||||
|
back to non_argp.c.
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/mchehab/zbar/commit/77ad19ae9bc3d0fa0f2208be99e562fb96a6e392]
|
||||||
|
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
||||||
|
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
||||||
|
---
|
||||||
|
test/meson.build | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test/meson.build b/test/meson.build
|
||||||
|
index 656c8aa2..42905b80 100644
|
||||||
|
--- a/test/meson.build
|
||||||
|
+++ b/test/meson.build
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
argp_compat = []
|
||||||
|
-if not cc.has_header('argp.h')
|
||||||
|
+if not cc.has_header('argp.h') or not cc.has_function('argp_parse')
|
||||||
|
argp_compat = files('non_argp.c')
|
||||||
|
endif
|
||||||
|
|
||||||
@@ -9,7 +9,9 @@ SECTION = "graphics"
|
|||||||
LICENSE = "LGPL-2.1-only"
|
LICENSE = "LGPL-2.1-only"
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5e9ee833a2118adc7d8b5ea38e5b1cef"
|
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5e9ee833a2118adc7d8b5ea38e5b1cef"
|
||||||
|
|
||||||
SRC_URI = "git://github.com/mchehab/zbar.git;branch=master;protocol=https;tag=${PV}"
|
SRC_URI = "git://github.com/mchehab/zbar.git;branch=master;protocol=https;tag=${PV} \
|
||||||
|
file://0001-test-meson.build-better-detect-if-libc-has-argp.patch \
|
||||||
|
"
|
||||||
SRCREV = "dc19fcc7da58e8cf84ba1ec417e24b04609feb23"
|
SRCREV = "dc19fcc7da58e8cf84ba1ec417e24b04609feb23"
|
||||||
|
|
||||||
DEPENDS += "xmlto-native"
|
DEPENDS += "xmlto-native"
|
||||||
|
|||||||
Reference in new issue
Block a user