homebrew-core/Formula/neko.rb
2018-01-26 22:43:41 -08:00

47 lines
1.6 KiB
Ruby

class Neko < Formula
desc "High-level, dynamically typed programming language"
homepage "https://nekovm.org/"
url "https://github.com/HaxeFoundation/neko/archive/v2-2-0/neko-2.2.0.tar.gz"
sha256 "cf101ca05db6cb673504efe217d8ed7ab5638f30e12c5e3095f06fa0d43f64e3"
revision 2
head "https://github.com/HaxeFoundation/neko.git"
bottle do
sha256 "af1317a0a416bc1a2c32822c6a2965d62ae627fc40d9a8ee8a215e9166c96920" => :high_sierra
sha256 "70ed1acd9dfa544ece90921fc4de1fc40a1bc3bb7d09ed135b756969a3306877" => :sierra
sha256 "c6ae159a08e01fea004c7c271e70d7edb6eac7c6741509f8609a3e6aa44ff16f" => :el_capitan
end
depends_on "cmake" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "mbedtls"
depends_on "bdw-gc"
depends_on "pcre"
depends_on "openssl"
def install
# Let cmake download its own copy of MariaDBConnector during build and statically link it.
# It is because there is no easy way to define we just need any one of mariadb, mariadb-connector-c,
# mysql, and mysql-connector-c.
system "cmake", ".", "-G", "Ninja", "-DSTATIC_DEPS=MariaDBConnector",
"-DRELOCATABLE=OFF", "-DRUN_LDCONFIG=OFF", *std_cmake_args
system "ninja", "install"
end
def caveats
s = ""
if HOMEBREW_PREFIX.to_s != "/usr/local"
s << <<~EOS
You must add the following line to your .bashrc or equivalent:
export NEKOPATH="#{HOMEBREW_PREFIX}/lib/neko"
EOS
end
s
end
test do
ENV["NEKOPATH"] = "#{HOMEBREW_PREFIX}/lib/neko"
system "#{bin}/neko", "-version"
end
end