From 111046f100a1a63b125494406351ce72a1a486bf Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 22 Jul 2012 23:16:39 -0500 Subject: [PATCH] pkg: add support for $(pc_path) variable for extracting PKG_DEFAULT_PATH --- pkg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg.c b/pkg.c index eee3381..a35c7d5 100644 --- a/pkg.c +++ b/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, + }, }; /*