version 1.32, 2011/03/14 08:35:08 |
version 1.33, 2011/03/14 08:40:13 |
|
|
$logfile = $ENV{PKG_CONFIG_LOGFILE}; |
$logfile = $ENV{PKG_CONFIG_LOGFILE}; |
} |
} |
|
|
my $allow_uninstalled = |
my $allow_uninstalled = |
defined $ENV{PKG_CONFIG_DISABLE_UNINSTALLED} ? 0 : 1; |
defined $ENV{PKG_CONFIG_DISABLE_UNINSTALLED} ? 0 : 1; |
my $found_uninstalled = 0; |
my $found_uninstalled = 0; |
|
|
|
|
|
|
# Initial value of printerr depends on the options... |
# Initial value of printerr depends on the options... |
if (!defined $mode{printerr}) { |
if (!defined $mode{printerr}) { |
if (defined $mode{libs} || defined $mode{cflags} |
if (defined $mode{libs} || defined $mode{cflags} |
|| defined $mode{version} || defined $mode{list}) { |
|| defined $mode{version} || defined $mode{list}) { |
$mode{printerr} = 1; |
$mode{printerr} = 1; |
} else { |
} else { |
|
|
my ($f) = @_; |
my ($f) = @_; |
|
|
my $cfg; |
my $cfg; |
eval { |
eval { |
$cfg = OpenBSD::PkgConfig->read_file($f); |
$cfg = OpenBSD::PkgConfig->read_file($f); |
}; |
}; |
if (!$@) { |
if (!$@) { |
|
|
return get_config($f); |
return get_config($f); |
} |
} |
if ($mode{printerr}) { |
if ($mode{printerr}) { |
print STDERR |
print STDERR |
"Package $p was not found in the pkg-config search path\n"; |
"Package $p was not found in the pkg-config search path\n"; |
} |
} |
return undef; |
return undef; |
|
|
my ($p, $x, $y, @files, $fname, $name); |
my ($p, $x, $y, @files, $fname, $name); |
my $error = 0; |
my $error = 0; |
|
|
foreach my $p (@PKGPATH) { |
foreach my $p (@PKGPATH) { |
push(@files, <$p/*.pc>); |
push(@files, <$p/*.pc>); |
} |
} |
|
|
# Scan the lengths of the package names so I can make a format |
# Scan the lengths of the package names so I can make a format |
|
|
next; |
next; |
} |
} |
$fname = basename($f, '.pc'); |
$fname = basename($f, '.pc'); |
printf("%${x}s %s - %s\n", $fname, |
printf("%${x}s %s - %s\n", $fname, |
stringize($cfg->get_property('Name', $variables)), |
stringize($cfg->get_property('Name', $variables)), |
stringize($cfg->get_property('Description', $variables), |
stringize($cfg->get_property('Description', $variables), |
' ')); |
' ')); |
} |
} |
|
|
sub versionmatch |
sub versionmatch |
{ |
{ |
my ($cfg, $op, $want) = @_; |
my ($cfg, $op, $want) = @_; |
|
|
# can't possibly match if we can't find the file |
# can't possibly match if we can't find the file |
return 0 if !defined $cfg; |
return 0 if !defined $cfg; |
|
|