ENV/shared: specify which Perl version we want to use
This commit is contained in:
parent
19af1ff2ea
commit
1e567161d1
@ -50,6 +50,7 @@ module SharedEnvExtension
|
||||
reset
|
||||
end
|
||||
private :setup_build_environment
|
||||
alias generic_shared_setup_build_environment setup_build_environment
|
||||
|
||||
sig { void }
|
||||
def reset
|
||||
|
||||
@ -4,6 +4,16 @@
|
||||
module SharedEnvExtension
|
||||
extend T::Sig
|
||||
|
||||
def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false)
|
||||
generic_shared_setup_build_environment(
|
||||
formula: formula, cc: cc, build_bottle: build_bottle,
|
||||
bottle_arch: bottle_arch, testing_formula: testing_formula
|
||||
)
|
||||
|
||||
# Normalise the system Perl version used, where multiple may be available
|
||||
self["VERSIONER_PERL_VERSION"] = MacOS.preferred_perl_version
|
||||
end
|
||||
|
||||
sig { returns(T::Boolean) }
|
||||
def no_weak_imports_support?
|
||||
return false unless compiler == :clang
|
||||
|
||||
@ -60,6 +60,17 @@ module OS
|
||||
version >= "12"
|
||||
end
|
||||
|
||||
sig { returns(String) }
|
||||
def preferred_perl_version
|
||||
if version >= :big_sur
|
||||
"5.30"
|
||||
elsif version == :catalina
|
||||
"5.28"
|
||||
else
|
||||
"5.18"
|
||||
end
|
||||
end
|
||||
|
||||
def languages
|
||||
return @languages if @languages
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user