Skip to content

Commit 511e304

Browse files
committed
neko 2.1.0
1 parent 410ff75 commit 511e304

File tree

1 file changed

+18
-33
lines changed

1 file changed

+18
-33
lines changed

Formula/neko.rb

+18-33
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
class Neko < Formula
22
desc "High-level, dynamically typed programming language"
33
homepage "http://nekovm.org"
4-
# revision includes recent parameterized build targets for mac. Use a :tag
5-
# on the next release
6-
url "https://github.com/HaxeFoundation/neko.git", :revision => "22c49a89b56b9f106d7162710102e9475227e882"
7-
version "2.0.0-22c49a8"
8-
revision 2
4+
url "http://nekovm.org/media/neko-2.1.0-src.tar.gz"
5+
sha256 "0c93d5fe96240510e2d1975ae0caa9dd8eadf70d916a868684f66a099a4acf96"
96

107
head "https://github.com/HaxeFoundation/neko.git"
118

@@ -16,38 +13,26 @@ class Neko < Formula
1613
sha256 "a45ce3f4eab713bea15f8b34045333462d3e6a971c10257b9789ffc8000951e2" => :mountain_lion
1714
end
1815

19-
head do
20-
depends_on "cmake" => :build
21-
depends_on "pkg-config" => :build
22-
depends_on "mbedtls"
23-
end
24-
16+
depends_on "cmake" => :build
17+
depends_on "pkg-config" => :build
18+
depends_on "mbedtls"
2519
depends_on "bdw-gc"
2620
depends_on "pcre"
2721
depends_on "openssl"
2822

29-
def install
30-
if build.head?
31-
# Let cmake download its own copy of MariaDBConnector during build and statically link it.
32-
# It is because there is no easy way to define we just need any one of mariadb, mariadb-connector-c,
33-
# mysql, and mysql-connector-c.
34-
system "cmake", ".", "-DSTATIC_DEPS=MariaDBConnector", "-DRUN_LDCONFIG=OFF", *std_cmake_args
35-
system "make", "install"
36-
else
37-
# Build requires targets to be built in specific order
38-
ENV.deparallelize
39-
system "make", "os=osx", "LIB_PREFIX=#{HOMEBREW_PREFIX}", "INSTALL_FLAGS="
40-
41-
include.install Dir["vm/neko*.h"]
42-
neko = lib/"neko"
43-
neko.install Dir["bin/*"]
23+
patch do
24+
# To workaround issue https://github.com/HaxeFoundation/neko/issues/130
25+
# It is a commit already applied to the upstream.
26+
url "https://github.com/HaxeFoundation/neko/commit/a8c71ad97faaccff6c6e9e09eba2d5efd022f8dc.patch"
27+
sha256 "7bbdbd38f64220aa11fd1725ae99ea53f2d36563249f1828d5452562e3ca9977"
28+
end
4429

45-
# Symlink into bin so libneko.dylib resolves correctly for custom prefix
46-
%w[neko nekoc nekoml nekotools].each do |file|
47-
bin.install_symlink neko/file
48-
end
49-
lib.install_symlink neko/"libneko.dylib"
50-
end
30+
def install
31+
# Let cmake download its own copy of MariaDBConnector during build and statically link it.
32+
# It is because there is no easy way to define we just need any one of mariadb, mariadb-connector-c,
33+
# mysql, and mysql-connector-c.
34+
system "cmake", ".", "-DSTATIC_DEPS=MariaDBConnector", "-DRELOCATABLE=OFF", "-DRUN_LDCONFIG=OFF", *std_cmake_args
35+
system "make", "install"
5136
end
5237

5338
def caveats
@@ -63,6 +48,6 @@ def caveats
6348

6449
test do
6550
ENV["NEKOPATH"] = "#{HOMEBREW_PREFIX}/lib/neko"
66-
system "#{bin}/neko", "#{HOMEBREW_PREFIX}/lib/neko/test.n"
51+
system "#{bin}/neko", "-version"
6752
end
6853
end

0 commit comments

Comments
 (0)