| 
									
										
										
										
											2009-05-21 00:04:43 +01:00
										 |  |  | $:.unshift "#{File.dirname __FILE__}/../Cellar/homebrew" #rubysucks | 
					
						
							|  |  |  | require 'brewkit' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | homepage='http://www.digitalmars.com/d/' | 
					
						
							|  |  |  | url='http://ftp.digitalmars.com/dmd.1.043.zip' | 
					
						
							|  |  |  | md5='6c83b7296cb84090a9ebc11ab0fb94a2' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Formula.new(url, md5).brew do |prefix| | 
					
						
							| 
									
										
										
										
											2009-05-21 17:50:57 +01:00
										 |  |  |   ohai "make" | 
					
						
							| 
									
										
										
										
											2009-05-21 00:04:43 +01:00
										 |  |  |   prefix.mkpath | 
					
						
							|  |  |  |   FileUtils.cp_r 'osx/bin', prefix | 
					
						
							|  |  |  |   FileUtils.cp_r 'osx/lib', prefix | 
					
						
							|  |  |  |   FileUtils.cp_r 'man', prefix | 
					
						
							| 
									
										
										
										
											2009-05-21 01:22:43 +01:00
										 |  |  |   FileUtils.cp_r 'src', prefix | 
					
						
							| 
									
										
										
										
											2009-05-21 00:04:43 +01:00
										 |  |  |    | 
					
						
							|  |  |  |   share=prefix+'share'+'doc'+'d' | 
					
						
							|  |  |  |   html=share+'html' | 
					
						
							|  |  |  |   samples=share+'examples' #examples is the more typical directory name | 
					
						
							|  |  |  |   html.mkpath | 
					
						
							|  |  |  |   samples.mkpath | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  |   FileUtils.cp_r Dir['html/d/*'], html unless ARGV.include? '--no-html' | 
					
						
							|  |  |  |   FileUtils.cp_r Dir['samples/d/*'], samples unless ARGV.include? '--no-samples' | 
					
						
							| 
									
										
										
										
											2009-05-22 20:09:40 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |   # zip files suck | 
					
						
							|  |  |  |   Dir.chdir(prefix+'bin') { `chmod u+x dmd dumpobj obj2asm` } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-21 03:26:44 +01:00
										 |  |  |   nil | 
					
						
							| 
									
										
										
										
											2009-05-21 00:04:43 +01:00
										 |  |  | end |