From f44378e03d9806b0b528b8589a4c705a9c564889 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat, 17 Jan 2015 18:52:14 -0800
Subject: [PATCH 3/7] MacPorts Only: Fix sample project regex to work with
 multiple digit versions

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
---
 projects/sample/Makefile.llvm.rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git llvm_release_34/projects/sample/Makefile.llvm.rules macports_release_34/projects/sample/Makefile.llvm.rules
index 545e629..10716db 100644
--- llvm_release_34/projects/sample/Makefile.llvm.rules
+++ macports_release_34/projects/sample/Makefile.llvm.rules
@@ -476,9 +476,9 @@ endif
 ifeq ($(HOST_OS),Darwin)
   DARWIN_VERSION := `sw_vers -productVersion`
   # Strip a number like 10.4.7 to 10.4
-  DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E 's/(10.[0-9]).*/\1/')
+  DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E 's/(10.[0-9]+).*/\1/')
   # Get "4" out of 10.4 for later pieces in the makefile.
-  DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]).*/\1/')
+  DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]+).*/\1/')
 
   LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress
   SharedLinkOptions := -dynamiclib
-- 
2.2.2

