forked from keitheis/homebrew-dupes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nano.rb
46 lines (40 loc) · 1.56 KB
/
nano.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
class Nano < Formula
desc "Free (GNU) replacement for the Pico text editor"
homepage "http://www.nano-editor.org/"
url "http://www.nano-editor.org/dist/v2.5/nano-2.5.3.tar.gz"
mirror "ftp://ftp.gnu.org/pub/gnu/nano/nano-2.5.3.tar.gz"
sha256 "b2b060129b9feff2d4870d803a441178c96531de9aed144ec0b83bd63ccb12ee"
bottle do
cellar :any
sha256 "6ab6a181b86ffe0863c73396ac48811f54dd738844a6da1ef52b36e1c5db192d" => :el_capitan
sha256 "235dbaf011a3de72a7fcc6a3cd53eee7c72b3b62c4cfb462518c7b06d6a27cea" => :yosemite
sha256 "d580b484b84970848c70b26c1be2ec03f61c9b43bc0bcfde7cf5b560a9bc21af" => :mavericks
end
head do
url "svn://svn.sv.gnu.org/nano/trunk/nano"
depends_on "automake" => :build
depends_on "autoconf" => :build
end
depends_on "pkg-config" => :build
depends_on "gettext"
depends_on "homebrew/dupes/ncurses"
def install
# Otherwise SIGWINCH will not be defined
ENV.append_to_cflags "-U_XOPEN_SOURCE" if MacOS.version < :leopard
system "./autogen.sh" if build.head?
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--sysconfdir=#{etc}",
"--enable-color",
"--enable-extra",
"--enable-multibuffer",
"--enable-nanorc",
"--disable-nls",
"--enable-utf8"
system "make", "install"
end
test do
system "#{bin}/nano", "--version"
end
end