aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-06-28 12:50:10 -0500
committerJack Nagel2012-06-28 14:12:50 -0500
commitf2e076e5cc87e25602c07c030c47ecf048906176 (patch)
treebc4567b2f3e2958f73385c1282d0e948b3501b84 /Library
parent0bb95960e642782c85eb7e227eba844607fc2d00 (diff)
downloadbrew-f2e076e5cc87e25602c07c030c47ecf048906176.tar.bz2
Organize compiler methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/macos.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb
index d0b1670d9..b237ae94f 100644
--- a/Library/Homebrew/macos.rb
+++ b/Library/Homebrew/macos.rb
@@ -175,21 +175,6 @@ module MacOS extend self
end
end
- def gcc_42_build_version
- @gcc_42_build_version ||= if File.exist? "#{dev_tools_path}/gcc-4.2" \
- and not Pathname.new("#{dev_tools_path}/gcc-4.2").realpath.basename.to_s =~ /^llvm/
- `#{dev_tools_path}/gcc-4.2 --version` =~ /build (\d{4,})/
- $1.to_i
- end
- end
-
- def gcc_40_build_version
- @gcc_40_build_version ||= if File.exist? "#{dev_tools_path}/gcc-4.0"
- `#{dev_tools_path}/gcc-4.0 --version` =~ /build (\d{4,})/
- $1.to_i
- end
- end
-
def xcode_prefix
@xcode_prefix ||= begin
path = Pathname.new xcode_folder
@@ -305,6 +290,21 @@ module MacOS extend self
end
end
+ def gcc_40_build_version
+ @gcc_40_build_version ||= if locate("gcc-4.0")
+ `#{locate("gcc-4.0")} --version` =~ /build (\d{4,})/
+ $1.to_i
+ end
+ end
+
+ def gcc_42_build_version
+ @gcc_42_build_version ||= if locate("gcc-4.2") \
+ and not locate("gcc-4.2").realpath.basename.to_s =~ /^llvm/
+ `#{locate("gcc-4.2")} --version` =~ /build (\d{4,})/
+ $1.to_i
+ end
+ end
+
def llvm_build_version
# for Xcode 3 on OS X 10.5 this will not exist
# NOTE may not be true anymore but we can't test