Requirements: add CctoolsRequirement
Install it as a dependency unless already satisfied by Xcode. require cctools_requirement cctools_requirement should be satisfied by cctools present in opt add build_env => false to the satify block options in CctoolsRequirement
This commit is contained in:
parent
4d65b817ec
commit
b46d5de492
@ -122,13 +122,13 @@ module Homebrew
|
||||
end
|
||||
|
||||
def check_xcode
|
||||
# TODO: reinstate check_for_bad_install_name_tool
|
||||
# TODO: reinstate check_for_bad_install_name_tool and check_for_installed_developer_tools
|
||||
# currently check_for_bad_install_name_tool fails because it tries to call
|
||||
# the /usr/bin/otool stub program on systems without XCode/CLT
|
||||
# check_for_installed_developer_tools doesn't fail, but produces a warning
|
||||
# when one is no longer required
|
||||
checks = Checks.new
|
||||
%w[
|
||||
check_for_unsupported_osx
|
||||
check_for_installed_developer_tools
|
||||
check_xcode_license_approved
|
||||
check_for_osx_gcc_installer
|
||||
].each do |check|
|
||||
|
||||
@ -13,6 +13,7 @@ require "cmd/postinstall"
|
||||
require "hooks/bottles"
|
||||
require "debrew"
|
||||
require "sandbox"
|
||||
require "requirements/cctools_requirement"
|
||||
|
||||
class FormulaInstaller
|
||||
include FormulaCellarChecks
|
||||
@ -328,8 +329,10 @@ class FormulaInstaller
|
||||
end
|
||||
|
||||
def install_relocation_tools
|
||||
ohai "placeholder"
|
||||
true
|
||||
cctools = CctoolsRequirement.new
|
||||
return if cctools.satisfied?
|
||||
|
||||
install_dependency(cctools.to_dependency, inherited_options_for(cctools))
|
||||
end
|
||||
|
||||
class DependencyInstaller < FormulaInstaller
|
||||
|
||||
@ -2,7 +2,7 @@ class CctoolsRequirement < Requirement
|
||||
fatal true
|
||||
default_formula 'cctools'
|
||||
|
||||
satisfy do
|
||||
MacOS::XCode.installed? || MacOS::CLT.installed?
|
||||
satisfy(:build_env => false) do
|
||||
MacOS::Xcode.installed? || MacOS::CLT.installed? || Formula['cctools'].installed?
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user