Skip to content
Snippets Groups Projects
Commit 0abe1667 authored by Misty De Meo's avatar Misty De Meo
Browse files

Cabal: move fails_with to a class method

Fixes Homebrew/homebrew#39950.
parent 102170b9
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment