From 310770c980ddfdcc8fbd391c017961a6b437f55b Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Thu, 17 Dec 2009 12:42:26 -0800 Subject: Update dtach to use new inreplace. --- Library/Formula/dtach.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'Library') diff --git a/Library/Formula/dtach.rb b/Library/Formula/dtach.rb index a76c3c2e1..fdc5d7c32 100644 --- a/Library/Formula/dtach.rb +++ b/Library/Formula/dtach.rb @@ -2,20 +2,19 @@ require 'formula' class Dtach instead of #include "config.h" - # so it needs . in the include path. + # Includes instead of "config.h", so "." needs to be in the include path. ENV.append "CFLAGS", "-I." - - # Use our own flags, thanks. - inreplace "Makefile", /^CC = .*$/, "" - inreplace "Makefile", /^CFLAGS = .*$/, "" - inreplace "Makefile", /^LIBS = .*$/, "" + + inreplace "Makefile" do |f| + # Use our own flags, thanks. + %w[CC CFLAGS LIBS].each { |flag| f.gsub_make_var! flag, "" } + end system "make" bin.install "dtach" -- cgit v1.2.3