pkg-config-0.25-fix-variable.patch 1.0 KB

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