aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/tree.rb
blob: c56dec92202d2a5d96c071bd0fe95cb8b2352113 (plain)
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
require 'formula'

class Tree < Formula
  homepage 'http://mama.indstate.edu/users/ice/tree/'
  url 'http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz'
  sha1 '35bd212606e6c5d60f4d5062f4a59bb7b7b25949'

  bottle do
    cellar :any
    sha1 "d2e9699fce73145917f2b15f7f932765a47e1be6" => :mavericks
    sha1 "7bdbb4ca0cc98d12c7fae1926c654786600beb0d" => :mountain_lion
    sha1 "c92ed70a7a7d15f7ce5ee75a6851b59de11cf431" => :lion
  end

  def install
    ENV.append 'CFLAGS', '-fomit-frame-pointer'
    objs = 'tree.o unix.o html.o xml.o hash.o color.o strverscmp.o json.o'

    system "make", "prefix=#{prefix}",
                   "MANDIR=#{man1}",
                   "CC=#{ENV.cc}",
                   "CFLAGS=#{ENV.cflags}",
                   "LDFLAGS=#{ENV.ldflags}",
                   "OBJS=#{objs}",
                   "install"
  end

  test do
    system "#{bin}/tree", prefix
  end
end