Typecheck ENV extensions

This commit is contained in:
Douglas Eichelberger 2023-03-09 20:51:01 -08:00
parent 0b04b99e68
commit 76671ef555
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# typed: false # typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Stdenv module Stdenv
@ -7,7 +7,7 @@ module Stdenv
undef homebrew_extra_pkg_config_paths undef homebrew_extra_pkg_config_paths
def homebrew_extra_pkg_config_paths def homebrew_extra_pkg_config_paths
["#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}"] [Pathname("#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}")]
end end
def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false, def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false,

View File

@ -1,4 +1,4 @@
# typed: false # typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Superenv module Superenv
@ -29,7 +29,7 @@ module Superenv
# @private # @private
def homebrew_extra_pkg_config_paths def homebrew_extra_pkg_config_paths
["/usr/lib/pkgconfig", "#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}"] [Pathname("/usr/lib/pkgconfig"), Pathname("#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}")]
end end
# @private # @private
@ -68,7 +68,7 @@ module Superenv
end end
def homebrew_extra_cmake_library_paths def homebrew_extra_cmake_library_paths
["#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"] [Pathname("#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries")]
end end
def homebrew_extra_cmake_frameworks_paths def homebrew_extra_cmake_frameworks_paths
@ -96,7 +96,7 @@ module Superenv
end end
self["HOMEBREW_DEVELOPER_DIR"] = if is_xcode_sdk self["HOMEBREW_DEVELOPER_DIR"] = if is_xcode_sdk
MacOS::Xcode.prefix MacOS::Xcode.prefix.to_s
else else
MacOS::CLT::PKG_PATH MacOS::CLT::PKG_PATH
end end