mirror of
https://github.com/pkgconf/pkgconf.git
synced 2026-01-26 16:09:27 +00:00
libpkgconf: pkg: do not override pc_sysrootdir when emulating pkgconf 1.x
In pkgconf 1.x, we unconditionally prepend PKG_CONFIG_SYSROOT_DIR if it is not already present. Emulate this by not overriding pc_sysrootdir in cases where the .pc file is outside the sysroot. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
This commit is contained in:
parent
dc0805a3ad
commit
c8bfa9fee0
@ -649,7 +649,8 @@ pkgconf_pkg_new_from_path(pkgconf_client_t *client, const char *filename, unsign
|
||||
* package.
|
||||
* See https://github.com/pkgconf/pkgconf/issues/213
|
||||
*/
|
||||
if (client->sysroot_dir && strncmp(pkg->pc_filedir, client->sysroot_dir, strlen(client->sysroot_dir)))
|
||||
if (client->sysroot_dir != NULL && strncmp(pkg->pc_filedir, client->sysroot_dir, strlen(client->sysroot_dir)) &&
|
||||
!(client->flags & PKGCONF_PKG_PKGF_PKGCONF1_SYSROOT_RULES))
|
||||
pkgconf_tuple_add(client, &pkg->vars, "pc_sysrootdir", "", false, pkg->flags);
|
||||
|
||||
/* make module id */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user