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"
|
"-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def cxxstdlib
|
||||||
|
self.class.cxxstdlib
|
||||||
|
end
|
||||||
|
|
||||||
|
def cxxstdlib_check check_type
|
||||||
|
self.class.cxxstdlib_check check_type
|
||||||
|
end
|
||||||
|
|
||||||
def self.bottle_sha1(*)
|
def self.bottle_sha1(*)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class CxxStdlib
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_dependencies(formula, deps)
|
def check_dependencies(formula, deps)
|
||||||
unless formula.cxxstdlib.include? :skip
|
unless formula.class.cxxstdlib.include? :skip
|
||||||
deps.each do |dep|
|
deps.each do |dep|
|
||||||
# Software is unlikely to link against anything from its
|
# Software is unlikely to link against anything from its
|
||||||
# buildtime deps, so it doesn't matter at all if they link
|
# buildtime deps, so it doesn't matter at all if they link
|
||||||
|
@ -439,12 +439,6 @@ class Formula
|
|||||||
Requirement.expand(self, &block)
|
Requirement.expand(self, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Flag for marking whether this formula needs C++ standard library
|
|
||||||
# compatibility check
|
|
||||||
def cxxstdlib
|
|
||||||
@cxxstdlib ||= Set.new
|
|
||||||
end
|
|
||||||
|
|
||||||
def to_hash
|
def to_hash
|
||||||
hsh = {
|
hsh = {
|
||||||
"name" => name,
|
"name" => name,
|
||||||
@ -607,12 +601,6 @@ class Formula
|
|||||||
active_spec.patches.each(&:apply)
|
active_spec.patches.each(&:apply)
|
||||||
end
|
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
|
def self.method_added method
|
||||||
case method
|
case method
|
||||||
when :brew
|
when :brew
|
||||||
@ -730,6 +718,18 @@ class Formula
|
|||||||
@keg_only_reason = KegOnlyReason.new(reason, explanation.to_s.chomp)
|
@keg_only_reason = KegOnlyReason.new(reason, explanation.to_s.chomp)
|
||||||
end
|
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:
|
# For Apple compilers, this should be in the format:
|
||||||
# fails_with compiler do
|
# fails_with compiler do
|
||||||
# cause "An explanation for why the build doesn't work."
|
# cause "An explanation for why the build doesn't work."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user