Remove obsolete DEVELOPER_DIR hacks
These days Homebrew refuses to do anything if the xcode-select path is busted, so this workaround is unnecessary.
This commit is contained in:
parent
749c877f03
commit
dd8dc7a380
@ -9,7 +9,7 @@ require "#{dirname}/../libsuperenv"
|
||||
SUPERBIN = dirname.cleanpath.freeze
|
||||
|
||||
# Some build tools are stupid and still set DEVELOPER_DIR to old /Developer
|
||||
ENV['DEVELOPER_DIR'] = ENV['HOMEBREW_DEVELOPER_DIR']
|
||||
ENV.delete "DEVELOPER_DIR"
|
||||
|
||||
exec "/usr/bin/xcrun", *ARGV if ARGV.empty? or ARGV[0][0..0] == '-'
|
||||
if File.exist?("/usr/bin/#{ARGV.first}")
|
||||
@ -23,9 +23,7 @@ end
|
||||
|
||||
arg0 = ARGV.shift
|
||||
try `/usr/bin/xcrun --find #{arg0} 2>/dev/null`.chomp
|
||||
# Nuts, Xcode is not setup properly or something. Try to find the tools anyway!
|
||||
try "#{ENV['HOMEBREW_DEVELOPER_DIR']}/usr/bin/#{arg0}"
|
||||
try "#{ENV['HOMEBREW_DEVELOPER_DIR']}/Toolchains/XcodeDefault.xctoolchain/usr/bin/#{arg0}"
|
||||
|
||||
# xcrun won't always be able to find Homebrew's apple-gcc42,
|
||||
# even when it's in the PATH
|
||||
ENV['PATH'].split(':').each do |p|
|
||||
|
||||
@ -46,7 +46,7 @@ module Superenv
|
||||
def reset
|
||||
%w{CC CXX OBJC OBJCXX CPP MAKE LD LDSHARED
|
||||
CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS LDFLAGS CPPFLAGS
|
||||
MACOSX_DEPLOYMENT_TARGET SDKROOT
|
||||
MACOSX_DEPLOYMENT_TARGET SDKROOT DEVELOPER_DIR
|
||||
CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
|
||||
CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH OBJC_INCLUDE_PATH}.
|
||||
each{ |x| delete(x) }
|
||||
@ -65,7 +65,6 @@ module Superenv
|
||||
self.cc = self['HOMEBREW_CC'] = determine_cc
|
||||
self.cxx = self['HOMEBREW_CXX'] = determine_cxx
|
||||
validate_cc!(formula) unless formula.nil?
|
||||
self['DEVELOPER_DIR'] = determine_developer_dir
|
||||
self['MAKEFLAGS'] ||= "-j#{determine_make_jobs}"
|
||||
self['PATH'] = determine_path
|
||||
self['PKG_CONFIG_PATH'] = determine_pkg_config_path
|
||||
@ -76,7 +75,6 @@ module Superenv
|
||||
self['HOMEBREW_PREFIX'] = HOMEBREW_PREFIX
|
||||
self['HOMEBREW_TEMP'] = HOMEBREW_TEMP
|
||||
self['HOMEBREW_SDKROOT'] = "#{MacOS.sdk_path}" if MacOS::Xcode.without_clt?
|
||||
self['HOMEBREW_DEVELOPER_DIR'] = determine_developer_dir # used by our xcrun shim
|
||||
self['HOMEBREW_OPTFLAGS'] = determine_optflags
|
||||
self['CMAKE_PREFIX_PATH'] = determine_cmake_prefix_path
|
||||
self['CMAKE_FRAMEWORK_PATH'] = determine_cmake_frameworks_path
|
||||
@ -224,13 +222,6 @@ module Superenv
|
||||
s
|
||||
end
|
||||
|
||||
def determine_developer_dir
|
||||
# If Xcode path is broken then this is basically a fix. In the case where
|
||||
# nothing is valid, it still fixes most usage to supply a valid path that
|
||||
# is not "/".
|
||||
MacOS::Xcode.prefix || self['DEVELOPER_DIR']
|
||||
end
|
||||
|
||||
public
|
||||
|
||||
def deparallelize
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user