diff options
| author | Jack Nagel | 2014-08-02 20:03:42 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-08-02 20:03:42 -0500 |
| commit | fccfddb5105b82df35ea4296c4bb5b1d95b57651 (patch) | |
| tree | 3176a2a5c1cf960fd61177bf9bc0a0124be053b8 /Library/Homebrew/cxxstdlib.rb | |
| parent | 018aeb05ab74629f761741e51436a358db6feb9d (diff) | |
| download | brew-fccfddb5105b82df35ea4296c4bb5b1d95b57651.tar.bz2 | |
Partially revert e1f97e2 to pass new test cases
Diffstat (limited to 'Library/Homebrew/cxxstdlib.rb')
| -rw-r--r-- | Library/Homebrew/cxxstdlib.rb | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Library/Homebrew/cxxstdlib.rb b/Library/Homebrew/cxxstdlib.rb index 06599e7db..34ce92d99 100644 --- a/Library/Homebrew/cxxstdlib.rb +++ b/Library/Homebrew/cxxstdlib.rb @@ -23,7 +23,18 @@ class CxxStdlib # libstdc++ is compatible across Apple compilers, but # not between Apple and GNU compilers, or between GNU compiler versions def compatible_with?(other) - type.nil? || other.type.nil? || type == other.type + return true if type.nil? || other.type.nil? + + return false unless type == other.type + + if apple_compiler? + return false unless other.apple_compiler? + else + return false if other.apple_compiler? + return false unless compiler.to_s[4..6] == other.compiler.to_s[4..6] + end + + true end def check_dependencies(formula, deps) @@ -50,21 +61,11 @@ class CxxStdlib def apple_compiler? true end - - def compatible_with?(other) - super && other.apple_compiler? - end end class GnuStdlib < CxxStdlib def apple_compiler? false end - - def compatible_with?(other) - super && - !other.apple_compiler? && - compiler.to_s[4..6] == other.compiler.to_s[4..6] - end end end |
