summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2021-01-02 18:37:39 -0500
committerMike Gilbert <floppym@gentoo.org>2021-01-02 18:48:26 -0500
commitac07a890dd55813eee120b328a17ee413e5c3489 (patch)
treeaf64e6deae03fcb0dd0026c1b36e152a5e7de9ae /eclass/systemd.eclass
parentx11-plugins/wmpower: do not call ar directly (diff)
downloadgentoo-ac07a890dd55813eee120b328a17ee413e5c3489.tar.gz
gentoo-ac07a890dd55813eee120b328a17ee413e5c3489.tar.bz2
gentoo-ac07a890dd55813eee120b328a17ee413e5c3489.zip
systemd.eclass: remove SYSROOT from pkg-config output
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 <floppym@gentoo.org>
Diffstat (limited to 'eclass/systemd.eclass')
-rw-r--r--eclass/systemd.eclass1
1 files changed, 1 insertions, 0 deletions
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}