diff options
| author | Vítor Galvão | 2016-12-29 18:56:19 +0000 |
|---|---|---|
| committer | Vítor Galvão | 2017-01-02 02:46:03 +0000 |
| commit | 294781cc9efb330af98e9dfa701a2b64d41bf819 (patch) | |
| tree | 2f7b57d4ae1ffcd2fcb48ee02aa837b86fb35475 /Library/Homebrew/cask/lib | |
| parent | 4ca2eaf8dfd0e6cac169a61e1b786f074c942b1d (diff) | |
| download | brew-294781cc9efb330af98e9dfa701a2b64d41bf819.tar.bz2 | |
cask depends_on arch: remove everything but 64-bit intel
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb b/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb index 2168b7090..a8c1a1b73 100644 --- a/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb +++ b/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb @@ -13,30 +13,9 @@ module Hbc ].freeze VALID_ARCHES = { - intel: { type: :intel, bits: [32, 64] }, - ppc: { type: :ppc, bits: [32, 64] }, + intel: { type: :intel, bits: 64 }, # specific - i386: { type: :intel, bits: 32 }, x86_64: { type: :intel, bits: 64 }, - ppc_7400: { type: :ppc, bits: 32 }, - ppc_64: { type: :ppc, bits: 64 }, - }.freeze - - # Intentionally undocumented: catch variant spellings. - ARCH_SYNONYMS = { - x86_32: :i386, - x8632: :i386, - x8664: :x86_64, - intel_32: :i386, - intel32: :i386, - intel_64: :x86_64, - intel64: :x86_64, - amd_64: :x86_64, - amd64: :x86_64, - ppc7400: :ppc_7400, - ppc_32: :ppc_7400, - ppc32: :ppc_7400, - ppc64: :ppc_64, }.freeze attr_accessor :java @@ -100,8 +79,7 @@ module Hbc def arch=(*args) @arch ||= [] arches = args.map do |elt| - elt = elt.to_s.downcase.sub(/^:/, "").tr("-", "_").to_sym - ARCH_SYNONYMS.key?(elt) ? ARCH_SYNONYMS[elt] : elt + elt.to_s.downcase.sub(/^:/, "").tr("-", "_").to_sym end invalid_arches = arches - VALID_ARCHES.keys raise "invalid 'depends_on arch' values: #{invalid_arches.inspect}" unless invalid_arches.empty? |
