diff options
| author | Misty De Meo | 2015-05-28 19:30:10 -0700 |
|---|---|---|
| committer | Misty De Meo | 2015-05-28 19:30:10 -0700 |
| commit | 0abe16673eaf49d3f83754b806f4b4c31d0db642 (patch) | |
| tree | 394ac021b53f4653e742ca8df6a7ffb8377679f3 /Library/Homebrew/language/haskell.rb | |
| parent | 102170b9572164aee90be4fa459045e10761e554 (diff) | |
| download | brew-0abe16673eaf49d3f83754b806f4b4c31d0db642.tar.bz2 | |
Cabal: move fails_with to a class method
Fixes Homebrew/homebrew#39950.
Diffstat (limited to 'Library/Homebrew/language/haskell.rb')
| -rw-r--r-- | Library/Homebrew/language/haskell.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Library/Homebrew/language/haskell.rb b/Library/Homebrew/language/haskell.rb index e6dcabea1..6dc8df9ca 100644 --- a/Library/Homebrew/language/haskell.rb +++ b/Library/Homebrew/language/haskell.rb @@ -2,6 +2,17 @@ module Language module Haskell # module for formulas using cabal-install as build tool module Cabal + module ClassMethods + def setup_ghc_compilers + # Use llvm-gcc on Lion or below (same compiler used when building GHC). + fails_with(:clang) if MacOS.version <= :lion + end + end + + def self.included base + base.extend ClassMethods + end + def cabal_sandbox pwd = Pathname.pwd # force cabal to put its stuff here instead of the home directory by @@ -11,9 +22,6 @@ module Language home = ENV["HOME"] ENV["HOME"] = pwd - # Use llvm-gcc on Lion or below (same compiler used when building GHC). - fails_with(:clang) if MacOS.version <= :lion - # use cabal's sandbox feature if available cabal_version = `cabal --version`[/[0-9.]+/].split('.').collect(&:to_i) if (cabal_version <=> [1, 20]) > -1 |
