summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-06-15 11:54:04 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-06-15 11:54:04 +0000
commit2a9a89185f211c69df74380e58ed0a24979edacb (patch)
tree5b928978998b01758ad520e38fd485730ee459f1 /usr.bin
parentcff5be2da54425497bf239ad810e75ba9ce91701 (diff)
- only process Requires.private if needed (--cflags, --static or --print-requires-private)
- process Requires.private before processing Requires, order matters these are first steps towards a working --static. static doesn't work yet as libraries get re-ordered in a funky way.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/pkg-config/pkg-config13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.bin/pkg-config/pkg-config b/usr.bin/pkg-config/pkg-config
index e35689a577f..e144e741237 100644
--- a/usr.bin/pkg-config/pkg-config
+++ b/usr.bin/pkg-config/pkg-config
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $OpenBSD: pkg-config,v 1.63 2011/06/12 21:33:49 jasper Exp $
+# $OpenBSD: pkg-config,v 1.64 2011/06/15 11:54:03 jasper Exp $
# $CSK: pkgconfig.pl,v 1.39 2006/11/27 16:26:20 ckuethe Exp $
# Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org>
@@ -256,8 +256,10 @@ sub handle_config
}
};
+ if (defined $mode{cflags} or $mode{static} or $mode{printreqprivate}) {
+ &$get_props("Requires.private");
+ }
&$get_props("Requires");
- &$get_props("Requires.private");
}
@@ -357,9 +359,9 @@ sub find_config
{
my ($p) = @_;
my $f = pathresolve($p);
- if (defined $f) {
- return get_config($f);
- }
+
+ return get_config($f) if defined($f);
+
say_error("Package $p was not found in the pkg-config search path");
return undef;
@@ -456,6 +458,7 @@ sub do_libs
my $l = $configs{$pkg}->get_property('Libs', $variables);
push(@$libs, @$l) if defined $l;
}
+
my $a = OpenBSD::PkgConfig->compress($libs,
sub {
local $_ = shift;