From 3e131950587c83bc628fa0425c2a966af708f49f Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 24 Jul 2014 08:44:33 +0100 Subject: gcc: provide version_suffix class method. --- Library/Formula/gcc.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Library/Formula') 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}", -- cgit v1.2.3