The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / pkgconf / 0002-fix-double-sysroot.patch
1 pkgconf: don't double prefix lib/include paths with sysroot
2
3 A .pc file could contain statements of the form:
4     -L/usr/lib
5 but also:
6     -L/path/to/sysroot/usr/lib
7
8 The latter form typically occurs when the dependency was configured with a
9 statement like --with-xxx=$(STAGING_DIR)/usr.
10
11 pkgconf only expects the first form, and prefixes it with the specified
12 sysroot. However, this strategy would result in a double sysroot in the
13 second case:
14     -L/path/to/sysroot/path/to/sysroot/usr/lib
15
16 This patch checks for the presence of the sysroot in the specified -L or -I
17 directives, and only adds the sysroot when not already present.
18
19 Upstream-status: will be submitted
20
21 Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
22
23 ---
24  main.c |  3 ++-
25  1 files changed, 2 insertions(+), 1 deletions(-)
26
27
28 diff -r 16865d81819f -r 9d8e1737687f main.c
29 --- a/main.c    Mon Jun 16 19:47:52 2014 +0200
30 +++ b/main.c    Mon Jun 16 19:48:15 2014 +0200
31 @@ -82,7 +82,8 @@
32         {
33         case 'L':
34         case 'I':
35 -               return sysroot_dir;
36 +               if (strncmp(sysroot_dir, frag->data, strlen(sysroot_dir)) != 0)
37 +                       return sysroot_dir;
38         default:
39                 break;
40         }