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