From 851364cf8eb222e962527920b185b1d00b9b0e78 Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Thu, 10 Jul 2014 08:20:14 +0000 Subject: fix version comparison for openssl-like versions (1.0.1g etc) found, tested and OK sthen@ --- usr.bin/pkg-config/pkg-config | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'usr.bin/pkg-config') 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 @@ -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); -- cgit v1.2.3