aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/tree.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/tree.rb')
-rw-r--r--Library/Formula/tree.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/Library/Formula/tree.rb b/Library/Formula/tree.rb
index 2380672c7..de5e92cc8 100644
--- a/Library/Formula/tree.rb
+++ b/Library/Formula/tree.rb
@@ -1,21 +1,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/'
+ url 'http://mama.indstate.edu/users/ice/tree/src/tree-1.6.0.tgz'
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
+ ENV.append 'CFLAGS', '-fomit-frame-pointer'
+ ENV.append 'CFLAGS', '-no-cpp-precomp' unless ENV.compiler == :clang
+ objs = 'tree.o unix.o html.o xml.o hash.o color.o strverscmp.o'
- system "make"
- system "make install"
+ system "make", "prefix=#{prefix}",
+ "MANDIR=#{man1}",
+ "CC=#{ENV.cc}",
+ "CFLAGS=#{ENV.cflags}",
+ "LDFLAGS=#{ENV.ldflags}",
+ "OBJS=#{objs}",
+ "install"
end
end