File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ class Neo < Formula
2+ desc "Simulates the digital rain from \" The Matrix\" "
3+ homepage "https://github.com/st3w/neo"
4+ url "https://github.com/st3w/neo/releases/download/v0.6.1/neo-0.6.1.tar.gz"
5+ sha256 "a55e4ed5efd0a4af248d16018a7aaad3b617ef1d3ac05d292a258a38aaf46a79"
6+ license "GPL-3.0-or-later"
7+
8+ depends_on "autoconf" => :build
9+ depends_on "automake" => :build
10+
11+ uses_from_macos "ncurses"
12+
13+ def install
14+ if OS . mac?
15+ ncurses_include = MacOS . sdk_path_if_needed ? "#{ MacOS . sdk_path_if_needed } /usr/include" : "/usr/include"
16+ ncurses_lib = MacOS . sdk_path_if_needed ? "#{ MacOS . sdk_path_if_needed } /usr/lib" : "/usr/lib"
17+ ENV . append "LDFLAGS" , "-L#{ ncurses_lib } "
18+ ENV . append "CPPFLAGS" , "-I#{ ncurses_include } "
19+ else
20+ ncurses = Formula [ "ncurses" ]
21+ ENV . append "LDFLAGS" , "-L#{ ncurses . opt_lib } "
22+ ENV . append "CPPFLAGS" , "-I#{ ncurses . opt_include } "
23+ end
24+
25+ inreplace "configure.ac" , "ncursesw" , "ncurses"
26+ system "autoreconf" , "-fvi"
27+ system "./configure" , *std_configure_args
28+ system "make"
29+ system "make" , "install"
30+ end
31+
32+ test do
33+ assert_match version . to_s , shell_output ( "#{ bin } /neo -V" )
34+ end
35+ end
You can’t perform that action at this time.
0 commit comments