summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/pkg-config/pkg-config14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.bin/pkg-config/pkg-config b/usr.bin/pkg-config/pkg-config
index f6166213585..59df1df8994 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.81 2014/07/09 23:03:51 jasper Exp $
+# $OpenBSD: pkg-config,v 1.82 2014/07/10 08:20:13 jasper Exp $
# $CSK: pkgconfig.pl,v 1.39 2006/11/27 16:26:20 ckuethe Exp $
# Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org>
@@ -637,6 +637,18 @@ sub compare
$suffix_b[1] = $2;
}
+ # The above are standard suffixes; deal with single alphabetical
+ # suffixes too, e.g. 1.0.1h
+ if ($a =~ s/([a-zA-Z]){1}$//) {
+ say_debug("valid suffix $1 found in $a$1.");
+ $suffix_a[0] = $1;
+ }
+
+ if ($b =~ s/([a-zA-Z]){1}$//) {
+ say_debug("valid suffix $1 found in $b$1.");
+ $suffix_b[0] = $1;
+ }
+
my @a = split(/\./, $a);
my @b = split(/\./, $b);