+2001-07-11 Havoc Pennington <hp@pobox.com>
+
+ * parse.c (parse_cflags): fix failure to put space between cflags,
+ reported by Chema
+ (parse_line): allow spelling Cflags as CFlags, pointed out by Tim
+ (get_compat_package): support legacy script gnome-vfs-config for
+ package name "libgnomevfs"
+
2001-06-18 Havoc Pennington <hp@pobox.com>
* pkg.m4: print the error, not the name of the variable containing
AC_CONFIG_SUBDIRS(glib-1.2.8)
-AM_INIT_AUTOMAKE(pkgconfig, 0.7.0)
+AM_INIT_AUTOMAKE(pkgconfig, 0.8.0)
AM_MAINTAINER_MODE
const struct poptOption * opt,
const char * arg, void * data)
{
+ debug_spew ("Option --%s seen\n", opt->longName);
+
if (opt->val == DEFINE_VARIABLE)
{
char *varname;
want_debug_spew = TRUE;
want_verbose_errors = TRUE;
want_silence_errors = FALSE;
+ debug_spew ("PKG_CONFIG_DEBUG_SPEW variable enabling debug spew\n");
}
search_path = getenv ("PKG_CONFIG_PATH");
want_I_cflags ||
want_list)
{
+ debug_spew ("Error printing enabled by default due to use of --version, --libs, --cflags, --libs-only-l, --libs-only-L, --cflags-only-I, or --list. Value of --silence-errors: %d\n", want_silence_errors);
+
if (want_silence_errors && getenv ("PKG_CONFIG_DEBUG_SPEW") == NULL)
want_verbose_errors = FALSE;
else
}
else
{
+ debug_spew ("Error printing disabled by default, value of --print-errors: %d\n",
+ want_verbose_errors);
+
/* Leave want_verbose_errors unchanged, reflecting --print-errors */
- }
+ }
+
+ if (want_verbose_errors)
+ debug_spew ("Error printing enabled\n");
+ else
+ debug_spew ("Error printing disabled\n");
if (want_my_version)
{
}
else
{
+ if (other->len > 0)
+ g_string_append (other, " ");
g_string_append (other, arg);
}
parse_requires (pkg, p, path);
else if (strcmp (tag, "Libs") == 0)
parse_libs (pkg, p, path);
- else if (strcmp (tag, "Cflags") == 0)
+ else if (strcmp (tag, "Cflags") == 0 ||
+ strcmp (tag, "CFlags") == 0)
parse_cflags (pkg, p, path);
else if (strcmp (tag, "Conflicts") == 0)
parse_conflicts (pkg, p, path);
{
Package *pkg;
- debug_spew ("Looking for '%s' using old-style -config scripts\n", name);
+ if (name_ends_in_uninstalled (name))
+ debug_spew ("Suspiciously looking for compat package for -uninstalled: %s\n", name);
+
+ debug_spew ("Looking for '%s' using legacy -config scripts\n", name);
pkg = g_new0 (Package, 1);
parse_cflags (pkg, output, "gtk-config");
g_free (output);
+ return pkg;
+ }
+ else if (strcmp (name, "libgnomevfs") == 0)
+ {
+ char *output;
+
+ debug_spew ("Calling gnome-vfs-config\n");
+
+ pkg->version = backticks ("gnome-vfs-config --version");
+ if (pkg->version == NULL)
+ {
+ g_free (pkg);
+ return NULL;
+ }
+
+ pkg->name = g_strdup ("GNOME VFS");
+ pkg->key = g_strdup ("libgnomevfs");
+ pkg->description = g_strdup ("GNOME Virtual File System");
+
+ output = backticks ("gnome-vfs-config --libs");
+ parse_libs (pkg, output, "gnome-vfs-config");
+ g_free (output);
+
+ output = backticks ("gnome-vfs-config --cflags");
+ parse_cflags (pkg, output, "gnome-vfs-config");
+ g_free (output);
+
return pkg;
}
else if (strcmp (name, "imlib") == 0)
}
/* strlen ("uninstalled") */
-#define UNINSTALLED_LEN 11
+#define UNINSTALLED_LEN 11
-static gboolean
-ends_in_uninstalled (const char *str)
+gboolean
+name_ends_in_uninstalled (const char *str)
{
int len = strlen (str);
{
/* See if we should auto-prefer the uninstalled version */
if (!disable_uninstalled &&
- !ends_in_uninstalled (name))
+ !name_ends_in_uninstalled (name))
{
char *un;
}
location = g_hash_table_lookup (locations, name);
- debug_spew ("Reading '%s' from file '%s'\n", name, location);
}
if (location == NULL && check_compat)
return NULL;
}
-
+
+ debug_spew ("Reading '%s' from file '%s'\n", name, location);
pkg = parse_package_file (location);
if (pkg == NULL)
void debug_spew (const char *format, ...);
void verbose_error (const char *format, ...);
+gboolean name_ends_in_uninstalled (const char *str);
+
/* If TRUE, do not automatically prefer uninstalled versions */
extern gboolean disable_uninstalled;