aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorJack Nagel2012-12-23 19:44:56 -0600
committerJack Nagel2012-12-26 14:37:03 -0600
commitbb03a39ad88a367f2ad17c496038652610a8e3cc (patch)
tree03e678535764654bcf916ab98dba197a05ca91e2 /Library/Homebrew/extend
parent5639cc7f3803fe79e6385779040927c3f5b99730 (diff)
downloadhomebrew-bb03a39ad88a367f2ad17c496038652610a8e3cc.tar.bz2
Allow requirements to specify env options
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ENV.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index 668fd29bd..b3b8d26b3 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -431,6 +431,11 @@ class << ENV
append 'CPPFLAGS', "-DNCURSES_OPAQUE=0"
end
+ def userpaths!
+ paths = ORIGINAL_PATHS.map { |p| p.realpath.to_s rescue nil } - %w{/usr/X11/bin /opt/X11/bin}
+ self['PATH'] = paths.unshift(*self['PATH'].split(":")).uniq.join(":")
+ end
+
def fortran
fc_flag_vars = %w{FCFLAGS FFLAGS}