pkg: add support for $(pc_path) variable for extracting PKG_DEFAULT_PATH

pull/29/head
William Pitcock 2012-07-22 23:16:39 -05:00
parent 3d7455f82b
commit 111046f100
1 changed files with 5 additions and 4 deletions

9
pkg.c
View File

@ -215,7 +215,7 @@ cleanup:
void void
pkg_free(pkg_t *pkg) pkg_free(pkg_t *pkg)
{ {
if (pkg == NULL) if (pkg == NULL || pkg->flags & PKG_PROPF_VIRTUAL)
return; return;
pkg_dependency_free(pkg->requires); pkg_dependency_free(pkg->requires);
@ -228,9 +228,6 @@ pkg_free(pkg_t *pkg)
pkg_tuple_free(pkg->vars); pkg_tuple_free(pkg->vars);
if (pkg->flags & PKG_PROPF_VIRTUAL)
return;
if (pkg->id != NULL) if (pkg->id != NULL)
free(pkg->id); free(pkg->id);
@ -520,6 +517,10 @@ static pkg_t pkg_config_virtual = {
.url = PACKAGE_BUGREPORT, .url = PACKAGE_BUGREPORT,
.version = PKG_PKGCONFIG_VERSION_EQUIV, .version = PKG_PKGCONFIG_VERSION_EQUIV,
.flags = PKG_PROPF_VIRTUAL, .flags = PKG_PROPF_VIRTUAL,
.vars = &(pkg_tuple_t){
.key = "pc_path",
.value = PKG_DEFAULT_PATH,
},
}; };
/* /*