diff options
author | Simon Bertrang <simon@cvs.openbsd.org> | 2008-08-21 21:57:46 +0000 |
---|---|---|
committer | Simon Bertrang <simon@cvs.openbsd.org> | 2008-08-21 21:57:46 +0000 |
commit | 4fc786e90318d3dca339a7d33d5c0914af851670 (patch) | |
tree | af2f0c8370a009c0e6d23643668e13a57ff21228 | |
parent | 8a242ca5bf192568aaf5d089d26ae3ae5c5ff816 (diff) |
Add an optional separator to stringize() and use it from do_list() to
match the GNU pkg-config --list-all output.
ok ckuethe@
-rw-r--r-- | usr.bin/pkg-config/pkg-config | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/pkg-config/pkg-config b/usr.bin/pkg-config/pkg-config index 6dedc57e5f1..189c960b98d 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.20 2007/02/01 16:38:21 espie Exp $ +# $OpenBSD: pkg-config,v 1.21 2008/08/21 21:57:45 simon Exp $ #$CSK: pkgconfig.pl,v 1.39 2006/11/27 16:26:20 ckuethe Exp $ # Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org> @@ -323,9 +323,10 @@ sub find_config sub stringize { my $list = shift; + my $sep = shift || ','; if (defined $list) { - return join(',', @$list) + return join($sep, @$list) } else { return ''; } @@ -449,7 +450,8 @@ sub do_list $fname = basename($f, '.pc'); printf("%${x}s %s - %s\n", $fname, stringize($cfg->get_property('Name', $variables)), - stringize($cfg->get_property('Description', $variables))); + stringize($cfg->get_property('Description', $variables), + ' ')); } return $error; } |