diff options
| author | Mike McQuaid | 2014-04-21 18:50:22 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-04-23 08:10:48 +0100 |
| commit | 249aae177f3e6fb100c391c1f4562cc331c69d2e (patch) | |
| tree | 2e9a6647b98bbb78d9161beba8e48d382f39abc5 /Library/Homebrew | |
| parent | 6cdc76452b34b8dfe6c7c99a077183bf2d65ebee (diff) | |
| download | brew-249aae177f3e6fb100c391c1f4562cc331c69d2e.tar.bz2 | |
formula: move cxxstdlib methods to the class.
This allows disabling this checks when e.g. pouring bottles.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/compat/formula.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/cxxstdlib.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 24 |
3 files changed, 21 insertions, 13 deletions
diff --git a/Library/Homebrew/compat/formula.rb b/Library/Homebrew/compat/formula.rb index 509ff5d18..bbccb7a44 100644 --- a/Library/Homebrew/compat/formula.rb +++ b/Library/Homebrew/compat/formula.rb @@ -16,6 +16,14 @@ class Formula "-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev" end + def cxxstdlib + self.class.cxxstdlib + end + + def cxxstdlib_check check_type + self.class.cxxstdlib_check check_type + end + def self.bottle_sha1(*) end diff --git a/Library/Homebrew/cxxstdlib.rb b/Library/Homebrew/cxxstdlib.rb index fba868277..1ae50c674 100644 --- a/Library/Homebrew/cxxstdlib.rb +++ b/Library/Homebrew/cxxstdlib.rb @@ -33,7 +33,7 @@ class CxxStdlib end def check_dependencies(formula, deps) - unless formula.cxxstdlib.include? :skip + unless formula.class.cxxstdlib.include? :skip deps.each do |dep| # Software is unlikely to link against anything from its # buildtime deps, so it doesn't matter at all if they link diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index d21fc48b1..9b8de904e 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -439,12 +439,6 @@ class Formula Requirement.expand(self, &block) end - # Flag for marking whether this formula needs C++ standard library - # compatibility check - def cxxstdlib - @cxxstdlib ||= Set.new - end - def to_hash hsh = { "name" => name, @@ -607,12 +601,6 @@ class Formula active_spec.patches.each(&:apply) end - # Explicitly request changing C++ standard library compatibility check - # settings. Use with caution! - def cxxstdlib_check check_type - cxxstdlib << check_type - end - def self.method_added method case method when :brew @@ -730,6 +718,18 @@ class Formula @keg_only_reason = KegOnlyReason.new(reason, explanation.to_s.chomp) end + # Flag for marking whether this formula needs C++ standard library + # compatibility check + def cxxstdlib + @cxxstdlib ||= Set.new + end + + # Explicitly request changing C++ standard library compatibility check + # settings. Use with caution! + def cxxstdlib_check check_type + cxxstdlib << check_type + end + # For Apple compilers, this should be in the format: # fails_with compiler do # cause "An explanation for why the build doesn't work." |
