+2003-02-15 Havoc Pennington <hp@pobox.com>
+
+ Fixes suggested by Werner Trobin
+
+ * main.c (verbose_error): honor --errors-to-stdout and flush
+ the same stream we write to
+
+ * parse.c (parse_url): support an "url" field so if someone
+ has a .pc file they can figure out where to go for newer
+ versions and such
+
2003-01-16 Havoc Pennington <hp@redhat.com>
* configure.in: 0.15
{
va_list args;
gchar *str;
-
+ FILE* stream;
+
g_return_if_fail (format != NULL);
if (!want_verbose_errors)
str = g_strdup_vprintf (format, args);
va_end (args);
- fputs (str, stderr);
- fflush (stdout);
+ if (want_stdout_errors)
+ stream = stdout;
+ else
+ stream = stderr;
+
+ fputs (str, stream);
+ fflush (stream);
g_free (str);
}
pkg->I_cflags = g_slist_reverse (pkg->I_cflags);
pkg->other_cflags = g_slist_reverse (pkg->other_cflags);
}
-
+
+static void
+parse_url (Package *pkg, const char *str, const char *path)
+{
+ if (pkg->url != NULL)
+ {
+ verbose_error ("URL field occurs twice in '%s'\n", path);
+
+ exit (1);
+ }
+
+ pkg->url = trim_and_sub (pkg, str, path);
+}
+
static void
parse_line (Package *pkg, const char *untrimmed, const char *path)
{
parse_cflags (pkg, p, path);
else if (strcmp (tag, "Conflicts") == 0)
parse_conflicts (pkg, p, path);
+ else if (strcmp (tag, "URL") == 0)
+ parse_url (pkg, p, path);
else
{
verbose_error ("Unknown keyword '%s' in '%s'\n",
Name: GObject # human-readable name
Description: Object/type system for GLib # human-readable description
-Version: 1.3.1
+Version: 1.3.1
+URL: http://www.gtk.org
Requires: glib-2.0 = 1.3.1
Conflicts: foobar <= 4.5
Libs: -L${libdir} -lgobject-1.3
.I "Description:"
This should be a brief description of the package
.TP
+.I "URL:"
+An URL where people can get more information about and download the package
+.TP
.I "Version:"
This should be the most-specific-possible package version string.
.TP
ver->version,
req->name,
req->version);
+ if (req->url)
+ verbose_error ("You may find new versions of %s at %s\n",
+ req->name, req->url);
exit (1);
}
char *name; /* human-readable name */
char *version;
char *description;
+ char *url;
char *pcfiledir; /* directory it was loaded from */
GSList *requires;
GSList *l_libs;