| 
									
										
										
										
											2011-03-18 10:30:26 -07:00
										 |  |  | ## Compatibility layer introduced in 0.8 (refactor) | 
					
						
							| 
									
										
										
										
											2010-09-11 20:22:54 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | # maybe never used by anyone, but alas it must continue to exist | 
					
						
							|  |  |  | def versions_of(keg_name) | 
					
						
							|  |  |  |   `/bin/ls #{HOMEBREW_CELLAR}/#{keg_name}`.collect { |version| version.strip }.reverse | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def dump_config | 
					
						
							|  |  |  |   require 'cmd/--config' | 
					
						
							|  |  |  |   Homebrew.__config | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def dump_build_env env | 
					
						
							|  |  |  |   require 'cmd/--env' | 
					
						
							|  |  |  |   Homebrew.dump_build_env env | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-16 02:46:46 +01:00
										 |  |  | def default_cc | 
					
						
							|  |  |  |   MacOS.default_cc | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-11 20:22:54 +01:00
										 |  |  | def gcc_42_build | 
					
						
							|  |  |  |   MacOS.gcc_42_build_version | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | alias :gcc_build :gcc_42_build | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def gcc_40_build | 
					
						
							|  |  |  |   MacOS.gcc_40_build_version | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def llvm_build | 
					
						
							|  |  |  |   MacOS.llvm_build_version | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def x11_installed? | 
					
						
							|  |  |  |   MacOS.x11_installed? | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def macports_or_fink_installed? | 
					
						
							|  |  |  |   MacOS.macports_or_fink_installed? | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def outdated_brews | 
					
						
							|  |  |  |   require 'cmd/outdated' | 
					
						
							|  |  |  |   Homebrew.outdated_brews | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def search_brews text | 
					
						
							|  |  |  |   require 'cmd/search' | 
					
						
							|  |  |  |   Homebrew.search_brews text | 
					
						
							|  |  |  | end | 
					
						
							| 
									
										
										
										
											2010-11-05 13:44:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-18 10:30:26 -07:00
										 |  |  | def snow_leopard_64? | 
					
						
							|  |  |  |   MacOS.prefer_64_bit? | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-05 13:44:24 +00:00
										 |  |  | class Formula | 
					
						
							|  |  |  |   # in compatability because the naming is somewhat confusing | 
					
						
							|  |  |  |   def self.resolve_alias name | 
					
						
							|  |  |  |     opoo 'Formula.resolve_alias is deprecated and will eventually be removed' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # Don't resolve paths or URLs | 
					
						
							|  |  |  |     return name if name.include?("/") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-31 11:00:15 -08:00
										 |  |  |     aka = HOMEBREW_REPOSITORY+"Library/Aliases"+name | 
					
						
							| 
									
										
										
										
											2010-11-05 13:44:24 +00:00
										 |  |  |     if aka.file? | 
					
						
							|  |  |  |       aka.realpath.basename('.rb').to_s | 
					
						
							|  |  |  |     else | 
					
						
							|  |  |  |       name | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							| 
									
										
										
										
											2011-03-21 14:23:28 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   # This used to be called in "def install", but should now be used | 
					
						
							|  |  |  |   # up in the DSL section. | 
					
						
							|  |  |  |   def fails_with_llvm msg=nil, data=nil | 
					
						
							|  |  |  |     handle_llvm_failure FailsWithLLVM.new(msg, data) | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-05 13:44:24 +00:00
										 |  |  | end |