homebrew-core/Formula/nu.rb

54 lines
1.2 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Nu < Formula
homepage 'http://programming.nu'
2013-09-28 04:29:08 +00:00
url 'https://github.com/timburks/nu/archive/v2.1.1.tar.gz'
sha1 'ca0f9bbd5bbdb8528be516325f274d07d4be54bf'
2013-06-18 15:09:22 +00:00
depends_on :macos => :lion
depends_on 'pcre'
2013-02-03 18:51:20 +00:00
fails_with :llvm do
build 2336
cause 'nu only builds with clang'
end
fails_with :gcc do
build 5666
cause 'nu only builds with clang'
end
def install
ENV['PREFIX'] = prefix
inreplace "Nukefile" do |s|
s.gsub!('(SH "sudo ', '(SH "') # don't use sudo to install
s.gsub!('#{@destdir}/Library/Frameworks', '#{@prefix}/Frameworks')
s.sub! /^;; source files$/, <<-EOS
;; source files
2013-05-03 16:28:45 +00:00
(set @framework_install_path "#{frameworks}")
EOS
end
system "make"
system "./mininush", "tools/nuke"
bin.mkdir
lib.mkdir
include.mkdir
system "./mininush", "tools/nuke", "install"
end
def caveats
2013-12-09 19:44:45 +00:00
if self.installed? and File.exist? frameworks+"Nu.framework"
return <<-EOS.undent
Nu.framework was installed to:
2013-05-03 16:28:45 +00:00
#{frameworks}/Nu.framework
You may want to symlink this Framework to a standard OS X location,
such as:
2013-05-03 16:28:45 +00:00
ln -s "#{frameworks}/Nu.framework" /Library/Frameworks
EOS
end
return nil
end
end