aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/tree.rb
blob: 2380672c72279311f6d394c72e59dd6b794b80b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'formula'

class Tree < Formula
  url 'http://mama.indstate.edu/users/ice/tree/src/tree-1.6.0.tgz'
  homepage 'http://mama.indstate.edu/users/ice/tree/'
  md5 '04e967a3f4108d50cde3b4b0e89e970a'

  def install
    inreplace 'Makefile' do |s|
      s.change_make_var! 'prefix', prefix
      s.change_make_var! 'MANDIR', man1
      s.change_make_var! 'CC', ENV.cc
      s.change_make_var! 'CFLAGS', "#{ENV.cflags} -fomit-frame-pointer -no-cpp-precomp"
      s.remove_make_var! 'LDFLAGS'
      s.change_make_var! 'OBJS', 'tree.o unix.o html.o xml.o hash.o color.o strverscmp.o'
    end

    system "make"
    system "make install"
  end
end