blob: 0b1d4a9d8841cb0e4c53721397e0ac451d646c5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
[PATCH] prefix sysroot to include/libdir path variables
Prefix includedir / libdir variable values with sysroot if a variable is
requested (--variable=<name>), similar to how it's done for -I / -L flags.
This is sometimes used to find header files (E.G. in gst-plugins configure),
so ensure the sysroot'ed files are used.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
main.c | 5 +++++
1 file changed, 5 insertions(+)
Index: pkg-config-0.25/main.c
===================================================================
--- pkg-config-0.25.orig/main.c
+++ pkg-config-0.25/main.c
@@ -700,6 +700,11 @@
if (variable_name)
{
char *str = packages_get_var (packages, variable_name);
+ /* include/lib variable? */
+ if (pcsysrootdir &&
+ (!strcmp(variable_name, "includedir") ||
+ !strcmp(variable_name, "libdir")))
+ printf ("%s/", pcsysrootdir);
printf ("%s", str);
g_free (str);
need_newline = TRUE;
|