pkgconf stub: walk the dependency tree
parent
c6197b39ac
commit
3f9cedf532
20
pkg.c
20
pkg.c
|
@ -39,7 +39,25 @@ int main(int argc, const char *argv[])
|
||||||
|
|
||||||
pkg = pkg_find(argv[1]);
|
pkg = pkg_find(argv[1]);
|
||||||
if (pkg)
|
if (pkg)
|
||||||
printf("%s %s\n", pkg->cflags, pkg->libs);
|
{
|
||||||
|
pkg_dependency_t *node;
|
||||||
|
|
||||||
|
foreach_list_entry(pkg->requires, node)
|
||||||
|
{
|
||||||
|
pkg_t *pkgdep;
|
||||||
|
|
||||||
|
pkgdep = pkg_find(node->package);
|
||||||
|
if (pkgdep == NULL)
|
||||||
|
{
|
||||||
|
printf("dependency '%s' not satisfied\n", node->package);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("%s: {%s} {%s}\n", pkgdep->realname, pkgdep->cflags, pkgdep->libs);
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("%s: {%s} {%s}\n", pkg->realname, pkg->cflags, pkg->libs);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("%s not found\n", argv[1]);
|
printf("%s not found\n", argv[1]);
|
||||||
|
|
2
pkg.h
2
pkg.h
|
@ -56,7 +56,7 @@ typedef struct tuple_ pkg_tuple_t;
|
||||||
struct dependency_ {
|
struct dependency_ {
|
||||||
struct dependency_ *prev, *next;
|
struct dependency_ *prev, *next;
|
||||||
|
|
||||||
char *name;
|
char *package;
|
||||||
pkg_comparator_t compare;
|
pkg_comparator_t compare;
|
||||||
char *version;
|
char *version;
|
||||||
pkg_t *parent;
|
pkg_t *parent;
|
||||||
|
|
Loading…
Reference in New Issue