2013-06-07 15:42:52 +00:00
|
|
|
class Neko < Formula
|
2014-11-20 22:42:03 +00:00
|
|
|
homepage "http://nekovm.org"
|
2015-05-09 19:31:05 +00:00
|
|
|
# revision includes recent parameterized build targets for mac. Use a :tag
|
|
|
|
# on the next release
|
|
|
|
url "https://github.com/HaxeFoundation/neko.git", :revision => "22c49a89b56b9f106d7162710102e9475227e882"
|
|
|
|
version "2.0.0-22c49a8"
|
|
|
|
revision 2
|
2014-11-20 22:42:03 +00:00
|
|
|
|
2015-05-09 19:31:05 +00:00
|
|
|
head "https://github.com/HaxeFoundation/neko.git"
|
2013-06-07 15:42:52 +00:00
|
|
|
|
2014-03-04 14:56:20 +00:00
|
|
|
bottle do
|
2015-05-10 05:14:39 +00:00
|
|
|
sha256 "08e27a02801d60a36971ef04892c8737402d94611c8cce5e6abdfc0066f2d8ce" => :yosemite
|
|
|
|
sha256 "fd20435ab471a197439ef8b15bc22e20ed63e5bee586b0a64d811a8a178a4c3b" => :mavericks
|
|
|
|
sha256 "a45ce3f4eab713bea15f8b34045333462d3e6a971c10257b9789ffc8000951e2" => :mountain_lion
|
2014-03-04 14:56:20 +00:00
|
|
|
end
|
|
|
|
|
2014-11-20 22:42:03 +00:00
|
|
|
depends_on "bdw-gc"
|
|
|
|
depends_on "pcre"
|
|
|
|
depends_on "openssl"
|
2013-06-07 15:42:52 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
# Build requires targets to be built in specific order
|
|
|
|
ENV.deparallelize
|
|
|
|
system "make", "os=osx", "LIB_PREFIX=#{HOMEBREW_PREFIX}", "INSTALL_FLAGS="
|
|
|
|
|
2014-11-20 22:42:03 +00:00
|
|
|
include.install Dir["vm/neko*.h"]
|
|
|
|
neko = lib/"neko"
|
|
|
|
neko.install Dir["bin/*"]
|
2013-06-07 15:42:52 +00:00
|
|
|
|
|
|
|
# Symlink into bin so libneko.dylib resolves correctly for custom prefix
|
2013-08-12 23:47:48 +00:00
|
|
|
%w(neko nekoc nekoml nekotools).each do |file|
|
2014-03-26 22:27:10 +00:00
|
|
|
bin.install_symlink neko/file
|
2013-06-07 15:42:52 +00:00
|
|
|
end
|
2014-03-26 22:27:10 +00:00
|
|
|
lib.install_symlink neko/"libneko.dylib"
|
2013-06-07 15:42:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2013-08-12 23:47:48 +00:00
|
|
|
ENV["NEKOPATH"] = "#{HOMEBREW_PREFIX}/lib/neko"
|
2013-06-07 15:42:52 +00:00
|
|
|
system "#{bin}/neko", "#{HOMEBREW_PREFIX}/lib/neko/test.n"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
2014-11-20 22:42:03 +00:00
|
|
|
s = ""
|
|
|
|
if HOMEBREW_PREFIX.to_s != "/usr/local"
|
2013-06-07 15:42:52 +00:00
|
|
|
s << <<-EOS.undent
|
|
|
|
You must add the following line to your .bashrc or equivalent:
|
|
|
|
export NEKOPATH="#{HOMEBREW_PREFIX}/lib/neko"
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
s
|
|
|
|
end
|
|
|
|
end
|