aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib
diff options
context:
space:
mode:
authorMarkus Reiter2017-01-02 12:08:21 +0100
committerGitHub2017-01-02 12:08:21 +0100
commite84e4b5566ac9211481af2ab7c74cd7ad617d958 (patch)
tree993298425c003c38146f093af4b2d8e26a417c6c /Library/Homebrew/cask/lib
parent3e0d54d8b9be1507c61e7a862379d7c9ad31fb8a (diff)
parent294781cc9efb330af98e9dfa701a2b64d41bf819 (diff)
downloadbrew-e84e4b5566ac9211481af2ab7c74cd7ad617d958.tar.bz2
Merge pull request #1745 from vitorgalvao/depends-on-arch
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.rb26
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?