2003-02-22 James Henstridge <james@daa.com.au>

Author: jamesh
Date: 2003-02-22 14:04:21 GMT
2003-02-22  James Henstridge  <james@daa.com.au>

    * pkg.c (add_virtual_pkgconfig_package): function to add a virtual
    "pkg-config" package to the packages hash table.
    (package_init): add the "pkg-config" package while initing the
    hash table.
This commit is contained in:
Arch Librarian 2005-07-14 13:05:53 +00:00
parent 72b5088eae
commit 3fe3dde617
2 changed files with 27 additions and 0 deletions

View file

@ -1,5 +1,10 @@
2003-02-22 James Henstridge <james@daa.com.au>
* pkg.c (add_virtual_pkgconfig_package): function to add a virtual
"pkg-config" package to the packages hash table.
(package_init): add the "pkg-config" package while initing the
hash table.
* pkg.h: add missing prototype.
* main.c (main): print the url if the package is too old, to match

22
pkg.c
View file

@ -183,6 +183,26 @@ scan_dir (const char *dirname)
}
}
static Package *
add_virtual_pkgconfig_package (void)
{
Package *pkg = NULL;
pkg = g_new0 (Package, 1);
pkg->key = g_strdup ("pkg-config");
pkg->version = g_strdup (VERSION);
pkg->name = g_strdup ("pkg-config");
pkg->description = g_strdup ("pkg-config is a system for managing "
"compile/link flags for libraries");
pkg->url = g_strdup ("http://www.freedesktop.org/software/pkgconfig/");
debug_spew ("Adding virtual 'pkg-config' package to list of known packages\n");
g_hash_table_insert (packages, pkg->key, pkg);
return pkg;
}
void
package_init ()
{
@ -201,6 +221,8 @@ package_init ()
locations = g_hash_table_new (g_str_hash, g_str_equal);
path_positions = g_hash_table_new (g_str_hash, g_str_equal);
add_virtual_pkgconfig_package ();
g_slist_foreach (search_dirs, (GFunc)scan_dir, NULL);
scan_dir (pkglibdir);
}