$NetBSD: patch-ah,v 1.3 2008/03/04 09:22:27 wiz Exp $ Don't call gnome-config, it has been dead for ages and the warnings just confuse users. --- parse.c.orig 2008-01-16 20:42:49.000000000 +0000 +++ parse.c @@ -1418,102 +1418,8 @@ get_compat_package (const char *name) } else { - /* Check for the module in gnome-config */ - char *output; - char *p; - char *command; - - debug_spew ("Calling gnome-config\n"); - - /* Annoyingly, --modversion doesn't return a failure - * code if the lib is unknown, so we have to use --libs - * for that. - */ - - command = g_strdup_printf ("gnome-config --libs %s", - name); - - if (!try_command (command)) - { - g_free (command); - g_free (pkg); - return NULL; - } - else - g_free (command); - - command = g_strdup_printf ("gnome-config --modversion %s", - name); - - output = backticks (command); - g_free (command); - if (output == NULL) - { - g_free (pkg); - return NULL; - } - - /* Unknown modules give "Unknown library `foo'" from gnome-config - * (but on stderr so this is useless, nevermind) - */ - if (strstr (output, "Unknown") || *output == '\0') - { - g_free (output); - g_free (pkg); - return NULL; - } - - /* gnome-config --modversion gnomeui outputs e.g. "gnome-libs-1.2.4" - * or libglade-0.12 - */ - p = output; - - while (*p && isspace ((guchar)*p)) - ++p; - - if (*p == '\0') - { - /* empty output */ - g_free (output); - g_free (pkg); - return NULL; - } - - /* only heuristic; find a number or . */ - while (*p && ! (isdigit ((guchar)*p) || *p == '.')) - ++p; - - pkg->version = g_strdup (p); - - g_free (output); - - /* Strip newline */ - p = pkg->version; - while (*p) - { - if (*p == '\n') - *p = '\0'; - - ++p; - } - - pkg->name = g_strdup (name); - pkg->key = g_strdup (name); - pkg->description = g_strdup ("No description"); - - command = g_strdup_printf ("gnome-config --libs %s", name); - output = backticks (command); - g_free (command); - parse_libs (pkg, output, "gnome-config"); - g_free (output); - - command = g_strdup_printf ("gnome-config --cflags %s", name); - output = backticks (command); - g_free (command); - parse_cflags (pkg, output, "gnome-config"); - g_free (output); - - return pkg; + g_free (pkg); + return NULL; } #endif }