homebrew-core/Formula/dmd.rb

36 lines
918 B
Ruby
Raw Normal View History

require 'formula'
class Dmd <Formula
homepage 'http://www.digitalmars.com/d/'
url 'http://ftp.digitalmars.com/dmd.1.065.zip'
md5 '10e39569dee0ea6c95806b370f837bc7'
def doc
#use d and not dmd, rationale: meh
2010-06-04 18:56:52 +00:00
prefix+'share/doc/d'
end
2009-06-26 11:58:32 +00:00
def install
2009-07-23 03:12:36 +00:00
ohai "Installing dmd"
# clean it up a little first
Dir['src/*.mak'].each {|f| File.unlink f}
mv 'license.txt', 'COPYING'
mv 'README.TXT', 'README'
mv 'src/phobos/phoboslicense.txt', 'src/phobos/COPYING.phobos'
2009-07-23 03:12:36 +00:00
prefix.install 'osx/lib'
prefix.install 'osx/bin'
prefix.install 'src'
man.install 'man/man1'
2010-06-04 18:56:52 +00:00
(prefix+'src/dmd').rmtree # we don't need the dmd sources thanks
man5.install man1+'dmd.conf.5' # oops
2010-08-08 17:20:15 +00:00
(share+'d/examples').install Dir['samples/d/*.d']
2009-06-26 11:58:32 +00:00
2010-08-08 17:20:15 +00:00
(bin+'dmd.conf').open('w') do |f|
f.puts "[Environment]"
2010-08-08 17:20:15 +00:00
f.puts "DFLAGS=-I#{prefix}/src/phobos -L#{lib}"
end
end
end