1 |
When cross-compiling, users will typically have |
2 |
PKG_CONFIG_SYSROOT=${SYSROOT} defined via pkg-config wrapper. |
3 |
|
4 |
When PKG_CONFIG_SYSROOT is set, all paths included in pkg-config |
5 |
output get prefixed with this value. |
6 |
|
7 |
Signed-off-by: Mike Gilbert <floppym@g.o> |
8 |
--- |
9 |
|
10 |
This patch has already been pushed, but I figured I would send it for |
11 |
review in case someone else can think of a failure case, or has a better |
12 |
solution. |
13 |
|
14 |
eclass/systemd.eclass | 1 + |
15 |
1 file changed, 1 insertion(+) |
16 |
|
17 |
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass |
18 |
index 81065a0af79a..f6d1fa2d92d6 100644 |
19 |
--- a/eclass/systemd.eclass |
20 |
+++ b/eclass/systemd.eclass |
21 |
@@ -50,6 +50,7 @@ _systemd_get_dir() { |
22 |
|
23 |
if $(tc-getPKG_CONFIG) --exists systemd; then |
24 |
d=$($(tc-getPKG_CONFIG) --variable="${variable}" systemd) || die |
25 |
+ d=${d#${SYSROOT}} |
26 |
d=${d#${EPREFIX}} |
27 |
else |
28 |
d=${fallback} |
29 |
-- |
30 |
2.30.0 |