2011-03-10 11:36:18 +01:00
|
|
|
[PATCH] prefix sysroot to include/libdir path variables
|
2011-01-29 22:59:44 +01:00
|
|
|
|
2011-03-10 11:36:18 +01:00
|
|
|
Prefix includedir / libdir variable values with sysroot if a variable is
|
|
|
|
requested (--variable=<name>), similar to how it's done for -I / -L flags.
|
2011-01-29 22:59:44 +01:00
|
|
|
|
|
|
|
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>
|
|
|
|
---
|
2011-03-10 11:36:18 +01:00
|
|
|
main.c | 5 +++++
|
|
|
|
1 file changed, 5 insertions(+)
|
2011-01-29 22:59:44 +01:00
|
|
|
|
|
|
|
Index: pkg-config-0.25/main.c
|
|
|
|
===================================================================
|
|
|
|
--- pkg-config-0.25.orig/main.c
|
|
|
|
+++ pkg-config-0.25/main.c
|
2011-03-10 11:36:18 +01:00
|
|
|
@@ -700,6 +700,11 @@
|
2011-01-29 22:59:44 +01:00
|
|
|
if (variable_name)
|
|
|
|
{
|
|
|
|
char *str = packages_get_var (packages, variable_name);
|
2011-03-10 11:36:18 +01:00
|
|
|
+ /* include/lib variable? */
|
|
|
|
+ if (pcsysrootdir &&
|
|
|
|
+ (!strcmp(variable_name, "includedir") ||
|
|
|
|
+ !strcmp(variable_name, "libdir")))
|
2011-01-29 22:59:44 +01:00
|
|
|
+ printf ("%s/", pcsysrootdir);
|
|
|
|
printf ("%s", str);
|
|
|
|
g_free (str);
|
|
|
|
need_newline = TRUE;
|