formula: move cxxstdlib methods to the class.
This allows disabling this checks when e.g. pouring bottles.
This commit is contained in:
parent
6cdc76452b
commit
249aae177f
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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."
|
||||
|
Loading…
x
Reference in New Issue
Block a user