forked from ariadne/pkgconf
pkg: add support for $(pc_path) variable for extracting PKG_DEFAULT_PATH
parent
3d7455f82b
commit
111046f100
9
pkg.c
9
pkg.c
|
@ -215,7 +215,7 @@ cleanup:
|
|||
void
|
||||
pkg_free(pkg_t *pkg)
|
||||
{
|
||||
if (pkg == NULL)
|
||||
if (pkg == NULL || pkg->flags & PKG_PROPF_VIRTUAL)
|
||||
return;
|
||||
|
||||
pkg_dependency_free(pkg->requires);
|
||||
|
@ -228,9 +228,6 @@ pkg_free(pkg_t *pkg)
|
|||
|
||||
pkg_tuple_free(pkg->vars);
|
||||
|
||||
if (pkg->flags & PKG_PROPF_VIRTUAL)
|
||||
return;
|
||||
|
||||
if (pkg->id != NULL)
|
||||
free(pkg->id);
|
||||
|
||||
|
@ -520,6 +517,10 @@ static pkg_t pkg_config_virtual = {
|
|||
.url = PACKAGE_BUGREPORT,
|
||||
.version = PKG_PKGCONFIG_VERSION_EQUIV,
|
||||
.flags = PKG_PROPF_VIRTUAL,
|
||||
.vars = &(pkg_tuple_t){
|
||||
.key = "pc_path",
|
||||
.value = PKG_DEFAULT_PATH,
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue