Replace version strings with Version objects
parent
e8599abf7f
commit
2cc9a0b98a
|
@ -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
|
||||
|
||||
|
|
|
@ -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}"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue