diff options
author | Arch Librarian <arch@canonical.com> | 2005-07-14 13:04:19 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2005-07-14 13:04:19 +0000 |
commit | e7323695df2b28ee745fafd0e75d8a5daf1dc1cf (patch) | |
tree | 2e7890c4a1d351acf33e89d6666f98981172f4ef /parse.c | |
parent | 2f5befc9f72c16627261fc8c7f139503e5b144f0 (diff) | |
download | pkg-config-e7323695df2b28ee745fafd0e75d8a5daf1dc1cf.tar.gz |
2001-07-11 Havoc Pennington <hp@pobox.com>
Author: hp
Date: 2001-07-10 22:51:39 GMT
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"
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 37 |
1 files changed, 35 insertions, 2 deletions
@@ -742,6 +742,8 @@ parse_cflags (Package *pkg, const char *str, const char *path) } else { + if (other->len > 0) + g_string_append (other, " "); g_string_append (other, arg); } @@ -805,7 +807,8 @@ parse_line (Package *pkg, const char *untrimmed, const char *path) 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); @@ -949,7 +952,10 @@ get_compat_package (const char *name) { 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); @@ -1007,6 +1013,33 @@ get_compat_package (const char *name) 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) { char *output; |