remove homebrew-fork compat.rb and compat dir
This commit is contained in:
parent
a0c86c4cd5
commit
5e6ac42bbb
|
@ -1,6 +0,0 @@
|
|||
require 'compat/fails_with_llvm'
|
||||
require 'compat/formula'
|
||||
require 'compat/hardware'
|
||||
require 'compat/macos'
|
||||
require 'compat/md5'
|
||||
require 'compat/version'
|
|
@ -1,11 +0,0 @@
|
|||
class Formula
|
||||
def fails_with_llvm msg=nil, data=nil
|
||||
opoo "Calling fails_with_llvm in the install method is deprecated"
|
||||
puts "Use the fails_with DSL instead"
|
||||
end
|
||||
|
||||
def self.fails_with_llvm msg=nil, data={}
|
||||
data = msg if Hash === msg
|
||||
fails_with(:llvm) { build(data.delete(:build).to_i) }
|
||||
end
|
||||
end
|
|
@ -1,35 +0,0 @@
|
|||
module FormulaCompat
|
||||
def x11_installed?
|
||||
MacOS::X11.installed?
|
||||
end
|
||||
|
||||
def snow_leopard_64?
|
||||
MacOS.prefer_64_bit?
|
||||
end
|
||||
end
|
||||
|
||||
class Formula
|
||||
include FormulaCompat
|
||||
extend FormulaCompat
|
||||
|
||||
def std_cmake_parameters
|
||||
"-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev"
|
||||
end
|
||||
|
||||
def self.all
|
||||
opoo "Formula.all is deprecated, use Formula.map instead"
|
||||
map
|
||||
end
|
||||
|
||||
def self.canonical_name(name)
|
||||
Formulary.canonical_name(name)
|
||||
end
|
||||
|
||||
def self.class_s(name)
|
||||
Formulary.class_s(name)
|
||||
end
|
||||
|
||||
def self.factory(name)
|
||||
Formulary.factory(name)
|
||||
end
|
||||
end
|
|
@ -1,29 +0,0 @@
|
|||
class Hardware
|
||||
class << self
|
||||
def is_32_bit?
|
||||
not CPU.is_64_bit?
|
||||
end
|
||||
|
||||
def is_64_bit?
|
||||
CPU.is_64_bit?
|
||||
end
|
||||
|
||||
def bits
|
||||
Hardware::CPU.bits
|
||||
end
|
||||
|
||||
def cpu_type
|
||||
Hardware::CPU.type
|
||||
end
|
||||
|
||||
def cpu_family
|
||||
Hardware::CPU.family
|
||||
end
|
||||
alias_method :intel_family, :cpu_family
|
||||
alias_method :ppc_family, :cpu_family
|
||||
|
||||
def processor_count
|
||||
Hardware::CPU.cores
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,58 +0,0 @@
|
|||
module OS
|
||||
module Mac
|
||||
def xcode_folder
|
||||
Xcode.folder
|
||||
end
|
||||
|
||||
def xcode_prefix
|
||||
Xcode.prefix
|
||||
end
|
||||
|
||||
def xcode_installed?
|
||||
Xcode.installed?
|
||||
end
|
||||
|
||||
def xcode_version
|
||||
Xcode.version
|
||||
end
|
||||
|
||||
def clt_installed?
|
||||
CLT.installed?
|
||||
end
|
||||
|
||||
def clt_version?
|
||||
CLT.version
|
||||
end
|
||||
|
||||
def x11_installed?
|
||||
X11.installed?
|
||||
end
|
||||
|
||||
def x11_prefix
|
||||
X11.prefix
|
||||
end
|
||||
|
||||
def leopard?
|
||||
version == "10.5"
|
||||
end
|
||||
|
||||
def snow_leopard?
|
||||
version >= "10.6"
|
||||
end
|
||||
alias_method :snow_leopard_or_newer?, :snow_leopard?
|
||||
|
||||
def lion?
|
||||
version >= "10.7"
|
||||
end
|
||||
alias_method :lion_or_newer?, :lion?
|
||||
|
||||
def mountain_lion?
|
||||
version >= "10.8"
|
||||
end
|
||||
alias_method :mountain_lion_or_newer?, :mountain_lion?
|
||||
|
||||
def macports_or_fink_installed?
|
||||
!macports_or_fink.empty?
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,28 +0,0 @@
|
|||
class Formula
|
||||
def self.md5(val)
|
||||
stable.md5(val)
|
||||
end
|
||||
end
|
||||
|
||||
class SoftwareSpec
|
||||
def md5(val)
|
||||
@resource.md5(val)
|
||||
end
|
||||
end
|
||||
|
||||
class Resource
|
||||
def md5(val)
|
||||
@checksum = Checksum.new(:md5, val)
|
||||
end
|
||||
end
|
||||
|
||||
class Pathname
|
||||
def md5
|
||||
require 'digest/md5'
|
||||
opoo <<-EOS.undent
|
||||
MD5 support is deprecated and will be removed in a future version.
|
||||
Please switch this formula to #{Checksum::TYPES.map { |t| t.to_s.upcase } * ' or '}.
|
||||
EOS
|
||||
incremental_hash(Digest::MD5)
|
||||
end
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
class Version
|
||||
def slice *args
|
||||
opoo "Calling slice on versions is deprecated, use: to_s.slice"
|
||||
to_s.slice(*args)
|
||||
end
|
||||
end
|
|
@ -100,8 +100,6 @@ end
|
|||
|
||||
HOMEBREW_PULL_OR_COMMIT_URL_REGEX = %r[https://github\.com/([\w-]+)/homebrew(-[\w-]+)?/(?:pull/(\d+)|commit/[0-9a-fA-F]{4,40})]
|
||||
|
||||
require 'compat' unless ARGV.include? "--no-compat" or ENV['HOMEBREW_NO_COMPAT']
|
||||
|
||||
ORIGINAL_PATHS = ENV['PATH'].split(File::PATH_SEPARATOR).map{ |p| Pathname.new(p).expand_path rescue nil }.compact.freeze
|
||||
|
||||
SUDO_BAD_ERRMSG = <<-EOS.undent
|
||||
|
|
Loading…
Reference in New Issue