Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
This commit is contained in:
parent
94c0d833c3
commit
9fca172d03
@ -14,12 +14,13 @@ end
|
||||
|
||||
require "pathname"
|
||||
HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent
|
||||
|
||||
require "English"
|
||||
unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s)
|
||||
$LOAD_PATH.unshift(HOMEBREW_LIBRARY_PATH.to_s)
|
||||
end
|
||||
|
||||
require "global"
|
||||
require "tap"
|
||||
|
||||
if ARGV == %w[--version] || ARGV == %w[-v]
|
||||
puts "Homebrew #{HOMEBREW_VERSION}"
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "set"
|
||||
|
||||
class BuildEnvironment
|
||||
def initialize(*settings)
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
require "hardware"
|
||||
require "utils"
|
||||
|
||||
require "hbc/artifact"
|
||||
require "hbc/audit"
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "pathname"
|
||||
require "timeout"
|
||||
|
||||
require "hbc/artifact/abstract_artifact"
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
require "tmpdir"
|
||||
|
||||
require "hbc/container/base"
|
||||
|
||||
module Hbc
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "tmpdir"
|
||||
|
||||
require "hbc/container/base"
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "set"
|
||||
require "tempfile"
|
||||
|
||||
require "hbc/container/base"
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "tmpdir"
|
||||
|
||||
require "hbc/container/base"
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "tmpdir"
|
||||
|
||||
require "hbc/container/base"
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "tmpdir"
|
||||
|
||||
require "hbc/container/base"
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "tmpdir"
|
||||
|
||||
require "hbc/container/base"
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "tmpdir"
|
||||
|
||||
require "hbc/container/base"
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "tmpdir"
|
||||
|
||||
require "hbc/container/base"
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "tmpdir"
|
||||
|
||||
require "hbc/container/base"
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "set"
|
||||
require "locale"
|
||||
|
||||
require "hbc/artifact"
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "tap"
|
||||
|
||||
module Hbc
|
||||
module Locations
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "set"
|
||||
|
||||
require "os/mac/version"
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "forwardable"
|
||||
require "language/python"
|
||||
|
||||
class Caveats
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
#: * `--repository` <user>`/`<repo>:
|
||||
#: Display where tap <user>`/`<repo>'s directory is located.
|
||||
|
||||
require "tap"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#: deleted. If you want to delete those too: `rm -rf $(brew --cache)`
|
||||
|
||||
require "cleanup"
|
||||
require "utils"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
@ -71,7 +71,6 @@ require "missing_formula"
|
||||
require "diagnostic"
|
||||
require "cmd/search"
|
||||
require "formula_installer"
|
||||
require "tap"
|
||||
require "hardware"
|
||||
require "development_tools"
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
|
||||
require "formula"
|
||||
require "tab"
|
||||
require "set"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
@ -15,8 +15,6 @@
|
||||
|
||||
require "formula"
|
||||
require "missing_formula"
|
||||
require "utils"
|
||||
require "official_taps"
|
||||
require "descriptions"
|
||||
|
||||
module Homebrew
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
#:
|
||||
#: Exits with a non-zero status if any style violations are found.
|
||||
|
||||
require "utils"
|
||||
require "json"
|
||||
require "open3"
|
||||
|
||||
|
||||
@ -15,8 +15,6 @@
|
||||
#: See the docs for examples of using the JSON output:
|
||||
#: <https://docs.brew.sh/Querying-Brew>
|
||||
|
||||
require "tap"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
#: Pin <tap>, prioritizing its formulae over core when formula names are supplied
|
||||
#: by the user. See also `tap-unpin`.
|
||||
|
||||
require "tap"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
#: * `tap-unpin` <tap>:
|
||||
#: Unpin <tap> so its formulae are no longer prioritized. See also `tap-pin`.
|
||||
|
||||
require "tap"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
|
||||
@ -28,8 +28,6 @@
|
||||
#: * `tap` `--list-pinned`:
|
||||
#: List all pinned taps.
|
||||
|
||||
require "tap"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
#: * `untap` <tap>:
|
||||
#: Remove a tapped repository.
|
||||
|
||||
require "tap"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@ require "migrator"
|
||||
require "formulary"
|
||||
require "descriptions"
|
||||
require "cleanup"
|
||||
require "utils"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "utils"
|
||||
|
||||
module Gpg
|
||||
module_function
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "tap"
|
||||
|
||||
class Tap
|
||||
def core_formula_repository?
|
||||
|
||||
@ -2,8 +2,6 @@ unless ENV["HOMEBREW_BREW_FILE"]
|
||||
raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!"
|
||||
end
|
||||
|
||||
require "constants"
|
||||
|
||||
# Path to `bin/brew` main executable in HOMEBREW_PREFIX
|
||||
HOMEBREW_BREW_FILE = Pathname.new(ENV["HOMEBREW_BREW_FILE"])
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ require "dependency"
|
||||
require "dependencies"
|
||||
require "requirement"
|
||||
require "requirements"
|
||||
require "set"
|
||||
require "extend/cachable"
|
||||
|
||||
## A dependency is a formula that another formula needs to install.
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "set"
|
||||
require "formula"
|
||||
require "formula_versions"
|
||||
|
||||
|
||||
@ -39,11 +39,9 @@
|
||||
|
||||
require "formula"
|
||||
require "formula_versions"
|
||||
require "utils"
|
||||
require "utils/curl"
|
||||
require "extend/ENV"
|
||||
require "formula_cellar_checks"
|
||||
require "official_taps"
|
||||
require "cmd/search"
|
||||
require "cmd/style"
|
||||
require "date"
|
||||
|
||||
@ -37,7 +37,6 @@ require "formula_versions"
|
||||
require "cli_parser"
|
||||
require "utils/inreplace"
|
||||
require "erb"
|
||||
require "extend/pathname"
|
||||
|
||||
BOTTLE_ERB = <<-EOS.freeze
|
||||
bottle do
|
||||
|
||||
@ -50,12 +50,10 @@
|
||||
|
||||
require "net/http"
|
||||
require "net/https"
|
||||
require "utils"
|
||||
require "json"
|
||||
require "cli_parser"
|
||||
require "formula"
|
||||
require "formulary"
|
||||
require "tap"
|
||||
require "version"
|
||||
require "pkg_version"
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
#: * `tap-new` <user>`/`<repo>:
|
||||
#: Generate the template files for a new tap.
|
||||
|
||||
require "tap"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
|
||||
require "cli_parser"
|
||||
require "fileutils"
|
||||
require "tap"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
@ -22,6 +22,7 @@ class AbstractDownloadStrategy
|
||||
@url = resource.url
|
||||
@version = resource.version
|
||||
@meta = resource.specs
|
||||
@shutup = false
|
||||
extend Pourable if meta[:bottle]
|
||||
end
|
||||
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
require "formula"
|
||||
require "compilers"
|
||||
require "development_tools"
|
||||
require "PATH"
|
||||
|
||||
# Homebrew extends Ruby's `ENV` to make our code more readable.
|
||||
# Implemented in {SharedEnvExtension} and either {Superenv} or
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
require "fileutils"
|
||||
require "tmpdir"
|
||||
require "etc"
|
||||
|
||||
# Homebrew extends Ruby's `FileUtils` to make our code more readable.
|
||||
|
||||
@ -6,7 +6,9 @@ class Module
|
||||
attrs.each do |attr|
|
||||
module_eval <<-EOS, file, line
|
||||
def #{attr}(val=nil)
|
||||
val.nil? ? @#{attr} : @#{attr} = val
|
||||
@#{attr} ||= nil
|
||||
return @#{attr} if val.nil?
|
||||
@#{attr} = val
|
||||
end
|
||||
EOS
|
||||
end
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
require "optparse"
|
||||
require "pathname"
|
||||
|
||||
OptionParser.accept Pathname do |path|
|
||||
Pathname(path).expand_path if path
|
||||
|
||||
@ -1,2 +1 @@
|
||||
require "utils/bottles"
|
||||
require "extend/os/mac/utils/bottles" if OS.mac?
|
||||
|
||||
@ -1,2 +1 @@
|
||||
require "dependency_collector"
|
||||
require "extend/os/mac/dependency_collector" if OS.mac?
|
||||
|
||||
@ -1,2 +1 @@
|
||||
require "development_tools"
|
||||
require "extend/os/mac/development_tools" if OS.mac?
|
||||
|
||||
@ -1,2 +1 @@
|
||||
require "diagnostic"
|
||||
require "extend/os/mac/diagnostic" if OS.mac?
|
||||
|
||||
@ -1,3 +1 @@
|
||||
require "os"
|
||||
require "emoji"
|
||||
require "extend/os/mac/emoji" if OS.mac?
|
||||
|
||||
@ -1,2 +1 @@
|
||||
require "extend/ENV/shared"
|
||||
require "extend/os/mac/extend/ENV/shared" if OS.mac?
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "extend/ENV/std"
|
||||
if OS.mac?
|
||||
require "extend/os/mac/extend/ENV/std"
|
||||
elsif OS.linux?
|
||||
|
||||
@ -1,2 +1 @@
|
||||
require "extend/ENV/super"
|
||||
require "extend/os/mac/extend/ENV/super" if OS.mac?
|
||||
|
||||
@ -1,2 +1 @@
|
||||
require "formula_cellar_checks"
|
||||
require "extend/os/mac/formula_cellar_checks" if OS.mac?
|
||||
|
||||
@ -1,2 +1 @@
|
||||
require "keg_relocate"
|
||||
require "extend/os/mac/keg_relocate" if OS.mac?
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
class Caveats
|
||||
undef plist_caveats
|
||||
|
||||
def plist_caveats
|
||||
s = []
|
||||
if f.plist || (keg&.plist_installed?)
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
class Cleaner
|
||||
private
|
||||
|
||||
undef executable_path?
|
||||
|
||||
def executable_path?(path)
|
||||
path.mach_o_executable? || path.text_executable?
|
||||
end
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
require "os/mac/ld64_dependency"
|
||||
|
||||
class DependencyCollector
|
||||
undef git_dep_if_needed, subversion_dep_if_needed, cvs_dep_if_needed,
|
||||
xz_dep_if_needed, unzip_dep_if_needed, bzip2_dep_if_needed,
|
||||
ld64_dep_if_needed
|
||||
|
||||
def git_dep_if_needed(tags)
|
||||
return if MacOS.version >= :lion
|
||||
Dependency.new("git", tags)
|
||||
@ -18,7 +22,7 @@ class DependencyCollector
|
||||
Dependency.new("xz", tags)
|
||||
end
|
||||
|
||||
def zip_dep_if_needed(tags); end
|
||||
def unzip_dep_if_needed(tags); end
|
||||
|
||||
def bzip2_dep_if_needed(tags); end
|
||||
|
||||
|
||||
@ -3,10 +3,13 @@ require "os/mac/xcode"
|
||||
# @private
|
||||
class DevelopmentTools
|
||||
class << self
|
||||
alias original_locate locate
|
||||
alias generic_locate locate
|
||||
undef installed?, default_compiler, curl_handles_most_https_certificates?,
|
||||
subversion_handles_most_https_certificates?
|
||||
|
||||
def locate(tool)
|
||||
(@locate ||= {}).fetch(tool) do |key|
|
||||
@locate[key] = if (located_tool = original_locate(tool))
|
||||
@locate[key] = if (located_tool = generic_locate(tool))
|
||||
located_tool
|
||||
elsif MacOS.version > :tiger
|
||||
path = Utils.popen_read("/usr/bin/xcrun", "-no-cache", "-find", tool, err: :close).chomp
|
||||
@ -22,6 +25,35 @@ class DevelopmentTools
|
||||
MacOS::Xcode.installed? || MacOS::CLT.installed?
|
||||
end
|
||||
|
||||
def default_compiler
|
||||
case default_cc
|
||||
# if GCC 4.2 is installed, e.g. via Tigerbrew, prefer it
|
||||
# over the system's GCC 4.0
|
||||
when /^gcc-4\.0/ then gcc_4_2_build_version ? :gcc_4_2 : :gcc_4_0
|
||||
when /^gcc/ then :gcc_4_2
|
||||
when "clang" then :clang
|
||||
else
|
||||
# guess :(
|
||||
if MacOS::Xcode.version >= "4.3"
|
||||
:clang
|
||||
else
|
||||
:gcc_4_2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def curl_handles_most_https_certificates?
|
||||
# The system Curl is too old for some modern HTTPS certificates on
|
||||
# older macOS versions.
|
||||
ENV["HOMEBREW_SYSTEM_CURL_TOO_OLD"].nil?
|
||||
end
|
||||
|
||||
def subversion_handles_most_https_certificates?
|
||||
# The system Subversion is too old for some HTTPS certificates on
|
||||
# older macOS versions.
|
||||
MacOS.version >= :sierra
|
||||
end
|
||||
|
||||
def installation_instructions
|
||||
if MacOS.version >= "10.9"
|
||||
<<~EOS
|
||||
@ -64,34 +96,5 @@ class DevelopmentTools
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
def default_compiler
|
||||
case default_cc
|
||||
# if GCC 4.2 is installed, e.g. via Tigerbrew, prefer it
|
||||
# over the system's GCC 4.0
|
||||
when /^gcc-4\.0/ then gcc_4_2_build_version ? :gcc_4_2 : :gcc_4_0
|
||||
when /^gcc/ then :gcc_4_2
|
||||
when "clang" then :clang
|
||||
else
|
||||
# guess :(
|
||||
if MacOS::Xcode.version >= "4.3"
|
||||
:clang
|
||||
else
|
||||
:gcc_4_2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def curl_handles_most_https_certificates?
|
||||
# The system Curl is too old for some modern HTTPS certificates on
|
||||
# older macOS versions.
|
||||
ENV["HOMEBREW_SYSTEM_CURL_TOO_OLD"].nil?
|
||||
end
|
||||
|
||||
def subversion_handles_most_https_certificates?
|
||||
# The system Subversion is too old for some HTTPS certificates on
|
||||
# older macOS versions.
|
||||
MacOS.version >= :sierra
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
module Homebrew
|
||||
module Diagnostic
|
||||
class Checks
|
||||
undef development_tools_checks, fatal_development_tools_checks,
|
||||
build_error_checks
|
||||
|
||||
def development_tools_checks
|
||||
%w[
|
||||
check_for_unsupported_macos
|
||||
|
||||
@ -1,5 +1,39 @@
|
||||
module Stdenv
|
||||
# @private
|
||||
|
||||
undef homebrew_extra_pkg_config_paths, x11
|
||||
|
||||
def homebrew_extra_pkg_config_paths
|
||||
["#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}"]
|
||||
end
|
||||
|
||||
def x11
|
||||
# There are some config scripts here that should go in the PATH
|
||||
append_path "PATH", MacOS::X11.bin.to_s
|
||||
|
||||
# Append these to PKG_CONFIG_LIBDIR so they are searched
|
||||
# *after* our own pkgconfig directories, as we dupe some of the
|
||||
# libs in XQuartz.
|
||||
append_path "PKG_CONFIG_LIBDIR", "#{MacOS::X11.lib}/pkgconfig"
|
||||
append_path "PKG_CONFIG_LIBDIR", "#{MacOS::X11.share}/pkgconfig"
|
||||
|
||||
append "LDFLAGS", "-L#{MacOS::X11.lib}"
|
||||
append_path "CMAKE_PREFIX_PATH", MacOS::X11.prefix.to_s
|
||||
append_path "CMAKE_INCLUDE_PATH", MacOS::X11.include.to_s
|
||||
append_path "CMAKE_INCLUDE_PATH", "#{MacOS::X11.include}/freetype2"
|
||||
|
||||
append "CPPFLAGS", "-I#{MacOS::X11.include}"
|
||||
append "CPPFLAGS", "-I#{MacOS::X11.include}/freetype2"
|
||||
|
||||
append_path "ACLOCAL_PATH", "#{MacOS::X11.share}/aclocal"
|
||||
|
||||
if MacOS::XQuartz.provided_by_apple? && !MacOS::CLT.installed?
|
||||
append_path "CMAKE_PREFIX_PATH", "#{MacOS.sdk_path}/usr/X11"
|
||||
end
|
||||
|
||||
append "CFLAGS", "-I#{MacOS::X11.include}" unless MacOS::CLT.installed?
|
||||
end
|
||||
|
||||
def setup_build_environment(formula = nil)
|
||||
generic_setup_build_environment formula
|
||||
|
||||
@ -29,10 +63,6 @@ module Stdenv
|
||||
ld64 if Formula["ld64"].installed?
|
||||
end
|
||||
|
||||
def homebrew_extra_pkg_config_paths
|
||||
["#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}"]
|
||||
end
|
||||
|
||||
# Sets architecture-specific flags for every environment variable
|
||||
# given in the list `flags`.
|
||||
# @private
|
||||
@ -110,33 +140,6 @@ module Stdenv
|
||||
end
|
||||
end
|
||||
|
||||
def x11
|
||||
# There are some config scripts here that should go in the PATH
|
||||
append_path "PATH", MacOS::X11.bin.to_s
|
||||
|
||||
# Append these to PKG_CONFIG_LIBDIR so they are searched
|
||||
# *after* our own pkgconfig directories, as we dupe some of the
|
||||
# libs in XQuartz.
|
||||
append_path "PKG_CONFIG_LIBDIR", "#{MacOS::X11.lib}/pkgconfig"
|
||||
append_path "PKG_CONFIG_LIBDIR", "#{MacOS::X11.share}/pkgconfig"
|
||||
|
||||
append "LDFLAGS", "-L#{MacOS::X11.lib}"
|
||||
append_path "CMAKE_PREFIX_PATH", MacOS::X11.prefix.to_s
|
||||
append_path "CMAKE_INCLUDE_PATH", MacOS::X11.include.to_s
|
||||
append_path "CMAKE_INCLUDE_PATH", "#{MacOS::X11.include}/freetype2"
|
||||
|
||||
append "CPPFLAGS", "-I#{MacOS::X11.include}"
|
||||
append "CPPFLAGS", "-I#{MacOS::X11.include}/freetype2"
|
||||
|
||||
append_path "ACLOCAL_PATH", "#{MacOS::X11.share}/aclocal"
|
||||
|
||||
if MacOS::XQuartz.provided_by_apple? && !MacOS::CLT.installed?
|
||||
append_path "CMAKE_PREFIX_PATH", "#{MacOS.sdk_path}/usr/X11"
|
||||
end
|
||||
|
||||
append "CFLAGS", "-I#{MacOS::X11.include}" unless MacOS::CLT.installed?
|
||||
end
|
||||
|
||||
def no_weak_imports
|
||||
append "LDFLAGS", "-Wl,-no_weak_imports" if no_weak_imports_support?
|
||||
end
|
||||
|
||||
@ -1,16 +1,24 @@
|
||||
module Superenv
|
||||
class << self
|
||||
undef bin
|
||||
|
||||
# @private
|
||||
def bin
|
||||
return unless DevelopmentTools.installed?
|
||||
|
||||
(HOMEBREW_SHIMS_PATH/"super").realpath
|
||||
end
|
||||
end
|
||||
|
||||
alias x11? x11
|
||||
|
||||
# @private
|
||||
def self.bin
|
||||
return unless DevelopmentTools.installed?
|
||||
|
||||
(HOMEBREW_SHIMS_PATH/"super").realpath
|
||||
end
|
||||
|
||||
def effective_sysroot
|
||||
MacOS.sdk_path.to_s if MacOS::Xcode.without_clt?
|
||||
end
|
||||
undef homebrew_extra_paths,
|
||||
homebrew_extra_pkg_config_paths, homebrew_extra_aclocal_paths,
|
||||
homebrew_extra_isystem_paths, homebrew_extra_library_paths,
|
||||
homebrew_extra_cmake_include_paths,
|
||||
homebrew_extra_cmake_library_paths,
|
||||
homebrew_extra_cmake_frameworks_paths,
|
||||
determine_cccfg, set_x11_env_if_installed
|
||||
|
||||
def homebrew_extra_paths
|
||||
paths = []
|
||||
@ -86,6 +94,14 @@ module Superenv
|
||||
s
|
||||
end
|
||||
|
||||
def effective_sysroot
|
||||
MacOS.sdk_path.to_s if MacOS::Xcode.without_clt?
|
||||
end
|
||||
|
||||
def set_x11_env_if_installed
|
||||
ENV.x11 = MacOS::X11.installed?
|
||||
end
|
||||
|
||||
# @private
|
||||
def setup_build_environment(formula = nil)
|
||||
generic_setup_build_environment(formula)
|
||||
@ -115,10 +131,6 @@ module Superenv
|
||||
self["HOMEBREW_PREFER_CLT_PROXIES"] = "1" if MacOS.version >= "10.9"
|
||||
end
|
||||
|
||||
def set_x11_env_if_installed
|
||||
ENV.x11 = MacOS::X11.installed?
|
||||
end
|
||||
|
||||
def no_weak_imports
|
||||
append "HOMEBREW_CCCFG", "w" if no_weak_imports_support?
|
||||
end
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
module Hardware
|
||||
class CPU
|
||||
class << self
|
||||
undef optimization_flags, type, family, universal_archs, can_run?,
|
||||
features, sse4?
|
||||
|
||||
PPC_OPTIMIZATION_FLAGS = {
|
||||
g3: "-mcpu=750",
|
||||
g4: "-mcpu=7400",
|
||||
@ -8,6 +11,7 @@ module Hardware
|
||||
g5: "-mcpu=970",
|
||||
g5_64: "-mcpu=970 -arch ppc64",
|
||||
}.freeze
|
||||
|
||||
def optimization_flags
|
||||
OPTIMIZATION_FLAGS.merge(PPC_OPTIMIZATION_FLAGS)
|
||||
end
|
||||
@ -71,10 +75,6 @@ module Hardware
|
||||
end
|
||||
end
|
||||
|
||||
def extmodel
|
||||
sysctl_int("machdep.cpu.extmodel")
|
||||
end
|
||||
|
||||
# Returns an array that's been extended with ArchitectureListExtension,
|
||||
# which provides helpers like #as_arch_flags and #as_cmake_arch_flags.
|
||||
def universal_archs
|
||||
@ -113,6 +113,14 @@ module Hardware
|
||||
).split(" ").map { |s| s.downcase.to_sym }
|
||||
end
|
||||
|
||||
def sse4?
|
||||
sysctl_bool("hw.optional.sse4_1")
|
||||
end
|
||||
|
||||
def extmodel
|
||||
sysctl_int("machdep.cpu.extmodel")
|
||||
end
|
||||
|
||||
def aes?
|
||||
sysctl_bool("hw.optional.aes")
|
||||
end
|
||||
@ -137,10 +145,6 @@ module Hardware
|
||||
sysctl_bool("hw.optional.supplementalsse3")
|
||||
end
|
||||
|
||||
def sse4?
|
||||
sysctl_bool("hw.optional.sse4_1")
|
||||
end
|
||||
|
||||
def sse4_2?
|
||||
sysctl_bool("hw.optional.sse4_2")
|
||||
end
|
||||
|
||||
@ -1,24 +1,20 @@
|
||||
class Keg
|
||||
def fix_dynamic_linkage
|
||||
mach_o_files.each do |file|
|
||||
file.ensure_writable do
|
||||
change_dylib_id(dylib_id_for(file), file) if file.dylib?
|
||||
class << self
|
||||
undef file_linked_libraries
|
||||
|
||||
each_install_name_for(file) do |bad_name|
|
||||
# Don't fix absolute paths unless they are rooted in the build directory
|
||||
next if bad_name.start_with?("/") &&
|
||||
!bad_name.start_with?(HOMEBREW_TEMP.to_s) &&
|
||||
!bad_name.start_with?(HOMEBREW_TEMP.realpath.to_s)
|
||||
|
||||
new_name = fixed_name(file, bad_name)
|
||||
change_install_name(bad_name, new_name, file) unless new_name == bad_name
|
||||
end
|
||||
def file_linked_libraries(file, string)
|
||||
# Check dynamic library linkage. Importantly, do not perform for static
|
||||
# libraries, which will falsely report "linkage" to themselves.
|
||||
if file.mach_o_executable? || file.dylib? || file.mach_o_bundle?
|
||||
file.dynamically_linked_libraries.select { |lib| lib.include? string }
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
|
||||
generic_fix_dynamic_linkage
|
||||
end
|
||||
|
||||
undef relocate_dynamic_linkage, detect_cxx_stdlibs
|
||||
|
||||
def relocate_dynamic_linkage(relocation)
|
||||
mach_o_files.each do |file|
|
||||
file.ensure_writable do
|
||||
@ -58,6 +54,26 @@ class Keg
|
||||
results.to_a
|
||||
end
|
||||
|
||||
def fix_dynamic_linkage
|
||||
mach_o_files.each do |file|
|
||||
file.ensure_writable do
|
||||
change_dylib_id(dylib_id_for(file), file) if file.dylib?
|
||||
|
||||
each_install_name_for(file) do |bad_name|
|
||||
# Don't fix absolute paths unless they are rooted in the build directory
|
||||
next if bad_name.start_with?("/") &&
|
||||
!bad_name.start_with?(HOMEBREW_TEMP.to_s) &&
|
||||
!bad_name.start_with?(HOMEBREW_TEMP.realpath.to_s)
|
||||
|
||||
new_name = fixed_name(file, bad_name)
|
||||
change_install_name(bad_name, new_name, file) unless new_name == bad_name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
generic_fix_dynamic_linkage
|
||||
end
|
||||
|
||||
# If file is a dylib or bundle itself, look for the dylib named by
|
||||
# bad_name relative to the lib directory, so that we can skip the more
|
||||
# expensive recursive search if possible.
|
||||
@ -130,14 +146,4 @@ class Keg
|
||||
# it's wrong. -O is a BSD-grep-only option.
|
||||
"-lrO"
|
||||
end
|
||||
|
||||
def self.file_linked_libraries(file, string)
|
||||
# Check dynamic library linkage. Importantly, do not perform for static
|
||||
# libraries, which will falsely report "linkage" to themselves.
|
||||
if file.mach_o_executable? || file.dylib? || file.mach_o_bundle?
|
||||
file.dynamically_linked_libraries.select { |lib| lib.include? string }
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -20,6 +20,8 @@ class JavaRequirement < Requirement
|
||||
|
||||
private
|
||||
|
||||
undef possible_javas, oracle_java_os
|
||||
|
||||
JAVA_CASK_MAP = {
|
||||
"1.8" => "caskroom/versions/java8",
|
||||
"10.0" => "java",
|
||||
@ -35,6 +37,10 @@ class JavaRequirement < Requirement
|
||||
javas
|
||||
end
|
||||
|
||||
def oracle_java_os
|
||||
:darwin
|
||||
end
|
||||
|
||||
def java_home_cmd
|
||||
return nil unless File.executable?("/usr/libexec/java_home")
|
||||
args = %w[--failfast]
|
||||
@ -47,8 +53,4 @@ class JavaRequirement < Requirement
|
||||
def env_apple
|
||||
ENV.append_to_cflags "-I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/"
|
||||
end
|
||||
|
||||
def oracle_java_os
|
||||
:darwin
|
||||
end
|
||||
end
|
||||
|
||||
@ -4,15 +4,17 @@ class X11Requirement < Requirement
|
||||
cask "xquartz"
|
||||
download "https://xquartz.macosforge.org"
|
||||
|
||||
def min_version
|
||||
MacOS::XQuartz.minimum_version
|
||||
end
|
||||
|
||||
satisfy build_env: false do
|
||||
next false unless MacOS::XQuartz.installed?
|
||||
min_version <= MacOS::XQuartz.version
|
||||
end
|
||||
|
||||
undef min_version, message
|
||||
|
||||
def min_version
|
||||
MacOS::XQuartz.minimum_version
|
||||
end
|
||||
|
||||
def message
|
||||
"XQuartz #{min_version} (or newer) is required to install this formula. #{super}"
|
||||
end
|
||||
|
||||
@ -1,24 +1,6 @@
|
||||
class SystemConfig
|
||||
class << self
|
||||
def xcode
|
||||
@xcode ||= if MacOS::Xcode.installed?
|
||||
xcode = MacOS::Xcode.version.to_s
|
||||
xcode += " => #{MacOS::Xcode.prefix}" unless MacOS::Xcode.default_prefix?
|
||||
xcode
|
||||
end
|
||||
end
|
||||
|
||||
def clt
|
||||
@clt ||= if MacOS::CLT.installed? && MacOS::Xcode.version >= "4.3"
|
||||
MacOS::CLT.version
|
||||
end
|
||||
end
|
||||
|
||||
def xquartz
|
||||
@xquartz ||= if MacOS::XQuartz.installed?
|
||||
"#{MacOS::XQuartz.version} => #{describe_path(MacOS::XQuartz.prefix)}"
|
||||
end
|
||||
end
|
||||
undef describe_java, describe_homebrew_ruby
|
||||
|
||||
def describe_java
|
||||
# java_home doesn't exist on all macOSs; it might be missing on older versions.
|
||||
@ -43,6 +25,26 @@ class SystemConfig
|
||||
end
|
||||
end
|
||||
|
||||
def xcode
|
||||
@xcode ||= if MacOS::Xcode.installed?
|
||||
xcode = MacOS::Xcode.version.to_s
|
||||
xcode += " => #{MacOS::Xcode.prefix}" unless MacOS::Xcode.default_prefix?
|
||||
xcode
|
||||
end
|
||||
end
|
||||
|
||||
def clt
|
||||
@clt ||= if MacOS::CLT.installed? && MacOS::Xcode.version >= "4.3"
|
||||
MacOS::CLT.version
|
||||
end
|
||||
end
|
||||
|
||||
def xquartz
|
||||
@xquartz ||= if MacOS::XQuartz.installed?
|
||||
"#{MacOS::XQuartz.version} => #{describe_path(MacOS::XQuartz.prefix)}"
|
||||
end
|
||||
end
|
||||
|
||||
def dump_verbose_config(f = $stdout)
|
||||
dump_generic_verbose_config(f)
|
||||
f.puts "macOS: #{MacOS.full_version}-#{kernel}"
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
module Utils
|
||||
class Bottles
|
||||
class << self
|
||||
undef tag
|
||||
|
||||
def tag
|
||||
if MacOS.version >= :lion
|
||||
MacOS.cat
|
||||
@ -21,9 +23,10 @@ module Utils
|
||||
class Collector
|
||||
private
|
||||
|
||||
alias original_find_matching_tag find_matching_tag
|
||||
alias generic_find_matching_tag find_matching_tag
|
||||
|
||||
def find_matching_tag(tag)
|
||||
original_find_matching_tag(tag) || find_altivec_tag(tag) || find_or_later_tag(tag)
|
||||
generic_find_matching_tag(tag) || find_altivec_tag(tag) || find_or_later_tag(tag)
|
||||
end
|
||||
|
||||
# This allows generic Altivec PPC bottles to be supported in some
|
||||
|
||||
@ -1,2 +1 @@
|
||||
require "missing_formula"
|
||||
require "extend/os/mac/missing_formula" if OS.mac?
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
require "requirements/java_requirement"
|
||||
|
||||
if OS.mac?
|
||||
require "extend/os/mac/requirements/java_requirement"
|
||||
elsif OS.linux?
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
require "requirements/osxfuse_requirement"
|
||||
|
||||
if OS.mac?
|
||||
require "extend/os/mac/requirements/osxfuse_requirement"
|
||||
elsif OS.linux?
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
require "system_config"
|
||||
|
||||
if OS.mac?
|
||||
require "extend/os/mac/system_config"
|
||||
elsif OS.linux?
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
require "pathname"
|
||||
require "resource"
|
||||
require "metafiles"
|
||||
require "utils"
|
||||
|
||||
module DiskUsageExtension
|
||||
def disk_usage
|
||||
|
||||
@ -10,7 +10,6 @@ require "formulary"
|
||||
require "software_spec"
|
||||
require "install_renamed"
|
||||
require "pkg_version"
|
||||
require "tap"
|
||||
require "keg"
|
||||
require "migrator"
|
||||
require "extend/ENV"
|
||||
@ -173,7 +172,9 @@ class Formula
|
||||
@name = name
|
||||
@path = path
|
||||
@alias_path = alias_path
|
||||
@alias_name = File.basename(alias_path) if alias_path
|
||||
@alias_name = if alias_path
|
||||
File.basename(alias_path)
|
||||
end
|
||||
@revision = self.class.revision || 0
|
||||
@version_scheme = self.class.version_scheme || 0
|
||||
|
||||
@ -203,6 +204,7 @@ class Formula
|
||||
@pin = FormulaPin.new(self)
|
||||
@follow_installed_alias = true
|
||||
@prefix_returns_versioned_prefix = false
|
||||
@oldname_lock = nil
|
||||
end
|
||||
|
||||
# @private
|
||||
|
||||
@ -154,6 +154,8 @@ module FormulaCellarChecks
|
||||
end
|
||||
|
||||
def audit_installed
|
||||
@new_formula ||= false
|
||||
|
||||
problem_if_output(check_manpages)
|
||||
problem_if_output(check_infopages)
|
||||
problem_if_output(check_jars)
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
require "cxxstdlib"
|
||||
require "exceptions"
|
||||
require "formula"
|
||||
require "keg"
|
||||
require "tab"
|
||||
@ -59,7 +58,8 @@ class FormulaInstaller
|
||||
@invalid_option_names = []
|
||||
@requirement_messages = []
|
||||
@poured_bottle = false
|
||||
@pour_failed = false
|
||||
@pour_failed = false
|
||||
@start_time = nil
|
||||
end
|
||||
|
||||
def self.attempted
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
require "digest/md5"
|
||||
require "tap"
|
||||
require "extend/cachable"
|
||||
|
||||
# The Formulary is responsible for creating instances of Formula.
|
||||
|
||||
@ -1,21 +1,9 @@
|
||||
require "forwardable"
|
||||
require "extend/module"
|
||||
require "extend/predicable"
|
||||
require "extend/fileutils"
|
||||
require "extend/pathname"
|
||||
require "extend/git_repository"
|
||||
require "extend/ARGV"
|
||||
require "PATH"
|
||||
require "extend/string"
|
||||
require "os"
|
||||
require "utils"
|
||||
require "exceptions"
|
||||
require "set"
|
||||
require "rbconfig"
|
||||
require "official_taps"
|
||||
require "pp"
|
||||
require "pathname"
|
||||
require "English"
|
||||
|
||||
require "pp"
|
||||
require "extend/ARGV"
|
||||
|
||||
ARGV.extend(HomebrewArgvExtension)
|
||||
|
||||
HOMEBREW_PRODUCT = ENV["HOMEBREW_PRODUCT"]
|
||||
@ -23,9 +11,12 @@ HOMEBREW_VERSION = ENV["HOMEBREW_VERSION"]
|
||||
HOMEBREW_WWW = "https://brew.sh".freeze
|
||||
|
||||
require "config"
|
||||
require "extend/git_repository"
|
||||
|
||||
HOMEBREW_REPOSITORY.extend(GitRepositoryExtension)
|
||||
|
||||
require "rbconfig"
|
||||
|
||||
RUBY_PATH = Pathname.new(RbConfig.ruby)
|
||||
RUBY_BIN = RUBY_PATH.dirname
|
||||
|
||||
@ -33,7 +24,7 @@ HOMEBREW_USER_AGENT_CURL = ENV["HOMEBREW_USER_AGENT_CURL"]
|
||||
HOMEBREW_USER_AGENT_RUBY = "#{ENV["HOMEBREW_USER_AGENT"]} ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}".freeze
|
||||
HOMEBREW_USER_AGENT_FAKE_SAFARI = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8".freeze
|
||||
|
||||
require "tap_constants"
|
||||
require "extend/fileutils"
|
||||
|
||||
module Homebrew
|
||||
extend FileUtils
|
||||
@ -42,6 +33,7 @@ module Homebrew
|
||||
attr_writer :failed
|
||||
|
||||
def failed?
|
||||
@failed ||= false
|
||||
@failed == true
|
||||
end
|
||||
|
||||
@ -60,7 +52,8 @@ end
|
||||
HOMEBREW_PULL_API_REGEX = %r{https://api\.github\.com/repos/([\w-]+)/([\w-]+)?/pulls/(\d+)}
|
||||
HOMEBREW_PULL_OR_COMMIT_URL_REGEX = %r[https://github\.com/([\w-]+)/([\w-]+)?/(?:pull/(\d+)|commit/[0-9a-fA-F]{4,40})]
|
||||
|
||||
require "compat" unless ARGV.include?("--no-compat") || ENV["HOMEBREW_NO_COMPAT"]
|
||||
require "forwardable"
|
||||
require "PATH"
|
||||
|
||||
ENV["HOMEBREW_PATH"] ||= ENV["PATH"]
|
||||
ORIGINAL_PATHS = PATH.new(ENV["HOMEBREW_PATH"]).map do |p|
|
||||
@ -88,3 +81,24 @@ HOMEBREW_INTERNAL_COMMAND_ALIASES = {
|
||||
"environment" => "--env",
|
||||
"--config" => "config",
|
||||
}.freeze
|
||||
|
||||
require "set"
|
||||
|
||||
require "os"
|
||||
require "extend/pathname"
|
||||
|
||||
require "extend/module"
|
||||
require "extend/predicable"
|
||||
require "extend/string"
|
||||
|
||||
require "constants"
|
||||
require "exceptions"
|
||||
require "utils"
|
||||
|
||||
require "official_taps"
|
||||
require "tap"
|
||||
require "tap_constants"
|
||||
|
||||
if !ARGV.include?("--no-compat") && !ENV["HOMEBREW_NO_COMPAT"]
|
||||
require "compat"
|
||||
end
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
require "os"
|
||||
|
||||
module Hardware
|
||||
class CPU
|
||||
INTEL_32BIT_ARCHS = [:i386].freeze
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "extend/pathname"
|
||||
require "keg_relocate"
|
||||
require "lock_file"
|
||||
require "ostruct"
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "utils"
|
||||
require "language/python_virtualenv_constants"
|
||||
|
||||
module Language
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "set"
|
||||
require "keg"
|
||||
require "formula"
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "set"
|
||||
|
||||
module Metafiles
|
||||
# https://github.com/github/markup#markups
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "formula"
|
||||
require "lock_file"
|
||||
require "keg"
|
||||
require "tab"
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
require "formulary"
|
||||
require "tap"
|
||||
require "utils"
|
||||
|
||||
module Homebrew
|
||||
module MissingFormula
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "set"
|
||||
|
||||
class Option
|
||||
attr_reader :name, :description, :flag
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
require "rbconfig"
|
||||
|
||||
module OS
|
||||
def self.mac?
|
||||
return false if ENV["HOMEBREW_TEST_GENERIC_OS"]
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
require "hardware"
|
||||
require "development_tools"
|
||||
require "os/mac/version"
|
||||
require "os/mac/xcode"
|
||||
require "os/mac/xquartz"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
require "extend/os/hardware"
|
||||
require "hardware"
|
||||
|
||||
module ArchitectureListExtension
|
||||
# @private
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
require "formula"
|
||||
require "tap"
|
||||
|
||||
module Readall
|
||||
class << self
|
||||
|
||||
@ -42,6 +42,7 @@ class SoftwareSpec
|
||||
@deprecated_options = []
|
||||
@build = BuildOptions.new(Options.create(@flags), options)
|
||||
@compiler_failures = []
|
||||
@bottle_disable_reason = nil
|
||||
end
|
||||
|
||||
def owner=(owner)
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
require "hardware"
|
||||
require "software_spec"
|
||||
require "rexml/document"
|
||||
require "tap"
|
||||
require "development_tools"
|
||||
|
||||
class SystemConfig
|
||||
@ -116,6 +115,7 @@ class SystemConfig
|
||||
HOMEBREW_REPOSITORY: "/usr/local/Homebrew",
|
||||
HOMEBREW_CELLAR: "/usr/local/Cellar",
|
||||
HOMEBREW_CACHE: "#{ENV["HOME"]}/Library/Caches/Homebrew",
|
||||
HOMEBREW_RUBY_WARNINGS: "-W0",
|
||||
}.freeze
|
||||
boring_keys = %w[
|
||||
HOMEBREW_BROWSER
|
||||
@ -131,7 +131,6 @@ class SystemConfig
|
||||
HOMEBREW_LIBRARY
|
||||
HOMEBREW_MACOS_VERSION
|
||||
HOMEBREW_RUBY_PATH
|
||||
HOMEBREW_RUBY_WARNINGS
|
||||
HOMEBREW_SYSTEM
|
||||
HOMEBREW_OS_VERSION
|
||||
HOMEBREW_PATH
|
||||
@ -151,6 +150,9 @@ class SystemConfig
|
||||
if defaults_hash[:HOMEBREW_CACHE] != HOMEBREW_CACHE.to_s
|
||||
f.puts "HOMEBREW_CACHE: #{HOMEBREW_CACHE}"
|
||||
end
|
||||
if defaults_hash[:HOMEBREW_RUBY_WARNINGS] != ENV["HOMEBREW_RUBY_WARNINGS"].to_s
|
||||
f.puts "HOMEBREW_RUBY_WARNINGS: #{ENV["HOMEBREW_RUBY_WARNINGS"]}"
|
||||
end
|
||||
unless ENV["HOMEBREW_ENV"]
|
||||
ENV.sort.each do |key, value|
|
||||
next unless key.start_with?("HOMEBREW_")
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "extend/string"
|
||||
require "extend/cachable"
|
||||
require "readall"
|
||||
|
||||
@ -78,6 +77,8 @@ class Tap
|
||||
@full_name = "#{@user}/homebrew-#{@repo}"
|
||||
@path = TAP_DIRECTORY/@full_name.downcase
|
||||
@path.extend(GitRepositoryExtension)
|
||||
@alias_table = nil
|
||||
@alias_reverse_table = nil
|
||||
end
|
||||
|
||||
# clear internal cache
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
require "test/support/fixtures/testball"
|
||||
require "cleanup"
|
||||
require "fileutils"
|
||||
require "pathname"
|
||||
|
||||
describe Homebrew::Cleanup do
|
||||
let(:ds_store) { Pathname.new("#{HOMEBREW_PREFIX}/Library/.DS_Store") }
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
describe "brew search", :integration_test do
|
||||
before do
|
||||
setup_test_formula "testball"
|
||||
setup_remote_tap "caskroom/cask"
|
||||
end
|
||||
|
||||
it "lists all available Formulae when no argument is given" do
|
||||
@ -26,6 +25,8 @@ describe "brew search", :integration_test do
|
||||
end
|
||||
|
||||
it "falls back to a GitHub tap search when no formula is found", :needs_network, retry: 3 do
|
||||
setup_remote_tap "caskroom/cask"
|
||||
|
||||
expect { brew "search", "caskroom/cask/firefox" }
|
||||
.to output(/firefox/).to_stdout
|
||||
.and output(/Searching/).to_stderr
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "tmpdir"
|
||||
require "extend/pathname"
|
||||
require "install_renamed"
|
||||
|
||||
|
||||
@ -1,13 +1,3 @@
|
||||
require "find"
|
||||
require "pathname"
|
||||
require "rspec/its"
|
||||
require "rspec/wait"
|
||||
require "rspec/retry"
|
||||
require "rubocop"
|
||||
require "rubocop/rspec/support"
|
||||
require "set"
|
||||
require "support/no_seed_progress_formatter"
|
||||
|
||||
if ENV["HOMEBREW_TESTS_COVERAGE"]
|
||||
require "simplecov"
|
||||
|
||||
@ -17,12 +7,19 @@ if ENV["HOMEBREW_TESTS_COVERAGE"]
|
||||
end
|
||||
end
|
||||
|
||||
require "rspec/its"
|
||||
require "rspec/wait"
|
||||
require "rspec/retry"
|
||||
require "rubocop"
|
||||
require "rubocop/rspec/support"
|
||||
require "find"
|
||||
|
||||
$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_LIBRARY"]}/Homebrew"))
|
||||
$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_LIBRARY"]}/Homebrew/test/support/lib"))
|
||||
|
||||
require "global"
|
||||
require "tap"
|
||||
|
||||
require "test/support/no_seed_progress_formatter"
|
||||
require "test/support/helper/fixtures"
|
||||
require "test/support/helper/formula"
|
||||
require "test/support/helper/mktmpdir"
|
||||
|
||||
@ -2,9 +2,6 @@ unless ENV["HOMEBREW_BREW_FILE"]
|
||||
raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!"
|
||||
end
|
||||
|
||||
require "constants"
|
||||
|
||||
require "tmpdir"
|
||||
require "pathname"
|
||||
|
||||
HOMEBREW_BREW_FILE = Pathname.new(ENV["HOMEBREW_BREW_FILE"])
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "utils"
|
||||
|
||||
describe Tty do
|
||||
describe "::strip_ansi" do
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "utils"
|
||||
|
||||
describe "globally-scoped helper methods" do
|
||||
let(:dir) { mktmpdir }
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user