forked from ariadne/pkgconf
main: use support for munging by $(pc_sysrootdir) and remove the old sysroot hack
parent
01c2d1d44c
commit
77c5b82aad
22
main.c
22
main.c
|
@ -74,23 +74,6 @@ fragment_has_system_dir(pkg_fragment_t *frag)
|
|||
return false;
|
||||
}
|
||||
|
||||
static inline const char *
|
||||
print_sysroot_dir(pkg_fragment_t *frag)
|
||||
{
|
||||
if (sysroot_dir == NULL)
|
||||
return "";
|
||||
else switch (frag->type)
|
||||
{
|
||||
case 'L':
|
||||
case 'I':
|
||||
return sysroot_dir;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
static void
|
||||
print_fragment(pkg_fragment_t *frag)
|
||||
{
|
||||
|
@ -98,7 +81,7 @@ print_fragment(pkg_fragment_t *frag)
|
|||
return;
|
||||
|
||||
if (frag->type)
|
||||
printf("-%c%s%s ", frag->type, print_sysroot_dir(frag), frag->data);
|
||||
printf("-%c%s ", frag->type, frag->data);
|
||||
else
|
||||
printf("%s ", frag->data);
|
||||
}
|
||||
|
@ -656,7 +639,10 @@ main(int argc, char *argv[])
|
|||
pkg_tuple_add_global("pc_top_builddir", "$(top_builddir)");
|
||||
|
||||
if ((sysroot_dir = getenv("PKG_CONFIG_SYSROOT_DIR")) != NULL)
|
||||
{
|
||||
pkg_tuple_add_global("pc_sysrootdir", sysroot_dir);
|
||||
global_traverse_flags |= PKGF_MUNGE_SYSROOT_PREFIX;
|
||||
}
|
||||
else
|
||||
pkg_tuple_add_global("pc_sysrootdir", "/");
|
||||
|
||||
|
|
Loading…
Reference in New Issue