Replace version strings with Version objects

master
Jack Nagel 2012-07-10 16:01:02 -05:00
parent e8599abf7f
commit 2cc9a0b98a
4 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ class Bash < Formula
depends_on 'readline'
def patches
patch_level = version.split('.').last.to_i
patch_level = version.to_s.split('.').last.to_i
{'p0' => (1..patch_level).map { |i| "http://ftpmirror.gnu.org/bash/bash-4.2-patches/bash42-%03d" % i }}
end

View File

@ -53,7 +53,7 @@ class Lua < Formula
# this ensures that this symlinking for lua starts at lib/lua/5.1 and not
# below that, thus making luarocks work
(HOMEBREW_PREFIX/"lib/lua"/version.split('.')[0..1].join('.')).mkpath
(HOMEBREW_PREFIX/"lib/lua"/version.to_s.split('.')[0..1].join('.')).mkpath
system "make", "macosx", "INSTALL_TOP=#{prefix}", "INSTALL_MAN=#{man1}"
system "make", "install", "INSTALL_TOP=#{prefix}", "INSTALL_MAN=#{man1}"

View File

@ -25,7 +25,7 @@ class Shapelib < Formula
include.install 'shapefil.h'
cd lib do
ln_s "libshp.#{version}.dylib", "libshp.#{version.split('.').first}.dylib"
ln_s "libshp.#{version}.dylib", "libshp.#{version.to_s.split('.').first}.dylib"
ln_s "libshp.#{version}.dylib", "libshp.dylib"
end
end

View File

@ -28,7 +28,7 @@ class Sip < Formula
else
sip_version = version
end
inreplace 'build.py', /@SIP_VERSION@/, (sip_version.gsub '.', ',')
inreplace 'build.py', /@SIP_VERSION@/, (sip_version.to_s.gsub '.', ',')
system "python", "build.py", "prepare"
# Set --destdir such that the python modules will be in the HOMEBREWPREFIX/lib/pythonX.Y/site-packages