| 
									
										
										
										
											2009-10-15 12:36:09 +01:00
										 |  |  | require 'extend/pathname' | 
					
						
							|  |  |  | require 'extend/ARGV' | 
					
						
							| 
									
										
										
										
											2010-02-27 17:26:27 +00:00
										 |  |  | require 'extend/string' | 
					
						
							| 
									
										
										
										
											2009-09-04 15:28:18 +01:00
										 |  |  | require 'utils' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-15 12:36:09 +01:00
										 |  |  | ARGV.extend(HomebrewArgvExtension) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-08 15:55:30 -08:00
										 |  |  | HOMEBREW_VERSION = 0.6
 | 
					
						
							| 
									
										
										
										
											2010-04-06 08:29:33 -07:00
										 |  |  | HOMEBREW_WWW = 'http://mxcl.github.com/homebrew/' | 
					
						
							| 
									
										
										
										
											2009-10-15 12:36:09 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-04 15:28:18 +01:00
										 |  |  | if Process.uid == 0
 | 
					
						
							|  |  |  |   # technically this is not the correct place, this cache is for *all users* | 
					
						
							|  |  |  |   # so in that case, maybe we should always use it, root or not? | 
					
						
							|  |  |  |   HOMEBREW_CACHE=Pathname.new("/Library/Caches/Homebrew") | 
					
						
							|  |  |  | else | 
					
						
							|  |  |  |   HOMEBREW_CACHE=Pathname.new("~/Library/Caches/Homebrew").expand_path | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-07 18:09:48 +00:00
										 |  |  | if not defined? HOMEBREW_BREW_FILE | 
					
						
							| 
									
										
										
										
											2009-11-18 15:39:51 -08:00
										 |  |  |   HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] || `which brew`.chomp | 
					
						
							| 
									
										
										
										
											2009-11-07 18:09:48 +00:00
										 |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-07 18:08:26 +00:00
										 |  |  | HOMEBREW_PREFIX = Pathname.new(HOMEBREW_BREW_FILE).dirname.parent # Where we link under | 
					
						
							|  |  |  | HOMEBREW_REPOSITORY = Pathname.new(HOMEBREW_BREW_FILE).realpath.dirname.parent # Where .git is found | 
					
						
							| 
									
										
										
										
											2009-10-27 13:27:36 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-29 13:53:57 -07:00
										 |  |  | # Where we store built products; /usr/local/Cellar if it exists, | 
					
						
							|  |  |  | # otherwise a Cellar relative to the Repository. | 
					
						
							| 
									
										
										
										
											2009-10-27 13:27:36 -07:00
										 |  |  | if (HOMEBREW_PREFIX+'Cellar').exist? | 
					
						
							|  |  |  |   HOMEBREW_CELLAR = HOMEBREW_PREFIX+'Cellar' | 
					
						
							|  |  |  | else | 
					
						
							|  |  |  |   HOMEBREW_CELLAR = HOMEBREW_REPOSITORY+'Cellar' | 
					
						
							|  |  |  | end | 
					
						
							| 
									
										
										
										
											2009-09-30 02:36:21 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-16 11:28:50 +01:00
										 |  |  | MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp | 
					
						
							|  |  |  | MACOS_VERSION = /(10\.\d+)(\.\d+)?/.match(MACOS_FULL_VERSION).captures.first.to_f | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | HOMEBREW_USER_AGENT = "Homebrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}; Mac OS X #{MACOS_FULL_VERSION})" | 
					
						
							| 
									
										
										
										
											2009-11-05 21:37:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-21 09:40:28 -07:00
										 |  |  | RECOMMENDED_LLVM = 2207
 | 
					
						
							| 
									
										
										
										
											2010-03-16 20:58:12 -07:00
										 |  |  | RECOMMENDED_GCC_40 = 5493
 | 
					
						
							| 
									
										
										
										
											2010-07-21 09:40:28 -07:00
										 |  |  | RECOMMENDED_GCC_42 = (MACOS_VERSION >= 10.6) ? 5659 : 5577
 |