mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-02-04 22:20:33 +01:00
2006-08-16 Tollef Fog Heen <tfheen@err.no>
* pkg.c: Add internal pkg-config package which can be queried for version number, name and URL for now. More information will be added later.
This commit is contained in:
parent
6d32cb3e6d
commit
eae3abf93e
2 changed files with 16 additions and 0 deletions
|
|
@ -1,5 +1,9 @@
|
|||
2006-08-16 Tollef Fog Heen <tfheen@err.no>
|
||||
|
||||
* pkg.c: Add internal pkg-config package which can be queried for
|
||||
version number, name and URL for now. More information will be
|
||||
added later.
|
||||
|
||||
* parse.c (trim_and_sub): Since %{...} has not been used for a
|
||||
long time, there is no point in being able to escape %. However,
|
||||
make the code able to escape $ by doubling the $ to $$.
|
||||
|
|
|
|||
12
pkg.c
12
pkg.c
|
|
@ -57,6 +57,15 @@ gboolean disable_uninstalled = FALSE;
|
|||
gboolean ignore_requires = FALSE;
|
||||
gboolean ignore_private_libs = TRUE;
|
||||
|
||||
static Package pkg_config_package = {
|
||||
.key = PACKAGE,
|
||||
.name = PACKAGE,
|
||||
.version = VERSION, /* .version */
|
||||
.description = "returns metainformation about installed libraries",
|
||||
.url = "http://pkg-config.freedesktop.org",
|
||||
0 /* keep the rest as null */
|
||||
};
|
||||
|
||||
void
|
||||
add_search_dir (const char *path)
|
||||
{
|
||||
|
|
@ -275,6 +284,9 @@ internal_get_package (const char *name, gboolean warn, gboolean check_compat)
|
|||
Package *pkg = NULL;
|
||||
const char *location;
|
||||
|
||||
if (strcmp(PACKAGE, name) == 0)
|
||||
return &pkg_config_package;
|
||||
|
||||
pkg = g_hash_table_lookup (packages, name);
|
||||
|
||||
if (pkg)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue