From 3fe3dde61762c1afc0d1caa22a7f41e9024853ac Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Thu, 14 Jul 2005 13:05:53 +0000 Subject: [PATCH] 2003-02-22 James Henstridge Author: jamesh Date: 2003-02-22 14:04:21 GMT 2003-02-22 James Henstridge * 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. --- ChangeLog | 5 +++++ pkg.c | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/ChangeLog b/ChangeLog index 17e06d3..0b237da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2003-02-22 James Henstridge + * 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 diff --git a/pkg.c b/pkg.c index 4a91326..c1af2e1 100644 --- a/pkg.c +++ b/pkg.c @@ -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); } -- 2.39.5