pkg-config-0.23-fix-sysroot.patch 948 B

12345678910111213141516171819202122232425262728293031323334
  1. [PATCH] fix PKG_CONFIG_SYSROOT_DIR handling
  2. With PKG_CONFIG_SYSROOT_DIR enabled, everything else than -L and -I words
  3. gets stripped away.
  4. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  5. ---
  6. pkg.c | 8 ++------
  7. 1 file changed, 2 insertions(+), 6 deletions(-)
  8. Index: pkg-config-0.23/pkg.c
  9. ===================================================================
  10. --- pkg-config-0.23.orig/pkg.c
  11. +++ pkg-config-0.23/pkg.c
  12. @@ -472,17 +472,13 @@
  13. while (tmp != NULL)
  14. {
  15. char *tmpstr = (char*) tmp->data;
  16. - if (pcsysrootdir != NULL)
  17. + if (pcsysrootdir != NULL && tmpstr[0] == '-' &&
  18. + (tmpstr[1] == 'I' || tmpstr[1] == 'L'))
  19. {
  20. - if (tmpstr[0] == '-' &&
  21. - (tmpstr[1] == 'I' ||
  22. - tmpstr[1] == 'L'))
  23. - {
  24. g_string_append_c (str, '-');
  25. g_string_append_c (str, tmpstr[1]);
  26. g_string_append (str, pcsysrootdir);
  27. g_string_append (str, tmpstr+2);
  28. - }
  29. }
  30. else
  31. {