homebrew-core/Formula/dmd.rb

36 lines
983 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Dmd < Formula
homepage 'http://www.digitalmars.com/d/'
url 'http://cloud.github.com/downloads/D-Programming-Language/dmd/dmd.2.060.zip'
md5 '6cf237d16625bf37a757a413963fa999'
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
# clean it up a little first
rm Dir['src/*.mak']
mv 'license.txt', 'COPYING'
mv 'README.TXT', 'README'
2009-07-23 03:12:36 +00:00
prefix.install 'osx/bin', 'osx/lib', 'src'
2009-07-23 03:12:36 +00:00
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
2012-02-20 03:09:32 +00:00
# Rewrite the DFLAGS to point to the prefix.
# @adamv: this should not go into bin!
2012-02-20 03:09:32 +00:00
# But I'm too lazy to figure out how to fix right now.
rm bin+'dmd.conf'
(bin+'dmd.conf').write <<-EOS.undent
[Environment]
DFLAGS=-I#{prefix}/src/phobos -I#{prefix}/src/druntime/import
EOS
end
2011-03-10 05:11:03 +00:00
end