aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2014-07-24 08:44:33 +0100
committerMike McQuaid2014-07-24 08:51:08 +0100
commit3e131950587c83bc628fa0425c2a966af708f49f (patch)
treecc2dac29510cd7b9c8193076fffed914ed53d681 /Library
parenta8582c580466997aeee4e6ce788dd2af6f6ae643 (diff)
downloadhomebrew-3e131950587c83bc628fa0425c2a966af708f49f.tar.bz2
gcc: provide version_suffix class method.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/gcc.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Formula/gcc.rb b/Library/Formula/gcc.rb
index 77698d660..3e57c9e7c 100644
--- a/Library/Formula/gcc.rb
+++ b/Library/Formula/gcc.rb
@@ -68,6 +68,10 @@ class Gcc < Formula
MacOS::CLT.installed?
end
+ def version_suffix
+ version.to_s.slice(/\d\.\d/)
+ end
+
def install
# GCC will suffer build errors if forced to use a particular linker.
ENV.delete "LD"
@@ -85,8 +89,6 @@ class Gcc < Formula
languages << "fortran" if build.with?("fortran") || build.with?("all-languages")
languages << "java" if build.with?("java") || build.with?("all-languages")
- version_suffix = version.to_s.slice(/\d\.\d/)
-
args = [
"--build=#{arch}-apple-darwin#{osmajor}",
"--prefix=#{prefix}",