Remove the universal accessor from BuildOptions
BuildOptions is now immutable (finally).
This commit is contained in:
parent
cb7b9945cd
commit
e6498f4dfc
@ -1,6 +1,4 @@
|
||||
class BuildOptions
|
||||
attr_accessor :universal
|
||||
|
||||
def initialize(args, options)
|
||||
@args = args
|
||||
@options = options
|
||||
@ -48,7 +46,7 @@ class BuildOptions
|
||||
|
||||
# True if the user requested a universal build.
|
||||
def universal?
|
||||
universal || include?("universal") && option_defined?("universal")
|
||||
include?("universal") && option_defined?("universal")
|
||||
end
|
||||
|
||||
# True if the user requested to enable C++11 mode.
|
||||
|
@ -43,4 +43,8 @@ class Formula
|
||||
def self.factory(name)
|
||||
Formulary.factory(name)
|
||||
end
|
||||
|
||||
def self.require_universal_deps
|
||||
define_method(:require_universal_deps?) { true }
|
||||
end
|
||||
end
|
||||
|
@ -248,6 +248,10 @@ class Formula
|
||||
self.class.cxxstdlib.include?(:skip)
|
||||
end
|
||||
|
||||
def require_universal_deps?
|
||||
false
|
||||
end
|
||||
|
||||
# yields self with current working directory set to the uncompressed tarball
|
||||
def brew
|
||||
validate_attributes :name, :version
|
||||
@ -759,10 +763,6 @@ class Formula
|
||||
end
|
||||
end
|
||||
|
||||
def require_universal_deps
|
||||
specs.each { |spec| spec.build.universal = true }
|
||||
end
|
||||
|
||||
def test &block
|
||||
return @test unless block_given?
|
||||
@test_defined = true
|
||||
|
@ -310,7 +310,7 @@ class FormulaInstaller
|
||||
def inherited_options_for(dep)
|
||||
inherited_options = Options.new
|
||||
u = Option.new("universal")
|
||||
if (options.include?(u) || f.build.universal?) && !dep.build? && dep.to_formula.option_defined?(u)
|
||||
if (options.include?(u) || f.require_universal_deps?) && !dep.build? && dep.to_formula.option_defined?(u)
|
||||
inherited_options << u
|
||||
end
|
||||
inherited_options
|
||||
|
Loading…
x
Reference in New Issue
Block a user