summaryrefslogtreecommitdiff
path: root/usr.bin/pkg-config
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2013-03-28 22:00:03 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2013-03-28 22:00:03 +0000
commit3e8bac15baa10a06bc360d6764b4fd7444b063b4 (patch)
treeaff2bd84418700aa5357ef28a25e8c8e34b2dea2 /usr.bin/pkg-config
parent5db83df0f0402349228bff070a2d9584547f76ed (diff)
allow passing a full path to a .pc file, instead of just the module name.
fd.o pkg-config allows this and some ports landry's working on depend on it. tested in a bulk by landry@, thanks
Diffstat (limited to 'usr.bin/pkg-config')
-rw-r--r--usr.bin/pkg-config/pkg-config6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/pkg-config/pkg-config b/usr.bin/pkg-config/pkg-config
index 54091a34faa..6206464df26 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.77 2012/12/10 10:12:12 jasper Exp $
+# $OpenBSD: pkg-config,v 1.78 2013/03/28 22:00:02 jasper Exp $
# $CSK: pkgconfig.pl,v 1.39 2006/11/27 16:26:20 ckuethe Exp $
# Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org>
@@ -390,7 +390,9 @@ sub setup_self
sub find_config
{
my ($p) = @_;
- my $f = pathresolve($p);
+
+ # Differentiate between getting a full path and just the module name.
+ my $f = ($p =~ m/\.pc$/ ? $p : pathresolve($p));
return get_config($f) if defined($f);