diff options
| author | Kevin Ballard | 2010-08-06 15:24:20 -0700 |
|---|---|---|
| committer | David Höppner | 2010-08-09 12:22:38 +0200 |
| commit | b0af8f127ad11c0b7cda28ef9ad784b4316fb6aa (patch) | |
| tree | 94f02ab46d56b0b65e78eedded1b437b9f18aaf8 /Library | |
| parent | 6ed4930d4b488a3d016974f820e486e5d38e009c (diff) | |
| download | homebrew-b0af8f127ad11c0b7cda28ef9ad784b4316fb6aa.tar.bz2 | |
New formula: nu
Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: David Höppner <0xffea@gmail.com>
* remove aka
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/nu.rb | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Library/Formula/nu.rb b/Library/Formula/nu.rb new file mode 100644 index 000000000..4893d2af3 --- /dev/null +++ b/Library/Formula/nu.rb @@ -0,0 +1,53 @@ +require 'formula' + +class Nu <Formula + url 'http://programming.nu/releases/Nu-0.4.0.tgz' + homepage 'http://programming.nu' + md5 '94d181e94cd661569103290183e89477' + + depends_on 'pcre' + + def install + ENV['PREFIX']="#{prefix}" + inreplace "Makefile" do |s| + cflags = s.get_make_var "CFLAGS" + s.change_make_var! "CFLAGS", "#{cflags} #{ENV["CPPFLAGS"]}" + end + inreplace "Nukefile" do |s| + case Hardware.cpu_type + when :intel + arch = :i386 + when :ppc + arch = :ppc + end + arch = :x86_64 if arch == :i386 && Hardware.is_64_bit? + s.sub!(/^;;\(set @arch '\("i386"\)\)$/, "(set @arch '(\"#{arch}\"))") unless arch.nil? + s.gsub!('(SH "sudo ', '(SH "') # don't use sudo to install + s.gsub!('#{@destdir}/Library/Frameworks', '#{@prefix}/Library/Frameworks') + s.sub! /^;; source files$/, <<-EOS +;; source files +(set @framework_install_path "#{prefix}/Library/Frameworks") +EOS + end + system "make" + system "./mininush", "tools/nuke" + bin.mkdir + lib.mkdir + include.mkdir + system "./mininush", "tools/nuke", "install" + end + + def caveats + if self.installed? and File.exists? prefix+"Library/Frameworks/Nu.framework" + return <<-EOS.undent + Nu.framework was installed to: + #{prefix}/Library/Frameworks/Nu.framework + + You may want to symlink this Framework to a standard OS X location, + such as: + ln -s "#{prefix}/Library/Frameworks/Nu.framework" /Library/Frameworks + EOS + end + return nil + end +end |
