When cross-compiling, users will typically have
PKG_CONFIG_SYSROOT=${SYSROOT} defined via pkg-config wrapper.When PKG_CONFIG_SYSROOT is set, all paths included in pkg-config output get prefixed with this value. Signed-off-by: Mike Gilbert <[email protected]> --- This patch has already been pushed, but I figured I would send it for review in case someone else can think of a failure case, or has a better solution. eclass/systemd.eclass | 1 + 1 file changed, 1 insertion(+) diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index 81065a0af79a..f6d1fa2d92d6 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -50,6 +50,7 @@ _systemd_get_dir() { if $(tc-getPKG_CONFIG) --exists systemd; then d=$($(tc-getPKG_CONFIG) --variable="${variable}" systemd) || die + d=${d#${SYSROOT}} d=${d#${EPREFIX}} else d=${fallback} -- 2.30.0
