aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/bottle_version.rb4
-rw-r--r--Library/Homebrew/test/test_bottle_versions.rb5
2 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/bottle_version.rb b/Library/Homebrew/bottle_version.rb
index 38b51005e..615980d83 100644
--- a/Library/Homebrew/bottle_version.rb
+++ b/Library/Homebrew/bottle_version.rb
@@ -7,6 +7,10 @@ class BottleVersion < Version
m = /-([\d\.]+-x86(_64)?)/.match(stem)
return m.captures.first unless m.nil?
+ # e.g. x264-r2197.4.mavericks.bottle.tar.gz
+ m = /(r\d+\.\d)/.match(stem)
+ return m.captures.first unless m.nil?
+
# e.g. ssh-copy-id-6.2p2.mountain_lion.bottle.tar.gz
# e.g. icu4c-52.1.mountain_lion.bottle.tar.gz
m = /(\d+\.(\d)+(p(\d)+)?)/.match(stem)
diff --git a/Library/Homebrew/test/test_bottle_versions.rb b/Library/Homebrew/test/test_bottle_versions.rb
index 26efb1261..7968d1e19 100644
--- a/Library/Homebrew/test/test_bottle_versions.rb
+++ b/Library/Homebrew/test/test_bottle_versions.rb
@@ -20,4 +20,9 @@ class BottleVersionParsingTests < Test::Unit::TestCase
assert_version_detected '52.1',
'/usr/local/icu4c-52.1.mavericks.bottle.tar.gz'
end
+
+ def test_x264_style
+ assert_version_detected 'r2197.4',
+ '/usr/local/x264-r2197.4.mavericks.bottle.tar.gz'
+ end
end