diff options
| author | Jack Nagel | 2014-08-16 01:33:41 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-08-16 01:39:33 -0500 |
| commit | 8a98d4b09c0c224c7c7ec1a2f0e0c9ff966cfe40 (patch) | |
| tree | 2f59a328c4b2f9e00a9cb8821598e947a5e28735 /Library/Homebrew | |
| parent | 4c1666cb4b3f86aa2fdf57adf490eb98cfd6e85f (diff) | |
| download | homebrew-8a98d4b09c0c224c7c7ec1a2f0e0c9ff966cfe40.tar.bz2 | |
Remove the universal accessor from BuildOptions
BuildOptions is now immutable (finally).
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/build_options.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/compat/formula.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 2 |
4 files changed, 10 insertions, 8 deletions
diff --git a/Library/Homebrew/build_options.rb b/Library/Homebrew/build_options.rb index 41e5eb14b..d880c76eb 100644 --- a/Library/Homebrew/build_options.rb +++ b/Library/Homebrew/build_options.rb @@ -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. diff --git a/Library/Homebrew/compat/formula.rb b/Library/Homebrew/compat/formula.rb index 9a3e95065..11f65e36d 100644 --- a/Library/Homebrew/compat/formula.rb +++ b/Library/Homebrew/compat/formula.rb @@ -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 diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 35b0f60a9..2774f23ca 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -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 diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 98711719a..2e7286404 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -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 |
