aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/dmd.rb
diff options
context:
space:
mode:
authorMax Howell2009-07-23 04:12:36 +0100
committerMax Howell2009-07-23 04:12:36 +0100
commitff4e7e4768d8688b0ced9a86f401d007b072046b (patch)
tree0f8907c5baa5f7585cc64b1f1678b367c97bd856 /Library/Formula/dmd.rb
parenta85147df984fd6d17ea028c02841bd0fe7d23979 (diff)
downloadhomebrew-ff4e7e4768d8688b0ced9a86f401d007b072046b.tar.bz2
Update and improve dmd formula
Diffstat (limited to 'Library/Formula/dmd.rb')
-rw-r--r--Library/Formula/dmd.rb44
1 files changed, 18 insertions, 26 deletions
diff --git a/Library/Formula/dmd.rb b/Library/Formula/dmd.rb
index 7193343db..d4b9f1380 100644
--- a/Library/Formula/dmd.rb
+++ b/Library/Formula/dmd.rb
@@ -2,8 +2,8 @@ require 'brewkit'
class Dmd <Formula
@homepage='http://www.digitalmars.com/d/'
- @url='http://ftp.digitalmars.com/dmd.1.043.zip'
- @md5='6c83b7296cb84090a9ebc11ab0fb94a2'
+ @url='http://ftp.digitalmars.com/dmd.1.046.zip'
+ @md5='9ca82389e82e3f39185f999d7dda4617'
def doc
#use d and not dmd, rationale: meh
@@ -11,30 +11,22 @@ class Dmd <Formula
end
def install
- ohai "install"
- man.mkpath
-
- FileUtils.cp_r 'osx/bin', prefix
- FileUtils.cp_r 'osx/lib', prefix
- FileUtils.cp_r 'man/man1', man
- FileUtils.cp_r 'src', prefix
-
- #lol
- man5=man+'man5'
- man5.mkpath
- man5.install man+'man1'+'dmd.conf.5'
- #lol ends
-
- html=doc+'html'
- samples=doc+'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'
-
- # zip files suck
- FileUtils.chmod 0544, ['dmd','dumpobj','obj2asm'].collect{|x|"osx/bin/#{x}"}
+ ohai "Installing dmd"
+
+ # clean it up a little first
+ Dir['src/*.mak'].each {|f| File.unlink f}
+ FileUtils.mv 'license.txt', 'COPYING'
+ FileUtils.mv 'README.TXT', 'README'
+ FileUtils.mv 'src/phobos/phoboslicense.txt', 'src/phobos/COPYING.phobos'
+
+ prefix.install 'osx/lib'
+ prefix.install 'osx/bin'
+ prefix.install 'src'
+ man.install 'man/man1'
+
+ (prefix+'src'+'dmd').rmtree # we don't need the dmd sources thanks
+ (man+'man5').install man1+'dmd.conf.5' # oops
+ (prefix+'share'+'d'+'examples').install Dir['samples/d/*']
(prefix+'bin'+'dmd.conf').open('w') do |f|
f.puts "[Environment]"