2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Dmd < Formula
|
2010-08-16 23:24:11 +00:00
|
|
|
homepage 'http://www.digitalmars.com/d/'
|
2011-12-27 23:02:34 +00:00
|
|
|
url 'https://github.com/downloads/D-Programming-Language/dmd/dmd.2.057.zip'
|
|
|
|
md5 '531c4b60eb002ea8abbe5c80b2eb677d'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
|
|
|
def doc
|
|
|
|
#use d and not dmd, rationale: meh
|
2010-06-04 18:56:52 +00:00
|
|
|
prefix+'share/doc/d'
|
2009-06-04 18:21:19 +00:00
|
|
|
end
|
2009-06-26 11:58:32 +00:00
|
|
|
|
2009-06-04 18:21:19 +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}
|
2010-04-07 05:58:35 +00:00
|
|
|
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
|
2010-04-07 05:58:35 +00:00
|
|
|
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|
|
2009-06-04 18:21:19 +00:00
|
|
|
f.puts "[Environment]"
|
2011-01-12 14:35:18 +00:00
|
|
|
f.puts "DFLAGS=-I#{prefix}/src/phobos -I#{prefix}/src/druntime/import"
|
2009-06-04 18:21:19 +00:00
|
|
|
end
|
|
|
|
end
|
2011-03-10 05:11:03 +00:00
|
|
|
end
|