version 1.31, 2011/03/10 19:15:55 |
version 1.32, 2011/03/14 08:35:08 |
|
|
defined $ENV{PKG_CONFIG_DISABLE_UNINSTALLED} ? 0 : 1; |
defined $ENV{PKG_CONFIG_DISABLE_UNINSTALLED} ? 0 : 1; |
my $found_uninstalled = 0; |
my $found_uninstalled = 0; |
|
|
my $version = 0.22; # pretend to be this version of pkgconfig |
my $version = 0.23; # pretend to be this version of pkgconfig |
|
|
my %configs = (); |
my %configs = (); |
my %mode = (); |
my %mode = (); |
|
|
} else { |
} else { |
$variables->{pc_top_builddir} = '$(top_builddir)'; |
$variables->{pc_top_builddir} = '$(top_builddir)'; |
} |
} |
|
|
|
my $s = $ENV{PKG_CONFIG_SYSROOT_DIR}; |
|
if (defined $s) { |
|
$variables->{pc_sysrootdir} = $s; |
|
} |
|
# The default '/' is implied. |
} |
} |
|
|
$D = 1 if defined($ENV{PKG_CONFIG_DEBUG_SPEW}); |
$D = 1 if defined($ENV{PKG_CONFIG_DEBUG_SPEW}); |
|
|
my $l = $configs{$pkg}->get_property('Cflags', $variables); |
my $l = $configs{$pkg}->get_property('Cflags', $variables); |
push(@$cflags, @$l) if defined $l; |
push(@$cflags, @$l) if defined $l; |
} |
} |
return OpenBSD::PkgConfig->compress($cflags, |
my $a = OpenBSD::PkgConfig->compress($cflags, |
sub { |
sub { |
local $_ = shift; |
local $_ = shift; |
if (($mode{cflags} & 1) && /^-I/ || |
if (($mode{cflags} & 1) && /^-I/ || |
|
|
return 0; |
return 0; |
} |
} |
}); |
}); |
return undef; |
if (defined($a) && defined($variables->{pc_sysrootdir})){ |
|
$a =~ s/^-I/$&$variables->{pc_sysrootdir}/g; |
|
} |
|
|
|
return $a; |
} |
} |
|
|
#if the lib option is set, pull out the linker flags |
#if the lib option is set, pull out the linker flags |
|
|
return 0; |
return 0; |
} |
} |
}); |
}); |
|
|
|
if (defined($variables->{pc_sysrootdir})){ |
|
$a =~ s/^-[lL]/$&$variables->{pc_sysrootdir}/g; |
|
} |
|
|
if ($mode{libs} & 1) { |
if ($mode{libs} & 1) { |
my $b = OpenBSD::PkgConfig->rcompress($libs, |
my $b = OpenBSD::PkgConfig->rcompress($libs, |
sub { shift =~ m/^-l/; }); |
sub { shift =~ m/^-l/; }); |