pkg: add support for parsing Provides: entries

pull/100/head
William Pitcock 2016-08-26 12:14:32 -05:00
parent d5d194f1db
commit f9101659bc
3 changed files with 2 additions and 2 deletions

View File

@ -98,6 +98,7 @@ struct pkgconf_pkg_ {
pkgconf_list_t requires;
pkgconf_list_t requires_private;
pkgconf_list_t conflicts;
pkgconf_list_t provides;
pkgconf_list_t vars;

View File

@ -241,6 +241,7 @@ static const pkgconf_pkg_parser_keyword_pair_t pkgconf_pkg_parser_keyword_funcs[
{"LIBS", pkgconf_pkg_parser_fragment_func, offsetof(pkgconf_pkg_t, libs)},
{"LIBS.private", pkgconf_pkg_parser_fragment_func, offsetof(pkgconf_pkg_t, libs_private)},
{"Name", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, realname)},
{"Provides", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, provides)},
{"Requires", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, requires)},
{"Requires.private", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, requires_private)},
{"Version", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, version)},

2
main.c
View File

@ -253,7 +253,6 @@ print_requires_private(pkgconf_pkg_t *pkg)
static void
print_provides(pkgconf_pkg_t *pkg)
{
#ifdef NOTYET
pkgconf_node_t *node;
PKGCONF_FOREACH_LIST_ENTRY(pkg->provides.head, node)
@ -267,7 +266,6 @@ print_provides(pkgconf_pkg_t *pkg)
printf("\n");
}
#endif
printf("%s = %s\n", pkg->id, pkg->version);
}