diff -r -u pkgconfig-0.15.0-debian/parse.c pkgconfig-0.15.0/parse.c --- pkgconfig-0.15.0-debian/parse.c 2002-09-27 03:25:41.000000000 +1000 +++ pkgconfig-0.15.0/parse.c 2004-02-15 12:22:56.000000000 +1100 @@ -770,7 +770,7 @@ } static void -parse_line (Package *pkg, const char *untrimmed, const char *path) +parse_line (Package *pkg, const char *untrimmed, const char *path, gboolean ignore_requires) { char *str; char *p; @@ -811,7 +811,12 @@ else if (strcmp (tag, "Version") == 0) parse_version (pkg, p, path); else if (strcmp (tag, "Requires") == 0) - parse_requires (pkg, p, path); + { + if (ignore_requires == FALSE) + parse_requires (pkg, p, path); + else + return; + } else if (strcmp (tag, "Libs") == 0) parse_libs (pkg, p, path); else if (strcmp (tag, "Cflags") == 0 || @@ -907,7 +912,7 @@ } Package* -parse_package_file (const char *path) +parse_package_file (const char *path, gboolean ignore_requires) { FILE *f; Package *pkg; @@ -944,7 +949,7 @@ { one_line = TRUE; - parse_line (pkg, str->str, path); + parse_line (pkg, str->str, path, ignore_requires); g_string_truncate (str, 0); } diff -r -u pkgconfig-0.15.0-debian/parse.h pkgconfig-0.15.0/parse.h --- pkgconfig-0.15.0-debian/parse.h 2002-09-07 05:32:18.000000000 +1000 +++ pkgconfig-0.15.0/parse.h 2004-02-15 12:17:49.000000000 +1100 @@ -22,7 +22,7 @@ #include "pkg.h" -Package *parse_package_file (const char *path); +Package *parse_package_file (const char *path, gboolean ignore_requires); Package *get_compat_package (const char *name); diff -r -u pkgconfig-0.15.0-debian/pkg.c pkgconfig-0.15.0/pkg.c --- pkgconfig-0.15.0-debian/pkg.c 2003-01-17 08:07:09.000000000 +1100 +++ pkgconfig-0.15.0/pkg.c 2004-02-15 12:19:03.000000000 +1100 @@ -61,6 +61,7 @@ static int scanned_dir_count = 0; gboolean disable_uninstalled = FALSE; +gboolean ignore_requires = FALSE; void add_search_dir (const char *path) @@ -292,7 +293,7 @@ } debug_spew ("Reading '%s' from file '%s'\n", name, location); - pkg = parse_package_file (location); + pkg = parse_package_file (location, ignore_requires); if (pkg == NULL) { @@ -1408,6 +1409,8 @@ { int mlen = 0; + ignore_requires = TRUE; + g_hash_table_foreach (locations, max_len_foreach, &mlen); g_hash_table_foreach (locations, packages_foreach, GINT_TO_POINTER (mlen + 1)); }