open-plc-utils: new package
[buildroot-gz.git] / package / pkgconf / 0001-fix-variable.patch
blob4c213d6ee80bd64d4bb1f446fb7b152ea78e064e
1 [PATCH] prefix sysroot to include/libdir path variables
3 Prefix includedir / libdir variable values with sysroot if a variable is
4 requested (--variable=<name>), similar to how it's done for -I / -L flags.
6 This is sometimes used to find header files (E.G. in gst-plugins configure),
7 so ensure the sysroot'ed files are used.
9 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
10 Signed-off-by: Bernd Kuhls <berndkuhls@hotmail.com>
12 diff -Nura pkgconf-0.8.9.orig/main.c pkgconf-0.8.9/main.c
13 --- pkgconf-0.8.9.orig/main.c 2012-10-24 14:32:08.236508699 -0300
14 +++ pkgconf-0.8.9/main.c 2012-10-24 14:54:36.771070217 -0300
15 @@ -298,7 +298,13 @@
16 if (eflag != PKG_ERRF_OK)
17 return false;
19 - printf("%s\n", req.buf);
20 + if ( !strcmp(req.variable, "includedir") ||
21 + !strcmp(req.variable, "mapdir") ||
22 + !strcmp(req.variable, "sdkdir") ||
23 + !strcmp(req.variable, "libdir"))
24 + printf("%s%s\n", sysroot_dir, req.buf);
25 + else
26 + printf("%s\n", req.buf);
27 return true;