From 20a75a3e3e9717a5e0afd2c30a080cea74c3032e Mon Sep 17 00:00:00 2001 From: "Klein, Thorsten (GDE-EDS9)" Date: Thu, 12 Jan 2023 12:17:57 +0100 Subject: [PATCH] Don't prepend sysroot_dir if pkg-config file lies outside of sysroot_dir --- libpkgconf/pkg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c index 1897600..20b5ff1 100644 --- a/libpkgconf/pkg.c +++ b/libpkgconf/pkg.c @@ -434,7 +434,9 @@ pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE * * See https://github.com/pkgconf/pkgconf/issues/213 */ if (client->sysroot_dir && strncmp(pkg->pc_filedir, client->sysroot_dir, strlen(client->sysroot_dir))) - pkgconf_tuple_add(client, &pkg->vars, "pc_sysrootdir", "", false, pkg->flags); + { + pkgconf_client_set_sysroot_dir(client, ""); + } /* make module id */ if ((idptr = strrchr(pkg->filename, PKG_DIR_SEP_S)) != NULL)