48 lines
1.6 KiB
Ruby
48 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 3
|
|
head "https://github.com/HaxeFoundation/neko.git"
|
|
|
|
bottle do
|
|
sha256 "d2cc6078ee557511a9b942a11235f6f1de35bb0b4a192e3bdf2c06225a1739fa" => :high_sierra
|
|
sha256 "87da62afced4e6a0b68669069752ff4e960618e4e8d243cc3bfef648cbbc3a23" => :sierra
|
|
sha256 "ef18bc7d2dadb87582ea22cec0d64ee272f8570cde1157700ce88fd3a4631002" => :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
|