mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Move extra stdenv setup to extended callback
This commit is contained in:
parent
eebc04ec9b
commit
d09e23c8b1
@ -14,7 +14,6 @@ module EnvActivation
|
|||||||
extend(Superenv)
|
extend(Superenv)
|
||||||
else
|
else
|
||||||
extend(HomebrewEnvExtension)
|
extend(HomebrewEnvExtension)
|
||||||
prepend 'PATH', "#{HOMEBREW_PREFIX}/bin", ':' unless ORIGINAL_PATHS.include? HOMEBREW_PREFIX/'bin'
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -27,6 +26,12 @@ module HomebrewEnvExtension
|
|||||||
FC_FLAG_VARS = %w{FCFLAGS FFLAGS}
|
FC_FLAG_VARS = %w{FCFLAGS FFLAGS}
|
||||||
DEFAULT_FLAGS = '-march=core2 -msse4'
|
DEFAULT_FLAGS = '-march=core2 -msse4'
|
||||||
|
|
||||||
|
def self.extended(base)
|
||||||
|
unless ORIGINAL_PATHS.include? HOMEBREW_PREFIX/'bin'
|
||||||
|
base.prepend_path 'PATH', "#{HOMEBREW_PREFIX}/bin"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def setup_build_environment
|
def setup_build_environment
|
||||||
# Clear CDPATH to avoid make issues that depend on changing directories
|
# Clear CDPATH to avoid make issues that depend on changing directories
|
||||||
delete('CDPATH')
|
delete('CDPATH')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user