dev-cmd/unbottled: simulate target tag
This commit is contained in:
parent
b7391069d4
commit
bca9eb05d1
@ -44,6 +44,15 @@ module Homebrew
|
|||||||
Utils::Bottles.tag
|
Utils::Bottles.tag
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Homebrew::SimulateSystem.os = @bottle_tag.system
|
||||||
|
Homebrew::SimulateSystem.arch = if Hardware::CPU::INTEL_ARCHS.include?(@bottle_tag.arch)
|
||||||
|
:intel
|
||||||
|
elsif Hardware::CPU::ARM_ARCHS.include?(@bottle_tag.arch)
|
||||||
|
:arm
|
||||||
|
else
|
||||||
|
raise "Unknown arch #{@bottle_tag.arch}."
|
||||||
|
end
|
||||||
|
|
||||||
all = args.eval_all?
|
all = args.eval_all?
|
||||||
if args.total?
|
if args.total?
|
||||||
if !all && !Homebrew::EnvConfig.eval_all?
|
if !all && !Homebrew::EnvConfig.eval_all?
|
||||||
@ -82,6 +91,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
output_unbottled(formulae, deps_hash, noun, hash, args.named.present?)
|
output_unbottled(formulae, deps_hash, noun, hash, args.named.present?)
|
||||||
|
ensure
|
||||||
|
Homebrew::SimulateSystem.clear
|
||||||
end
|
end
|
||||||
|
|
||||||
def formulae_all_installs_from_args(args, all)
|
def formulae_all_installs_from_args(args, all)
|
||||||
|
|||||||
@ -9,15 +9,16 @@ module Hardware
|
|||||||
class CPU
|
class CPU
|
||||||
INTEL_32BIT_ARCHS = [:i386].freeze
|
INTEL_32BIT_ARCHS = [:i386].freeze
|
||||||
INTEL_64BIT_ARCHS = [:x86_64].freeze
|
INTEL_64BIT_ARCHS = [:x86_64].freeze
|
||||||
|
INTEL_ARCHS = (INTEL_32BIT_ARCHS + INTEL_64BIT_ARCHS).freeze
|
||||||
PPC_32BIT_ARCHS = [:ppc, :ppc32, :ppc7400, :ppc7450, :ppc970].freeze
|
PPC_32BIT_ARCHS = [:ppc, :ppc32, :ppc7400, :ppc7450, :ppc970].freeze
|
||||||
PPC_64BIT_ARCHS = [:ppc64, :ppc64le, :ppc970].freeze
|
PPC_64BIT_ARCHS = [:ppc64, :ppc64le, :ppc970].freeze
|
||||||
|
PPC_ARCHS = (PPC_32BIT_ARCHS + PPC_64BIT_ARCHS).freeze
|
||||||
ARM_64BIT_ARCHS = [:arm64, :aarch64].freeze
|
ARM_64BIT_ARCHS = [:arm64, :aarch64].freeze
|
||||||
|
ARM_ARCHS = ARM_64BIT_ARCHS
|
||||||
ALL_ARCHS = [
|
ALL_ARCHS = [
|
||||||
*INTEL_32BIT_ARCHS,
|
*INTEL_ARCHS,
|
||||||
*INTEL_64BIT_ARCHS,
|
*PPC_ARCHS,
|
||||||
*PPC_32BIT_ARCHS,
|
*ARM_ARCHS,
|
||||||
*PPC_64BIT_ARCHS,
|
|
||||||
*ARM_64BIT_ARCHS,
|
|
||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
INTEL_64BIT_OLDEST_CPU = :core2
|
INTEL_64BIT_OLDEST_CPU = :core2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user