parent
5433203fb4
commit
744de30089
@ -6,3 +6,4 @@ require 'compat/macos'
|
||||
require 'compat/md5'
|
||||
require 'compat/requirements'
|
||||
require 'compat/version'
|
||||
require 'compat/download_strategy'
|
||||
|
||||
6
Library/Homebrew/compat/download_strategy.rb
Normal file
6
Library/Homebrew/compat/download_strategy.rb
Normal file
@ -0,0 +1,6 @@
|
||||
require "download_strategy"
|
||||
|
||||
CurlSSL3DownloadStrategy = CurlDownloadStrategy
|
||||
CurlUnsafeDownloadStrategy = CurlDownloadStrategy
|
||||
StrictSubversionDownloadStrategy = SubversionDownloadStrategy
|
||||
UnsafeSubversionDownloadStrategy = SubversionDownloadStrategy
|
||||
@ -43,4 +43,20 @@ class Formula
|
||||
def self.require_universal_deps
|
||||
define_method(:require_universal_deps?) { true }
|
||||
end
|
||||
|
||||
def self.path name
|
||||
Formulary.core_path(name)
|
||||
end
|
||||
|
||||
DATA = :DATA
|
||||
|
||||
def patches; {} end
|
||||
|
||||
def python(options={}, &block)
|
||||
opoo 'Formula#python is deprecated and will go away shortly.'
|
||||
block.call if block_given?
|
||||
PythonRequirement.new
|
||||
end
|
||||
alias_method :python2, :python
|
||||
alias_method :python3, :python
|
||||
end
|
||||
|
||||
@ -397,9 +397,6 @@ class CurlPostDownloadStrategy < CurlDownloadStrategy
|
||||
end
|
||||
end
|
||||
|
||||
# @deprecated
|
||||
CurlSSL3DownloadStrategy = CurlDownloadStrategy
|
||||
|
||||
# Use this strategy to download but not unzip a file.
|
||||
# Useful for installing jars.
|
||||
class NoUnzipCurlDownloadStrategy < CurlDownloadStrategy
|
||||
@ -408,9 +405,6 @@ class NoUnzipCurlDownloadStrategy < CurlDownloadStrategy
|
||||
end
|
||||
end
|
||||
|
||||
# @deprecated
|
||||
CurlUnsafeDownloadStrategy = CurlDownloadStrategy
|
||||
|
||||
# This strategy extracts our binary packages.
|
||||
class CurlBottleDownloadStrategy < CurlDownloadStrategy
|
||||
def stage
|
||||
@ -538,11 +532,6 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
|
||||
alias_method :update, :clone_repo
|
||||
end
|
||||
|
||||
# @deprecated
|
||||
StrictSubversionDownloadStrategy = SubversionDownloadStrategy
|
||||
# @deprecated
|
||||
UnsafeSubversionDownloadStrategy = SubversionDownloadStrategy
|
||||
|
||||
class GitDownloadStrategy < VCSDownloadStrategy
|
||||
SHALLOW_CLONE_WHITELIST = [
|
||||
%r{git://},
|
||||
|
||||
@ -261,7 +261,7 @@ class Formula
|
||||
(dir = installed_prefix).directory? && dir.children.length > 0
|
||||
end
|
||||
|
||||
# @deprecated
|
||||
# @private
|
||||
# The `LinkedKegs` directory for this {Formula}.
|
||||
# You probably want {#opt_prefix} instead.
|
||||
def linked_keg
|
||||
@ -494,12 +494,6 @@ class Formula
|
||||
# tell the user about any caveats regarding this package, return a string
|
||||
def caveats; nil end
|
||||
|
||||
# @deprecated
|
||||
DATA = :DATA
|
||||
|
||||
# @deprecated
|
||||
def patches; {} end
|
||||
|
||||
# rarely, you don't want your library symlinked into the main prefix
|
||||
# see gettext.rb for an example
|
||||
def keg_only?
|
||||
@ -627,15 +621,6 @@ class Formula
|
||||
]
|
||||
end
|
||||
|
||||
# @deprecated
|
||||
def python(options={}, &block)
|
||||
opoo 'Formula#python is deprecated and will go away shortly.'
|
||||
block.call if block_given?
|
||||
PythonRequirement.new
|
||||
end
|
||||
alias_method :python2, :python
|
||||
alias_method :python3, :python
|
||||
|
||||
# an array of all core {Formula} names
|
||||
def self.core_names
|
||||
@core_names ||= Dir["#{HOMEBREW_LIBRARY}/Formula/*.rb"].map{ |f| File.basename f, ".rb" }.sort
|
||||
@ -715,11 +700,6 @@ class Formula
|
||||
path == Formulary.core_path(name)
|
||||
end
|
||||
|
||||
# @deprecated
|
||||
def self.path name
|
||||
Formulary.core_path(name)
|
||||
end
|
||||
|
||||
def env
|
||||
self.class.env
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user