From 90ea28f6ba430d70c59126c56fb11cdc041bedbe Mon Sep 17 00:00:00 2001 From: Max Howell Date: Tue, 11 Aug 2009 14:46:04 +0100 Subject: [PATCH] Remove MacPorts and Fink from the build environment Closes Homebrew/homebrew#13 --- Library/Homebrew/brewkit.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb index 92cd3b65b9..c8702c4b16 100644 --- a/Library/Homebrew/brewkit.rb +++ b/Library/Homebrew/brewkit.rb @@ -113,6 +113,14 @@ end ENV.extend HomebrewEnvExtension +# remove MacPorts and Fink from the PATH, this prevents issues like: +# http://github.com/mxcl/homebrew/issues/#issue/13 +paths=ENV['PATH'].split(':').reject do |p| + p.squeeze! '/' + p=~%r[^/opt/local] or p=~%r[^/sw] +end +ENV['PATH']=paths*':' + def inreplace(path, before, after) before=Regexp.escape before.to_s