diff options
| author | Jack Nagel | 2013-09-21 19:27:24 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2013-09-21 19:27:24 -0500 | 
| commit | b8b210b91f93992eab317b07f8b8b1c37cf2648b (patch) | |
| tree | 32281b169a77b556ecbd15013e1019b7783fbedf /Library/Homebrew/formula.rb | |
| parent | 0af7d5611e09d88dbcec602bd523d8a72a81c57b (diff) | |
| download | homebrew-b8b210b91f93992eab317b07f8b8b1c37cf2648b.tar.bz2 | |
Allow explicitly requiring universal deps
Previously, instructing Homebrew that all dependencies should be built
universal could be accomplished by redefining BuildOptions#universal? in
the class body:
  def build.universal?
    true
  end
However, the build object is no longer shared by all specs, so this is
insufficient. Instead, a new DSL method, "require_universal_deps", can
be used.
This feature is almost exclusively for wine, which requires universal
deps but does not itself have a universal option, since it is always
built 32-bit.
Diffstat (limited to 'Library/Homebrew/formula.rb')
| -rw-r--r-- | Library/Homebrew/formula.rb | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 35dc9a08d..90ab6e66e 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -777,6 +777,10 @@ class Formula        @cc_failures << CompilerFailure.new(compiler, &block)      end +    def require_universal_deps +      specs.each { |spec| spec.build.universal = true } +    end +      def test &block        return @test unless block_given?        @test_defined = true  | 
