diff options
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/config.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/extend/ENV/std.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/extend/ENV/super.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/test/lib/config.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/test/testing_env.rb | 2 |
5 files changed, 6 insertions, 4 deletions
diff --git a/Library/Homebrew/config.rb b/Library/Homebrew/config.rb index 6da8c481e..4a6ad2f2c 100644 --- a/Library/Homebrew/config.rb +++ b/Library/Homebrew/config.rb @@ -39,6 +39,7 @@ HOMEBREW_PREFIX = Pathname.new(ENV["HOMEBREW_PREFIX"]) HOMEBREW_REPOSITORY = Pathname.new(ENV["HOMEBREW_REPOSITORY"]) HOMEBREW_LIBRARY = Pathname.new(ENV["HOMEBREW_LIBRARY"]) +HOMEBREW_ENV_PATH = HOMEBREW_LIBRARY/"ENV" HOMEBREW_CONTRIB = HOMEBREW_REPOSITORY/"Library/Contributions" # Where we store built products diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb index 8bfc5ce57..b3b91dc47 100644 --- a/Library/Homebrew/extend/ENV/std.rb +++ b/Library/Homebrew/extend/ENV/std.rb @@ -77,7 +77,7 @@ module Stdenv paths = [] paths << "#{HOMEBREW_PREFIX}/lib/pkgconfig" paths << "#{HOMEBREW_PREFIX}/share/pkgconfig" - paths << "#{HOMEBREW_LIBRARY}/ENV/pkgconfig/#{MacOS.version}" + paths << "#{HOMEBREW_ENV_PATH}/pkgconfig/#{MacOS.version}" paths << "/usr/lib/pkgconfig" paths.select { |d| File.directory? d }.join(File::PATH_SEPARATOR) end diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index c2401602f..e4eb86cdf 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -28,7 +28,7 @@ module Superenv def self.bin return unless MacOS.has_apple_developer_tools? - bin = (HOMEBREW_REPOSITORY/"Library/ENV").subdirs.reject { |d| d.basename.to_s > MacOS::Xcode.version }.max + bin = HOMEBREW_ENV_PATH.subdirs.reject { |d| d.basename.to_s > MacOS::Xcode.version }.max bin.realpath unless bin.nil? end @@ -150,7 +150,7 @@ module Superenv end def determine_pkg_config_libdir - paths = %W[/usr/lib/pkgconfig #{HOMEBREW_LIBRARY}/ENV/pkgconfig/#{MacOS.version}] + paths = %W[/usr/lib/pkgconfig #{HOMEBREW_ENV_PATH}/pkgconfig/#{MacOS.version}] paths << "#{MacOS::X11.lib}/pkgconfig" << "#{MacOS::X11.share}/pkgconfig" if x11? paths.to_path_s end diff --git a/Library/Homebrew/test/lib/config.rb b/Library/Homebrew/test/lib/config.rb index cf9578544..f6e601d52 100644 --- a/Library/Homebrew/test/lib/config.rb +++ b/Library/Homebrew/test/lib/config.rb @@ -14,6 +14,7 @@ HOMEBREW_PREFIX = Pathname.new(TEST_TMPDIR).join("prefix") HOMEBREW_REPOSITORY = HOMEBREW_PREFIX HOMEBREW_LIBRARY = HOMEBREW_REPOSITORY+"Library" HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../..", __FILE__)) +HOMEBREW_ENV_PATH = HOMEBREW_LIBRARY_PATH.parent+"ENV" HOMEBREW_LOAD_PATH = [File.expand_path("..", __FILE__), HOMEBREW_LIBRARY_PATH].join(":") HOMEBREW_CACHE = HOMEBREW_PREFIX.parent+"cache" HOMEBREW_CACHE_FORMULA = HOMEBREW_PREFIX.parent+"formula_cache" diff --git a/Library/Homebrew/test/testing_env.rb b/Library/Homebrew/test/testing_env.rb index d0c1d500d..8b76dee2c 100644 --- a/Library/Homebrew/test/testing_env.rb +++ b/Library/Homebrew/test/testing_env.rb @@ -6,7 +6,7 @@ require "global" require "formulary" # Test environment setup -%w[ENV Formula].each { |d| HOMEBREW_LIBRARY.join(d).mkpath } +HOMEBREW_LIBRARY.join("Formula").mkpath %w[cache formula_cache cellar logs].each { |d| HOMEBREW_PREFIX.parent.join(d).mkpath } # Test fixtures and files can be found relative to this path |
