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
|
end
|
||||||
|
|
||||||
def check_xcode
|
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
|
# currently check_for_bad_install_name_tool fails because it tries to call
|
||||||
# the /usr/bin/otool stub program on systems without XCode/CLT
|
# 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
|
checks = Checks.new
|
||||||
%w[
|
%w[
|
||||||
check_for_unsupported_osx
|
|
||||||
check_for_installed_developer_tools
|
|
||||||
check_xcode_license_approved
|
check_xcode_license_approved
|
||||||
check_for_osx_gcc_installer
|
check_for_osx_gcc_installer
|
||||||
].each do |check|
|
].each do |check|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ require "cmd/postinstall"
|
|||||||
require "hooks/bottles"
|
require "hooks/bottles"
|
||||||
require "debrew"
|
require "debrew"
|
||||||
require "sandbox"
|
require "sandbox"
|
||||||
|
require "requirements/cctools_requirement"
|
||||||
|
|
||||||
class FormulaInstaller
|
class FormulaInstaller
|
||||||
include FormulaCellarChecks
|
include FormulaCellarChecks
|
||||||
@ -328,8 +329,10 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
def install_relocation_tools
|
def install_relocation_tools
|
||||||
ohai "placeholder"
|
cctools = CctoolsRequirement.new
|
||||||
true
|
return if cctools.satisfied?
|
||||||
|
|
||||||
|
install_dependency(cctools.to_dependency, inherited_options_for(cctools))
|
||||||
end
|
end
|
||||||
|
|
||||||
class DependencyInstaller < FormulaInstaller
|
class DependencyInstaller < FormulaInstaller
|
||||||
|
|||||||
@ -2,7 +2,7 @@ class CctoolsRequirement < Requirement
|
|||||||
fatal true
|
fatal true
|
||||||
default_formula 'cctools'
|
default_formula 'cctools'
|
||||||
|
|
||||||
satisfy do
|
satisfy(:build_env => false) do
|
||||||
MacOS::XCode.installed? || MacOS::CLT.installed?
|
MacOS::Xcode.installed? || MacOS::CLT.installed? || Formula['cctools'].installed?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user