From 6809bbe29a14a42a06b2c4eff219f6f8a7573144 Mon Sep 17 00:00:00 2001
From: Arkady Rost <arkrost@gmail.com>
Date: Thu, 22 Oct 2015 11:06:00 +0300
Subject: [PATCH] Fix clang version pattern

'Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)' was parsed incorrectly.
---
 build-support/factor.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-support/factor.sh b/build-support/factor.sh
index 4014ee76f0..00be3ce779 100755
--- a/build-support/factor.sh
+++ b/build-support/factor.sh
@@ -113,7 +113,7 @@ set_md5sum() {
 }
 
 semver_into() {
-	CLANG_RE_OLD="^([0-9]*)\.([0-9]*)-(.*)?$" # 3.3-5
+	CLANG_RE_OLD="^([0-9]*)\.([0-9]*)-?(.*)?$" # 3.3-5
 	RE_SEMVER="^([0-9]*)\.([0-9]*)\.([0-9]*)-?(.*)?$" # 3.3.3-5
 	if [[ $1 =~ $CLANG_RE_OLD ]] ; then
 		export "$2=${BASH_REMATCH[1]}"