1
1
class Neko < Formula
2
2
desc "High-level, dynamically typed programming language"
3
3
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"
9
6
10
7
head "https://github.com/HaxeFoundation/neko.git"
11
8
@@ -16,38 +13,26 @@ class Neko < Formula
16
13
sha256 "a45ce3f4eab713bea15f8b34045333462d3e6a971c10257b9789ffc8000951e2" => :mountain_lion
17
14
end
18
15
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"
25
19
depends_on "bdw-gc"
26
20
depends_on "pcre"
27
21
depends_on "openssl"
28
22
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
44
29
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"
51
36
end
52
37
53
38
def caveats
@@ -63,6 +48,6 @@ def caveats
63
48
64
49
test do
65
50
ENV [ "NEKOPATH" ] = "#{ HOMEBREW_PREFIX } /lib/neko"
66
- system "#{ bin } /neko" , "#{ HOMEBREW_PREFIX } /lib/neko/test.n "
51
+ system "#{ bin } /neko" , "-version "
67
52
end
68
53
end
0 commit comments