summaryrefslogtreecommitdiff
path: root/usr.bin/pkg-config
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2014-07-10 08:20:14 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2014-07-10 08:20:14 +0000
commit851364cf8eb222e962527920b185b1d00b9b0e78 (patch)
treeb780fcfbbeb08b7e51d397b34e503ed6cf365335 /usr.bin/pkg-config
parent9103d4ecca1b0823151221581601c7e3afbb620a (diff)
fix version comparison for openssl-like versions (1.0.1g etc)
found, tested and OK sthen@
Diffstat (limited to 'usr.bin/pkg-config')
-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);